Closed matzehuels closed 5 years ago
Does the camera need root access ? By default, the RGBMatrix construction will drop privileges to nobody/nobody. If you want to stay root, make sure to set the change the runtime options to not drop root privileges.
In the c++ header you see the description of the Runtime struct. You have to set the right value in Python.
did you get it to work ?
Hello,
I am working on this project as well and I came across is exact same issue. I did try your suggestion, but it did not work for me.
This might be an issue that has not been well documented yet, but I've tried various things fix it, including: https://raspberrypi.stackexchange.com/questions/19436/how-can-i-permanently-fix-dev-vchiq-permission-errors
I ran this exact code in my setup, and tested each line. It turns out, that the line "matrix = RGBMatrix(options = options)" was the line that's the problem, but I have no idea why. (Obviously, without it the matrix functions wouldn't work so those were commented out as well. But the "matrix = RGBMatrix(options = options)" line alone should have still executed).
I played around with all the possibilities of where I could put that line, But I'd either get the same error, or the program would get completely stuck.
Is it possible that the GPIO pin of the camera and rgb-matrix could be conflicting with each other, thus not allowing access to the camera?
So did you try the --led-no-drop-privs
option as suggested above ?
Thanks for your reply! Yes sir, I did. Unfortunately, with no luck.
On Sun, Dec 9, 2018 at 5:06 PM Henner Zeller notifications@github.com wrote:
So did you try the --led-no-drop-privs option as suggested above ?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/hzeller/rpi-rgb-led-matrix/issues/714#issuecomment-445576262, or mute the thread https://github.com/notifications/unsubscribe-auth/Ao1Y3fgpVW1eElOPZjwaJixWRGsTFlTWks5u3YlUgaJpZM4YPe9b .
so your camera probably uses some of the functionality the matrix uses as well. If it is the hardware pulse generator, try --led-no-hardware-pulse
.
Sorry for getting back to this with delay. I got it running by not dropping the Sudo rights as hzeller suggested. Also remember to actually run the process as sudo!
Hi! Turns out I completely misread hzeller's original response as manually entering into the command line, not actually setting the value in the code. Thanks again!
Well, how about that, that was my problem too @hzeller , can't believe I didn't find this bug. In my case I had to add ropt.drop_privileges = -1; before RGBMatrix *rgbmatrix = rgb_matrix::CreateMatrixFromOptions(defaults, ropt); this allows the picam to still work after the RGBMatrix is initialized.
I am struggling with a project that I am working on currently. Essentially, I want to capture an image using picamera (see https://github.com/waveform80/picamera) and then display it on an RGB LED-matrix. It seems, somehow both packages cant work together and I can not really figure out why and how to fix this issue.
When I run the minimal example below, I get an error saying "* failed to open vchiq instance"