Pi5 Arducam Pivariety Camera frontend has timed out

Hello Arducam team

I recently purchased a B0263 and B0266 PiVariety camera kit.

I have a Raspberry PI 5 board with default Bookworm Desktop image release on 13-May-2025 64bit.
I am testing it with Arducam Pivariety Camera B0263 and B0266.

For Arducam B0266,
On board power on, 1st time , libcamera-hello -t 0 gets failed with a similar error.

dipenparmar@dipen:~ $ libcamera-hello -t 0
[0:01:23.916596760] [1962] INFO Camera camera_manager.cpp:326 libcamera v0.5.0+84-79f583c3-dirty (2025-05-06T02:52:19BST)
[0:01:23.923566906] [1965] INFO RPI pisp.cpp:720 libpisp version v1.2.1 981977ff21f3 29-04-2025 (14:13:50)
[0:01:23.949106648] [1965] ERROR IPAProxy ipa_proxy.cpp:171 Configuration file ‘arducam-pivariety_mono.json’ not found for IPA module ‘rpi/pisp’
[0:01:24.125471742] [1965] INFO RPI pisp.cpp:1180 Registered camera /base/axi/pcie@1000120000/rp1/i2c@80000/arducam_pivariety@c to CFE device /dev/media0 and ISP device /dev/media2 using PiSP variant BCM2712_D0
Made X/EGL preview window
Mode selection for 1280:400:12:P
R8,1280x400/0 - Score: 2000
R8,2560x720/0 - Score: 2533.33
R8,2560x800/0 - Score: 2420
R10_CSI2P,640x200/0 - Score: 2680
R10_CSI2P,1280x400/0 - Score: 1000
R10_CSI2P,2560x720/0 - Score: 1533.33
R10_CSI2P,2560x800/0 - Score: 1420
Stream configuration adjusted
[0:01:24.353851007] [1962] INFO Camera camera.cpp:1205 configuring streams: (0) 1280x400-YUV420 (1) 1280x400-MONO_PISP_COMP1
[0:01:24.417815109] [1965] INFO RPI pisp.cpp:1484 Sensor: /base/axi/pcie@1000120000/rp1/i2c@80000/arducam_pivariety@c - Selected sensor format: 1280x400-Y10_1X10 - Selected CFE format: 1280x400-PC1M
[0:01:25.570693420] [1965] WARN V4L2 v4l2_videodevice.cpp:2150 /dev/video4[16:cap]: Dequeue timer of 1000000.00us has expired!
[0:01:25.570739399] [1965] ERROR RPI pipeline_base.cpp:1420 Camera frontend has timed out!
[0:01:25.570745289] [1965] ERROR RPI pipeline_base.cpp:1421 Please check that your camera sensor connector is attached securely.
[0:01:25.570750810] [1965] ERROR RPI pipeline_base.cpp:1422 Alternatively, try another cable and/or sensor.
ERROR: Device timeout detected, attempting a restart!!!

On 2nd time onwards, libcamera-hello -t 0 has no failures and works perfectly. There is no failure even if i stop this and restarts application as many as times.

dipenparmar@dipen:~ $ libcamera-hello -t 0
[0:03:02.110649312] [2016] INFO Camera camera_manager.cpp:326 libcamera v0.5.0+84-79f583c3-dirty (2025-05-06T02:52:19BST)
[0:03:02.117595506] [2019] INFO RPI pisp.cpp:720 libpisp version v1.2.1 981977ff21f3 29-04-2025 (14:13:50)
[0:03:02.145472173] [2019] ERROR IPAProxy ipa_proxy.cpp:171 Configuration file ‘arducam-pivariety_mono.json’ not found for IPA module ‘rpi/pisp’
[0:03:02.322062339] [2019] INFO RPI pisp.cpp:1180 Registered camera /base/axi/pcie@1000120000/rp1/i2c@80000/arducam_pivariety@c to CFE device /dev/media0 and ISP device /dev/media2 using PiSP variant BCM2712_D0
Made X/EGL preview window
Mode selection for 1280:400:12:P
R8,1280x400/0 - Score: 2000
R8,2560x720/0 - Score: 2533.33
R8,2560x800/0 - Score: 2420
R10_CSI2P,640x200/0 - Score: 2680
R10_CSI2P,1280x400/0 - Score: 1000
R10_CSI2P,2560x720/0 - Score: 1533.33
R10_CSI2P,2560x800/0 - Score: 1420
Stream configuration adjusted
[0:03:02.363504420] [2016] INFO Camera camera.cpp:1205 configuring streams: (0) 1280x400-YUV420 (1) 1280x400-MONO_PISP_COMP1
[0:03:02.430220748] [2019] INFO RPI pisp.cpp:1484 Sensor: /base/axi/pcie@1000120000/rp1/i2c@80000/arducam_pivariety@c - Selected sensor format: 1280x400-Y10_1X10 - Selected CFE format: 1280x400-PC1M

For Arducam B0263,
On board power on 1st or multiple times, libcamera-hello -t 0 gets failed with similar error.

In both cases, I am able to detect camera with proper modes using libcamera-hello --list-camera command.

dipenparmar@dipen:~ $ libcamera-hello --list-camera
Available cameras
0 : arducam-pivariety [2560x800 10-bit MONO] (/base/axi/pcie@1000120000/rp1/i2c@80000/arducam_pivariety@c)
Modes: ‘R8’ : 1280x400 [150.04 fps - (0, 0)/1280x400 crop]
2560x720 [75.67 fps - (0, 0)/2560x720 crop]
2560x800 [60.04 fps - (0, 0)/2560x800 crop]
‘R10_CSI2P’ : 640x200 [inf fps - (0, 0)/0x0 crop]
1280x400 [150.04 fps - (0, 0)/1280x400 crop]
2560x720 [65.02 fps - (0, 0)/2560x720 crop]
2560x800 [60.03 fps - (0, 0)/2560x800 crop]

