Focus not working on ArduCam camera after official setup error

Hi everyone, I’m having trouble getting the focus to work on my Arducam IMX519 motorized focus camera. The autofocus doesn’t work at all, and neither does manual focus.

I tried following the official setup instructions but ran into an error during installation. I’m attaching screenshots of what I’m seeing:

Bez tytułu.png
OZSeGbxEChQHES7K.png

Basically the camera streams video but I can’t get the lens to focus at all. Has anyone run into this before? What am I doing wrong?

Looking at your screenshots, I can see the issue. The IMX519 low-speed driver installation is failing because that driver was designed specifically for the Bullseye OS release. Based on what I’m seeing, you’re not running Bullseye — that’s why the installation script is throwing errors.

The correct approach for your OS version is to use the device tree overlay dtoverlay=imx519 instead of the low-speed driver, along with Arducam’s custom libcamera packages.

Here’s what to do:

  1. Add dtoverlay=imx519 to your /boot/config.txt (or /boot/firmware/config.txt depending on your Pi model) and reboot.

  2. After reboot, run:

    rpicam-still -t 0
    

    and post the full log output here so we can verify the camera is being detected properly.

  3. If you haven’t already installed Arducam’s custom libcamera packages, run these:

    wget -O install_pivariety_pkgs.sh https://github.com/ArduCAM/Arducam-Pivariety-V4L2-Driver/releases/download/install_script/install_pivariety_pkgs.sh
    chmod +x install_pivariety_pkgs.sh
    ./install_pivariety_pkgs.sh -p libcamera_dev
    ./install_pivariety_pkgs.sh -p libcamera_apps
    

Give that a try and let me know what the rpicam-still output looks like.

Thanks for the quick reply! I followed your instructions. I added this line to config.txt:

dtoverlay=imx519,cam0,vcm=off

Rebooted and ran rpicam-still -t 0. The camera streams video but the focus still doesn’t work — nothing moves, auto or manual.

Here’s the full log output from rpicam-still:

[0:05:30.000420090] [2226]  INFO Camera camera_manager.cpp:340 libcamera v0.6.0+rpt20251202+26-177de571-dirty (2025-12-03T09:33:34GMT)
[0:05:30.016816196] [2229]  INFO RPI pisp.cpp:720 libpisp version v1.3.0 09-10-2025 (12:13:21)
[0:05:30.029845900] [2229]  INFO IPAProxy ipa_proxy.cpp:180 Using tuning file /usr/share/libcamera/ipa/rpi/pisp/imx519.json
[0:05:30.040798885] [2229]  INFO Camera camera_manager.cpp:223 Adding camera '/base/axi/pcie@1000120000/rp1/i2c@88000/imx519@1a' for pipeline handler rpi/pisp
[0:05:30.040842218] [2229]  INFO RPI pisp.cpp:1182 Registered camera /base/axi/pcie@1000120000/rp1/i2c@88000/imx519@1a to CFE device /dev/media0 and ISP device /dev/media2 using PiSP variant BCM2712_D0
WARNING: Capture will not make use of temporal denoise
         Consider using the --zsl option for best results, for example:
         rpicam-still --zsl -o
Made X/EGL preview window
Made DRM preview window
Preview window unavailable
Mode selection for 2328:1748:12:P
    SRGGB10_CSI2P,1280x720/0 - Score: 5319.24
    SRGGB10_CSI2P,1920x1080/0 - Score: 3319.24
    SRGGB10_CSI2P,2328x1748/0 - Score: 1000
    SRGGB10_CSI2P,3840x2160/0 - Score: 1648.24
    SRGGB10_CSI2P,4656x3496/0 - Score: 2019
Stream configuration adjusted
[0:05:30.061681282] [2226]  INFO Camera camera.cpp:1215 configuring streams: (0) 2328x1748-YUV420/sYCC (1) 2328x1748-RGGB_PISP_COMP1/RAW
[0:05:30.061805597] [2229]  INFO RPI pisp.cpp:1486 Sensor: /base/axi/pcie@1000120000/rp1/i2c@88000/imx519@1a - Selected sensor format: 2328x1748-SRGGB10_1X10/RAW - Selected CFE format: 2328x1748-PC1R/RAW
#7 (0.00 fps) exp 32844.00 ag 8.00 dg 1.00
#8 (30.00 fps) exp 32844.00 ag 8.00 dg 1.00
#9 (30.00 fps) exp 32844.00 ag 8.00 dg 1.00
#10 (30.00 fps) exp 32844.00 ag 8.00 dg 1.00

I’m on a Pi 5 (BCM2712_D0). Camera is detected on i2c@88000 but focus is totally dead. Any ideas?

Bez tytułu.png
OZSeGbxEChQHES7K.png

Found it! The problem is right there in your dtoverlay line:

dtoverlay=imx519,cam0,vcm=off

