Quad IMX519 16MP on Zero 2 W: Failed to start camera error

Hello everyone

I have been trying to get the Quad 16MP hat (got it from the Kickstarter campaign) to run on a Raspi Zero 2 W.
The setup works on a Raspi 4, so the cameras and the hat are fine.

Here’s the situation:

  • Fresh RP Zero 2 W, fresh SD-Card with latest Bullseye 32bit
  • Connecting via ssh
  • I followed the Arducam setup guide step by step
  • Activated Glamor and Full KMS
  • Tried every suggestion in this threads: Link
  • Tried booting to the GUI as well as to CLI
  • Also tried connecting via vnc and directly with keyboard, mouse and display

I always get the same result:

Error message:

[email protected]:~ $ libcamera-still -t 5000 -n -o test.jpg [0:03:04.107742808] [1621] INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3572-e13ccdd5 [0:03:04.130651166] [1623] WARN CameraSensorProperties camera_sensor_properties.cpp:163 No static properties available for 'imx519' [0:03:04.130746165] [1623] WARN CameraSensorProperties camera_sensor_properties.cpp:165 Please consider updating the camera sensor properties database [0:03:04.131963763] [1623] ERROR CameraSensor camera_sensor.cpp:591 'imx519 10-001a': Camera sensor does not support test pattern modes. [0:03:04.183816016] [1623] WARN RPI raspberrypi.cpp:1263 Mismatch between Unicam and CamHelper for embedded data usage! [0:03:04.184890489] [1623] ERROR DelayedControls delayed_controls.cpp:87 Delay request for control id 0x009a090a but control is not exposed by device /dev/v4l-subdev0 [0:03:04.185541006] [1623] INFO RPI raspberrypi.cpp:1386 Registered camera /base/soc/i2c0mux/[email protected]/[email protected] to Unicam device /dev/media3 and ISP device /dev/media0 [0:03:04.186642302] [1621] INFO Camera camera.cpp:1029 configuring streams: (0) 2328x1748-YUV420 [0:03:04.187730472] [1623] INFO RPI raspberrypi.cpp:764 Sensor: /base/soc/i2c0mux/[email protected]/[email protected] - Selected sensor format: 2328x1748-SRGGB10_1X10 - Selected unicam format: 2328x1748-pRAA [0:03:04.256462264] [1623] ERROR V4L2 v4l2_videodevice.cpp:1852 /dev/video0[14:cap]: Failed to start streaming: Input/output error ERROR: *** failed to start camera ***

Output of uname -a:

Linux payload 5.15.32-v7+ #1538 SMP Thu Mar 31 19:38:48 BST 2022 armv7l GNU/Linux

Output of vcgencmd version:

Mar 24 2022 13:20:54 Copyright (c) 2012 Broadcom version e5a963efa66a1974127860b42e913d2374139ff5 (clean) (release) (start)

Output of libcamera-hello --version

libcamera-apps build: 1cdc057d2db9-intree 28-06-2022 (05:05:40) libcamera build: v0.0.0+3572-e13ccdd5

Has anybody gotten this to work?
I got in touch with Arducam support but haven’t heard back from them, so I’d really appreciate any ideas you lovely people might have.

Cheers!
Manuel

hi, @manolito

You can try adding "dtoverlay=vc4-kms-v3d,cma-512 " in the /boot/config.txt file.

hello @yang

Thanks for your reply!

This did produce a different error message:

[0:00:41.600751441] [954] INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3572-e13ccdd5
[0:00:41.624627118] [958] WARN CameraSensorProperties camera_sensor_properties.cpp:163 No static properties available for 'imx519'
[0:00:41.624732483] [958] WARN CameraSensorProperties camera_sensor_properties.cpp:165 Please consider updating the camera sensor properties database
[0:00:41.625861233] [958] ERROR CameraSensor camera_sensor.cpp:591 'imx519 10-001a': Camera sensor does not support test pattern modes.
[0:00:41.700696649] [958] WARN RPI raspberrypi.cpp:1263 Mismatch between Unicam and CamHelper for embedded data usage!
[0:00:41.701871233] [958] ERROR DelayedControls delayed_controls.cpp:87 Delay request for control id 0x009a090a but control is not exposed by device /dev/v4l-subdev0
[0:00:41.702566649] [958] INFO RPI raspberrypi.cpp:1386 Registered camera /base/soc/i2c0mux/[email protected]/[email protected] to Unicam device /dev/media3 and ISP device /dev/media0
[0:00:41.703712014] [954] INFO Camera camera.cpp:1029 configuring streams: (0) 2328x1748-YUV420
[0:00:41.704590816] [958] INFO RPI raspberrypi.cpp:764 Sensor: /base/soc/i2c0mux/[email protected]/[email protected] - Selected sensor format: 2328x1748-SRGGB10_1X10 - Selected unicam format: 2328x1748-pRAA
[0:00:41.707390764] [958] ERROR V4L2 v4l2_videodevice.cpp:1211 /dev/video14[16:cap]: Unable to request 4 buffers: Cannot allocate memory

ERROR: *** failed to allocate capture buffers ***

Here on line 4048 i found that cma-512 needs 1 GB – the Zero 2 W only has 512 though.

A few thoughts:

  • Does this interact in any way with the gpu-mem setting?
  • Does it matter if I boot to cli or to desktop?
  • I don’t need the cams to trigger at once, I’d be more than happy to switch through them manually with the i2c command and then trigger, if that makes things any easier.

Also I found that i was supposed to supply some more information like dmesg, please find it here: Gist

hi, @manolito

If this command can produce different information, then you can modify 512 to 128 to meet the requirements of pi zero.

Yes, the effect of this command is to allocate the specified memory size.

There is no problem with starting the desktop.

You can switch camera channels using i2c commands to display a camera individually.

hey @yang

I have tried all the settings for cma from 64 to 512 but that didn’t help

Is there an optimal setting?

Yes, this works great on the Raspi 4, but doesn’t have an effect on the failed to start camera error on the Zero 2 W.

Is there anything else I could try to get this working on the Zero 2 W?

Thanks

hi, @manolito

Which driver of imx519 do you install? We recommend installing imx519_kernel_driver_low_speed.

If this is not what you installed, you can try to install this driver and test it.

hi @yang

Yes, I have installed imx519_kernel_driver_low_speed

hi, @manolito

We tested it on a pi zero and found it to be not very stable. But it can be displayed normally.

You can try running it a few more times.

Ok, I will keep trying and share the solution if I find it. Thanks.

For anyone else looking into this: The quad IMX519 hat does work on a Zero 2 W.

What did the trick for me was using shorter flex cables. For the Pi to hat connection I used these 10cm ones I found on Mouser and for the hat to cam connections I used the shorter ones from this Arducam cable kit.

On the software side:

  • A fresh card with 32 bit Bullseye on it
  • I did run rpi-update
  • then I followed the Arducam setup guide step by step
  • That’s it, no modifications to /boot/config.txt or anything needed

Good luck!