No AF algorithm imx519 raspi zero 2

New Raspberry followed all the instructions on the site and also looked through a few things on here to see how other people fixed it, but nothing seemed to work.

Linux raspberrypi 6.12.34+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.12.34-1+rpt1~bookworm (2025-06-26) aarch64 GNU/Linux

[0:04:20.434904567] [1903]  INFO RPI vc4.cpp:615 Sensor: /base/soc/i2c0mux/i2c@1/imx519@1a - Selected sensor format: 2328x1748-SRGGB10_1X10 - Selected unicam format: 2328x1748-pRAA
[0:04:20.494107597] [1907]  WARN IPARPI ipa_base.cpp:791 Could not set AF_MODE - no AF algorithm
[0:04:20.494834366] [1907]  WARN IPARPI ipa_base.cpp:1249 Could not set AF_SPEED - no focus algorithm
[0:04:20.495239001] [1907]  WARN IPARPI ipa_base.cpp:1231 Could not set AF_RANGE - no focus algorithm
asdf@raspberrypi:~ $ dpkg -l | grep libcamera
ii  libcamera-apps                       1.8.1-1~bookworm                        all          transitional package
ii  libcamera-ipa:arm64                  0.5.1+rpt20250722-1                     arm64        complex camera support library (IPA modules)
ii  libcamera-tools                      0.5.1+rpt20250722-1                     arm64        complex camera support library (tools)
ii  libcamera0.3:arm64                   0.3.2+rpt20241119-1                     arm64        complex camera support library
ii  libcamera0.5:arm64                   0.5.1+rpt20250722-1                     arm64        complex camera support library
ii  libspa-0.2-libcamera:arm64           1.2.7-1~bpo12+1+rpt5                    arm64        libraries for the PipeWire multimedia server - libcamera plugin
ii  pipewire-libcamera                   1.2.7-1~bpo12+1+rpt5                    all          transitional package for libspa-0.2-libcamera
ii  python3-libcamera:arm64              0.5.1+rpt20250722-1                     arm64        complex camera support library (Python bindings)
ii  rpicam-apps                          1.8.1-1~bookworm                        all          Camera based applications for Raspberry Pi using the libcamera framework
ii  rpicam-apps-core                     1.8.1-1~bookworm                        arm64        Camera based applications for Raspberry Pi using the libcamera framework
1 Like

Hi, and welcome to our community!

I’m sorry to hear you’re running into trouble. It can be frustrating when you’ve followed all the guides and something still isn’t working.

You’ve almost certainly run into a very common software issue. The standard libcamera that comes with a new Raspberry Pi OS doesn’t include the specific autofocus algorithms that our IMX519 camera needs.

The good news is, we have a simple script that installs our customized libcamera version for you. Please run these commands in the terminal:

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

After the installation is complete, you can run the command below again to double-check if you have installed the specific camera module.

dpkg -l | grep libcamera

If the libcamera version is correct, you can test the camera with the following command:

rpicam-still -t 0

This should open a live preview from your camera. Let us know if this brings it to life for you.

1 Like

I already did this and posted my dpkg -l results in my first post, still no AF algo

For some reason, some of you have 3s behind it when mine ends in 2s, though

Following this also doesn’t seem to install dev?

I tried running it all again, but I don’t think there was any change

image

1 Like

in other news i put it into a raspeberry pi 5 followed all the steps made sure it was in port zero and activated port zero in config.txt


comes up with everything like yours does but the raspeberry pi cannot find the camera no matter what i do

1 Like

Could you show me the output of the following command?

cat /boot/firmware/config.txt

sorry, I fixed the raspi 5 one myself but the zero still can’t find auto focus algorithm.

$ cat /boot/firmware/config.txt
# For more options and information see
# http://rptl.io/configtxt
# Some settings may impact device functionality. See link above for details

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

# Additional overlays and parameters are documented
# /boot/firmware/overlays/README

# Automatically load overlays for detected cameras
camera_auto_detect=1

# Automatically load overlays for detected DSI displays
display_auto_detect=1

# Automatically load initramfs files, if found
auto_initramfs=1

# Enable DRM VC4 V3D driver
dtoverlay=vc4-kms-v3d
max_framebuffers=2

# Don't have the firmware create an initial video= setting in cmdline.txt.
# Use the kernel's default instead.
disable_fw_kms_setup=1

# Run in 64-bit mode
arm_64bit=1

# Disable compensation for displays with overscan
disable_overscan=1

# Run as fast as firmware / board allows
arm_boost=1

[cm4]
# Enable host mode on the 2711 built-in XHCI USB controller.
# This line should be removed if the legacy DWC2 controller is required
# (e.g. for USB device mode) or if USB support is not required.
otg_mode=1

[cm5]
dtoverlay=dwc2,dr_mode=host

[all]
dtoverlay=imx519

1 Like

Is there anything else you need to diagnose my issue? I have a project I’m trying to finish and this is the only thing preventing me from finishing it.

1 Like

Did you use the same SD card on your RPI 5 and Pi Zero?

1 Like

No. I could try to though. Didn’t really think of it.

1 Like

Alright, I switched it over and removed the point to cm 0 from the pi 5 to the zero 2 w, and it appears to work, does this mean I have a software issue on my other SD card? Guessing the fix is just reflashing the SD and starting from scratch if I want that one to work properly?

1 Like