raspberrypi / libcamera

Other
240 stars 102 forks source link

libcamera c++ api not working with raspberry pi 5 and pi camera #206

Open AAleka opened 4 days ago

AAleka commented 4 days ago

I have a raspberry pi 5 and a pi camera (IMX296). I cannot get them to work with libcamera c++ api (I installed it with apt install libcamera-dev). It shows one frame and then I get the following errors:

[1:38:18.970107448] [2487]  WARN V4L2 v4l2_videodevice.cpp:2095 /dev/video4[15:cap]: Dequeue timer of 1000000.00us has expired!
[1:38:18.970175948] [2487] ERROR RPI pipeline_base.cpp:1364 Camera frontend has timed out!
[1:38:18.970181319] [2487] ERROR RPI pipeline_base.cpp:1365 Please check that your camera sensor connector is attached securely.
[1:38:18.970186652] [2487] ERROR RPI pipeline_base.cpp:1366 Alternatively, try another cable and/or sensor.

However, I tested the cable, camera and my code on a raspberry pi zero and it works fine. Also I tested my pi 5 and a camera with libcamera-apps and it works fine. I am using the original pi 5 power supply, I tried changing the /boot/firmware/config.txt (camera_auto_detect=0/1, dtoverlay=imx296,cam0) but it still does not work.

naushir commented 3 days ago

Also I tested my pi 5 and a camera with libcamera-apps and it works fine.

Just to clarify, you tested another camera on the Pi 5 and it worked? If so, what sensor was this?

AAleka commented 3 days ago

@naushir No, I tested the same camera on the Pi 5. The same camera works with the Pi Zero, but not the Pi 5.

naushir commented 3 days ago

Do you happen to have any other camera that you can test with your Pi 5? Can you provide the exact command line you are running? Also, can you run camera-bug-report and paste the output file generated here?

AAleka commented 3 days ago

@naushir so, when I run libcamera-apps (libcamera-hello) in the terminal it works. But when I try to use the C++ API it shouw the first frame and throws the errors above. Unfortunately, I don't have any other Pi camera but I have the Pi Zero and I successfully tested the API on it, so it can't be the cable or the camera issue. The output of camera-bug-report:

--------------------------------------------------------------------------------
rpicam-apps Bug Report
--------------------------------------------------------------------------------
Date: 11-11-2024 (17:12:31)
Command: /usr/bin/camera-bug-report

--------------------------------------------------------------------------------
Hardware information
--------------------------------------------------------------------------------
** hostname **
rpi5

** cat /proc/cpuinfo **
processor   : 0
BogoMIPS    : 108.00
Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x4
CPU part    : 0xd0b
CPU revision    : 1

processor   : 1
BogoMIPS    : 108.00
Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x4
CPU part    : 0xd0b
CPU revision    : 1

processor   : 2
BogoMIPS    : 108.00
Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x4
CPU part    : 0xd0b
CPU revision    : 1

processor   : 3
BogoMIPS    : 108.00
Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x4
CPU part    : 0xd0b
CPU revision    : 1

Revision    : c04170
Serial      : e46803cb3ed37867
Model       : Raspberry Pi 5 Model B Rev 1.0

--------------------------------------------------------------------------------
Configuration
--------------------------------------------------------------------------------
** cat /boot/firmware/cmdline.txt **
console=serial0,115200 console=tty1 root=PARTUUID=05a4a276-02 rootfstype=ext4 fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles cfg80211.ieee80211_regdom=TR
** cat /boot/firmware/config.txt **
# For more options and information see
# http://rptl.io/configtxt
# Some settings may impact device functionality. See link above for details

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

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

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

# Automatically load overlays for detected cameras
camera_auto_detect=1

# Automatically load overlays for detected DSI displays
display_auto_detect=1

# Automatically load initramfs files, if found
auto_initramfs=1

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

# Don't have the firmware create an initial video= setting in cmdline.txt.
# Use the kernel's default instead.
disable_fw_kms_setup=1

# Run in 64-bit mode
arm_64bit=1

# Disable compensation for displays with overscan
disable_overscan=1

# Run as fast as firmware / board allows
arm_boost=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

[cm5]
dtoverlay=dwc2,dr_mode=host

[all]

