Camera freezes when using libcamera-still autofocus on Arducam 64MP quad kit Raspberry Pi

Hi everyone. I’m stuck with an Arducam 64MP AF Quad Kit on a Raspberry Pi 4. When I try to capture with libcamera-still and --autofocus-on-capture, the camera switches on and then freezes — no image.jpg is ever written.

I’ve actually tried this on two different Pi 4s. Details:

  • Hardware revision: b03115
  • Kernel: 6.1.0-rpi4-rpi-v8
  • libcamera: bookworm, arm64-v5
  • Sensor: /base/soc/i2c0mux/i2c@1/arducam_64mp@1a

This is the command I’m running:

libcamera-still -t 5000 --viewfinder-width 2312 --viewfinder-height 1736 -o image.jpg --autofocus-on-capture

On a second Pi I also can’t get applications to download from a links file, so the install keeps failing — not sure if that’s related or a completely separate thing.

Anyone seen this freeze before?

Thanks for posting all the environment info. The freeze right at autofocus capture usually shows up in the libcamera log, so could you run that exact command from a terminal and paste the full output you get? The repeated errors around embedded data or the stream setup will point us in the right direction.

The links-file download issue on the other Pi sounds like a separate problem — I’d suggest its own thread, but if that Pi is also on Bookworm it might be worth noting which OS it’s running.

Here’s the output from the hanging capture:

ERROR IPARPI cam_helper.cpp:257 Embedded data buffer parsing failed (repeated)
INFO Camera camera.cpp:1033 configuring streams: (0) 9152x6944-YUV420 (1) 9152x6944-SRGGB10_CSI2P
INFO RPI vc4.cpp:572 Sensor: /base/soc/i2c0mux/i2c@1/arducam_64mp@1a - Selected sensor format: 9152x6944-SRGGB10_1X10 - Selected unicam format: 9152x6944-pRAA
WARN V4L2 v4l2_videodevice.cpp:2007 /dev/video0[17:cap]: Dequeue timer of 1850000.00us has expired!
ERROR RPI pipeline_base.cpp:1356 Camera frontend has timed out!
ERROR RPI pipeline_base.cpp:1357 Please check that your camera sensor connector is attached securely.
ERROR RPI pipeline_base.cpp:1358 Alternatively, try another cable and/or sensor.
ERROR: Device timeout detected, attempting a restart!!!

I already swapped the cables, rebooted, and rebuilt on a second Pi 4 — same result every time.

Thanks, that gives a clearer picture.

  • The repeated ‘Embedded data buffer parsing failed’ means the sensor’s embedded metadata isn’t being parsed on the first frames.
  • Streams are negotiating fine: (0) 9152x6944-YUV420 and (1) 9152x6944-SRGGB10_CSI2P, with the sensor at /base/soc/i2c0mux/i2c@1/arducam_64mp@1a selecting 9152x6944-SRGGB10_1X10 and unicam 9152x6944-pRAA. So the camera is detected — it’s dying right after negotiation.
  • The actual freeze is the frontend timeout on /dev/video0[17:cap], with the 1850000.00us dequeue timer expiring.

Since you’ve already changed cables, rebooted, and tried another Pi, the OS is the next suspect. You’re on Bookworm (kernel 6.1.0-rpi4-rpi-v8, libcamera bookworm arm64-v5). For the 64MP Hawk-eye on a Pi 4, Arducam recommends Bullseye. Can you confirm the OS is Bookworm, not Bullseye?

Yes, it’s definitely Bookworm — that’s what was on the card. The kit switches on and then freezes when I use that capture command, and image.jpg never appears.

That confirms it. My conclusion is this is an OS/camera driver compatibility issue. Bookworm’s libcamera build for this sensor (kernel 6.1.0-rpi4-rpi-v8, libcamera bookworm arm64-v5) is causing the embedded-data parse failures and the subsequent frontend timeout. The timeout lines do also hint at a loose connector or bad cable, but you’ve already ruled those out by swapping cables and Pi boards.

For the Raspberry Pi 4, the workaround is to burn Bullseye OS onto the SD card and set it up per the Arducam Pi Hawk-eye 64MP Quick Start Guide:
https://docs.arducam.com/Raspberry-Pi-Camera/Native-camera/Quick-Start-Guide/#arducam-pi-hawk-eye-64mp-cameras

Then run your original capture command again:

libcamera-still -t 5000 --viewfinder-width 2312 --viewfinder-height 1736 -o image.jpg --autofocus-on-capture

If you’re on a Raspberry Pi 5 instead, Pi 5 + Bookworm compatibility with Arducam cameras is still under discussion, so you may need to wait for updates — this thread tracks it:

Let us know how Bullseye behaves on the Pi 4 — that’ll tell us if it’s purely the OS or if there’s still a hardware issue hiding underneath.