Arducam 12MP IMX477 PTZ camera no preview in libcamera-hello on Raspberry Pi 3 B

Hi, I’m stuck getting my Arducam 12MP IMX477 PTZ camera to preview on a Raspberry Pi 3 B v1.2. When I run libcamera-hello in the terminal I get an error and no preview window shows up. I’ve tried several things I found online and none of them helped. Here’s my current /boot/config.txt in case anything stands out:

# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
dtparam=i2c_arm=on
#dtparam=i2s=on
dtparam=spi=on

# Uncomment this to enable infrared communication.
#dtoverlay=gpio-ir,gpio_pin=17
#dtoverlay=gpio-ir-tx,gpio_pin=18

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

# Automatically load overlays for detected cameras
start_x=1
dtoverlay=imx477

# Automatically load overlays for detected DSI displays
display_auto_detect=1

# Enable DRM VC4 V3D driver
#dtoverlay=vc4-kms-v3d
max_framebuffers=2

# Disable compensation for displays with overscan
disable_overscan=1

[cm4]
# Enable host mode on the 2711 built-in XHCI USB controller.
# This line should be removed if the legacy DWC2 controller is required
# (e.g. for USB device mode) or if USB support is not required.
otg_mode=1

[all]

[pi4]
dtoverlay=vc4-fkms-v3d
# Run as fast as firmware / board allows
arm_boost=1

[all]
dtoverlay=w1-gpio
enable_uart=1
gpu_mem=128

Any idea what I’m missing?

Thanks for posting the config. The camera-related bits look mostly correct — I can see start_x=1, dtoverlay=imx477, display_auto_detect=1, and max_framebuffers=2 are all there, and vc4-kms-v3d is currently commented out. This really sounds like a display/GPU acceleration issue. The libcamera preview needs Glamor acceleration enabled to render properly.

Can you try enabling Glamor and test again?

sudo raspi-config

Then go to 6 Advanced OptionsA8 Glamor and enable it. Reboot the Pi, then run libcamera-hello again and let me know what happens.

I enabled Glamor and rebooted, but I’m still getting the exact same error when I run libcamera-hello. No preview at all.

Okay, Glamor alone isn’t the fix then. Let’s gather more info. Please reboot the device, then download and run our bug report tool:

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 will produce an arducam-bug-report.txt file in the current directory. Please send that file to me via private message rather than posting it here.

I’ve also sent you a couple of screenshots via PM with specific areas of the hardware highlighted in red. Could you take close-up photos of those highlighted spots and send them over too?

While we’re at it, can you also try libcamera-still -t 0? The -t 0 keeps the preview running indefinitely, which is a good way to check whether the camera output is there at all.

I ran libcamera-still -t 0 and I still can’t preview the camera — same error message as before.

Are you running the Pi with a monitor connected, or accessing it another way? The preview output needs an actual display to show up on.

I’ve been connecting to the Pi from my laptop over VNC. Could that be the problem?

It very well could be. VNC and other remote desktop sessions often won’t show the camera preview at all. Can you connect the Pi to a physical monitor via HDMI and test again?

I plugged the Pi into a monitor and ran libcamera-still -t 0 again, but the same error still shows up. I’m starting to think the camera itself might be damaged or dead — is that possible?

Let’s not assume the hardware is bad yet. There’s one more config change worth trying. The vc4-kms-v3d overlay can affect how libcamera handles the preview. In your current config.txt that line is commented out (#dtoverlay=vc4-kms-v3d). Uncomment it so it reads:

dtoverlay=vc4-kms-v3d

Save, reboot, and test the camera again.

After changing that line in config.txt the image finally appears, but it’s very blurry. I also tried running FocuserAutoFocus.py and it keeps throwing an error every time (I’ll try to grab the exact error text). I’ve got picamera installed on the Pi.

Glad the preview is coming through now. For driving the PTZ camera — focus, pan, tilt and so on — follow the quick-start guide here:
https://docs.arducam.com/Raspberry-Pi-Camera/Pan-Tilt-Zoom-Camera/quick-start/

The camera is working now, thanks for the help. Two quick questions: is there example code for panning and tilting the camera? And do I need that additional metal base for the pan/tilt to actually work?

Just to make sure we’re talking about the same product — is this the one?

Yes, that’s the one.

In that case, pan and tilt require the metal base with the two digital servos shown in the product photos — the camera module itself can’t pan/tilt without that assembly. I’m not sure if the base can be sold individually, but you’ll need it for the pan/tilt functionality.

Unrelated follow-up while I have you: I’m also having trouble downloading TensorFlow Lite on the Raspberry Pi and getting an error. Any chance you can point me in the right direction?

Sorry, TensorFlow Lite installation is outside the scope of what Arducam support covers. We can only help with the camera and its setup/documentation, not third-party ML frameworks like TensorFlow. For the camera itself, stick with the Arducam documentation I linked earlier.