--------------------------------------------------------------------------------
Logs
--------------------------------------------------------------------------------
** dmesg **
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x414fd0b1]
[    0.000000] Linux version 6.6.59-v8-16k+ (dom@buildbot) (aarch64-linux-gnu-gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #1812 SMP PREEMPT Fri Nov  8 15:40:46 GMT 2024
[    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 64 MiB
[    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[    0.000000] OF: reserved mem: 0x0000000002000000..0x0000000005ffffff (65536 KiB) map reusable linux,cma
[    0.000000] OF: reserved mem: 0x0000000000000000..0x000000000007ffff (512 KiB) nomap non-reusable atf@0
[    0.000000] OF: reserved mem: 0x000000003fd165e0..0x000000003fd16617 (0 KiB) nomap non-reusable nvram@0
[    0.000000] NUMA: No NUMA configuration found
[    0.000000] NUMA: Faking a node at [mem 0x0000000000000000-0x00000000ffffffff]
[    0.000000] NUMA: NODE_DATA [mem 0xffd892c0-0xffd8bfff]
[    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-0x000000003fbfffff]
[    0.000000]   node   0: [mem 0x0000000040000000-0x00000000ffffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x00000000ffffffff]
[    0.000000] On node 0, zone DMA: 256 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 s184168 r8192 d37016 u229376
[    0.000000] pcpu-alloc: s184168 r8192 d37016 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] CPU features: detected: SSBS not fully self-synchronizing
[    0.000000] alternatives: applying boot alternatives
[    0.000000] Kernel command line: reboot=w coherent_pool=1M 8250.nr_uarts=1 pci=pcie_bus_safe cgroup_disable=memory numa_policy=interleave  smsc95xx.macaddr=D8:3A:DD:C0:AC:DF vc_mem.mem_base=0x3fc00000 vc_mem.mem_size=0x40000000  console=ttyAMA10,115200 console=tty1 root=PARTUUID=05a4a276-02 rootfstype=ext4 fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles cfg80211.ieee80211_regdom=TR
[    0.000000] cgroup: Disabling memory control group subsystem
[    0.000000] mempolicy: NUMA default policy overridden to 'interleave:0'
[    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] Fallback order for Node 0: 0 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 260864
[    0.000000] Policy zone: DMA
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 4054032K/4190208K available (13504K kernel code, 2220K rwdata, 4320K rodata, 5120K init, 1216K bss, 70640K reserved, 65536K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] ftrace: allocating 43569 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.000176] Console: colour dummy device 80x25
[    0.000180] printk: console [tty1] enabled
[    0.000232] Calibrating delay loop (skipped), value calculated using timer frequency.. 108.00 BogoMIPS (lpj=216000)
[    0.000238] pid_max: default: 32768 minimum: 301
[    0.000264] LSM: initializing lsm=capability,integrity
[    0.000318] Mount-cache hash table entries: 8192 (order: 2, 65536 bytes, linear)
[    0.000330] Mountpoint-cache hash table entries: 8192 (order: 2, 65536 bytes, linear)
[    0.000955] RCU Tasks: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1.
[    0.000976] RCU Tasks Rude: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1.
[    0.000995] RCU Tasks Trace: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1.
[    0.001050] rcu: Hierarchical SRCU implementation.
[    0.001052] rcu:     Max phase no-delay instances is 1000.
[    0.001651] EFI services will not be available.
[    0.001711] smp: Bringing up secondary CPUs ...
[    0.001864] Detected PIPT I-cache on CPU1
[    0.001903] CPU1: Booted secondary processor 0x0000000100 [0x414fd0b1]
[    0.002080] Detected PIPT I-cache on CPU2
[    0.002113] CPU2: Booted secondary processor 0x0000000200 [0x414fd0b1]
[    0.002272] Detected PIPT I-cache on CPU3
[    0.002301] CPU3: Booted secondary processor 0x0000000300 [0x414fd0b1]
[    0.002331] smp: Brought up 1 node, 4 CPUs
[    0.002335] SMP: Total of 4 processors activated.
[    0.002338] CPU features: detected: 32-bit EL0 Support
[    0.002340] CPU features: detected: Data cache clean to the PoU not required for I/D coherence
[    0.002342] CPU features: detected: Common not Private translations
[    0.002344] CPU features: detected: CRC32 instructions
[    0.002346] CPU features: detected: RCpc load-acquire (LDAPR)
[    0.002348] CPU features: detected: LSE atomic instructions
[    0.002350] CPU features: detected: Privileged Access Never
[    0.002351] CPU features: detected: RAS Extension Support
[    0.002354] CPU features: detected: Speculative Store Bypassing Safe (SSBS)
[    0.002388] CPU: All CPU(s) started at EL2
[    0.002389] alternatives: applying system-wide alternatives
[    0.004241] devtmpfs: initialized
[    0.007238] Enabled cp15_barrier support
[    0.007245] Enabled setend support
[    0.007295] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.007301] futex hash table entries: 1024 (order: 2, 65536 bytes, linear)
[    0.007523] pinctrl core: initialized pinctrl subsystem
[    0.007642] DMI not present or invalid.
[    0.007792] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.008349] DMA: preallocated 1024 KiB GFP_KERNEL pool for atomic allocations
[    0.008394] DMA: preallocated 1024 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    0.008441] DMA: preallocated 1024 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.008456] audit: initializing netlink subsys (disabled)
[    0.008501] audit: type=2000 audit(0.008:1): state=initialized audit_enabled=0 res=1
[    0.008619] thermal_sys: Registered thermal governor 'step_wise'
[    0.008630] cpuidle: using governor menu
[    0.008699] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.008727] ASID allocator initialised with 32768 entries
[    0.009043] Serial: AMBA PL011 UART driver
[    0.009889] bcm2835-mbox 107c013880.mailbox: mailbox enabled
[    0.010230] 107d001000.serial: ttyAMA10 at MMIO 0x107d001000 (irq = 15, base_baud = 0) is a PL011 rev2
[    0.010240] printk: console [ttyAMA10] enabled
[    0.015990] raspberrypi-firmware soc:firmware: Attached to firmware from 2024-11-05T12:38:12, variant start_cd
[    0.019989] raspberrypi-firmware soc:firmware: Firmware hash is 3c4fc88600000000000000000000000000000000
[    0.026417] Modules: 2G module region forced by RANDOMIZE_MODULE_REGION_FULL
[    0.026421] Modules: 0 pages in range for non-PLT usage
[    0.026423] Modules: 129400 pages in range for PLT usage
[    0.032511] bcm2835-dma 1000010000.dma: DMA legacy API manager, dmachans=0x1
[    0.032873] iommu: Default domain type: Translated
[    0.032875] iommu: DMA domain TLB invalidation policy: strict mode
[    0.032959] SCSI subsystem initialized
[    0.032994] usbcore: registered new interface driver usbfs
[    0.033002] usbcore: registered new interface driver hub
[    0.033011] usbcore: registered new device driver usb
[    0.033101] pps_core: LinuxPPS API ver. 1 registered
[    0.033103] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.033108] PTP clock support registered
[    0.033372] vgaarb: loaded
[    0.033742] clocksource: Switched to clocksource arch_sys_counter
[    0.033852] VFS: Disk quotas dquot_6.6.0
[    0.033865] VFS: Dquot-cache hash table entries: 2048 (order 0, 16384 bytes)
[    0.033893] FS-Cache: Loaded
[    0.033928] CacheFiles: Loaded
[    0.038771] NET: Registered PF_INET protocol family
[    0.038853] IP idents hash table entries: 65536 (order: 5, 524288 bytes, linear)
[    0.040070] tcp_listen_portaddr_hash hash table entries: 2048 (order: 1, 32768 bytes, linear)
[    0.040093] Table-perturb hash table entries: 65536 (order: 4, 262144 bytes, linear)
[    0.040097] TCP established hash table entries: 32768 (order: 4, 262144 bytes, linear)
[    0.040232] TCP bind hash table entries: 32768 (order: 6, 1048576 bytes, linear)
[    0.040932] TCP: Hash tables configured (established 32768 bind 32768)
[    0.041021] MPTCP token hash table entries: 4096 (order: 2, 98304 bytes, linear)
[    0.041093] UDP hash table entries: 2048 (order: 2, 65536 bytes, linear)
[    0.041145] UDP-Lite hash table entries: 2048 (order: 2, 65536 bytes, linear)
[    0.041238] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.041394] RPC: Registered named UNIX socket transport module.
[    0.041396] RPC: Registered udp transport module.
[    0.041398] RPC: Registered tcp transport module.
[    0.041399] RPC: Registered tcp-with-tls transport module.
[    0.041401] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.041405] PCI: CLS 0 bytes, default 64
[    0.041529] Trying to unpack rootfs image as initramfs...
[    0.057864] kvm [1]: IPA Size Limit: 40 bits
[    0.057884] kvm [1]: GICV region size/alignment is unsafe, using trapping (reduced performance)
[    0.057909] kvm [1]: vgic interrupt IRQ9
[    0.057923] kvm [1]: VHE mode initialized successfully
[    0.274575] Freeing initrd memory: 17392K
[    0.328153] Initialise system trusted keyrings
[    0.328269] workingset: timestamp_bits=42 max_order=18 bucket_order=0
[    0.328301] zbud: loaded
[    0.328521] NFS: Registering the id_resolver key type
[    0.328527] Key type id_resolver registered
[    0.328529] Key type id_legacy registered
[    0.328535] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.328537] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    0.328587] F2FS not supported on PAGE_SIZE(16384) != 4096
[    0.328648] Key type asymmetric registered
[    0.328651] Asymmetric key parser 'x509' registered
[    0.328667] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[    0.328709] io scheduler mq-deadline registered
[    0.328712] io scheduler kyber registered
[    0.328723] io scheduler bfq registered
[    0.328996] irq_brcmstb_l2: registered L2 intc (/soc/interrupt-controller@7c502000, parent irq: 26)
[    0.329067] irq_brcmstb_l2: registered L2 intc (/soc/intc@7d503000, parent irq: 27)
[    0.329112] irq_brcmstb_l2: registered L2 intc (/soc/intc@7d508380, parent irq: 28)
[    0.329156] irq_brcmstb_l2: registered L2 intc (/soc/intc@7d508400, parent irq: 29)
[    0.329204] irq_brcmstb_l2: registered L2 intc (/soc/interrupt-controller@7d510600, parent irq: 30)
[    0.329248] irq_brcmstb_l2: registered L2 intc (/soc/intc@7d517b00, parent irq: 31)
[    0.365276] Serial: 8250/16550 driver, 1 ports, IRQ sharing enabled
[    0.365667] 107d50c000.serial: ttyS0 at MMIO 0x107d50c000 (irq = 33, base_baud = 6000000) is a Broadcom BCM7271 UART
[    0.365720] serial serial0: tty port ttyS0 registered
[    0.366034] iproc-rng200 107d208000.rng: hwrng registered
[    0.366090] vc-mem: phys_addr:0x00000000 mem_base=0x3fc00000 mem_size:0x40000000(1024 MiB)
[    0.366302] bcm2712-iommu-cache 1000005b00.iommuc: bcm2712_iommu_cache_probe
[    0.368231] brd: module loaded
[    0.369590] loop: module loaded
[    0.369699] bcm2835-power bcm2835-power: Broadcom BCM2835 power domains driver
[    0.369826] Loading iSCSI transport class v2.0-870.
[    0.370697] usbcore: registered new device driver r8152-cfgselector
[    0.370705] usbcore: registered new interface driver r8152
[    0.370712] usbcore: registered new interface driver lan78xx
[    0.370718] usbcore: registered new interface driver smsc95xx
[    0.370777] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[    0.370798] dwc_otg: FIQ enabled
[    0.370800] dwc_otg: NAK holdoff enabled
[    0.370801] dwc_otg: FIQ split-transaction FSM enabled
[    0.370804] Module dwc_common_port init
[    0.370931] usbcore: registered new interface driver uas
[    0.370938] usbcore: registered new interface driver usb-storage
[    0.371045] mousedev: PS/2 mouse device common for all mice
[    0.379496] rpi-rtc soc:rpi_rtc: registered as rtc0
[    0.381031] rpi-rtc soc:rpi_rtc: setting system clock to 1970-01-01T00:00:10 UTC (10)
[    0.381360] bcm2835-wdt bcm2835-wdt: Poweroff handler already present!
[    0.381363] bcm2835-wdt bcm2835-wdt: Broadcom BCM2835 watchdog timer
[    0.383787] sdhci: Secure Digital Host Controller Interface driver
[    0.383789] sdhci: Copyright(c) Pierre Ossman
[    0.383830] sdhci-pltfm: SDHCI platform and OF driver helper
[    0.384035] ledtrig-cpu: registered to indicate activity on CPUs
[    0.384079] SMCCC: SOC_ID: ARCH_SOC_ID not implemented, skipping ....
[    0.384091] hid: raw HID events driver (C) Jiri Kosina
[    0.384118] usbcore: registered new interface driver usbhid
[    0.384119] usbhid: USB HID core driver
[    0.384434] hw perfevents: enabled with armv8_cortex_a76 PMU driver, 7 counters available
[    0.384784] NET: Registered PF_PACKET protocol family
[    0.384810] Key type dns_resolver registered
[    0.389258] registered taskstats version 1
[    0.389315] Loading compiled-in X.509 certificates
[    0.390857] Key type .fscrypt registered
[    0.390859] Key type fscrypt-provisioning registered
[    0.391432] brcm-pcie 1000120000.pcie: host bridge /axi/pcie@120000 ranges:
[    0.391437] brcm-pcie 1000120000.pcie:   No bus range found for /axi/pcie@120000, using [bus 00-ff]
[    0.391445] brcm-pcie 1000120000.pcie:      MEM 0x1f00000000..0x1ffffffffb -> 0x0000000000
[    0.391449] brcm-pcie 1000120000.pcie:      MEM 0x1c00000000..0x1effffffff -> 0x0400000000
[    0.391454] brcm-pcie 1000120000.pcie:   IB MEM 0x1f00000000..0x1f003fffff -> 0x0000000000
[    0.391457] brcm-pcie 1000120000.pcie:   IB MEM 0x0000000000..0x0fffffffff -> 0x1000000000
[    0.392714] brcm-pcie 1000120000.pcie: Forcing gen 2
[    0.392875] brcm-pcie 1000120000.pcie: PCI host bridge to bus 0000:00
[    0.392877] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.392880] pci_bus 0000:00: root bus resource [mem 0x1f00000000-0x1ffffffffb] (bus address [0x00000000-0xfffffffb])
[    0.392883] pci_bus 0000:00: root bus resource [mem 0x1c00000000-0x1effffffff pref] (bus address [0x400000000-0x6ffffffff])
[    0.392893] pci 0000:00:00.0: [14e4:2712] type 01 class 0x060400
[    0.392912] pci 0000:00:00.0: PME# supported from D0 D3hot
[    0.393544] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.497750] brcm-pcie 1000120000.pcie: link up, 5.0 GT/s PCIe x4 (!SSC)
[    0.497775] pci 0000:01:00.0: [1de4:0001] type 00 class 0x020000
[    0.497791] pci 0000:01:00.0: reg 0x10: [mem 0xffffc000-0xffffffff]
[    0.497799] pci 0000:01:00.0: reg 0x14: [mem 0xffc00000-0xffffffff]
[    0.497806] pci 0000:01:00.0: reg 0x18: [mem 0xffff0000-0xffffffff]
[    0.497880] pci 0000:01:00.0: supports D1
[    0.497882] pci 0000:01:00.0: PME# supported from D0 D1 D3hot D3cold
[    0.509754] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    0.509767] pci 0000:00:00.0: BAR 8: assigned [mem 0x1f00000000-0x1f005fffff]
[    0.509771] pci 0000:01:00.0: BAR 1: assigned [mem 0x1f00000000-0x1f003fffff]
[    0.509776] pci 0000:01:00.0: BAR 2: assigned [mem 0x1f00400000-0x1f0040ffff]
[    0.509781] pci 0000:01:00.0: BAR 0: assigned [mem 0x1f00410000-0x1f00413fff]
[    0.509786] pci 0000:00:00.0: PCI bridge to [bus 01]
[    0.509789] pci 0000:00:00.0:   bridge window [mem 0x1f00000000-0x1f005fffff]
[    0.509794] pci 0000:00:00.0: Max Payload Size set to  256/ 512 (was  128), Max Read Rq  512
[    0.509803] pci 0000:01:00.0: Max Payload Size set to  256/ 256 (was  128), Max Read Rq  512
[    0.509873] pcieport 0000:00:00.0: enabling device (0000 -> 0002)
[    0.509907] pcieport 0000:00:00.0: PME: Signaling with IRQ 38
[    0.509977] pcieport 0000:00:00.0: AER: enabled with IRQ 38
[    0.510065] rp1 0000:01:00.0: bar0 len 0x4000, start 0x1f00410000, end 0x1f00413fff, flags, 0x40200
[    0.510069] rp1 0000:01:00.0: bar1 len 0x400000, start 0x1f00000000, end 0x1f003fffff, flags, 0x40200
[    0.510079] rp1 0000:01:00.0: enabling device (0000 -> 0002)
[    0.510924] rp1 0000:01:00.0: chip_id 0x20001927
[    0.515995] genirq: irq_chip rp1_irq_chip did not update eff. affinity mask of irq 100
[    0.533991] macb 1f00100000.ethernet eth0: Cadence GEM rev 0x00070109 at 0x1f00100000 irq 106 (d8:3a:dd:c0:ac:df)
[    0.534075] platform 1f00110000.csi: Fixed dependency cycle(s) with /axi/pcie@120000/rp1/i2c@88000/imx296@1a
[    0.534186] platform 1f00128000.csi: Fixed dependency cycle(s) with /axi/pcie@120000/rp1/i2c@80000/imx296@1a
[    0.536236] dw_axi_dmac_platform 1f00188000.dma: DesignWare AXI DMA Controller, 8 channels
[    0.536478] xhci-hcd xhci-hcd.0: xHCI Host Controller
[    0.536484] xhci-hcd xhci-hcd.0: new USB bus registered, assigned bus number 1
[    0.536925] xhci-hcd xhci-hcd.0: hcc params 0x0240fe6d hci version 0x110 quirks 0x0000008000000810
[    0.536935] xhci-hcd xhci-hcd.0: irq 131, io mem 0x1f00200000
[    0.536998] xhci-hcd xhci-hcd.0: xHCI Host Controller
[    0.537001] xhci-hcd xhci-hcd.0: new USB bus registered, assigned bus number 2
[    0.537005] xhci-hcd xhci-hcd.0: Host supports USB 3.0 SuperSpeed
[    0.537048] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.06
[    0.537051] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.537054] usb usb1: Product: xHCI Host Controller
[    0.537056] usb usb1: Manufacturer: Linux 6.6.59-v8-16k+ xhci-hcd
[    0.537058] usb usb1: SerialNumber: xhci-hcd.0
[    0.537169] hub 1-0:1.0: USB hub found
[    0.537181] hub 1-0:1.0: 2 ports detected
[    0.537302] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 6.06
[    0.537305] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.537307] usb usb2: Product: xHCI Host Controller
[    0.537309] usb usb2: Manufacturer: Linux 6.6.59-v8-16k+ xhci-hcd
[    0.537311] usb usb2: SerialNumber: xhci-hcd.0
[    0.537386] hub 2-0:1.0: USB hub found
[    0.537397] hub 2-0:1.0: 1 port detected
[    0.537647] xhci-hcd xhci-hcd.1: xHCI Host Controller
[    0.537652] xhci-hcd xhci-hcd.1: new USB bus registered, assigned bus number 3
[    0.538089] xhci-hcd xhci-hcd.1: hcc params 0x0240fe6d hci version 0x110 quirks 0x0000008000000810
[    0.538099] xhci-hcd xhci-hcd.1: irq 136, io mem 0x1f00300000
[    0.538159] xhci-hcd xhci-hcd.1: xHCI Host Controller
[    0.538162] xhci-hcd xhci-hcd.1: new USB bus registered, assigned bus number 4
[    0.538165] xhci-hcd xhci-hcd.1: Host supports USB 3.0 SuperSpeed
[    0.538195] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.06
[    0.538198] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.538200] usb usb3: Product: xHCI Host Controller
[    0.538202] usb usb3: Manufacturer: Linux 6.6.59-v8-16k+ xhci-hcd
[    0.538204] usb usb3: SerialNumber: xhci-hcd.1
[    0.538284] hub 3-0:1.0: USB hub found
[    0.538296] hub 3-0:1.0: 2 ports detected
[    0.538405] usb usb4: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 6.06
[    0.538408] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.538410] usb usb4: Product: xHCI Host Controller
[    0.538412] usb usb4: Manufacturer: Linux 6.6.59-v8-16k+ xhci-hcd
[    0.538414] usb usb4: SerialNumber: xhci-hcd.1
[    0.538483] hub 4-0:1.0: USB hub found
[    0.538493] hub 4-0:1.0: 1 port detected
[    0.539131] bcm2712-iommu 1000005100.iommu: bcm2712_iommu_init: DEBUG_INFO = 0x20804774
[    0.539404] platform 1000800000.codec: bcm2712_iommu_probe_device: MMU 1000005100.iommu
[    0.539408] platform 1000800000.codec: bcm2712_iommu_device_group: MMU 1000005100.iommu
[    0.539413] platform 1000800000.codec: Adding to iommu group 0
[    0.539423] platform 1000880000.pisp_be: bcm2712_iommu_probe_device: MMU 1000005100.iommu
[    0.539426] platform 1000880000.pisp_be: bcm2712_iommu_device_group: MMU 1000005100.iommu
[    0.539430] platform 1000880000.pisp_be: Adding to iommu group 0
[    0.539470] platform 1000800000.codec: bcm2712_iommu_attach_dev: MMU 1000005100.iommu
[    0.539472] platform 1000880000.pisp_be: bcm2712_iommu_attach_dev: MMU 1000005100.iommu
[    0.539476] bcm2712-iommu 1000005100.iommu: bcm2712_iommu_probe: Success
[    0.539783] bcm2712-iommu 1000005200.iommu: bcm2712_iommu_init: DEBUG_INFO = 0x20804774
[    0.540026] platform axi:gpu: bcm2712_iommu_probe_device: MMU 1000005200.iommu
[    0.540030] platform axi:gpu: bcm2712_iommu_device_group: MMU 1000005200.iommu
[    0.540033] platform axi:gpu: Adding to iommu group 1
[    0.540060] platform axi:gpu: bcm2712_iommu_attach_dev: MMU 1000005200.iommu
[    0.540064] bcm2712-iommu 1000005200.iommu: bcm2712_iommu_probe: Success
[    0.540337] bcm2712-iommu 1000005280.iommu: bcm2712_iommu_init: DEBUG_INFO = 0x20804774
[    0.540592] platform 1f00110000.csi: bcm2712_iommu_probe_device: MMU 1000005280.iommu
[    0.540595] platform 1f00110000.csi: bcm2712_iommu_device_group: MMU 1000005280.iommu
[    0.540599] platform 1f00110000.csi: Adding to iommu group 2
[    0.540604] platform 1f00128000.csi: bcm2712_iommu_probe_device: MMU 1000005280.iommu
[    0.540607] platform 1f00128000.csi: bcm2712_iommu_device_group: MMU 1000005280.iommu
[    0.540611] platform 1f00128000.csi: Adding to iommu group 2
[    0.540615] platform 1f00110000.csi: bcm2712_iommu_attach_dev: MMU 1000005280.iommu
[    0.540617] platform 1f00128000.csi: bcm2712_iommu_attach_dev: MMU 1000005280.iommu
[    0.540621] bcm2712-iommu 1000005280.iommu: bcm2712_iommu_probe: Success
[    0.541342] sdhci-brcmstb 1000fff000.mmc: Got CD GPIO
[    0.541445] mmc0: CQHCI version 5.10
[    0.541761] mmc1: CQHCI version 5.10
[    0.542043] of_cfs_init
[    0.542082] of_cfs_init: OK
[    0.542159] clk: Disabling unused clocks
[    0.577695] mmc0: SDHCI controller on 1000fff000.mmc [1000fff000.mmc] using ADMA 64-bit
[    0.671309] mmc0: new ultra high speed SDR104 SDXC card at address 59b4
[    0.671487] mmcblk0: mmc0:59b4 ED2S5 119 GiB
[    0.672596]  mmcblk0: p1 p2
[    0.672679] mmcblk0: mmc0:59b4 ED2S5 119 GiB
[    0.729767] mmc1: SDHCI controller on 1001100000.mmc [1001100000.mmc] using ADMA 64-bit
[    0.732170] Freeing unused kernel memory: 5120K
[    0.732223] Run /init as init process
[    0.732225]   with arguments:
[    0.732226]     /init
[    0.732228]     splash
[    0.732229]   with environment:
[    0.732230]     HOME=/
[    0.732232]     TERM=linux
[    0.763890] mmc1: new ultra high speed DDR50 SDIO card at address 0001
[    1.037121] EXT4-fs (mmcblk0p2): mounted filesystem 5170097f-f1f6-42d8-a2ff-8938cbdfa7be ro with ordered data mode. Quota mode: none.
[    1.258183] systemd[1]: System time before build time, advancing clock.
[    1.313787] NET: Registered PF_INET6 protocol family
[    1.314094] Segment Routing with IPv6
[    1.314101] In-situ OAM (IOAM) with IPv6
[    1.334438] systemd[1]: systemd 252.31-1~deb12u1 running in system mode (+PAM +AUDIT +SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT -GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY +P11KIT +QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD -BPF_FRAMEWORK -XKBCOMMON +UTMP +SYSVINIT default-hierarchy=unified)
[    1.334448] systemd[1]: Detected architecture arm64.
[    1.338884] systemd[1]: Hostname set to <rpi5>.
[    1.397192] uart-pl011 107d001000.serial: no DMA platform data
[    1.582531] systemd[1]: Queued start job for default target graphical.target.
[    1.610397] systemd[1]: Created slice system-getty.slice - Slice /system/getty.
[    1.610718] systemd[1]: Created slice system-modprobe.slice - Slice /system/modprobe.
[    1.610964] systemd[1]: Created slice system-serial\x2dgetty.slice - Slice /system/serial-getty.
[    1.611205] systemd[1]: Created slice system-systemd\x2dfsck.slice - Slice /system/systemd-fsck.
[    1.611349] systemd[1]: Created slice user.slice - User and Session Slice.
[    1.611425] systemd[1]: Started systemd-ask-password-wall.path - Forward Password Requests to Wall Directory Watch.
[    1.611619] systemd[1]: Set up automount proc-sys-fs-binfmt_misc.automount - Arbitrary Executable File Formats File System Automount Point.
[    1.611648] systemd[1]: Expecting device dev-disk-by\x2dpartuuid-05a4a276\x2d01.device - /dev/disk/by-partuuid/05a4a276-01...
[    1.611661] systemd[1]: Expecting device dev-dri-card0.device - /dev/dri/card0...
[    1.611671] systemd[1]: Expecting device dev-dri-renderD128.device - /dev/dri/renderD128...
[    1.611681] systemd[1]: Expecting device dev-ttyAMA10.device - /dev/ttyAMA10...
[    1.611718] systemd[1]: Reached target integritysetup.target - Local Integrity Protected Volumes.
[    1.611759] systemd[1]: Reached target nss-user-lookup.target - User and Group Name Lookups.
[    1.611796] systemd[1]: Reached target slices.target - Slice Units.
[    1.611824] systemd[1]: Reached target swap.target - Swaps.
[    1.611857] systemd[1]: Reached target veritysetup.target - Local Verity Protected Volumes.
[    1.612003] systemd[1]: Listening on systemd-fsckd.socket - fsck to fsckd communication Socket.
[    1.612068] systemd[1]: Listening on systemd-initctl.socket - initctl Compatibility Named Pipe.
[    1.612326] systemd[1]: Listening on systemd-journald-audit.socket - Journal Audit Socket.
[    1.612448] systemd[1]: Listening on systemd-journald-dev-log.socket - Journal Socket (/dev/log).
[    1.612571] systemd[1]: Listening on systemd-journald.socket - Journal Socket.
[    1.613128] systemd[1]: Listening on systemd-udevd-control.socket - udev Control Socket.
[    1.613240] systemd[1]: Listening on systemd-udevd-kernel.socket - udev Kernel Socket.
[    1.613403] systemd[1]: dev-hugepages.mount - Huge Pages File System was skipped because of an unmet condition check (ConditionPathExists=/sys/kernel/mm/hugepages).
[    1.614239] systemd[1]: Mounting dev-mqueue.mount - POSIX Message Queue File System...
[    1.615205] systemd[1]: Mounting sys-kernel-debug.mount - Kernel Debug File System...
[    1.616163] systemd[1]: Mounting sys-kernel-tracing.mount - Kernel Trace File System...
[    1.616440] systemd[1]: auth-rpcgss-module.service - Kernel Module supporting RPCSEC_GSS was skipped because of an unmet condition check (ConditionPathExists=/etc/krb5.keytab).
[    1.618357] systemd[1]: Starting fake-hwclock.service - Restore / save the current clock...
[    1.619868] systemd[1]: Starting keyboard-setup.service - Set the console keyboard layout...
[    1.621008] systemd[1]: Starting kmod-static-nodes.service - Create List of Static Device Nodes...
[    1.622343] systemd[1]: Starting modprobe@configfs.service - Load Kernel Module configfs...
[    1.623855] systemd[1]: Starting modprobe@dm_mod.service - Load Kernel Module dm_mod...
[    1.625778] systemd[1]: Starting modprobe@drm.service - Load Kernel Module drm...
[    1.627798] systemd[1]: Starting modprobe@efi_pstore.service - Load Kernel Module efi_pstore...
[    1.629255] systemd[1]: Starting modprobe@fuse.service - Load Kernel Module fuse...
[    1.630642] systemd[1]: Starting modprobe@loop.service - Load Kernel Module loop...
[    1.630875] systemd[1]: systemd-fsck-root.service - File System Check on Root Device was skipped because of an unmet condition check (ConditionPathExists=!/run/initramfs/fsck-root).
[    1.632957] systemd[1]: Starting systemd-journald.service - Journal Service...
[    1.636077] systemd[1]: Starting systemd-modules-load.service - Load Kernel Modules...
[    1.637250] systemd[1]: Starting systemd-remount-fs.service - Remount Root and Kernel File Systems...
[    1.638725] systemd[1]: Starting systemd-udev-trigger.service - Coldplug All udev Devices...
[    1.640344] systemd[1]: Mounted dev-mqueue.mount - POSIX Message Queue File System.
[    1.640709] systemd[1]: Mounted sys-kernel-debug.mount - Kernel Debug File System.
[    1.640892] systemd[1]: Mounted sys-kernel-tracing.mount - Kernel Trace File System.
[    1.641167] systemd[1]: Finished kmod-static-nodes.service - Create List of Static Device Nodes.
[    1.641529] systemd[1]: modprobe@configfs.service: Deactivated successfully.
[    1.641633] systemd[1]: Finished modprobe@configfs.service - Load Kernel Module configfs.
[    1.641833] device-mapper: ioctl: 4.48.0-ioctl (2023-03-01) initialised: dm-devel@redhat.com
[    1.641932] systemd[1]: modprobe@efi_pstore.service: Deactivated successfully.
[    1.642049] systemd[1]: Finished modprobe@efi_pstore.service - Load Kernel Module efi_pstore.
[    1.642271] systemd[1]: modprobe@dm_mod.service: Deactivated successfully.
[    1.642384] systemd[1]: Finished modprobe@dm_mod.service - Load Kernel Module dm_mod.
[    1.642570] systemd[1]: modprobe@loop.service: Deactivated successfully.
[    1.642666] systemd[1]: Finished modprobe@loop.service - Load Kernel Module loop.
[    1.643662] systemd[1]: Mounting sys-kernel-config.mount - Kernel Configuration File System...
[    1.643969] systemd[1]: systemd-repart.service - Repartition Root Disk was skipped because no trigger condition checks were met.
[    1.645458] fuse: init (API version 7.39)
[    1.646657] systemd[1]: modprobe@fuse.service: Deactivated successfully.
[    1.646983] systemd[1]: Finished modprobe@fuse.service - Load Kernel Module fuse.
[    1.647695] systemd[1]: Mounted sys-kernel-config.mount - Kernel Configuration File System.
[    1.649266] systemd[1]: Mounting sys-fs-fuse-connections.mount - FUSE Control File System...
[    1.651922] systemd[1]: Mounted sys-fs-fuse-connections.mount - FUSE Control File System.
[    1.663387] systemd-journald[279]: Oldest entry in /run/log/journal/dcecec06b34c482d9bd836a9d377caec/system.journal is older than the configured file retention duration (1month), suggesting rotation.
[    1.663396] systemd-journald[279]: /run/log/journal/dcecec06b34c482d9bd836a9d377caec/system.journal: Journal header limits reached or header out-of-date, rotating.
[    1.663906] systemd-journald[279]: Oldest entry in /run/log/journal/dcecec06b34c482d9bd836a9d377caec/system.journal is older than the configured file retention duration (1month), suggesting rotation.
[    1.663926] systemd-journald[279]: /run/log/journal/dcecec06b34c482d9bd836a9d377caec/system.journal: Journal header limits reached or header out-of-date, rotating.
[    1.665113] systemd[1]: Finished fake-hwclock.service - Restore / save the current clock.
[    1.667669] systemd[1]: modprobe@drm.service: Deactivated successfully.
[    1.667774] systemd[1]: Finished modprobe@drm.service - Load Kernel Module drm.
[    1.674460] EXT4-fs (mmcblk0p2): re-mounted 5170097f-f1f6-42d8-a2ff-8938cbdfa7be r/w. Quota mode: none.
[    1.675585] systemd[1]: Finished systemd-remount-fs.service - Remount Root and Kernel File Systems.
[    1.675806] systemd[1]: systemd-firstboot.service - First Boot Wizard was skipped because of an unmet condition check (ConditionFirstBoot=yes).
[    1.675840] systemd[1]: systemd-pstore.service - Platform Persistent Storage Archival was skipped because of an unmet condition check (ConditionDirectoryNotEmpty=/sys/fs/pstore).
[    1.676625] systemd[1]: Starting systemd-random-seed.service - Load/Save Random Seed...
[    1.677956] i2c_dev: i2c /dev entries driver
[    1.678141] systemd[1]: Starting systemd-sysusers.service - Create System Users...
[    1.679080] systemd[1]: Finished systemd-modules-load.service - Load Kernel Modules.
[    1.680501] systemd[1]: Starting systemd-sysctl.service - Apply Kernel Variables...
[    1.684117] systemd[1]: Started systemd-journald.service - Journal Service.
[    1.702151] systemd-journald[279]: Received client request to flush runtime journal.
[    1.718994] systemd-journald[279]: File /var/log/journal/dcecec06b34c482d9bd836a9d377caec/system.journal corrupted or uncleanly shut down, renaming and replacing.
[    1.749467] systemd-journald[279]: Oldest entry in /var/log/journal/dcecec06b34c482d9bd836a9d377caec/system.journal is older than the configured file retention duration (1month), suggesting rotation.
[    1.749477] systemd-journald[279]: /var/log/journal/dcecec06b34c482d9bd836a9d377caec/system.journal: Journal header limits reached or header out-of-date, rotating.
[    2.314392] rpi-gpiomem 107d508500.gpiomem: window base 0x107d508500 size 0x00000040
[    2.314515] rpi-gpiomem 107d508500.gpiomem: initialised 1 regions as /dev/gpiomem1
[    2.314611] rpi-gpiomem 107d517c00.gpiomem: window base 0x107d517c00 size 0x00000040
[    2.314643] rpi-gpiomem 107d517c00.gpiomem: initialised 1 regions as /dev/gpiomem2
[    2.315121] rpi-gpiomem 107d504100.gpiomem: window base 0x107d504100 size 0x00000020
[    2.315185] rpi-gpiomem 107d504100.gpiomem: initialised 1 regions as /dev/gpiomem3
[    2.315222] rpi-gpiomem 107d510700.gpiomem: window base 0x107d510700 size 0x00000020
[    2.315254] rpi-gpiomem 107d510700.gpiomem: initialised 1 regions as /dev/gpiomem4
[    2.315330] rpi-gpiomem 1f000d0000.gpiomem: window base 0x1f000d0000 size 0x00030000
[    2.318723] rpi-gpiomem 1f000d0000.gpiomem: initialised 1 regions as /dev/gpiomem0
[    2.343582] mc: Linux media interface: v0.10
[    2.361176] input: pwr_button as /devices/platform/pwr_button/input/input0
[    2.370132] videodev: Linux video capture interface: v2.00
[    2.385555] brcmstb-i2c 107d508200.i2c:  @97500hz registered in interrupt mode
[    2.389170] brcmstb-i2c 107d508280.i2c:  @97500hz registered in interrupt mode
[    2.396452] [drm] Initialized v3d 1.0.0 20180419 for 1002000000.v3d on minor 0
[    2.416538] rpivid_hevc: module is from the staging directory, the quality is unknown, you have been warned.
[    2.419501] pispbe 1000880000.pisp_be: bcm2712_iommu_of_xlate: MMU 1000005100.iommu
[    2.449030] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    2.454130] Loaded X.509 cert 'benh@debian.org: 577e021cb980e0e820821ba7b54b4961b8b4fadf'
[    2.454364] Loaded X.509 cert 'romain.perier@gmail.com: 3abbc6ec146e09d1b6016ab9d6cf71dd233f0328'
[    2.457612] Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    2.457975] Loaded X.509 cert 'wens: 61c038651aabdcf94bd0ac7ff06c7248db18c600'
[    2.462947] pispbe 1000880000.pisp_be: Runtime PM usage count underflow!
[    2.465584] rp1-cfe 1f00110000.csi: bcm2712_iommu_of_xlate: MMU 1000005280.iommu
[    2.469543] rp1-cfe 1f00110000.csi: DW dphy Host HW v1.20
[    2.469561] rp1-cfe 1f00110000.csi: PiSP FE HW v0.1
[    2.470522] rp1-cfe 1f00110000.csi: found subdevice /axi/pcie@120000/rp1/i2c@88000/imx296@1a
[    2.470828] rpivid 1000800000.codec: bcm2712_iommu_of_xlate: MMU 1000005100.iommu
[    2.472014] rp1-cfe 1f00128000.csi: bcm2712_iommu_of_xlate: MMU 1000005280.iommu
[    2.479308] rpivid 1000800000.codec: Device registered as /dev/video19
[    2.479822] rp1-cfe 1f00128000.csi: DW dphy Host HW v1.20
[    2.479833] rp1-cfe 1f00128000.csi: PiSP FE HW v0.1
[    2.483427] rp1-cfe 1f00128000.csi: found subdevice /axi/pcie@120000/rp1/i2c@80000/imx296@1a
[    2.519178] Bluetooth: Core ver 2.22
[    2.519207] NET: Registered PF_BLUETOOTH protocol family
[    2.519209] Bluetooth: HCI device and connection manager initialized
[    2.519215] Bluetooth: HCI socket layer initialized
[    2.519218] Bluetooth: L2CAP socket layer initialized
[    2.519222] Bluetooth: SCO socket layer initialized
[    2.534319] brcmfmac: F1 signature read @0x18000000=0x15264345
[    2.538219] Bluetooth: HCI UART driver ver 2.3
[    2.538226] Bluetooth: HCI UART protocol H4 registered
[    2.538249] Bluetooth: HCI UART protocol Three-wire (H5) registered
[    2.538401] hci_uart_bcm serial0-0: supply vbat not found, using dummy regulator
[    2.538451] hci_uart_bcm serial0-0: supply vddio not found, using dummy regulator
[    2.538869] Bluetooth: HCI UART protocol Broadcom registered
[    2.541787] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[    2.542063] usbcore: registered new interface driver brcmfmac
[    2.785312] brcmfmac: brcmf_c_process_txcap_blob: no txcap_blob available (err=-2)
[    2.785562] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Aug 29 2023 01:47:08 version 7.45.265 (28bca26 CY) FWID 01-b677b91b
[    2.801615] vc4-drm axi:gpu: bcm2712_iommu_of_xlate: MMU 1000005200.iommu
[    2.808044] vc4-drm axi:gpu: bound 107c580000.hvs (ops vc4_hvs_ops [vc4])
[    2.809258] Registered IR keymap rc-cec
[    2.809315] rc rc0: vc4-hdmi-0 as /devices/platform/soc/107c701400.hdmi/rc/rc0
[    2.809353] input: vc4-hdmi-0 as /devices/platform/soc/107c701400.hdmi/rc/rc0/input1
[    2.811408] input: vc4-hdmi-0 HDMI Jack as /devices/platform/soc/107c701400.hdmi/sound/card0/input2
[    2.813673] vc4-drm axi:gpu: bound 107c701400.hdmi (ops vc4_hdmi_ops [vc4])
[    2.830291] Registered IR keymap rc-cec
[    2.830340] rc rc1: vc4-hdmi-1 as /devices/platform/soc/107c706400.hdmi/rc/rc1
[    2.830389] input: vc4-hdmi-1 as /devices/platform/soc/107c706400.hdmi/rc/rc1/input3
[    2.831959] input: vc4-hdmi-1 HDMI Jack as /devices/platform/soc/107c706400.hdmi/sound/card1/input4
[    2.833528] vc4-drm axi:gpu: bound 107c706400.hdmi (ops vc4_hdmi_ops [vc4])
[    2.833697] vc4-drm axi:gpu: bound 107c500000.mop (ops vc4_txp_ops [vc4])
[    2.837383] vc4-drm axi:gpu: bound 107c501000.moplet (ops vc4_txp_ops [vc4])
[    2.837488] vc4-drm axi:gpu: bound 107c410000.pixelvalve (ops vc4_crtc_ops [vc4])
[    2.837546] vc4-drm axi:gpu: bound 107c411000.pixelvalve (ops vc4_crtc_ops [vc4])
[    2.842268] [drm] Initialized vc4 0.0.0 20140616 for axi:gpu on minor 1
[    2.844969] vc4-drm axi:gpu: [drm] Cannot find any crtc or sizes
[    2.848768] vc4-drm axi:gpu: [drm] Cannot find any crtc or sizes
[    2.852291] vc4-drm axi:gpu: [drm] Cannot find any crtc or sizes
[    2.894342] Bluetooth: hci0: BCM: chip id 107
[    2.894559] Bluetooth: hci0: BCM: features 0x2f
[    2.896705] Bluetooth: hci0: BCM4345C0
[    2.896723] Bluetooth: hci0: BCM4345C0 (003.001.025) build 0000
[    2.904718] Bluetooth: hci0: BCM4345C0 'brcm/BCM4345C0.raspberrypi,5-model-b.hcd' Patch
[    3.132472] Adding 204784k swap on /var/swap.  Priority:-2 extents:6 across:2072576k SS
[    3.169619] alsactl[598]: memfd_create() called without MFD_EXEC or MFD_NOEXEC_SEAL set
[    3.200244] imx296 11-001a: 8-bit write to 0x3000 failed: -121
[    3.200252] imx296 11-001a: failed to get sensor out of standby (-121)
[    3.200359] imx296: probe of 11-001a failed with error -121
[    3.267287] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    3.267295] Bluetooth: BNEP filters: protocol multicast
[    3.267301] Bluetooth: BNEP socket layer initialized
[    3.630383] Bluetooth: hci0: BCM: features 0x2f
[    3.631730] Bluetooth: hci0: BCM43455 37.4MHz Raspberry Pi 3+-0190
[    3.631734] Bluetooth: hci0: BCM4345C0 (003.001.025) build 0382
[    3.632020] Bluetooth: hci0: BCM: Using default device address (43:45:c0:00:1f:ac)
[    3.650497] Bluetooth: MGMT ver 1.22
[    3.654447] NET: Registered PF_ALG protocol family
[    3.722473] imx296 10-001a: found IMX296LQ (16.7C)
[    3.722913] rp1-cfe 1f00110000.csi: Using sensor imx296 10-001a for capture
[    3.723005] rp1-cfe 1f00110000.csi: Registered [rp1-cfe-csi2_ch0] node id 0 successfully as /dev/video0
[    3.723060] rp1-cfe 1f00110000.csi: Registered [rp1-cfe-embedded] node id 1 successfully as /dev/video1
[    3.723085] rp1-cfe 1f00110000.csi: Registered [rp1-cfe-csi2_ch2] node id 2 successfully as /dev/video2
[    3.723224] rp1-cfe 1f00110000.csi: Registered [rp1-cfe-csi2_ch3] node id 3 successfully as /dev/video3
[    3.723267] rp1-cfe 1f00110000.csi: Registered [rp1-cfe-fe_image0] node id 4 successfully as /dev/video4
[    3.725493] rp1-cfe 1f00110000.csi: Registered [rp1-cfe-fe_image1] node id 5 successfully as /dev/video5
[    3.727025] rp1-cfe 1f00110000.csi: Registered [rp1-cfe-fe_stats] node id 6 successfully as /dev/video6
[    3.727194] rp1-cfe 1f00110000.csi: Registered [rp1-cfe-fe_config] node id 7 successfully as /dev/video7
[    3.885327] macb 1f00100000.ethernet eth0: PHY [1f00100000.ethernet-ffffffff:01] driver [Broadcom BCM54213PE] (irq=POLL)
[    3.885334] macb 1f00100000.ethernet eth0: configuring for phy/rgmii-id link mode
[    3.888365] pps pps0: new PPS source ptp0
[    3.888411] macb 1f00100000.ethernet: gem-ptp-timer ptp clock registered.
[    3.896565] brcmfmac: brcmf_cfg80211_set_power_mgmt: power save enabled
[    5.479219] Bluetooth: RFCOMM TTY layer initialized
[    5.479236] Bluetooth: RFCOMM socket layer initialized
[    5.479246] Bluetooth: RFCOMM ver 1.11
[   21.818143] Console: switching to colour frame buffer device 240x67
[   21.818157] vc4-drm axi:gpu: [drm] fb0: vc4drmfb frame buffer device
[   60.893744] usb 1-2: new full-speed USB device number 2 using xhci-hcd
[   61.076350] usb 1-2: New USB device found, idVendor=046d, idProduct=c534, bcdDevice=29.01
[   61.076357] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[   61.076361] usb 1-2: Product: USB Receiver
[   61.076363] usb 1-2: Manufacturer: Logitech
[   61.118660] input: Logitech USB Receiver as /devices/platform/axi/1000120000.pcie/1f00200000.usb/xhci-hcd.0/usb1/1-2/1-2:1.0/0003:046D:C534.0001/input/input5
[   61.241870] hid-generic 0003:046D:C534.0001: input,hidraw0: USB HID v1.11 Keyboard [Logitech USB Receiver] on usb-xhci-hcd.0-2/input0
[   61.275388] input: Logitech USB Receiver Mouse as /devices/platform/axi/1000120000.pcie/1f00200000.usb/xhci-hcd.0/usb1/1-2/1-2:1.1/0003:046D:C534.0002/input/input6
[   61.275583] input: Logitech USB Receiver Consumer Control as /devices/platform/axi/1000120000.pcie/1f00200000.usb/xhci-hcd.0/usb1/1-2/1-2:1.1/0003:046D:C534.0002/input/input7
[   61.333821] input: Logitech USB Receiver System Control as /devices/platform/axi/1000120000.pcie/1f00200000.usb/xhci-hcd.0/usb1/1-2/1-2:1.1/0003:046D:C534.0002/input/input8
[   61.334025] hid-generic 0003:046D:C534.0002: input,hiddev96,hidraw1: USB HID v1.11 Mouse [Logitech USB Receiver] on usb-xhci-hcd.0-2/input1
[   61.514157] logitech-djreceiver 0003:046D:C534.0001: hidraw0: USB HID v1.11 Keyboard [Logitech USB Receiver] on usb-xhci-hcd.0-2/input0
[   61.670307] logitech-djreceiver 0003:046D:C534.0002: hiddev96,hidraw1: USB HID v1.11 Mouse [Logitech USB Receiver] on usb-xhci-hcd.0-2/input1
[   61.739406] logitech-djreceiver 0003:046D:C534.0002: device of type eQUAD nano Lite (0x0a) connected on slot 1
[   61.742485] input: Logitech Wireless Keyboard PID:4023 Keyboard as /devices/platform/axi/1000120000.pcie/1f00200000.usb/xhci-hcd.0/usb1/1-2/1-2:1.1/0003:046D:C534.0002/0003:046D:4023.0003/input/input11
[   61.755394] logitech-djreceiver 0003:046D:C534.0002: device of type eQUAD nano Lite (0x0a) connected on slot 2
[   61.829851] hid-generic 0003:046D:4023.0003: input,hidraw2: USB HID v1.11 Keyboard [Logitech Wireless Keyboard PID:4023] on usb-xhci-hcd.0-2/input1:1
[   61.830200] input: Logitech Wireless Mouse PID:4054 Mouse as /devices/platform/axi/1000120000.pcie/1f00200000.usb/xhci-hcd.0/usb1/1-2/1-2:1.1/0003:046D:C534.0002/0003:046D:4054.0004/input/input16
[   61.830401] input: Logitech Wireless Mouse PID:4054 Consumer Control as /devices/platform/axi/1000120000.pcie/1f00200000.usb/xhci-hcd.0/usb1/1-2/1-2:1.1/0003:046D:C534.0002/0003:046D:4054.0004/input/input17
[   61.830757] hid-generic 0003:046D:4054.0004: input,hidraw3: USB HID v1.11 Mouse [Logitech Wireless Mouse PID:4054] on usb-xhci-hcd.0-2/input1:2
[   62.075561] input: Logitech Wireless Keyboard PID:4023 as /devices/platform/axi/1000120000.pcie/1f00200000.usb/xhci-hcd.0/usb1/1-2/1-2:1.1/0003:046D:C534.0002/0003:046D:4023.0003/input/input21
[   62.137839] logitech-hidpp-device 0003:046D:4023.0003: input,hidraw2: USB HID v1.11 Keyboard [Logitech Wireless Keyboard PID:4023] on usb-xhci-hcd.0-2/input1:1
[   62.235535] input: Logitech Wireless Mouse as /devices/platform/axi/1000120000.pcie/1f00200000.usb/xhci-hcd.0/usb1/1-2/1-2:1.1/0003:046D:C534.0002/0003:046D:4054.0004/input/input22
[   62.235717] logitech-hidpp-device 0003:046D:4054.0004: input,hidraw3: USB HID v1.11 Mouse [Logitech Wireless Mouse] on usb-xhci-hcd.0-2/input1:2
[   62.587444] logitech-hidpp-device 0003:046D:4054.0004: HID++ 4.5 device connected.
[   67.435647] logitech-hidpp-device 0003:046D:4023.0003: HID++ 2.0 device connected.