You’ve got vcm=off appended, which explicitly disables the Voice Coil Motor (VCM) — that’s the AK7375 focus motor on your IMX519 module. So the sensor itself works fine (as the log shows), but the focus motor is being told to stay completely off. Autofocus and manual focus will never work with that parameter set.

Change your config.txt line to just:

dtoverlay=imx519,cam0

(Remove ,vcm=off entirely.) Then reboot and try again. The log from rpicam-still should look different once the VCM is actually initialized.

Good catch, thank you! I removed vcm=off so now config.txt just has:

dtoverlay=imx519,cam0

Rebooted, but focus is still not working. I then tried running the AutofocusTest.py script from the Motorized_Focus_Camera repo:

cd ~/RaspberryPi/Motorized_Focus_Camera/python/
python3 AutofocusTest.py -i 10

Now I’m seeing some new errors that weren’t there before. Here’s the relevant part of the output:

[0:12:26.670253711] [2530]  INFO Camera camera_manager.cpp:340 libcamera v0.6.0+rpt20251202+26-177de571-dirty (2025-12-03T09:33:34GMT)
[0:12:26.687087428] [2533]  INFO RPI pisp.cpp:720 libpisp version v1.3.0 09-10-2025 (12:13:21)
[0:12:26.692408662] [2533] ERROR V4L2 v4l2_device.cpp:92 'ak7375 10-000c': Failed to open V4L2 device '/dev/v4l-subdev3': Invalid argument
[0:12:26.692452588] [2533] ERROR CameraSensor camera_sensor_legacy.cpp:663 'imx519 10-001a': Lens initialisation failed, lens disabled
[0:12:26.715754627] [2533]  INFO IPAProxy ipa_proxy.cpp:180 Using tuning file /usr/share/libcamera/ipa/rpi/pisp/imx519.json
[0:12:26.724623382] [2533]  INFO Camera camera_manager.cpp:223 Adding camera '/base/axi/pcie@1000120000/rp1/i2c@88000/imx519@1a' for pipeline handler rpi/pisp
[0:12:26.724677956] [2533]  INFO RPI pisp.cpp:1182 Registered camera /base/axi/pcie@1000120000/rp1/i2c@88000/imx519@1a to CFE device /dev/media2 and ISP device /dev/media1 using PiSP variant BCM2712_D0
[0:12:26.729679228] [2530]  INFO Camera camera.cpp:1215 configuring streams: (0) 640x360-XBGR8888/sRGB (1) 1280x720-RGGB_PISP_COMP1/RAW
[0:12:26.730103652] [2533]  INFO RPI pisp.cpp:1486 Sensor: /base/axi/pcie@1000120000/rp1/i2c@88000/imx519@1a - Selected sensor format: 1280x720-SRGGB10_1X10/RAW - Selected CFE format: 1280x720-PC1R/RAW

The key errors seem to be:

  • ERROR V4L2 v4l2_device.cpp:92 'ak7375 10-000c': Failed to open V4L2 device '/dev/v4l-subdev3': Invalid argument
  • ERROR CameraSensor camera_sensor_legacy.cpp:663 'imx519 10-001a': Lens initialisation failed, lens disabled

So it’s trying to talk to the AK7375 focus motor at i2c address 0x0c but failing to open /dev/v4l-subdev3. The lens gets disabled entirely as a result.

I’ve attached a few more screenshots showing my current setup:

yLykaPyNtkkUF0PQ.png
Bez tytułu.png
OZSeGbxEChQHES7K.png

Any idea why the AK7375 V4L2 subdevice is failing to open? Could this be a kernel or overlay issue?

Alright, so the situation now is: with vcm=off removed, libcamera is at least trying to initialize the AK7375 lens driver, but it’s failing when attempting to open /dev/v4l-subdev3. The error is “Invalid argument,” which suggests the kernel is exposing the subdevice node but the V4L2 driver can’t communicate with it properly.

A few things to check and try:

  1. Verify the AK7375 is actually present on the i2c bus. Run:

    i2cdetect -y 10
    

    (Your camera is on i2c bus 10 based on the log — imx519 10-001a). You should see the sensor at 0x1a and the AK7375 at 0x0c. If 0x0c doesn’t show up, the lens controller isn’t being detected at the hardware level.

  2. Check what V4L2 subdevices are available:

    ls -la /dev/v4l-subdev*
    

    Then check what each one is:

    for dev in /dev/v4l-subdev*; do echo "=== $dev ==="; v4l2-ctl -d $dev --info 2>&1; done
    
  3. Check your kernel version — uname -a. There have been some changes to how the RP1 i2c and VCM subdevices are handled on Pi 5 across different kernel releases. The ak7375 driver on the imx519 overlay may need a kernel that includes the proper VCM device tree binding for the RP1.

At this stage the issue appears to be that the AK7375 V4L2 subdevice registration is broken at the kernel/driver level — libcamera sees the device node exists but can’t open it, so it disables the lens entirely and falls back to sensor-only operation. This is why focus still doesn’t work even after removing vcm=off.