Autofocus not working; ERROR V4L2 with Bullseye, Lens initialization failed

Why do I get these errors when using the imx519 camera? I have tried everything to fix this and read through other postings on the forum but I can’t seem to resolve the issue.

ete@pi0cam:~ $ libcamera-hello

Made DRM preview window

[0:00:36.977598058] [722] INFO Camera camera_manager.cpp:297 libcamera v0.0.0+4367-ad9428b4

[0:00:37.017414256] [724] ERROR V4L2 v4l2_device.cpp:93 ‘ak7375 10-000c’: Failed to open V4L2 device ‘/dev/v4l-subdev1’: Invalid argument

[0:00:37.017527121] [724] ERROR CameraSensor camera_sensor.cpp:527 ‘imx519 10-001a’: Lens initialisation failed, lens disabled

[0:00:37.104615454] [724] INFO RPI vc4.cpp:444 Registered camera /base/soc/i2c0mux/i2c@1/imx519@1a to Unicam device /dev/media2 and ISP device /dev/media0

[0:00:37.104787954] [724] INFO RPI pipeline_base.cpp:1101 Using configuration file ‘/usr/share/libcamera/pipeline/rpi/vc4/rpi_apps.yaml’

[0:00:37.107886860] [722] INFO Camera camera.cpp:1033 configuring streams: (0) 2048x1536-YUV420

[0:00:37.109241496] [724] INFO RPI vc4.cpp:572 Sensor: /base/soc/i2c0mux/i2c@1/imx519@1a - Selected sensor format: 2328x1748-SRGGB10_1X10 - Selected unicam format: 2328x1748-pRAA

ete@pi0cam:~ $ uname -a

Linux pi0cam 6.1.21-v7+ #1642 SMP Mon Apr 3 17:20:52 BST 2023 armv7l GNU/Linux

ete@pi0cam:~ $ cat /etc/os-release

PRETTY_NAME=“Raspbian GNU/Linux 11 (bullseye)”

NAME=“Raspbian GNU/Linux”

VERSION_ID=“11”

VERSION=“11 (bullseye)”

VERSION_CODENAME=bullseye

ID=raspbian

ID_LIKE=debian

Autofocus not working.

Autofocus not working.

Hi,
Do you use this imx519 camera module connecting to a Raspberry Pi 5 with the RPI official 22-15pin cable?

No I am using a Zero 2W.

I have also tried to get autofocus working on a pi4 and two different pi zero 2W.

I am using the following pkgs on a clean install of Bullseye.

rm -rf install_pivariety_pkgs.sh

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 -l

./install_pivariety_pkgs.sh -p libcamera

./install_pivariety_pkgs.sh -p libcamera_apps

I get the same error on both pi4 and pi zero 2W.

[0:00:46.322767155] [937] ERROR V4L2 v4l2_device.cpp:93 ‘ak7375 10-000c’: Failed to open V4L2 device ‘/dev/v4l-subdev1’: Invalid argument
[0:00:46.322843804] [937] ERROR CameraSensor camera_sensor.cpp:527 ‘imx519 10-001a’: Lens initialisation failed, lens disabled

Hi
Got it. The focus motor of this camera seems defective so the libcamera command keeps uploading the error log like

[0:00:46.322767155] [937] ERROR V4L2 v4l2_device.cpp:93 ‘ak7375 10-000c’: Failed to open V4L2 device ‘/dev/v4l-subdev1’: Invalid argument
[0:00:46.322843804] [937] ERROR CameraSensor camera_sensor.cpp:527 ‘imx519 10-001a’: Lens initialisation failed, lens disabled

I’ll email you later today. Please check your inbox when you are available.

I have a Arducam quad camarray hat with 4 cameras connected. I am getting fussy image on all 4 cams. I get the same error as you with libcamera-still. I had some form of focus awhile ago. And I had no error. Do you know if this is an indicator of failures in 1 or more cameras or is this a configuration issue with V4L2. Also do I need to have a tuning file for autofocus to work?
Thx

Hi,
Could you send us the screenshot of the error log?