** sudo vclog log --msg **
004745.701: Initial voltage 800000 temp 23541
004943.050: avs_2712: AVS pred 8543 854300 temp 25190
004943.061: vpred 854 mV +0
005567.289: FB framebuffer_swap 1
005584.838: Select resolution HDMI0/2 hotplug 0 max_mode 2
005584.855: Select resolution HDMI1/2 hotplug 0 max_mode 2
006434.291: dtb_file 'bcm2712-rpi-5-b.dtb'
006518.375: Found camera 'imx296' on port 0, unicam_port 0
006588.098: Loaded overlay 'imx296'
006698.594: dtparam: audio=on
006703.119: Unknown dtparam 'audio' - ignored
006759.890: Loaded overlay 'vc4-kms-v3d-pi5'
006922.308: Loaded overlay 'imx296'
006922.321: dtparam: cam1=true
006926.999: Unknown dtparam 'cam1' - ignored
010120.474: Starting OS 10120 ms
010123.114: 00000040: -> 00000480
010123.130: 00000030: -> 00100080
010123.148: 00000034: -> 00100080
010123.164: 00000038: -> 00100080
010123.182: 0000003c: -> 00100080
010225.246: sdram: sdram refresh 2081->8324 (1)

** sudo vclog log --assert **

--------------------------------------------------------------------------------
Memory
--------------------------------------------------------------------------------
** cat /proc/meminfo **
MemTotal:        4142080 kB
MemFree:         3306160 kB
MemAvailable:    3644416 kB
Buffers:           36048 kB
Cached:           370784 kB
SwapCached:            0 kB
Active:           574096 kB
Inactive:         109440 kB
Active(anon):     309600 kB
Inactive(anon):        0 kB
Active(file):     264496 kB
Inactive(file):   109440 kB
Unevictable:       12096 kB
Mlocked:               0 kB
SwapTotal:        204784 kB
SwapFree:         204784 kB
Zswap:                 0 kB
Zswapped:              0 kB
Dirty:              2432 kB
Writeback:             0 kB
AnonPages:        289504 kB
Mapped:           173664 kB
Shmem:             32304 kB
KReclaimable:      19968 kB
Slab:              53696 kB
SReclaimable:      19968 kB
SUnreclaim:        33728 kB
KernelStack:        4960 kB
PageTables:        10064 kB
SecPageTables:         0 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     2275824 kB
Committed_AS:    1605056 kB
VmallocTotal:   68180246528 kB
VmallocUsed:       19744 kB
VmallocChunk:          0 kB
Percpu:             1280 kB
CmaTotal:          65536 kB
CmaFree:           49056 kB

