Libcamera-still quits immediately: LibEGL DRI2 failed to authenticate on Pi B0264 camera

Hi, I’ve got a B0264 2MP stereo camera (dual OV2311 monochrome modules) on a Raspberry Pi running a fresh Raspberry Pi OS install, and I can’t capture anything with it. Every time I run libcamera-still it just quits immediately. The first thing it prints is:

LibEGL warning: DRI2: failed to authenticate

I followed the usual steps for the driver and libcamera tools:

./install_pivariety_pkgs.sh -p kernel_driver
./install_pivariety_pkgs.sh -p libcamera_dev
./install_pivariety_pkgs.sh -p libcamera_apps

The driver looks loaded, firmware version reports 0x10003, /dev/video0 is present, and v4l2-ctl --list-formats-ext shows formats [0] - [45]. So from my side everything looks ok, but the command still won’t run. Running:

libcamera-still -t 5000 -o test.jpg

just dies with that LibEGL warning. I attached the full error output as dialog.txt: https://cdn.arducam.com/forum/9f93a93734c82546922494b9066fdc80/dialog.txt

Any idea what’s going on? This is a replacement camera so I was kind of expecting it to just work.

Thanks for the details, that’s a good writeup. Couple of things to pin down first:

  1. Which Raspberry Pi are you using (Pi 3, Pi 4, Zero, etc.)?
  2. After that LibEGL line, is there any more output at all, or does it just stop there?

The “LibEGL warning: DRI2: failed to authenticate” is almost always about the graphical/mesa acceleration path (Glamor) not being enabled on the board. If Glamor is off, EGL can’t authenticate and the libcamera apps bail out immediately, which matches what you’re seeing. Let me know the board model and we’ll point you at the right fix.

It’s a Pi 3. Yeah, the LibEGL line is basically the first thing and then it just stops, nothing else useful in the console. I attached the whole log as dialog.txt if that helps. The camera is brand new, it’s a B0264 2MP stereo with dual OV2311 monochrome modules. Formats all show up fine in v4l2-ctl, so the sensor side seems happy.

That lines up with what I expected. On the Pi 3 the fix is to enable Glamor so the graphical/mesa acceleration is available for EGL. Here’s the sequence:

sudo raspi-config

Then navigate:
→ 6. Advanced Options
→ A8 Glamor
→ enable it

After that, reboot the Pi, then try accessing the camera again with a libcamera command, e.g.:

libcamera-still -t 5000 -o test.jpg

That should get you past the DRI2 authentication error. Give it a try and let us know how it goes.

That did it! Enabled Glamor, rebooted, and now the camera produces a proper stereo image. Thanks a lot. Next I want to use it for some photogrammetry work, so I’m sure I’ll be back with more questions.

Great to hear it’s working now. For photogrammetry just keep in mind both captures come off the same stereo module, so make sure your frames are handled consistently. Post here if anything else comes up.

New question, different problem. The camera is producing good imagery now, but I need to focus it on a much closer object than it’s currently set for, and the lens focus movement appears to be cemented in place. I can’t turn the lens barrel at all.

How do I loosen the lens barrel so I can refocus it? And do you know what kind of cement was used on the lens focus movement? I’d like to know what I’m dealing with before I try anything, so I don’t wreck the lens.

For this module the lens focus is set and locked at the factory, so the barrel isn’t meant to be user-adjusted, and that’s why it won’t move.

The focus on the barrel threads is typically secured with a small amount of thread-locking/UV-style adhesive. If you really need a closer focus, the usual DIY approach is to warm the barrel gently (don’t overdo it) and use a proper lens spanner or a grippy rubber tool to slowly break the bond on the threads, then re-lock the focus afterwards so it doesn’t drift. Be cautious: too much heat or force can crack the barrel or shift sensor alignment, and once it’s re-cemented it should stay put.

So to summarize where we are: the original capture failure is resolved by enabling Glamor on the Pi 3 (raspi-config → 6. Advanced Options → A8 Glamor, then reboot), and the current focus issue is because the barrel is cemented from the factory with thread-lock adhesive and there’s no official procedure to change focus. If you want to try the DIY route, let me know and I can walk you through the safer steps in more detail.