IMX219 camera detected on Raspberry Pi 4B Bullseye but libcamera reports Unicam timeout errors

I have an Arducam IMX219 camera for the Raspberry Pi that I just can’t get working on my Pi 4B. The camera shows up as detected, but libcamera keeps failing with a Unicam timeout. I’ve never gotten it to work even once. This is the error I keep hitting:

[0:09:25.457448458] [1344] ERROR RPI raspberrypi.cpp:1794 Unicam has timed out!
[0:09:25.457501844] [1344] ERROR RPI raspberrypi.cpp:1795 Please check that your camera sensor connector is attached securely.
[0:09:25.457553545] [1344] ERROR RPI raspberrypi.cpp:1796 Alternatively, try another cable and/or sensor.

I’ve been following the Arducam 8MP IMX219 software setup docs. Any advice on what I’m missing would be great.

Hi, sorry you’re dealing with this. Let’s figure out whether it’s a config problem or something with the hardware. Can you send me a few things so I know exactly what you’re working with?

  1. A picture of the camera or the product/part number (or the product page) so I can confirm the exact model.
  2. The output of uname -a.
  3. The output of cat /etc/os-release and cat /boot/config.txt.

That’ll help narrow it down.

Sure. It’s an Arducam IMX219 CAM for RPi, running on a Raspberry Pi 4B with Raspbian GNU/Linux 11 (bullseye). The platform reports kernel 5.15.32-v7l+.

uname -a:

Linux my-printer 5.15.45-v7l+ #1561 SMP Mon Jun 6 15:24:26 BST 2022 armv7l GNU/Linux

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
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

I followed the instruction here: https://www.arducam.com/docs/cameras-for-raspberry-pi/native-raspberry-pi-cameras/8mp-imx219-standard-camera-modules/#10-software-setup

Thanks. Since you’re on a Pi 4, you only need to run the Pi 4 portion of that setup doc. Do the following:

  1. sudo nano /boot/config.txt
  2. Find the line camera_auto_detect=1 and change it to camera_auto_detect=0
  3. Add a new line: dtoverlay=imx219
  4. Save and reboot.

Give that a go and let me know if the errors change at all.

I already did exactly that (camera_auto_detect=0, dtoverlay=imx219, saved, rebooted) and it made no difference. Here’s my current /boot/config.txt:

dtparam=i2c_arm=on
dtparam=i2s=on
#dtparam=spi=on
dtparam=audio=off
camera_auto_detect=0
display_auto_detect=1
dtoverlay=vc4-kms-v3d
max_framebuffers=2
disable_overscan=1
otg_mode=1
arm_boost=1
start_x=1
gpu_mem=128
dtoverlay=imx219
#enable_uart=1

A couple of notes: I also tried adding ,cma-256 to the dtoverlay=vc4-kms-v3d line, and I tried it with and without the start_x=1 line. Same result either way.

OK, that config looks correct. A few more things to rule out the basics:

  • Are you using the included FFC cable, and have you tried the other one that came with the camera?
  • Double-check the ribbon orientation at both ends (which side the contacts face matters).
  • Have you tried a different OS image?
  • Was the ribbon fully seated before you powered the Pi on?

Also, can you re-run libcamera and paste the exact error output you get?

I’ve tried both included cables, same thing on both. I’ve checked the orientation multiple times and it’s definitely correct - the camera was connected and verified before I powered the Pi on. I also tried a few different OS images. The camera just gets detected and then throws the same Unicam timeout. Here it is again:

[0:09:25.457448458] [1344] ERROR RPI raspberrypi.cpp:1794 Unicam has timed out!
[0:09:25.457501844] [1344] ERROR RPI raspberrypi.cpp:1795 Please check that your camera sensor connector is attached securely.
[0:09:25.457553545] [1344] ERROR RPI raspberrypi.cpp:1796 Alternatively, try another cable and/or sensor.

I really never got it to work at any point.

Appreciate all the detail. We actually took one of these units and tested it on our side - the camera worked normally for us, so the standard setup is definitely correct and the module itself is fine in general. That makes me think it may be something specific to your unit. Can you confirm once more that the module is fully seated, the ribbon orientation is correct, and that it misbehaves on both cables? Just want to be sure before we call it.

Confirmed - connected properly and verified before powering on, and it does the same on both of the supplied cables. Both cables seem fine to me since it fails identically with each of them. The camera is detected but just reports those errors, exactly as in the log I posted.

Thanks for confirming. Based on everything so far:

  • Your /boot/config.txt is correct (camera_auto_detect=0 + dtoverlay=imx219), rebooted, and it didn’t change anything.
  • Cables and orientation are ruled out - you tried both cables with identical results.
  • Different OS images behave the same way.
  • Our own test of this camera worked normally on our side.

Since the connection and cabling are ruled out and the module still times out with the Unicam error, that points to a hardware fault with the camera module itself rather than the software setup. The next step would be to get that unit exchanged for a working one - reach out through the point of purchase to arrange it.