** sudo cat /sys/kernel/debug/dma_buf/bufinfo **

Dma-buf Objects:
size        flags       mode        count       exp_name    ino         name
00016384    00000000    00080005    00000010    drm 00000006    <none>
    write fence:drm_sched v3d_render seq 131 signalled
    Attached Devices:
    1002000000.v3d
    1002000000.v3d
Total 2 devices attached

00016384    00000000    00080005    00000010    drm 00000005    <none>
    write fence:drm_sched v3d_render seq 132 signalled
    Attached Devices:
    1002000000.v3d
    1002000000.v3d
Total 2 devices attached

08306688    00000000    00080005    00000010    drm 00000004    <none>
    write fence:drm_sched v3d_render seq 139 signalled
    Attached Devices:
    1002000000.v3d
    1002000000.v3d
Total 2 devices attached

00016384    00000000    00080005    00000010    drm 00000003    <none>
    write fence:drm_sched v3d_render seq 117 signalled
    Attached Devices:
    1002000000.v3d
    1002000000.v3d
Total 2 devices attached

08306688    00000000    00080005    00000010    drm 00000002    <none>
    write fence:drm_sched v3d_render seq 138 signalled
    Attached Devices:
    1002000000.v3d
    1002000000.v3d
Total 2 devices attached

Total 5 objects, 16662528 bytes

