Hi all, hoping someone can help me figure this out. I have an Arducam Raspberry Pi HQ Camera (12.3MP IMX477 with CS-mount lens and automatic IR-Cut switching) that I’m trying to use with OctoPi on my Raspberry Pi 4 4GB running Bullseye, but I get no camera feed at all.
The odd thing is the IR-cut filter does trigger when I wave my hand in front of it, so it seems to be getting power. The ribbon cable works fine with another camera, so I don’t think the cable is the issue. I also tried connecting the camera directly to the Pi, and even tried an HDMI cable conversion, but no result.
libcamera-still -o test.jpg gives:
Preview window unavailable
INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3384-44d59841
WARN CameraSensorProperties camera_sensor_properties.cpp:141 No static properties available for ‘imx477’
WARN CameraSensorProperties camera_sensor_properties.cpp:143 Please consider updating the camera sensor properties database
ERROR CameraSensor camera_sensor.cpp:535 ‘imx477 10-001a’: Camera sensor does not support test pattern modes.
INFO RPI raspberrypi.cpp:1313 Registered camera /base/soc/i2c0mux/i2c@1/imx477@1a to Unicam device /dev/media1 and ISP device /dev/media0
INFO Camera camera.cpp:1028 configuring streams: (0) 2028x1520-YUV420
ERROR V4L2 v4l2_videodevice.cpp:985 /dev/video0[12:cap]: Unable to set format: Device or resource busy
ERROR V4L2 v4l2_videodevice.cpp:1179 /dev/video0[12:cap]: Unable to request 0 buffers: Device or resource busy
ERROR: *** failed to configure streams ***
libcamera-hello fails the same way with Device or resource busy.
I also tried a separate SD card with Bullseye, and other cameras work fine on it, just not this one. Any ideas?
Thanks for posting all those logs. Before we dig into the config, can we isolate the camera from the OctoPi setup? Please flash a clean Bullseye OS onto a separate SD card and test just the camera there with the stock tools. That’ll help us figure out whether the problem is the camera/hardware or something in the OctoPi configuration.
Okay, I set up a clean Bullseye card and tested the camera there. I confirmed it’s Raspbian GNU/Linux 11 (bullseye) with cat /etc/os-release. Hostname is blueender3pro.
ls /dev/video0 shows /dev/video0, so it’s present.
But all the libcamera commands still fail with failed to configure streams:
libcamera-still -t 0:
Preview window unavailable
INFO Camera camera_manager.cpp:299 libcamera v0.0.3+40-9b860a66
INFO RPI raspberrypi.cpp:1425 Registered camera /base/soc/i2c0mux/i2c@1/imx477@1a to Unicam device /dev/media3 and ISP device /dev/media1
INFO Camera camera.cpp:1028 configuring streams: (0) 2028x1520-YUV420
ERROR V4L2 v4l2_videodevice.cpp:1047 /dev/video0[12:cap]: Unable to set format: Device or resource busy
ERROR: *** failed to configure streams ***
libcamera-jpeg -o test.jpg and libcamera-hello give the exact same error.
vcgencmd get_camera still shows:
supported=1 detected=0, libcamera interfaces=1
Thanks, that’s helpful. A couple of things for Bullseye:
vcgencmd get_camera is for the legacy camera stack, so it’s not really the right check on Bullseye. Better to rely on ls /dev/video0 and libcamera-still -t 0 instead.
Make sure your /boot/config.txt has:
dtoverlay=imx477
camera_auto_detect=0
/dev/video0 exists, and libcamera still fails the same way:
libcamera-still -t 0:
Preview window unavailable
INFO Camera camera_manager.cpp:299 libcamera v0.0.3+40-9b860a66
INFO RPI raspberrypi.cpp:1425 Registered camera /base/soc/i2c0mux/i2c@1/imx477@1a to Unicam device /dev/media3 and ISP device /dev/media1
INFO Camera camera.cpp:1028 configuring streams: (0) 2028x1520-YUV420
ERROR V4L2 v4l2_videodevice.cpp:1047 /dev/video0[12:cap]: Unable to set format: Device or resource busy
ERROR: *** failed to configure streams ***
libcamera-jpeg and libcamera-hello are identical. vcgencmd get_camera still says detected=0.
That ‘Unable to set format: Device or resource busy’ error is the key clue. It usually means another program or process has already grabbed the camera. libcamera can register the sensor (that’s why you see the imx477 lines), but then it can’t set the format because something else is holding /dev/video0.
First, do a full reboot so any leftover process releases the camera.
Then I’ve sent you a small camera bug-report script via private message, along with the instructions—please check your messages. Run it and it will produce an arducam-bug-report.txt file in the current directory. Send that file back to me via private message so I can see what’s holding the camera.
In the meantime, you can try to find the conflicting program yourself. Check what processes might be using the camera (anything from OctoPi or webcam streaming, or a leftover libcamera process) and close it, then re-run libcamera-still -t 0. Right now the working conclusion is that this is a resource conflict on /dev/video0 rather than the camera failing to be detected.