4

I've two Raspberry PI V2 cameras connected to my Raspberry Pi compute module 4 carrier.

The OS is (64bit) Bullseye 11

kernel is 5.15.76-v8+ libcamera-apps build: 9c5d3191b3f4 02-12-2022 (20:10:40) libcamera build: v0.0.2+47-0684c373 

The issue is when I attempt to run libcamera-hello as non-root user I get an error message "Could not open any dmaHeap device". The same command run as root works as expected.

/dev/media0 has the permissions:-

crw-rw---- 1 root video 237, 0 Feb 15 14:45 /dev/media0 

And the non-priviledged user I'm using is in the 'video' group

1 Answer 1

4

Interesting little glitch in the setup on the dma_heap device which is only has permission for the root user.

The fix which I've just confirmed is to create a new file and add the following configuration.

/etc/udev/rules.d/raspberrypi.rules:

SUBSYSTEM=="dma_heap", GROUP="video", MODE="0660" 

Once that file has been created either reboot or run:-

udevadm control --reload-rules && udevadm trigger 

As long as your non-priviledged user is in the 'video' group then libcamera will not produce the dma_heap error message.

2
  • 1
    Thanks, that worked for me on Bookworm, 6.6.51+rpt-rpi-v8. /dev/dma_heap/system ownership is root:root by default. Commented Dec 19, 2024 at 10:07
  • Please mark this as the accepted answer. Commented Apr 18 at 22:57

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.