** sudo cat /sys/kernel/debug/vcsm-cma/state **
cat: /sys/kernel/debug/vcsm-cma/state: No such file or directory

--------------------------------------------------------------------------------
Media Devices
--------------------------------------------------------------------------------
** media-ctl -d 0 -p **
Media controller API version 6.6.59

Media device information
------------------------
driver          pispbe
model           pispbe
serial          
bus info        platform:1000880000.pisp_be
hw revision     0x2252700
driver version  6.6.59

Device topology
- entity 1: pispbe (8 pads, 8 links)
            type V4L2 subdev subtype Unknown flags 0
    pad0: Sink
        <- "pispbe-input":0 [ENABLED,IMMUTABLE]
    pad1: Sink
        <- "pispbe-tdn_input":0 [ENABLED,IMMUTABLE]
    pad2: Sink
        <- "pispbe-stitch_input":0 [ENABLED,IMMUTABLE]
    pad3: Source
        -> "pispbe-output0":0 [ENABLED,IMMUTABLE]
    pad4: Source
        -> "pispbe-output1":0 [ENABLED,IMMUTABLE]
    pad5: Source
        -> "pispbe-tdn_output":0 [ENABLED,IMMUTABLE]
    pad6: Source
        -> "pispbe-stitch_output":0 [ENABLED,IMMUTABLE]
    pad7: Sink
        <- "pispbe-config":0 [ENABLED,IMMUTABLE]

