Control AfMode is not advertised by libcamera

  1. Where did you get the camera module(s)?
    Arducam Website

  2. Model number of the product(s)?

  3. What hardware/platform were you working on?
    raspberry pi 4 8GB

  4. Instructions you have followed. (link/manual/etc.)

  5. Problems you were having?
    I try to set the autfocus mode in python through the picamera2 library, by using
    “AfMode”: controls.AfModeEnum.Continuous. I recieve the following error:

RuntimeError: Control AfMode is not advertised by libcamera

Note this exact script was working before upgrading the kernal and having to reinstall libcamera and libcamera-apps

  1. The dmesg log from your hardware?

Output from “dmesg | grep 64mp”

[ 0.078631] platform fe801000.csi: Fixed dependency cycle(s) with /soc/i2c0mux/[email protected]/[email protected]
[ 7.206808] arducam_64mp 10-001a: Device found Arducam 64MP.
[ 7.251706] arducam_64mp 10-001a: Consider updating driver arducam_64mp to match on endpoints

Output from “libcamera-hello --version”:

libcamera-apps build: 4def288cd663-intree-dirty 10-03-2023 (09:16:09)
libcamera build: v0.0.0+4223-f664da96

Significant parts of “/boot/config.txt”

# Run as fast as firmware / board allows

# Run as fast as firmware / board allows


  1. Troubleshooting attempts you’ve made?

  2. What help do you need?



pls give me more information

uname -a
dpkg -l | grep libcamera

[email protected]:~ $ uname -a
Linux raspberrypi 6.1.19-v8+ #1637 SMP PREEMPT Tue Mar 14 11:11:47 GMT 2023 aarch64 GNU/Linux

[email protected]:~ $ dpkg -l | grep libcamera
ii libcamera-apps 0~git20230309+4def288-1 arm64 libcamera-apps
ii libcamera0:arm64 0~git20230310+f664da96-1 arm64 complex camera support library
ii python3-libcamera 0~git20230302+923f5d70-1 arm64 complex camera support library (Python 3 bindings)

I fixed the error by modifying /boot/config.txt

I originally had:

and changed this line to:

1 Like


Glad to hear that you solved this problem yourself.