I broke my old pi camera module 2 which I had hooked up to octoprint for print monitoring/timelapses. I broke it basically the same week that the pi camera module 3 came out, and thought that the autofocus would be really nice. So, I bought one to replace it.
Long story short, after months of troubleshooting, I cannot for the life of me get libcamera to detect the camera. libcamera-hello comes back with ERROR: *** no cameras available *** ; and cam -l just says available cameras: with nothing to follow.
I thought that the OS updates just lagged the release a bit, so here I am 6 months later and still no luck. I think imx708 drivers are installed, as I remember running some sort of command with | grep imx and imx708 was on the list it returned.
I tried a fresh install of dietpi on a separate microSD card and reinstalled libcamera and had the same issue. I imaged it with raspbian and it worked perfectly on the first boot up. That rules out any ribbon cable issues and hardware issues. Seems to me like something I’m missing with the DietPi OS.
Any ideas? Thanks in advance!
DietPi version | G_DIETPI_VERSION_CORE=8
Distro version | bullseye 0
Kernel version | Linux DietPi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux
Architecture | armhf
SBC model | RPi 4 Model B (aarch64)
Power supply used | 5V 1A RAVpower
SD card used | 32GB SanDisk extreme
Additional Information (if applicable)
- Software title | libcamera
- Was the software title installed freshly or updated/migrated? both
- Can this issue be replicated on a fresh installation of DietPi? yes
- /boot/config.txt under RPi camera module:
- camera_auto_detect=1 (have also tried with camera_auto_detect=0 with no luck)
- RPi Codecs: [On]
- RPi Camera: [On]
Steps to reproduce
should be getting a short video clip of live camera (when using the lite desktop)
[31:16:57.607391446]  INFO Camera camera_manager.cpp:299 libcamera v0.0.4+22-923f5d70
ERROR: *** no cameras available ***
Using pi camera module 3
Does not work on my current dietpi install
does not work on new SD card with fresh dietpi install
WORKS on fresh install of raspbian
maybe something @MichaIng could have a look in.
Did you enabled I2C and the camera module in
dietpi-config? Also the shared GPU memory should be raised, when using the camera module. (can also be done with
And what gives you
Thanks, yes I2C is enabled, camera module is enabled.
vcgencmd get_camera returns:
supported=1 detected=0 libcamera interfaces=1
Interestingly, if i change /boot/config.txt to say camera_auto_detect=0, then run the vcgencmd, I get:
supported=1 detected=1 libcamera interfaces=0
In either case, I still get the same result of no available camera from cam -l or libcamera_hello.
This looks promising.
I checked the official wiki.
Can you make sure (
dietpi-config > Display Options) that you are using
Can you also provide the full output of
I am not really sure where in dietpi-config that i set
I did find in the
#dtoverlay=vc4-kms-v3d, and I tried uncommenting that and rebooting, but still the same error.
# Docs: https://www.raspberrypi.com/documentation/computers/config_txt.html
# Overlays: https://github.com/raspberrypi/firmware/blob/13fbbc4f5ea698353486915986de8b48f18018f6/boot/overlays/README
# Max allocated framebuffers: Set to "0" in headless mode to reduce memory usage
# - Defaults to "2" on RPi4 and "1" on earlier RPi models
# If you get no picture, set the following to "1" to apply most compatible HDMI settings.
# Uncomment to adjust the HDMI signal strength if you have interferences, blanking, or no display.
# - Ranges from "0" to "11", use values above "7" only if required, e.g. with very long HDMI cable.
# - Default on first RPi1 A/B is "2", else "5", on RPi4 this setting is ignored.
# Uncomment if HDMI display is not detected and composite is being outputted.
# Uncomment to disable HDMI even if plugged, e.g. to force composite output.
# Uncomment to force a console size. By default it will be display's size minus overscan.
# Uncomment to enable SDTV/composite output on RPi4. This has no effect on previous RPi models.
# SDTV mode
# Uncomment to force a specific HDMI mode (this will force VGA).
# Uncomment to force an HDMI mode rather than DVI. This enables HDMI audio in DMT modes.
# Set "hdmi_blanking=1" to allow the display going into standby after 10 minutes without input.
# With default value "0", the display shows a blank screen instead, but will not go into standby.
# NB: Some legacy OpenMAX applications (OMXPlayer) cannot wake screens from real standby.
# Set to "1" if your display has a black border of unused pixels visible.
# Uncomment the following to adjust overscan.
# Use positive numbers if console goes off screen, and negative if there is too much border.
#-------RPi camera module-------
#-------GPU memory splits-------
#-------Boot splash screen------
# NB: "enable_uart=1" will enforce "core_freq=250" on RPi models with onboard WiFi.
#-------SD card HPD-----
# Comment to enable SD card hot-plug detection, while booting via USB or network.
# NB: This causes constant CPU load and kernel errors when no SD card is inserted.
Under Display options.
But in the file output you posted it is still commented. But anyway, try to change it via
Yes, sorry. I commented it out again after trying both
dtoverlay=vc4-fkms-v3d, which both did not change the errors i received. The file output i posted was after i tried both options, they did nothing, so i changed it back.
Also, I changed it via dietpi-config. Still receiving the same error with no “Available cameras:” listed with
Got it figured out. It seems like the combination of all of these settings in the
/boot/config.txt file are important:
up until this point, I’ve had each of those set, but not all at the same time. It seems like they all must be set this way to work.
Thanks for your help @Jappe!
It is modern vs legacy camera interface:
- The legacy camera interface, still used/needed for some camera software, requires
start_x=1 to be set and does not work if KMS is enabled, but only with the legacy framebuffer graphics stack (no
- The modern camera stack only works with KMS (
camera_auto_detect=1 enables modern camera support in a generic way, so the camera model is automatically detected and no dedicated overlay needs to be enabled explicitly.
I am not sure about fake KMS (
dtoverlay=vc4-fkms-v3d), to be true, whether it allows cameras to work the modern or legacy way or both or none.
In your case, settings are a little contradicting. I guess it works only because you explicitly enabled the overlay for your particular camera model (
dtoverlay=imx708), together with KMS, which might override the legacy extended firmware flag
start_x=1, or the latter does not break the modern one, but is just unnecessary. However, this is the cleanest way it should work:
start_x=1 should be commented, removed or set to
I aim since a longer time to add a choice for legacy vs modern camera support, but didn’t find the time yet to implement it: DietPi-Config | RPi: Add modern RPi camera module support · Issue #5127 · MichaIng/DietPi · GitHub