- entity 10: pispbe-input (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video20
    pad0: Source
        -> "pispbe":0 [ENABLED,IMMUTABLE]

- entity 16: pispbe-tdn_input (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video21
    pad0: Source
        -> "pispbe":1 [ENABLED,IMMUTABLE]

- entity 22: pispbe-stitch_input (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video22
    pad0: Source
        -> "pispbe":2 [ENABLED,IMMUTABLE]

- entity 28: pispbe-output0 (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video23
    pad0: Sink
        <- "pispbe":3 [ENABLED,IMMUTABLE]

- entity 34: pispbe-output1 (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video24
    pad0: Sink
        <- "pispbe":4 [ENABLED,IMMUTABLE]

- entity 40: pispbe-tdn_output (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video25
    pad0: Sink
        <- "pispbe":5 [ENABLED,IMMUTABLE]

- entity 46: pispbe-stitch_output (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video26
    pad0: Sink
        <- "pispbe":6 [ENABLED,IMMUTABLE]

- entity 52: pispbe-config (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video27
    pad0: Source
        -> "pispbe":7 [ENABLED,IMMUTABLE]

** media-ctl -d 1 -p **
Media controller API version 6.6.59

Media device information
------------------------
driver          pispbe
model           pispbe
serial          
bus info        platform:1000880000.pisp_be
hw revision     0x2252700
driver version  6.6.59

Device topology
- entity 1: pispbe (8 pads, 8 links)
            type V4L2 subdev subtype Unknown flags 0
    pad0: Sink
        <- "pispbe-input":0 [ENABLED,IMMUTABLE]
    pad1: Sink
        <- "pispbe-tdn_input":0 [ENABLED,IMMUTABLE]
    pad2: Sink
        <- "pispbe-stitch_input":0 [ENABLED,IMMUTABLE]
    pad3: Source
        -> "pispbe-output0":0 [ENABLED,IMMUTABLE]
    pad4: Source
        -> "pispbe-output1":0 [ENABLED,IMMUTABLE]
    pad5: Source
        -> "pispbe-tdn_output":0 [ENABLED,IMMUTABLE]
    pad6: Source
        -> "pispbe-stitch_output":0 [ENABLED,IMMUTABLE]
    pad7: Sink
        <- "pispbe-config":0 [ENABLED,IMMUTABLE]

- entity 10: pispbe-input (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video28
    pad0: Source
        -> "pispbe":0 [ENABLED,IMMUTABLE]

- entity 16: pispbe-tdn_input (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video29
    pad0: Source
        -> "pispbe":1 [ENABLED,IMMUTABLE]

- entity 22: pispbe-stitch_input (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video30
    pad0: Source
        -> "pispbe":2 [ENABLED,IMMUTABLE]

- entity 28: pispbe-output0 (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video31
    pad0: Sink
        <- "pispbe":3 [ENABLED,IMMUTABLE]

- entity 34: pispbe-output1 (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video32
    pad0: Sink
        <- "pispbe":4 [ENABLED,IMMUTABLE]

- entity 40: pispbe-tdn_output (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video33
    pad0: Sink
        <- "pispbe":5 [ENABLED,IMMUTABLE]

- entity 46: pispbe-stitch_output (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video34
    pad0: Sink
        <- "pispbe":6 [ENABLED,IMMUTABLE]

- entity 52: pispbe-config (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video35
    pad0: Source
        -> "pispbe":7 [ENABLED,IMMUTABLE]

** media-ctl -d 2 -p **
Media controller API version 6.6.59

Media device information
------------------------
driver          rp1-cfe
model           rp1-cfe
serial          
bus info        platform:1f00110000.csi
hw revision     0x114666
driver version  6.6.59

Device topology
- entity 1: csi2 (8 pads, 8 links)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev0
    pad0: Sink
        [fmt:SRGGB10_1X10/640x480 field:none colorspace:raw xfer:none ycbcr:601 quantization:full-range]
        <- "imx296 10-001a":0 [ENABLED,IMMUTABLE]
    pad1: Sink
        [fmt:unknown/16384x1 field:none]
    pad2: Sink
        [fmt:SRGGB10_1X10/640x480 field:none colorspace:raw xfer:none ycbcr:601 quantization:full-range]
    pad3: Sink
        [fmt:SRGGB10_1X10/640x480 field:none colorspace:raw xfer:none ycbcr:601 quantization:full-range]
    pad4: Source
        [fmt:SRGGB10_1X10/640x480 field:none colorspace:raw xfer:none ycbcr:601 quantization:full-range]
        -> "rp1-cfe-csi2_ch0":0 []
        -> "pisp-fe":0 []
    pad5: Source
        [fmt:unknown/16384x1 field:none]
        -> "rp1-cfe-embedded":0 []
    pad6: Source
        [fmt:SRGGB10_1X10/640x480 field:none colorspace:raw xfer:none ycbcr:601 quantization:full-range]
        -> "rp1-cfe-csi2_ch2":0 []
        -> "pisp-fe":0 []
    pad7: Source
        [fmt:SRGGB10_1X10/640x480 field:none colorspace:raw xfer:none ycbcr:601 quantization:full-range]
        -> "rp1-cfe-csi2_ch3":0 []
        -> "pisp-fe":0 []

- entity 10: pisp-fe (5 pads, 7 links)
             type V4L2 subdev subtype Unknown flags 0
             device node name /dev/v4l-subdev1
    pad0: Sink
        [fmt:SRGGB16_1X16/640x480 field:none colorspace:raw xfer:none ycbcr:601 quantization:full-range]
        <- "csi2":4 []
        <- "csi2":6 []
        <- "csi2":7 []
    pad1: Sink
        [fmt:FIXED/16384x1 field:none]
        <- "rp1-cfe-fe_config":0 []
    pad2: Source
        [fmt:SRGGB16_1X16/640x480 field:none colorspace:raw xfer:none ycbcr:601 quantization:full-range]
        -> "rp1-cfe-fe_image0":0 []
    pad3: Source
        [fmt:SRGGB16_1X16/640x480 field:none colorspace:raw xfer:none ycbcr:601 quantization:full-range]
        -> "rp1-cfe-fe_image1":0 []
    pad4: Source
        [fmt:FIXED/16384x1 field:none]
        -> "rp1-cfe-fe_stats":0 []

- entity 16: imx296 10-001a (1 pad, 1 link)
             type V4L2 subdev subtype Sensor flags 0
             device node name /dev/v4l-subdev2
    pad0: Source
        [fmt:SRGGB10_1X10/1456x1088 field:none colorspace:raw xfer:none quantization:full-range
         crop.bounds:(0,0)/1456x1088
         crop:(0,0)/1456x1088]
        -> "csi2":0 [ENABLED,IMMUTABLE]

- entity 18: rp1-cfe-csi2_ch0 (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video0
    pad0: Sink
        <- "csi2":4 []

- entity 22: rp1-cfe-embedded (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video1
    pad0: Sink
        <- "csi2":5 []

- entity 26: rp1-cfe-csi2_ch2 (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video2
    pad0: Sink
        <- "csi2":6 []

- entity 30: rp1-cfe-csi2_ch3 (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video3
    pad0: Sink
        <- "csi2":7 []

- entity 34: rp1-cfe-fe_image0 (1 pad, 1 link)
             type Node subtype V4L flags 1
             device node name /dev/video4
    pad0: Sink
        <- "pisp-fe":2 []

- entity 38: rp1-cfe-fe_image1 (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video5
    pad0: Sink
        <- "pisp-fe":3 []

- entity 42: rp1-cfe-fe_stats (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video6
    pad0: Sink
        <- "pisp-fe":4 []

- entity 46: rp1-cfe-fe_config (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video7
    pad0: Source
        -> "pisp-fe":1 []

** media-ctl -d 3 -p **
Media controller API version 6.6.59

Media device information
------------------------
driver          rpivid
model           rpivid
serial          
bus info        platform:rpivid
hw revision     0x0
driver version  6.6.59

Device topology
- entity 1: rpivid-source (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video19
    pad0: Source
        -> "rpivid-proc":0 [ENABLED,IMMUTABLE]

- entity 3: rpivid-proc (2 pads, 2 links)
            type Node subtype Unknown flags 0
    pad0: Sink
        <- "rpivid-source":0 [ENABLED,IMMUTABLE]
    pad1: Source
        -> "rpivid-sink":0 [ENABLED,IMMUTABLE]

- entity 6: rpivid-sink (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video19
    pad0: Sink
        <- "rpivid-proc":1 [ENABLED,IMMUTABLE]

** media-ctl -d 4 -p **
Media controller API version 6.6.59

Media device information
------------------------
driver          rp1-cfe
model           rp1-cfe
serial          
bus info        platform:1f00128000.csi
hw revision     0x114666
driver version  6.6.59

Device topology
- entity 1: csi2 (8 pads, 0 link)
            type V4L2 subdev subtype Unknown flags 0
    pad0: Sink
    pad1: Sink
    pad2: Sink
    pad3: Sink
    pad4: Source
    pad5: Source
    pad6: Source
    pad7: Source

- entity 10: pisp-fe (5 pads, 0 link)
             type V4L2 subdev subtype Unknown flags 0
    pad0: Sink
    pad1: Sink
    pad2: Source
    pad3: Source
    pad4: Source

--------------------------------------------------------------------------------
Cameras
--------------------------------------------------------------------------------
** rpicam-hello --list-cameras **
Available cameras
-----------------
0 : imx296 [1456x1088 10-bit RGGB] (/base/axi/pcie@120000/rp1/i2c@88000/imx296@1a)
    Modes: 'SRGGB10_CSI2P' : 1456x1088 [60.38 fps - (0, 0)/1456x1088 crop]

--------------------------------------------------------------------------------
Versions
--------------------------------------------------------------------------------
** uname -a **
Linux rpi5 6.6.59-v8-16k+ #1812 SMP PREEMPT Fri Nov  8 15:40:46 GMT 2024 aarch64 GNU/Linux

** cat /etc/os-release **
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

** vcgencmd version **
2024/11/05 12:38:12 
Copyright (c) 2012 Broadcom
version 3c4fc886 (release) (embedded)

** rpicam-hello --version **
rpicam-apps build: v1.5.2 a8ccf9f3cd9d 03-10-2024 (22:33:44)
libcamera build: v0.3.2+27-7330f29b
naushir commented 3 days ago

@naushir so, when I run libcamera-apps (libcamera-hello) in the terminal it works. But when I try to use the C++ API it shouw the first frame and throws the errors above.

Could you clarify this please - so if you run rpicam-hello/libcamera-hello on a Pi 5, everything works as expected with the camera? When you mean the C++ API, is this an application you have written yourself? Can you share some source code?

AAleka commented 3 days ago

@naushir Yes, running rpicam-hello/libcamera-hello from the terminal works as expected. But the C++ code that I wrote myself (from the libcamera's documentation) does not work. Here is my code:

#include <opencv2/opencv.hpp>
#include <libcamera/libcamera.h>

using namespace libcamera;

struct OPTIONS
{
    unsigned int width = 1440;    // frame width
    unsigned int height = 1080;    // frame height
    float        fps = 60.0f;   // frames per second
    float        shutter_speed = 8000.0f; // exposure time (milliseconds)
    float        threshold_value = 180.0f;  // threshold value
    float        color_gains = 0.5f;    // white balance
    int          autofocus = 0;       // enable/disable autofocus 
    int          stride = 0;       // stride value
    double       penalty = 10.0;    // dynamic programming penalty
} options;

static std::shared_ptr<Camera> camera;
static std::condition_variable condition_variable;
static std::mutex mutex;
static std::atomic<bool> is_running(true);

static void requestComplete(Request *request);
void signalHandler(int signum);

int main(int argc, char **argv) 
{
    std::unique_ptr<CameraManager> cm = std::make_unique<CameraManager>();
    cm->start();

    if (cm->cameras().empty()) 
    {
        std::cerr << "No cameras available\n";
        cm->stop();
        return EXIT_FAILURE;
    }

    camera = cm->get(cm->cameras()[0]->id());
    if (!camera) 
    {
        std::cerr << "Failed to get the camera\n";
        cm->stop();
        return EXIT_FAILURE;
    }

    camera->acquire();
    std::unique_ptr<CameraConfiguration> config = camera->generateConfiguration({ StreamRole::VideoRecording });

    if (!config || config->size() != 1) 
    {
        std::cerr << "Failed to generate configuration\n";
        return -1;
    }

    StreamConfiguration &streamConfig = config->at(0);
    streamConfig.size.width = options.width;
    streamConfig.size.height = options.height;

    config->validate();
    std::cout << "Validated viewfinder configuration is: " << streamConfig.toString() << '\n';

    if (camera->configure(config.get()) < 0) 
    {
        std::cerr << "Failed to configure the camera\n";
        return -1;
    }

    FrameBufferAllocator *allocator = new FrameBufferAllocator(camera);
    size_t allocated;
    for (StreamConfiguration &cfg : *config) 
    {
        int ret = allocator->allocate(cfg.stream());
        if (ret < 0) 
        {
            std::cerr << "Can't allocate buffers\n";
            return -ENOMEM;
        }

        allocated = allocator->buffers(cfg.stream()).size();
        std::cout << "Allocated " << allocated << " buffers for stream\n";
    }

    Stream *stream = streamConfig.stream();
    const std::vector<std::unique_ptr<FrameBuffer>> &buffers = allocator->buffers(stream);
    std::vector<std::unique_ptr<Request>> requests;

    if (buffers.empty()) 
    {
        std::cerr << "No buffers available\n";
        return -1;
    }

    for (unsigned int i = 0; i < allocated; ++i) 
    {
        std::unique_ptr<Request> request = camera->createRequest();
        if (!request)
        {
            std::cerr << "Can't create request\n";
            return -ENOMEM;
        }

        const std::unique_ptr<FrameBuffer> &buffer = buffers[i];
        int ret = request->addBuffer(stream, buffer.get());
        if (ret < 0)
        {
            std::cerr << "Can't set buffer for request\n";
            return ret;
        }

        requests.push_back(std::move(request));
    }

    camera->requestCompleted.connect(requestComplete);

    ControlList controls;
    controls.set(controls::ColourGains, Span<const float, 2>({ options.color_gains, options.color_gains }));
    controls.set(controls::ExposureTime, options.shutter_speed);
    controls.set(controls::AeLocked, true);
    controls.set(controls::AwbLocked, true);
    controls.set(controls::AwbEnable, false);
    controls.set(controls::AeEnable, false);

    if (options.fps > 0)
    {
        int64_t frame_time = 1000000 / options.fps;
        controls.set(controls::FrameDurationLimits, libcamera::Span<const int64_t, 2>({ frame_time, frame_time }));
    }

    if (options.autofocus == 1)
        controls.set(controls::AfMode, controls::AfModeContinuous);

    options.stride = stream->configuration().stride;
    camera->start(&controls);

    camera->queueRequest(requests[0].get());

    std::signal(SIGINT, signalHandler);
    std::signal(SIGTERM, signalHandler);

    {
        std::unique_lock<std::mutex> lock(mutex);
        condition_variable.wait(lock, [] { return !is_running; });
    }

    camera->stop();
    allocator->free(stream);
    delete allocator;
    camera->release();
    camera.reset();
    cm->stop();

    return 0;
}

static void requestComplete(Request *request)
{
    std::lock_guard<std::mutex> lock(mutex);

    if (!is_running)
        return;

    if (request->status() == Request::RequestCancelled)
    {
        std::cerr << "Request was cancelled\n";
        return;
    }

    const std::map<const Stream *, FrameBuffer *> &buffers = request->buffers();

    for (auto bufferPair : buffers)
    {
        FrameBuffer *buffer = bufferPair.second;
        int fd = buffer->planes()[0].fd.get();

        uint8_t *ptr = static_cast<uint8_t *>(mmap(NULL, buffer->planes()[0].length, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0));

        cv::Mat original_frame(options.height, options.width, CV_8UC1, ptr, options.stride);

        cv::imshow("output", original_frame);
        cv::waitKey(1);
    }

    if (!is_running)
    {
        condition_variable.notify_one();
        return;
    }

    if (!request)
    {
        std::cerr << "Request is invalid\n";
        return;
    }

    request->reuse(Request::ReuseBuffers);
    camera->queueRequest(request);
}

void signalHandler(int signum)
{
    std::cout << "Interrupt signal (" << signum << ") received.\n";
    is_running = false;

    std::unique_lock<std::mutex> lock(mutex);
    condition_variable.notify_one();
}
naushir commented 3 days ago

One thing I noticed is that you are updating your preview windows from the requestComplete handler. This is probably not advisable as it holds the thread up for a long time. Could you try commenting out the preview update and see if that helps.

Another thing to look at is the simple camera app: https://git.libcamera.org/libcamera/simple-cam.git which could be used as a skeleton application.

AAleka commented 3 days ago

@naushir Thank you for your help, after removing the preview window it doesn't crash anymore. But I am curious why this happens, because it doesn't happen on the Pi Zero. Anyways, I guess it might be related to opencv then.

naushir commented 2 days ago

It could be some timing bug and things get sequenced sufficiently different on the two platforms. I would suggest you start with the simple camera app as a template and work from there.