Raspberry Pi 4B Buster: HQ imx477 camera fails with mmal ENOSPC, older camera works

Hi, I picked up an HQ camera (imx477) and I can’t get it to work at all out of the box. Every time I try to capture I get an ENOSPC error. An older camera I have works fine on the same board with the same cable, so I’m pretty sure it’s not the Pi or the ribbon. Anyone seen this before?

Welcome! Can you give us a bit more to go on?

  1. Which Pi board and which OS version are you running (“Buster” vs “Bullseye”, full vs lite)?
  2. What does vcgencmd get_camera report?
  3. Please paste the FULL verbose output of whatever capture command you’re running (-v flag).

The exact wording of the mmal error usually tells us a lot.

Sure. Board is a Raspberry Pi 4B, OS is Buster. Sensor is imx477 (the HQ camera).

vcgencmd get_camera gives:

supported=1 detected=1

And here’s the full output:

squash@court4:~ $ raspistill -v -o test.jpg

"raspistill" Camera App (commit bab9bf8790cd Tainted)

Camera Name imx477
Width 4056, Height 3040, filename test.jpg
Using camera 0, sensor mode 0
GPS output Disabled
Quality 85, Raw no
Thumbnail enabled Yes, width 64, height 48, quality 35
Time delay 5000, Timelapse 0
Link to latest frame enabled  no
Full resolution preview No
Capture method : Single capture
Preview Yes, Full screen Yes
Preview window 0,0,1024,768
Opacity 255
Sharpness 0, Contrast 0, Brightness 50
Saturation 0, ISO 0, Video Stabilisation No, Exposure compensation 0
Exposure Mode 'auto', AWB Mode 'auto', Image Effect 'none'
Flicker Avoid Mode 'off'
Metering Mode 'average', Colour Effect Enabled No with U = 128, V = 128
Rotation 0, hflip No, vflip No
ROI x 0.000000, y 0.000000, w 1.000000 h 1.000000
mmal: mmal_vc_component_enable: failed to enable component: ENOSPC
mmal: camera component couldn't be enabled
mmal: main: Failed to create camera component
mmal: Failed to run camera app. Please check for firmware updates

So the camera is detected, but enabling the component fails. I already rebooted a couple of times and ran updates.

Thanks, that log is exactly what I needed.

The key detail here is that get_camera shows supported=1 detected=1, so the Pi sees the sensor fine, and your old camera working on the same board/cable rules out a hardware path issue. The failure is happening when the mmal component tries to come up.

Important: the HQ cameras were updated (around March) and the newer revisions only work on Raspberry Pi OS Bullseye with the libcamera stack (libcamera-apps). They no longer work on Buster with raspistill/raspivid (the old mmal path). That notice is posted on the product page for the HQ cameras.

So the fix is:

  1. Install Raspberry Pi OS Bullseye (a fresh flash is cleanest).
  2. Capture with libcamera instead of raspistill, e.g. libcamera-still -o test.jpg.

Can you try that and let me know? Also, if you send me your purchase/order info by private message I can double check you have one of the units affected by this change.

Hmm, that’s annoying but it explains the weird error. A couple of things I tried before that, in case it matters:

  • sudo apt update && sudo apt full-upgrade
  • sudo rpi-update
  • Rebooted several times, reseated the ribbon

None of it changed anything, still the same ENOSPC. Is there really no way to keep Buster? Could I roll the camera firmware back instead of reinstalling the OS?

The last line of your log (“Please check for firmware updates”) is a bit of a red herring, it’s just a generic message the app prints when it can’t create the component. It doesn’t mean a firmware update will fix it.

On the newer HQ revisions there’s no supported path back to Buster/raspistill, so a rpi-update or a firmware rollback won’t bring the old mmal path back for this sensor. Reinstalling/flashing Bullseye and using libcamera-still is the supported route. You can keep Buster only if you’re using one of the older camera revisions, which this isn’t.

Go ahead and give Bullseye a try and let us know how the capture goes.

OK, took a bit of time but I flashed Bullseye and set it up. Tried libcamera-still -o test.jpg and… it works! No more ENOSPC. Thanks, that sorted it.

Just to confirm, the old raspistill command is basically dead for this camera now?

That’s the expected result, great to hear it’s capturing.

To summarise the whole thing for anyone else reading this thread:

  • Symptom: raspistill on Buster fails with mmal: mmal_vc_component_enable: failed to enable component: ENOSPC / camera component couldn't be enabled / Failed to create camera component, even though vcgencmd get_camera reports supported=1 detected=1.
  • Cause: the updated Arducam HQ cameras only run on Raspberry Pi OS Bullseye with libcamera-apps. They stopped supporting Buster and the old raspistill/mmam pipeline.
  • Fix: flash Bullseye and capture with libcamera (libcamera-still / libcamera-vid) instead of raspistill.

So yes, for this camera revision raspistill is no longer usable, use the libcamera tools. Glad it’s sorted!

One more thing now that I’ve got it working. The image has a lot of barrel distortion, way more than I’d like. Is there another lens available with essentially no barrel distortion, something comparable to the v2 camera in that respect? I’m using it for a fairly straight-edge scene and the bowing is noticeable.

The HQ camera uses an interchangeable C/CS mount, so the distortion you’re seeing is coming from the lens supplied with it (the 6mm CS lens has fairly visible barrel distortion), not the sensor. The v2 camera’s lens is a different, much wider but more corrected design, so there isn’t really a direct “same as v2” drop-in for the HQ body.

What people usually do:

  • Swap to a different CS-mount or M12 lens (with an M12-to-CS adapter) that’s rated for low distortion. Arducam carries several M12 lens options, so it’s worth checking the lens line-up for the focal length/distortion spec you need.
  • Correct it in post with a lens profile (lensfun/darktable, or a manual undistort map) if you can’t change the lens.

There’s no single official “zero barrel distortion” lens offered for the HQ camera that’s equivalent to the v2, so if straight-line accuracy is critical you may need to compare a few M12 lens options or keep using the v2 camera for that particular shot. Let me know the field of view you need and I can point you at the closest lens specs.