Hi everyone, I’m hitting the same autofocus problem with my IMX519 that I saw in the ‘No Autofocus working IMX519’ thread (No Autofocus working IMX519 - #17 by vbuser). Video and JPEG capture through libcamera work fine, but autofocus never kicks in. Weirdly, libcamera list cameras reports ‘no cameras detected’ even though the camera apps can still capture.
Thanks for the report. That combination (capture works but list cameras says none) usually points to the lens driver failing while the sensor itself is still detected. Could you post the libcamera version you’re on, and confirm which lens controller is paired with the IMX519? Also useful: the V4L2 subdevice path and the full libcamera log lines around the failure.
Sure. The sensor is an IMX519 with an ak7375 lens controller. libcamera version is v0.0.0+4226-8689dd6b, and the V4L2 subdevice is /dev/v4l-subdev1. I already did a clean install and updated everything, same as the other thread suggested, and vid/jpeg capture still work. Here are the log lines:
[0:00:53.775789152] [707] INFO Camera camera_manager.cpp:299 libcamera v0.0.0+4226-8689dd6b
[0:00:53.805391429] [709] ERROR V4L2 v4l2_device.cpp:92 ‘ak7375 10-000c’: Failed to open V4L2 device ‘/dev/v4l-subdev1’: Invalid argument
[0:00:53.805466503] [709] ERROR CameraSensor camera_sensor.cpp:517 ‘imx519 10-001a’: Lens initialisation failed, lens disabled
Those errors match the other thread exactly. The ak7375 lens controller (ak7375 10-000c) is failing to open /dev/v4l-subdev1 with ‘Invalid argument’, so libcamera disables the lens on imx519 10-001a. That’s why autofocus is dead while the sensor still streams fine — the IMX519 itself is detected and working, it’s only the lens side that’s dropping out. list cameras reporting no cameras is probably the same initialization failure confusing the camera manager.
To dig into why the ak7375 can’t open that subdevice, can you generate the arducam bug report and send it over? I’ll send you the tool and steps privately.
Okay, that makes sense — I hadn’t separated the sensor from the lens controller. How do I generate the bug report? Is it a script I run on the Pi?
I’ve sent the bug report tool (arducam-camera-bug-report) and the exact steps via private message. In short: reboot the Pi first, then run the tool and send back the arducam-bug-report.txt file it creates in the current directory.
Current conclusion for anyone following along: the IMX519 sensor is fine and capture works, but the ak7375 lens driver can’t open /dev/v4l-subdev1, so libcamera disables the lens. I’m waiting on the bug report to see why that V4L2 subdevice init is failing before suggesting a fix.