FYI - I checked almost 3-4 different cables and do not feel that they have any issues.

I have made changes as per Quick Start Guide for Arducam CamArray HAT Kit - Arducam Wiki.

I checked with LIBCAMERA_RPI_CONFIG_FILE=/usr/local/share/libcamera/pipeline/rpi/pisp/example.yaml with timeout 99999999 before libcamera command and seems the timeout error is not shown but camera preview not started for 1st time but for 2nd time onward it works without any issues. So, not sure if adding the config file makes any changes.

Logs attached of Testing B0266:
OS Screenshot
config file
installed package list file
uname-a and uname-r textfiles
first boot dmesg log files
for 1st failure and 2nd success dmesg log files

Ticket has given the comments : [HOW-TO] debug dequeue timer · Issue #952 · raspberrypi/picamera2 · GitHub

Suggest if any latest fix for this or am i missing any critical change.
Screenshot 2025-06-19 at 10.55.36 PM

I found few crashes ! This seems recovering on B0266 for second retry but not helping with B0263.

[   25.319491] ------------[ cut here ]------------
[   25.319499] WARNING: CPU: 3 PID: 1541 at drivers/media/v4l2-core/v4l2-subdev.c:457 call_s_stream+0xe8/0x110 [videodev]
[   25.319537] Modules linked in: rfcomm snd_seq_dummy snd_hrtimer snd_seq snd_seq_device algif_hash algif_skcipher af_alg bnep binfmt_misc vc4 snd_soc_hdmi_codec drm_display_helper brcmfmac_wcc arducam_pivariety spidev brcmfmac brcmutil hci_uart btbcm bluetooth cfg80211 cec ecdh_generic ecc drm_dma_helper rfkill raspberrypi_hwmon snd_soc_core rpi_hevc_dec aes_ce_blk pisp_be aes_ce_cipher rp1_cfe ghash_ce v4l2_mem2mem gf128mul v4l2_fwnode v3d snd_compress i2c_brcmstb spi_bcm2835 v4l2_async libaes videobuf2_dma_contig snd_pcm_dmaengine videobuf2_memops snd_pcm videobuf2_v4l2 sha2_ce gpu_sched videodev snd_timer sha256_arm64 rp1_pio snd drm_shmem_helper i2c_designware_platform sha1_ce raspberrypi_gpiomem videobuf2_common rp1_mailbox drm_kms_helper rp1_adc mc i2c_designware_core sha1_generic rp1_fw gpio_keys uio_pdrv_genirq nvmem_rmem uio i2c_dev drm ledtrig_pattern drm_panel_orientation_quirks backlight fuse dm_mod ip_tables x_tables ipv6
[   25.319604] CPU: 3 UID: 0 PID: 1541 Comm: libcamera-hello Not tainted 6.12.33-v8-16k+ #1888
[   25.319607] Hardware name: Raspberry Pi 5 Model B Rev 1.1 (DT)
[   25.319609] pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[   25.319612] pc : call_s_stream+0xe8/0x110 [videodev]
[   25.319627] lr : cfe_stop_streaming+0xdc/0x210 [rp1_cfe]
[   25.319632] sp : ffffc00086253a00
[   25.319633] x29: ffffc00086253a00 x28: ffff8002811b4a00 x27: 0000000000000000
[   25.319637] x26: 0000000000000009 x25: 0000000000000001 x24: ffff8002811b5000
[   25.319640] x23: ffff800301070370 x22: 0000000000000000 x21: ffff800301073b68
[   25.319643] x20: ffff800301070000 x19: 0000000000000008 x18: ffffc00086253ae0
[   25.319647] x17: 0000000000000000 x16: ffffd06fcf1a8668 x15: ffffd06fcf2fe358
[   25.319650] x14: ffff80007ffe6c30 x13: ffffffffffffffff x12: ffffd06fcf2fe358
[   25.319653] x11: 0000000000000001 x10: 0000000000000002 x9 : ffffd06fb0413164
[   25.319657] x8 : 0000000000000000 x7 : 00000000000001e0 x6 : 0000000000000025
[   25.319660] x5 : ffff800301074358 x4 : 0000000000000000 x3 : ffffd06fb0171c00
[   25.319663] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff8001017f8880
[   25.319667] Call trace:
[   25.319668]  call_s_stream+0xe8/0x110 [videodev]
[   25.319683]  cfe_stop_streaming+0xdc/0x210 [rp1_cfe]
[   25.319686]  __vb2_queue_cancel+0x34/0x2d8 [videobuf2_common]
[   25.319694]  vb2_core_queue_release+0x2c/0x88 [videobuf2_common]
[   25.319699]  _vb2_fop_release+0x7c/0x90 [videobuf2_v4l2]
[   25.319705]  vb2_fop_release+0x34/0x68 [videobuf2_v4l2]
[   25.319709]  v4l2_release+0xec/0x100 [videodev]
[   25.319723]  __fput+0xd0/0x2e0
[   25.319728]  ____fput+0x1c/0x30
[   25.319730]  task_work_run+0x78/0xe0
[   25.319733]  do_exit+0x2e0/0x9c0
[   25.319737]  do_group_exit+0x3c/0xa0
[   25.319740]  get_signal+0x9e0/0x9e8
[   25.319744]  do_signal+0x94/0x10d0
[   25.319746]  do_notify_resume+0xd0/0x150
[   25.319750]  el0_svc+0xbc/0xd0
[   25.319754]  el0t_64_sync_handler+0x13c/0x158
[   25.319758]  el0t_64_sync+0x190/0x198
[   25.319760] ---[ end trace 0000000000000000 ]---