I'm running Arch Linux ARM on my RPi 1B. I'm trying to pipe raspividyuv's output to a program that I've written and it seems that I can't run raspividyuv without root privileges.

raspivid works fine without preceding it with sudo:

❯ /opt/vc/bin/raspivid -w 640 -h 480 -o - -t 0 -n

prints data to stdout as expected.

But when I run

❯ /opt/vc/bin/raspividyuv -w 640 -h 480 -o - -t 0 -n

I get

usrvcsm: [vcsm_malloc_cache]: [757] [mmal_vc_port buffer]: NULL size or invalid device!
usrvcsm: [vcsm_vc_hdl_from_hdl]: [757]: invalid device or handle!
usrvcsm: [vcsm_lock]: [757]: invalid device or invalid handle!
mmal: mmal_vc_shm_alloc: could not allocate 460800 bytes of shared memory (handle 0)
mmal: mmal_vc_port_payload_alloc: vc.ril.camera:out:1(I420): failed to 
allocate 460800 bytes of shared memory
mmal: mmal_pool_initialise_buffer_headers: failed to allocate payload 0/3
mmal: Failed to create buffer header pool for camera still port vc.ril.camera:out:2(OPQV)
fish: '/opt/vc/bin/raspividyuv -w 64...' terminated by signal SIGSEGV (Address boundary error)

and I don't really understand why the memory couldn't be allocated in this case.

However, running

❯ sudo /opt/vc/bin/raspividyuv -w 640 -h 480 -o - -t 0 -n

dumps expected data to stdout.

Any ideas why raspividyuv behaves like that and how to fix it?

2 Answers 2


I managed to fix this problem. It turned out to be connected to insufficient access permissions.

In short, I created the following udev rule for /dev/vcsm:

SUBSYSTEM=="vc-sm", MODE="0777"

If you are interested in more details I've written a short blog post about solving this issue.


If you add your account to the video group you won't need sudo

  • Add more detail to your answer, so that its more useful than a comment. Also how does this answer the question?
    – Vincent P
    Jul 12, 2018 at 15:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.