Closed felixloftus closed 3 years ago
It's evidently trying to show a DRM-based preview window, rather than an EGL one, and failing in the process. Can you say a bit more about your setup? (for what it's worth, the camera itself seems to be working fine)
Thanks!
Hi, thanks for your response.
I'm running a pi4 with 2GB RAM
I have a screen attached. It is the Adafruit PiTFT running as a FBCP, attached to the GPIO pins.
I'm unsure if I'm running X-Windows. I've just looked this up but I'm a bit unsure how to check this
I'm controlling the pi via SSH
I'm using Terminal on a Mac
I tried out your final suggestion and I get the same error with the V2 module. It isn't working, so I guess the problem might be something to do with the screen. I'm happy to uninstall the drivers if you think that's worth trying
Also, I'm not sure if this will help but I also returned to raspivid and raspicam by commenting out the dtoverlay line in /boot/config.txt - both of these worked fine
Thanks so much for your help
So it sounds to me like the problem is that you're logged in remotely via ssh and can't open the display. And from the error message I would guess you're running X, otherwise I think the DRM window would have worked.
Assuming you're logged in as the same user as the Pi dekstop (user "pi" by default), then I believe you should have permissions to open an X window on the main display. Go to the folder contiaining the applications and try typing this: DISPLAY=:0 ./libcamera-hello
.
Some observations on this:
xhost +
to get round them (you'll probably have to do that from the Pi itself, not an ssh login), but be aware that you're opening a security hole with that.Thank you very much for all this advice. For the time being, I've returned to the standard raspicam but I'll try some of these fixes when I have more time!
Thanks for letting us know! I'll close the issue at this point, but please submit a new one if you come back to this and need further help.
Hi, I've previously used libcam with a V2 camera module on my rpi4. I've just changed to a HQ camera module and am struggling. Initially I got a couple of images working but now I always get this error:
I'm a bit lost as to whats going wrong. Any help would be appreciated