Raspberry Pi 4 Bullseye 64-bit: IMX219 camera not detected (vcgencmd detected=0)

Hi, I’m stuck trying to get my camera working on a Raspberry Pi 4 running 64-bit Bullseye and honestly I never got it to work at all. When I run:

sudo vcgencmd get_camera

I get:

supported=1 detected=0, libcamera interfaces=1

Another thing that’s confusing me: my /boot/config.txt doesn’t match the setup instructions I found at all. The instructions that came in the package were Windows only, so I went looking for the Linux ones. In particular I don’t seem to have these lines anywhere:

camera_auto_detect=0
dtoverlay=imx219 (well I have an imx219 line but not where the docs show it)

I’m fairly sure it’s a software issue because if I put the camera into a PC it works fine. It’s the 8MP IMX219 motorized focus camera module. One more odd detail - I see a microphone tray icon, so the audio side of the device seems to be detected (I haven’t tested it, camera is my priority). Any idea what I’m doing wrong?

Hi, thanks for the details. Before we go further, can you generate a bug report so we can actually see your setup? Reboot the Pi first, then run:

wget -O arducam-camera-bug-report https://github.com/ketai-dhr/arducam-camera-bug-report/releases/download/tools/arducam-camera-bug-report
chmod +x ./arducam-camera-bug-report
./arducam-camera-bug-report

That creates an arducam-bug-report.txt in the current directory - attach that file here. Also, please paste the relevant part of your /boot/config.txt. That ‘detected=0, libcamera interfaces=1’ output is a bit of a clue and I want to see which overlays are actually loaded.

DONE - bug report attached. Here’s the /boot/config.txt excerpt:

Automatically load overlays for detected cameras

start_x=1

Automatically load overlays for detected DSI displays

display_auto_detect=1

Enable DRM VC4 V3D driver

#dtoverlay=vc4-kms-v3d
max_framebuffers=2

[pi4]
#dtoverlay=vc4-fkms-v3d
#dtoverlay=ov5647
dtoverlay=imx219

Run as fast as firmware / board allows

arm_boost=1

As you can see I don’t have camera_auto_detect=0 at all, and the dtoverlay=imx219 is sitting under [pi4] instead of where the doc shows it. Still nothing detected.

Thanks, the config helps a lot. I think we’ve been chasing the wrong thing here. The camera you have is a UVC camera - it talks over USB, not over the MIPI CSI interface. libcamera (and vcgencmd get_camera) only talks to MIPI cameras, so ‘detected=0, libcamera interfaces=1’ is actually what you’d expect for a UVC device. That’s also why the MIPI-style config.txt instructions don’t line up - lines like camera_auto_detect=0 and dtoverlay=imx219 are meant for MIPI cameras. The microphone icon showing up is another hint that the device is being seen over USB.

For a UVC camera on the Pi you don’t use libcamera at all - you access it with regular USB camera tools like VLC, ffmpeg, cheese, etc. Can you confirm the camera plugs in via USB, and does lsusb show it when it’s connected?

Ah, that would explain a lot. Yes it’s a USB camera - it plugs in over USB and it worked instantly when I tried it on a Windows PC. The problem is I have zero experience with vlc and those kinds of tools. Can you please send some instructions on how to use what you are discussing? I’ve only ever used the libcamera stuff, so I don’t know where to start.

No problem, here’s the guide for using Arducam UVC cameras on Linux:

https://www.arducam.com/docs/uvc-camera-module/use-arducam-uvc-cameras-on-linux/uvc-cameras-on-linux-software/

It walks through detecting the camera and opening it with VLC. Short version: install VLC (sudo apt install vlc), plug the camera in, confirm it appears with lsusb, then in VLC go to Media > Open Capture Device and choose /dev/video0 as the capture device. If the camera shows up as /dev/video* then it’s ready to use.

Ok I’ll give that a try. Quick question though - should I remove the dtoverlay=imx219 and start_x=1 lines from config.txt, or just leave them alone?

Leave them for now. They don’t apply to a UVC camera, but they generally won’t stop VLC from opening the device either. Just don’t rely on the MIPI/libcamera setup for this camera. If VLC still can’t see it after following the doc, post the output of lsusb and ls /dev/video* and we’ll take it from there.

Gave it a go - VLC now opens it on /dev/video0 and I can see the feed. The libcamera command still reports detected=0, but I’m guessing that’s expected for this camera. Thanks for the help!

Yep, for a UVC camera vcgencmd get_camera will keep reporting detected=0 - that’s normal, because libcamera only handles cameras on the MIPI interface. To summarise where we landed: the IMX219 module you have is a UVC/USB camera, so libcamera commands and the MIPI overlays (camera_auto_detect=0, dtoverlay=imx219) don’t apply to it. Early on it looked like a config.txt mismatch, but the real cause was trying to drive a USB camera through libcamera.

The working approach is to use it as a UVC device through tools like VLC (or ffmpeg/cheese) on /dev/video*, following the UVC-on-Linux guide:
https://www.arducam.com/docs/uvc-camera-module/use-arducam-uvc-cameras-on-linux/uvc-cameras-on-linux-software/

If anything else comes up, the Arducam forums (https://www.arducam.com/forums/) and docs (Arducam Wiki) are good places to check.