Dual 64MP USB 3 UVC Camera's can't take 64mp images (9248x6944)

  1. Where did you get the camera module(s)? - Arducam Website direct
  2. Model number of the product(s). - B0475
  3. What hardware/platform were you working on? - Raspberry Pi 5 with Bookworm
  4. Instructions you have followed. (link/manual/etc.) - Start USB3 UVC Camera on Linux - Arducam Wiki
  5. Problems you were having. - I can take a small number of 64MP (9248x6944) images before I get a CV2 Timeout error. I am trying to get images from 2 64MP USB cameras.
  6. The dmesg log from your hardware.

[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x414fd0b1]
[ 0.000000] Linux version 6.6.20+rpt-rpi-2712 ([email protected]) (gcc-12 (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT Debian 1:6.6.20-1+rpt1 (2024-03-07)
[ 0.000000] KASLR enabled
[ 0.000000] random: crng init done
[ 0.000000] Machine model: Raspberry Pi 5 Model B Rev 1.0
[ 0.000000] efi: UEFI not found.
[ 0.000000] Reserved memory: created CMA memory pool at 0x0000000002000000, size 320 MiB
[ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[ 0.000000] OF: reserved mem: 0x0000000002000000…0x0000000015ffffff (327680 KiB) map reusable linux,cma
[ 0.000000] OF: reserved mem: 0x0000000000000000…0x000000000007ffff (512 KiB) nomap non-reusable atf@0
[ 0.000000] OF: reserved mem: 0x000000003fd165a0…0x000000003fd165d6 (0 KiB) nomap non-reusable nvram@0
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000000000000-0x00000000ffffffff]
[ 0.000000] DMA32 empty
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x000000000007ffff]
[ 0.000000] node 0: [mem 0x0000000000080000-0x000000003f7fffff]
[ 0.000000] node 0: [mem 0x0000000040000000-0x00000000ffffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x00000000ffffffff]
[ 0.000000] On node 0, zone DMA: 512 pages in unavailable ranges
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv1.1 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: MIGRATE_INFO_TYPE not supported.
[ 0.000000] psci: SMC Calling Convention v1.2
[ 0.000000] percpu: Embedded 14 pages/cpu s183976 r8192 d37208 u229376
[ 0.000000] pcpu-alloc: s183976 r8192 d37208 u229376 alloc=14*16384
[ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[ 0.000000] Detected PIPT I-cache on CPU0
[ 0.000000] CPU features: detected: Virtualization Host Extensions
[ 0.000000] CPU features: detected: Hardware dirty bit management
[ 0.000000] CPU features: detected: Spectre-v4
[ 0.000000] CPU features: detected: Spectre-BHB
[ 0.000000] CPU features: kernel page table isolation forced ON by KASLR
[ 0.000000] CPU features: detected: Kernel page table isolation (KPTI)
[ 0.000000] alternatives: applying boot alternatives
[ 0.000000] Kernel command line: reboot=w coherent_pool=1M 8250.nr_uarts=1 pci=pcie_bus_safe snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 smsc95xx.macaddr=D8:3A:DD:C9:B9:89 vc_mem.mem_base=0x3fc00000 vc_mem.mem_size=0x40000000 console=ttyAMA10,115200 console=tty1 root=PARTUUID=3844e54c-02 rootfstype=ext4 fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles cfg80211.ieee80211_regdom=GB
[ 0.000000] Unknown kernel command line parameters “splash”, will be passed to user space.
[ 0.000000] Dentry cache hash table entries: 524288 (order: 8, 4194304 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 262144 (order: 7, 2097152 bytes, linear)
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 260608
[ 0.000000] mem auto-init: stack:all(zero), heap alloc:off, heap free:off
[ 0.000000] Memory: 3788752K/4186112K available (13376K kernel code, 2222K rwdata, 4288K rodata, 5056K init, 1213K bss, 69680K reserved, 327680K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] ftrace: allocating 43116 entries in 43 pages
[ 0.000000] ftrace: allocated 43 pages with 4 groups
[ 0.000000] trace event string verifier disabled
[ 0.000000] rcu: Preemptible hierarchical RCU implementation.
[ 0.000000] rcu: RCU event tracing is enabled.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=4.
[ 0.000000] Trampoline variant of Tasks RCU enabled.
[ 0.000000] Rude variant of Tasks RCU enabled.
[ 0.000000] Tracing variant of Tasks RCU enabled.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[ 0.000000] Root IRQ handler: gic_handle_irq
[ 0.000000] GIC: Using split EOI/Deactivate mode
[ 0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[ 0.000000] arch_timer: cp15 timer(s) running at 54.00MHz (phys).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0xc743ce346, max_idle_ns: 440795203123 ns
[ 0.000000] sched_clock: 56 bits at 54MHz, resolution 18ns, wraps every 4398046511102ns
[ 0.000157] Console: colour dummy device 80x25
[ 0.000161] printk: console [tty1] enabled
[ 0.000193] Calibrating delay loop (skipped), value calculated using timer frequency… 108.00 BogoMIPS (lpj=216000)
[ 0.000198] pid_max: default: 32768 minimum: 301
[ 0.000221] LSM: initializing lsm=capability,integrity
[ 0.000284] Mount-cache hash table entries: 8192 (order: 2, 65536 bytes, linear)
[ 0.000298] Mountpoint-cache hash table entries: 8192 (order: 2, 65536 bytes, linear)
[ 0.000632] cgroup: Disabling memory control group subsystem
[ 0.001036] RCU Tasks: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1.
[ 0.001063] RCU Tasks Rude: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1.
[ 0.001083] RCU Tasks Trace: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1.
[ 0.001139] rcu: Hierarchical SRCU implementation.
[ 0.001141] rcu: Max phase no-delay instances is 1000.
[ 0.001711] EFI services will not be available.
[ 0.001774] smp: Bringing up secondary CPUs …
[ 0.001930] Detected PIPT I-cache on CPU1
[ 0.001971] CPU1: Booted secondary processor 0x0000000100 [0x414fd0b1]
[ 0.002146] Detected PIPT I-cache on CPU2
[ 0.002181] CPU2: Booted secondary processor 0x0000000200 [0x414fd0b1]
[ 0.002344] Detected PIPT I-cache on CPU3
[ 0.002374] CPU3: Booted secondary processor 0x0000000300 [0x414fd0b1]
[ 0.002400] smp: Brought up 1 node, 4 CPUs
[ 0.002404] SMP: Total of 4 processors activated.
[ 0.002407] CPU features: detected: 32-bit EL0 Support
[ 0.002409] CPU features: detected: Data cache clean to the PoU not required for I/D coherence
[ 0.002411] CPU features: detected: Common not Private translations
[ 0.002413] CPU features: detected: CRC32 instructions
[ 0.002415] CPU features: detected: RCpc load-acquire (LDAPR)
[ 0.002417] CPU features: detected: LSE atomic instructions
[ 0.002419] CPU features: detected: Privileged Access Never
[ 0.002420] CPU features: detected: RAS Extension Support
[ 0.002423] CPU features: detected: Speculative Store Bypassing Safe (SSBS)
[ 0.002456] CPU: All CPU(s) started at EL2
[ 0.002458] alternatives: applying system-wide alternatives
[ 0.004313] devtmpfs: initialized
[ 0.007045] Enabled cp15_barrier support
[ 0.007051] Enabled setend support
[ 0.007113] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.007119] futex hash table entries: 1024 (order: 2, 65536 bytes, linear)
[ 0.007824] pinctrl core: initialized pinctrl subsystem
[ 0.007961] DMI not present or invalid.
[ 0.008127] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[ 0.008700] DMA: preallocated 1024 KiB GFP_KERNEL pool for atomic allocations
[ 0.008746] DMA: preallocated 1024 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[ 0.008794] DMA: preallocated 1024 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[ 0.008811] audit: initializing netlink subsys (disabled)
[ 0.008859] audit: type=2000 audit(0.008:1): state=initialized audit_enabled=0 res=1
[ 0.008975] thermal_sys: Registered thermal governor ‘step_wise’
[ 0.008987] cpuidle: using governor menu
[ 0.009046] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[ 0.009072] ASID allocator initialised with 32768 entries
[ 0.009358] Serial: AMBA PL011 UART driver
[ 0.010311] bcm2835-mbox 107c013880.mailbox: mailbox enabled
[ 0.010662] 107d001000.serial: ttyAMA10 at MMIO 0x107d001000 (irq = 15, base_baud = 0) is a PL011 rev2
[ 0.010671] printk: console [ttyAMA10] enabled
[ 0.015994] raspberrypi-firmware soc:firmware: Attached to firmware from 2024-02-16T15:28:41, variant start_cd
[ 0.019994] raspberrypi-firmware soc:firmware: Firmware hash is 4c845bd300000000000000000000000000000000
[ 0.026260] Modules: 2G module region forced by RANDOMIZE_MODULE_REGION_FULL
[ 0.026263] Modules: 0 pages in range for non-PLT usage
[ 0.026265] Modules: 129416 pages in range for PLT usage
[ 0.034463] bcm2835-dma 1000010000.dma: DMA legacy API manager, dmachans=0x1
[ 0.034816] iommu: Default domain type: Translated
[ 0.034819] iommu: DMA domain TLB invalidation policy: strict mode
[ 0.034918] SCSI subsystem initialized
[ 0.034955] usbcore: registered new interface driver usbfs
[ 0.034963] usbcore: registered new interface driver hub
[ 0.034971] usbcore: registered new device driver usb
[ 0.035053] pps_core: LinuxPPS API ver. 1 registered
[ 0.035055] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti [email protected]
[ 0.035060] PTP clock support registered
[ 0.035312] vgaarb: loaded
[ 0.035582] clocksource: Switched to clocksource arch_sys_counter
[ 0.035699] VFS: Disk quotas dquot_6.6.0
[ 0.035712] VFS: Dquot-cache hash table entries: 2048 (order 0, 16384 bytes)
[ 0.035737] FS-Cache: Loaded
[ 0.036014] CacheFiles: Loaded
[ 0.037421] NET: Registered PF_INET protocol family
[ 0.037516] IP idents hash table entries: 65536 (order: 5, 524288 bytes, linear)
[ 0.038776] tcp_listen_portaddr_hash hash table entries: 2048 (order: 1, 32768 bytes, linear)
[ 0.038797] Table-perturb hash table entries: 65536 (order: 4, 262144 bytes, linear)
[ 164.833132] uvcvideo 4-1:1.1: Non-zero status (-71) in video completion handler.
[ 164.898105] uvcvideo 2-1:1.1: Non-zero status (-71) in video completion handler.
[ 2411.741412] uvcvideo 2-1:1.1: Failed to set UVC probe control : -110 (exp. 34).
[ 2411.741607] uvcvideo 2-1:1.1: Failed to set UVC probe control : -71 (exp. 34).
[ 2411.741775] uvcvideo 2-1:1.1: Failed to set UVC probe control : -71 (exp. 34).
[ 2411.741943] uvcvideo 2-1:1.1: Failed to set UVC probe control : -71 (exp. 34).
[ 2411.742112] uvcvideo 2-1:1.1: Failed to set UVC probe control : -71 (exp. 34).
[ 2411.742297] uvcvideo 2-1:1.1: Failed to set UVC probe control : -71 (exp. 34).
[ 2411.742465] uvcvideo 2-1:1.1: Failed to set UVC probe control : -71 (exp. 34).
[ 2411.742634] uvcvideo 2-1:1.1: Failed to set UVC probe control : -71 (exp. 34).
[ 2411.742803] uvcvideo 2-1:1.1: Failed to set UVC probe control : -71 (exp. 34).
[ 2411.742972] uvcvideo 2-1:1.1: Failed to set UVC probe control : -71 (exp. 34).
[ 2411.743141] uvcvideo 2-1:1.1: Failed to set UVC probe control : -71 (exp. 34).
[ 2411.743310] uvcvideo 2-1:1.1: Failed to set UVC probe control : -71 (exp. 34).
[ 2411.743479] uvcvideo 2-1:1.1: Failed to set UVC probe control : -71 (exp. 34).
[ 2411.743647] uvcvideo 2-1:1.1: Failed to set UVC probe control : -71 (exp. 34).
[ 2411.743817] uvcvideo 2-1:1.1: Failed to set UVC probe control : -71 (exp. 34).
[ 2411.743985] uvcvideo 2-1:1.1: Failed to set UVC probe control : -71 (exp. 34).
[ 2411.744154] uvcvideo 2-1:1.1: Failed to set UVC probe control : -71 (exp. 34).
[ 2411.744323] uvcvideo 2-1:1.1: Failed to set UVC probe control : -71 (exp. 34).
[ 2411.744491] uvcvideo 2-1:1.1: Failed to set UVC probe control : -71 (exp. 34).
[ 2411.744671] uvcvideo 2-1:1.1: Failed to set UVC probe control : -71 (exp. 34).
[ 2412.104760] uvcvideo 4-1:1.1: Non-zero status (-71) in video completion handler.
[ 2520.703135] uvcvideo 2-1:1.1: Failed to set UVC probe control : -71 (exp. 34).
[ 2520.703313] uvcvideo 2-1:1.1: Failed to set UVC probe control : -71 (exp. 34).
[ 2520.703473] uvcvideo 2-1:1.1: Failed to set UVC probe control : -71 (exp. 34).
[ 2520.703646] uvcvideo 2-1:1.1: Failed to set UVC probe control : -71 (exp. 34).
[ 2520.703805] uvcvideo 2-1:1.1: Failed to set UVC probe control : -71 (exp. 34).
[ 2520.703965] uvcvideo 2-1:1.1: Failed to set UVC probe control : -71 (exp. 34).
[ 2520.704125] uvcvideo 2-1:1.1: Failed to set UVC probe control : -71 (exp. 34).
[ 2520.704284] uvcvideo 2-1:1.1: Failed to set UVC probe control : -71 (exp. 34).
[ 2520.704443] uvcvideo 2-1:1.1: Failed to set UVC probe control : -71 (exp. 34).
[ 2520.704602] uvcvideo 2-1:1.1: Failed to set UVC probe control : -71 (exp. 34).
[ 2520.704770] uvcvideo 2-1:1.1: Failed to set UVC probe control : -71 (exp. 34).
[ 2520.704929] uvcvideo 2-1:1.1: Failed to set UVC probe control : -71 (exp. 34).
[ 2520.705090] uvcvideo 2-1:1.1: Failed to set UVC probe control : -71 (exp. 34).
[ 2520.705252] uvcvideo 2-1:1.1: Failed to set UVC probe control : -71 (exp. 34).
[ 2520.705421] uvcvideo 2-1:1.1: Failed to set UVC probe control : -71 (exp. 34).
[ 2520.705588] uvcvideo 2-1:1.1: Failed to set UVC probe control : -71 (exp. 34).
[ 2520.705755] uvcvideo 2-1:1.1: Failed to set UVC probe control : -71 (exp. 34).
[ 2520.705922] uvcvideo 2-1:1.1: Failed to set UVC probe control : -71 (exp. 34).
[ 2520.706081] uvcvideo 2-1:1.1: Failed to set UVC probe control : -71 (exp. 34).
[ 2520.706249] uvcvideo 2-1:1.1: Failed to set UVC probe control : -71 (exp. 34).
[ 2520.824053] uvcvideo 4-1:1.1: Non-zero status (-71) in video completion handler.
[ 2543.384125] usb 4-1: USB disconnect, device number 2
[ 2547.157049] usb 4-1: new SuperSpeed USB device number 3 using xhci-hcd
[ 2547.177917] usb 4-1: New USB device found, idVendor=0781, idProduct=5581, bcdDevice= 1.00
[ 2547.177923] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2547.177926] usb 4-1: Product: SanDisk 3.2Gen1
[ 2547.177928] usb 4-1: Manufacturer: USB
[ 2547.177931] usb 4-1: SerialNumber: 04013668371f9d16ecec0351b549e006626e3eb0a52463c29d96b37bde5f0d95b2c00000000000000000000078470849009766188155810756ac0b43
[ 2547.178767] usb-storage 4-1:1.0: USB Mass Storage device detected
[ 2547.178917] scsi host0: usb-storage 4-1:1.0
[ 2548.189752] scsi 0:0:0:0: Direct-Access USB SanDisk 3.2Gen1 1.00 PQ: 0 ANSI: 6
[ 2548.195925] sd 0:0:0:0: [sda] 60125184 512-byte logical blocks: (30.8 GB/28.7 GiB)
[ 2548.196785] sd 0:0:0:0: [sda] Write Protect is off
[ 2548.196790] sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00
[ 2548.197204] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn’t support DPO or FUA
[ 2548.197586] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 2548.209057] sda: sda1
[ 2548.209217] sd 0:0:0:0: [sda] Attached SCSI removable disk
[ 2548.517661] FAT-fs (sda1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[ 2971.871427] sda: detected capacity change from 60125184 to 0

  1. Troubleshooting attempts you’ve made. - Fresh install of Bookworm. Only installed CV2. Different USB cables, power supplies, different camera modules, different RPI 5, different SD Card.

  2. What help do you need? - I believe there is some sort of memory/buffer shortage error. Or there is some issue going. I want to be able to take continuous images over a period of weeks.

Hello,

I have a RPi5 and 2 USB 3 64MP UVC cameras plugged in. I am using a fresh install of Bookwork but when I try and take a series of images from both cameras I can usually get a few images before I get a CV2 timeout error. I have included my test code so that you can see what is going on.

Thanks.

import cv2
from datetime import datetime

camera = cv2.VideoCapture(“/dev/video0”)
camera.set(cv2.CAP_PROP_FRAME_WIDTH,9248)
camera.set(cv2.CAP_PROP_FRAME_HEIGHT,6944)

camera2 = cv2.VideoCapture(“/dev/video2”)
camera2.set(cv2.CAP_PROP_FRAME_WIDTH,9248)
camera2.set(cv2.CAP_PROP_FRAME_HEIGHT,6944)

counter=1
while True:

print("Capturing frame "+str(counter))
ret, frame = camera.read()
ret2, frame2 = camera2.read()
print("ret="+str(ret)+"  ret2="+str(ret2))
if not ret or not ret2:
    print("frame read error")
    x=input("stop")
print(datetime.now())
counter+=1

as it currently stands it is not possible to capture images with two 64MP RGB888 simultanneously dude some sort of libcamera memory allocation issue that arducam is actively trying to work out with libcamera people. What you can do is make 1-2 sec delay between two cameras at 64MP or use YUV420 encoding instead of RGB888 at 64MP or decrease resolution to 48MP.

Solution and my full thread here on the same topic:

Hello,

Thanks for the reply.

My issue is that I am using CV2 to try and read a frame from both 64mp cameras, it is not simultaneous, I don’t need that, but just trying to read a frame from each sequentially is causing timeout errors, which I am assuming are due to some sort of memory allocation issue. My next big issue is that I want to try and run a 3 or possibly 4 64MP camera setup.