I’m having a weird issue with my Arducam 16MP Autofocus camera (IMX519). Autofocus just stopped working after a reboot. The lens doesn’t physically move at all anymore, it’s stuck at one focus position. Before this it was working fine on my Pi Zero 2 with libcamera-hello, libcamera-still and libcamera-vid. Focus would shift back and forth before capture, but now nothing moves.
I’ve reproduced the same thing on a Pi 4 as well, so I don’t think it’s the Zero 2.
Thanks for the report. We’re still investigating the root cause for this one. Can you turn on RPiAf autofocus debug logging and run a 10 second capture so we can see what the AF algorithm is doing?
Run:
export LIBCAMERA_LOG_LEVELS=RPiAf:0
Then:
libcamera-hello -t 10000
Let it run for about 10 seconds and paste the terminal output here.
Here’s some more environment info and what I’ve tried so far.
Environment:
Pi Zero 2 and Pi 4 B 2GB, Bullseye (latest Pi OS)
Arducam 16MP Autofocus camera (IMX519)
libcamera v0.0.0+4186-d1dc0373
Things I’ve tried:
–autofocus-range, --lens-position, and other AF params
Same camera on a Pi 4
export LIBCAMERA_LOG_LEVELS=RPiAf:0
This is the output from a normal run:
Made X/EGL preview window
[0:04:02.777669829] [1192] INFO Camera camera_manager.cpp:299 libcamera v0.0.0+4186-d1dc0373
[0:04:02.840905693] [1194] WARN RPI raspberrypi.cpp:1308 Mismatch between Unicam and CamHelper for embedded data usage!
[0:04:02.843884584] [1194] INFO RPI raspberrypi.cpp:1425 Registered camera /base/soc/i2c0mux/i2c@1/imx519@1a to Unicam device /dev/media2 and ISP device /dev/media0
[0:04:02.845510877] [1192] INFO Camera camera.cpp:1028 configuring streams: (0) 2048x1536-YUV420
[0:04:02.846962328] [1194] INFO RPI raspberrypi.cpp:805 Sensor: /base/soc/i2c0mux/i2c@1/imx519@1a - Selected sensor format: 2328x1748-SRGGB10_1X10 - Selected unicam format: 2328x1748-pRAA
Thanks. That run doesn’t actually show any RPiAf debug lines, which usually means the log level didn’t get applied to that process. Can you try setting it inline for the 10 second run like this:
Thanks, that’s useful. The RPiAf side does initialize, I can see switchMode with the stats region and the recomputed weights, but it stops there, so we need more of the system state. Can you generate the full camera bug report after a fresh reboot?
Thanks, I’ve gone through the bug report. At this point we can confirm the camera sensor and stream are up, the IMX519 registers and streams fine, and RPiAf initializes with the expected stats region and weights, but the lens actuator still never moves. We’re still digging into the root cause, so I don’t have a fix to share yet.
To take this further I’ve sent you details privately for setting up a remote session so we can look at the live system. Please check your messages and we’ll continue from there.