[0:07:57.380360899] [1552] INFO Camera camera_manager.cpp:297 libcamera v0.0.5+83-bde9b04f
[0:07:57.423093362] [1573] ERROR V4L2 v4l2_device.cpp:93 'ak7375 10-000c': Failed to open V4L2 device '/dev/v4l-subdev1': Invalid argument
[0:07:57.423199102] [1573] ERROR CameraSensor camera_sensor.cpp:527 'imx519 10-001a': Lens initialisation failed, lens disabled
[0:07:57.449205462] [1573] INFO RPI vc4.cpp:437 Registered camera /base/soc/i2c0mux/i2c@1/imx519@1a to Unicam device /dev/media1 and ISP device /dev/media3
[0:07:57.449313405] [1573] INFO RPI pipeline_base.cpp:1101 Using configuration file '/usr/share/libcamera/pipeline/rpi/vc4/rpi_apps.yaml'
[0:07:57.467523237] [1552] INFO Camera camera.cpp:1033 configuring streams: (0) 3000x2456-XBGR8888 (1) 4656x3496-SRGGB10_CSI2P
[0:07:57.470597582] [1573] INFO RPI vc4.cpp:565 Sensor: /base/soc/i2c0mux/i2c@1/imx519@1a - Selected sensor format: 4656x3496-SRGGB10_1X10 - Selected unicam format: 4656x3496-pRAA
Then the full traceback:
Traceback (most recent call last):
File "/home/pi/BABU/NEW_UI/auto.py", line 403, in <module>
window = Auto()
File "/home/pi/BABU/NEW_UI/auto.py", line 52, in __init__
self.picam2.set_controls({"AfMode": controls.AfModeEnum.Auto, "AfTrigger": controls.AfTriggerEnum.Start})
File "/usr/lib/python3/dist-packages/picamera2/picamera2.py", line 1093, in set_controls
self.controls.set_controls(controls)
File "/usr/lib/python3/dist-packages/picamera2/controls.py", line 58, in set_controls
self.__setattr__(k, v)
File "/usr/lib/python3/dist-packages/picamera2/controls.py", line 33, in __setattr__
raise RuntimeError(f"Control {name} is not advertised by libcamera")
RuntimeError: Control AfMode is not advertised by libcamera
The autofocus lens actuator (ak7375) fails to open the V4L2 device /dev/v4l-subdev1 with ‘Invalid argument’. That causes the imx519 lens initialisation to fail, so the lens gets disabled. Because the lens is disabled, libcamera doesn’t advertise the AfMode control at all — which is exactly why picamera2 raises ‘Control AfMode is not advertised by libcamera’ when you try to set AfMode/AfTrigger.
So the AfMode issue is a symptom of the lens init failure, not something wrong with your set_controls call.
To dig into this further, could you generate an Arducam camera bug report? Please do the following:
Thanks for the explanation. I rebooted, ran the tool, and it generated arducam-bug-report.txt. I’ve sent the file over in a private message so you can review it. What should I try next?
Thanks for your patience, and thanks for sending the bug report. Based on what we’ve seen so far, the next step is to install the Arducam-provided libcamera build. The standard build isn’t fully handling the IMX519 autofocus actuator, which is why the lens gets disabled and the AfMode/AfTrigger controls aren’t advertised.
Please follow the getting-started section of the Arducam libcamera user guide:
After installing the Arducam-specific libcamera build, the IMX519 autofocus controls (AfMode/AfTrigger) should be properly advertised and usable. If you still see the ‘lens disabled’ error or ‘Control AfMode is not advertised by libcamera’ after that, post back and we’ll continue troubleshooting from there.