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

Greenonline
  • 2,969
  • 5
  • 27
  • 38
Simon Banks
  • 610
  • 1
  • 7
  • 15

1 Answers1

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.

Greenonline
  • 2,969
  • 5
  • 27
  • 38
Simon Banks
  • 610
  • 1
  • 7
  • 15