Arducam QuadCam 16MP IMX519 - Can't Focus

It appears that my Arducam QuadCam 16 MP (IMX519) is working on my Raspberry PI. I can utilize jpeg, still, and video. But I can’t get focusing to work with either manual, auto, or continuous (my preference). There are no error messages about it. It just doesn’t change and the image is fuzzy (more so with video than the other two).

I recently tried the instructions in the thread below:

But no difference than before.

As you can see I am utilizing the command you previously provided in

Of course I added the “–autofocus-mode continuous”

Any thoughts?

Also - if you are using manual focus and press the keys to change focus - does it apply to all cameras equally? Same question when in autonomous, does it independently change each camera based on current view?

@Ervin

Can you give me the SKU number of the camera?

And before, I need some information

Please reboot your device and execute the following command:

wget -O arducam-camera-bug-report https://github.com/ketai-dhr/arducam-camera-bug-report/releases/download/tools/arducam-camera-bug-report
chmod +x ./arducam-camera-bug-report
./arducam-camera-bug-report

This will output an arducam-bug-report.txt in the current directory.

Please send this file to me via google cloud disk or similar platform or email ([email protected])

And if possible, please send me the hardware connection diagram.

Thank you for your cooperation and have a nice life.

Hi Edward,

I realize I didn’t send enough detail based on your posting rules. I’ll answer them here:

  1. Where did you get the camera module(s)?
    Amazon

  2. Model number of the product(s).
    CM4 IMX519

  3. What hardware/platform were you working on?
    Raspberry Pi 4 Model B / 5.15.84-v71+

  4. Instructions you have followed. (link/manual/etc.)
    wget -O install_pivariety_pkgs.sh https://github.com/ArduCAM/Arducam-Pivariety-V4L2-Driver/releases/download/install_script/install_pivariety_pkgs.sh

chmod +x install_pivariety_pkgs.sh

./install_pivariety_pkgs.sh -p libcamera_dev

./install_pivariety_pkgs.sh -p imx519_kernel_driver_low_speed

sudo reboot now

  1. Problems you were having.
    I am unable to get any type of focus to work automatic, continuous, or otherwise.

  2. The dmesg log from your hardware.
    cat dmesg.log

see following post (got an error message in form when I posted). Too many characters

  1. Troubleshooting attempts you’ve made.

Not much, I didn’t really find anything that matched the issue I was having in the forum.

Here is the command I was trying to get to work:
sudo libcamera-vid -n -t 5000 -o test123.h264 --save-pts timestamps.txt --width 1920 --height 1080 --autofocus-mode continuous --autofocus-speed fast --autofocus-range macro

I’ve also tried autofocus on libcamera-still and libcamera-jpeg but no luck.

  1. What help do you need?
    I would like to get autofocus to work.

dmesg Part 1
cat dmesg.log
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 5.15.84-v7l+ (dom@buildbot) (arm-linux-gnueabihf-gcc-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1613 SMP Thu Jan 5 12:01:26 GMT 2023
[ 0.000000] CPU: ARMv7 Processor [410fd083] revision 3 (ARMv7), cr=30c5383d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[ 0.000000] OF: fdt: Machine model: Raspberry Pi 4 Model B Rev 1.2
[ 0.000000] random: crng init done
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] Reserved memory: created CMA memory pool at 0x000000001ac00000, size 320 MiB
[ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000000000000-0x000000002fffffff]
[ 0.000000] Normal empty
[ 0.000000] HighMem [mem 0x0000000030000000-0x00000000fbffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x000000003b3fffff]
[ 0.000000] node 0: [mem 0x0000000040000000-0x00000000fbffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x00000000fbffffff]
[ 0.000000] percpu: Embedded 16 pages/cpu s35788 r8192 d21556 u65536
[ 0.000000] pcpu-alloc: s35788 r8192 d21556 u65536 alloc=16*4096
[ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 1011008
[ 0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 video=HDMI-A-1:1920x1080M@60 smsc95xx.macaddr=DC:A6:32:A8:6D:93 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 console=ttyS0,115200 console=tty1 root=PARTUUID=35308fdc-02 rootfstype=ext4 fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles
[ 0.000000] Unknown kernel command line parameters “splash”, will be passed to user space.
[ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] software IO TLB: mapped [mem 0x0000000014890000-0x0000000018890000] (64MB)
[ 0.000000] Memory: 3601252K/4050944K available (10240K kernel code, 1386K rwdata, 3308K rodata, 2048K init, 591K bss, 122012K reserved, 327680K cma-reserved, 3264512K highmem)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] ftrace: allocating 35518 entries in 105 pages
[ 0.000000] ftrace: allocated 105 pages with 4 groups
[ 0.000000] trace event string verifier disabled
[ 0.000000] rcu: Hierarchical RCU implementation.
[ 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 10 jiffies.
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] GIC: Using split EOI/Deactivate mode
[ 0.000000] irq_brcmstb_l2: registered L2 intc (/soc/interrupt-controller@7ef00100, parent irq: 25)
[ 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.000019] Switching to timer-based delay loop, resolution 18ns
[ 0.000393] Console: colour dummy device 80x30
[ 0.000460] printk: console [tty1] enabled
[ 0.000526] Calibrating delay loop (skipped), value calculated using timer frequency… 108.00 BogoMIPS (lpj=540000)
[ 0.000556] pid_max: default: 32768 minimum: 301
[ 0.000699] LSM: Security Framework initializing
[ 0.000902] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[ 0.000934] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[ 0.002532] cgroup: Disabling memory control group subsystem
[ 0.002797] CPU: Testing write buffer coherency: ok
[ 0.002855] CPU0: Spectre BHB: enabling loop workaround for all CPUs
[ 0.003321] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.004812] Setting up static identity map for 0x200000 - 0x20003c
[ 0.005011] rcu: Hierarchical SRCU implementation.
[ 0.006018] smp: Bringing up secondary CPUs …
[ 0.007278] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[ 0.008689] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[ 0.010080] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[ 0.010242] smp: Brought up 1 node, 4 CPUs
[ 0.010266] SMP: Total of 4 processors activated (432.00 BogoMIPS).
[ 0.010284] CPU: All CPU(s) started in HYP mode.
[ 0.010297] CPU: Virtualization extensions available.
[ 0.011108] devtmpfs: initialized
[ 0.032164] VFP support v0.3: implementor 41 architecture 3 part 40 variant 8 rev 0
[ 0.032401] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.032436] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[ 0.043084] pinctrl core: initialized pinctrl subsystem
[ 0.044361] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[ 0.048834] DMA: preallocated 1024 KiB pool for atomic coherent allocations
[ 0.049675] audit: initializing netlink subsys (disabled)
[ 0.049972] audit: type=2000 audit(0.040:1): state=initialized audit_enabled=0 res=1
[ 0.050610] thermal_sys: Registered thermal governor ‘step_wise’
[ 0.051443] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[ 0.051463] hw-breakpoint: maximum watchpoint size is 8 bytes.
[ 0.052014] Serial: AMBA PL011 UART driver
[ 0.068950] bcm2835-mbox fe00b880.mailbox: mailbox enabled
[ 0.110071] raspberrypi-firmware soc:firmware: Attached to firmware from 2023-01-05T10:46:54, variant start
[ 0.120087] raspberrypi-firmware soc:firmware: Firmware hash is 8ba17717fbcedd4c3b6d4bce7e50c7af4155cba9
[ 0.180986] Kprobes globally optimized
[ 0.187117] bcm2835-dma fe007000.dma: DMA legacy API manager, dmachans=0x1
[ 0.192155] vgaarb: loaded
[ 0.192648] SCSI subsystem initialized
[ 0.192878] usbcore: registered new interface driver usbfs
[ 0.192941] usbcore: registered new interface driver hub
[ 0.193026] usbcore: registered new device driver usb
[ 0.193469] usb_phy_generic phy: supply vcc not found, using dummy regulator
[ 0.193658] usb_phy_generic phy: dummy supplies not allowed for exclusive requests
[ 0.193973] pps_core: LinuxPPS API ver. 1 registered
[ 0.193988] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti [email protected]
[ 0.194015] PTP clock support registered
[ 0.195745] clocksource: Switched to clocksource arch_sys_counter
[ 0.276516] VFS: Disk quotas dquot_6.6.0
[ 0.276626] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[ 0.276810] FS-Cache: Loaded
[ 0.277031] CacheFiles: Loaded
[ 0.278229] simple-framebuffer 3e3cf000.framebuffer: framebuffer at 0x3e3cf000, 0x7f8000 bytes
[ 0.278253] simple-framebuffer 3e3cf000.framebuffer: format=a8r8g8b8, mode=1920x1080x32, linelength=7680
[ 0.278789] Console: switching to colour frame buffer device 240x67
[ 0.289388] simple-framebuffer 3e3cf000.framebuffer: fb0: simplefb registered!
[ 0.299905] NET: Registered PF_INET protocol family
[ 0.300162] IP idents hash table entries: 16384 (order: 5, 131072 bytes, linear)
[ 0.301807] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[ 0.301843] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[ 0.301867] TCP established hash table entries: 8192 (order: 3, 32768 bytes, linear)
[ 0.301932] TCP bind hash table entries: 8192 (order: 4, 65536 bytes, linear)
[ 0.302005] TCP: Hash tables configured (established 8192 bind 8192)
[ 0.302167] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
[ 0.302205] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
[ 0.302457] NET: Registered PF_UNIX/PF_LOCAL protocol family
[ 0.306704] RPC: Registered named UNIX socket transport module.
[ 0.306721] RPC: Registered udp transport module.
[ 0.306736] RPC: Registered tcp transport module.
[ 0.306750] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.306775] PCI: CLS 0 bytes, default 64
[ 1.352866] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 7 counters available
[ 1.355542] Initialise system trusted keyrings
[ 1.355878] workingset: timestamp_bits=14 max_order=20 bucket_order=6
[ 1.364957] zbud: loaded
[ 1.367084] FS-Cache: Netfs ‘nfs’ registered for caching
[ 1.367935] NFS: Registering the id_resolver key type
[ 1.367975] Key type id_resolver registered
[ 1.367990] Key type id_legacy registered
[ 1.368128] nfs4filelayout_init: NFSv4 File Layout Driver Registering…
[ 1.368145] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering…
[ 1.369253] Key type asymmetric registered
[ 1.369269] Asymmetric key parser ‘x509’ registered
[ 1.369500] bounce: pool size: 64 pages
[ 1.369564] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[ 1.369809] io scheduler mq-deadline registered
[ 1.369825] io scheduler kyber registered
[ 1.379615] brcm-pcie fd500000.pcie: host bridge /scb/pcie@7d500000 ranges:
[ 1.379659] brcm-pcie fd500000.pcie: No bus range found for /scb/pcie@7d500000, using [bus 00-ff]
[ 1.379754] brcm-pcie fd500000.pcie: MEM 0x0600000000…0x063fffffff → 0x00c0000000
[ 1.379848] brcm-pcie fd500000.pcie: IB MEM 0x0000000000…0x00bfffffff → 0x0400000000
[ 1.437846] brcm-pcie fd500000.pcie: link up, 5.0 GT/s PCIe x1 (SSC)
[ 1.438242] brcm-pcie fd500000.pcie: PCI host bridge to bus 0000:00
[ 1.438262] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 1.438284] pci_bus 0000:00: root bus resource [mem 0x600000000-0x63fffffff] (bus address [0xc0000000-0xffffffff])
[ 1.438378] pci 0000:00:00.0: [14e4:2711] type 01 class 0x060400
[ 1.438626] pci 0000:00:00.0: PME# supported from D0 D3hot
[ 1.443991] PCI: bus0: Fast back to back transfers disabled
[ 1.444330] pci 0000:01:00.0: [1106:3483] type 00 class 0x0c0330
[ 1.444461] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x00000fff 64bit]
[ 1.444893] pci 0000:01:00.0: PME# supported from D0 D3cold
[ 1.450206] PCI: bus1: Fast back to back transfers disabled
[ 1.450270] pci 0000:00:00.0: BAR 8: assigned [mem 0x600000000-0x6000fffff]
[ 1.450296] pci 0000:01:00.0: BAR 0: assigned [mem 0x600000000-0x600000fff 64bit]
[ 1.450382] pci 0000:00:00.0: PCI bridge to [bus 01]
[ 1.450409] pci 0000:00:00.0: bridge window [mem 0x600000000-0x6000fffff]
[ 1.450851] pcieport 0000:00:00.0: enabling device (0140 → 0142)
[ 1.451095] pcieport 0000:00:00.0: PME: Signaling with IRQ 79
[ 1.465751] iproc-rng200 fe104000.rng: hwrng registered
[ 1.466140] vc-mem: phys_addr:0x00000000 mem_base=0x3ec00000 mem_size:0x40000000(1024 MiB)
[ 1.467820] gpiomem-bcm2835 fe200000.gpiomem: Initialised: Registers at 0xfe200000
[ 1.481018] brd: module loaded
[ 1.491666] loop: module loaded
[ 1.492555] Loading iSCSI transport class v2.0-870.
[ 1.498023] bcmgenet fd580000.ethernet: GENET 5.0 EPHY: 0x0000
[ 1.595939] unimac-mdio unimac-mdio.-19: Broadcom UniMAC MDIO bus
[ 1.597267] usbcore: registered new interface driver r8152
[ 1.597339] usbcore: registered new interface driver lan78xx
[ 1.597411] usbcore: registered new interface driver smsc95xx
[ 1.599072] xhci_hcd 0000:01:00.0: enabling device (0140 → 0142)
[ 1.599266] xhci_hcd 0000:01:00.0: xHCI Host Controller
[ 1.599302] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 1
[ 1.605021] xhci_hcd 0000:01:00.0: hcc params 0x002841eb hci version 0x100 quirks 0x0000e40000000890
[ 1.606181] xhci_hcd 0000:01:00.0: xHCI Host Controller
[ 1.606210] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 2
[ 1.606238] xhci_hcd 0000:01:00.0: Host supports USB 3.0 SuperSpeed
[ 1.606686] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.15
[ 1.606710] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 1.606729] usb usb1: Product: xHCI Host Controller
[ 1.606747] usb usb1: Manufacturer: Linux 5.15.84-v7l+ xhci-hcd
[ 1.606763] usb usb1: SerialNumber: 0000:01:00.0
[ 1.607528] hub 1-0:1.0: USB hub found
[ 1.607604] hub 1-0:1.0: 1 port detected
[ 1.608669] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.15
[ 1.608692] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 1.608711] usb usb2: Product: xHCI Host Controller
[ 1.608728] usb usb2: Manufacturer: Linux 5.15.84-v7l+ xhci-hcd
[ 1.608744] usb usb2: SerialNumber: 0000:01:00.0
[ 1.609466] hub 2-0:1.0: USB hub found
[ 1.609538] hub 2-0:1.0: 4 ports detected
[ 1.611433] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[ 1.611826] dwc_otg: FIQ enabled
[ 1.611841] dwc_otg: NAK holdoff enabled
[ 1.611857] dwc_otg: FIQ split-transaction FSM enabled
[ 1.611874] Module dwc_common_port init
[ 1.612328] usbcore: registered new interface driver uas
[ 1.612435] usbcore: registered new interface driver usb-storage
[ 1.612671] mousedev: PS/2 mouse device common for all mice
[ 1.618283] sdhci: Secure Digital Host Controller Interface driver
[ 1.618301] sdhci: Copyright(c) Pierre Ossman
[ 1.619094] sdhci-pltfm: SDHCI platform and OF driver helper
[ 1.623210] ledtrig-cpu: registered to indicate activity on CPUs
[ 1.623505] hid: raw HID events driver (C) Jiri Kosina
[ 1.623666] usbcore: registered new interface driver usbhid
[ 1.623682] usbhid: USB HID core driver
[ 1.630499] Initializing XFRM netlink socket
[ 1.630544] NET: Registered PF_PACKET protocol family
[ 1.630662] Key type dns_resolver registered
[ 1.631156] Registering SWP/SWPB emulation handler
[ 1.632000] registered taskstats version 1
[ 1.632027] Loading compiled-in X.509 certificates
[ 1.632911] Key type .fscrypt registered
[ 1.632928] Key type fscrypt-provisioning registered
[ 1.646207] uart-pl011 fe201000.serial: there is not valid maps for state default
[ 1.646539] uart-pl011 fe201000.serial: cts_event_workaround enabled
[ 1.646680] fe201000.serial: ttyAMA0 at MMIO 0xfe201000 (irq = 34, base_baud = 0) is a PL011 rev2
[ 1.656210] bcm2835-wdt bcm2835-wdt: Broadcom BCM2835 watchdog timer
[ 1.656707] bcm2835-power bcm2835-power: Broadcom BCM2835 power domains driver
[ 1.658070] mmc-bcm2835 fe300000.mmcnr: mmc_debug:0 mmc_debug2:0
[ 1.658092] mmc-bcm2835 fe300000.mmcnr: DMA channel allocated
[ 1.688223] of_cfs_init
[ 1.688491] of_cfs_init: OK
[ 1.723162] mmc0: SDHCI controller on fe340000.mmc [fe340000.mmc] using ADMA
[ 1.723769] Waiting for root device PARTUUID=35308fdc-02…
[ 1.822217] mmc0: new ultra high speed DDR50 SDHC card at address 0001
[ 1.824410] mmcblk0: mmc0:0001 EB1QT 29.8 GiB
[ 1.830065] mmcblk0: p1 p2
[ 1.830113] mmc1: new high speed SDIO card at address 0001
[ 1.831238] mmcblk0: mmc0:0001 EB1QT 29.8 GiB
[ 1.850317] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none.
[ 1.850409] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[ 1.851338] devtmpfs: mounted
[ 1.862585] Freeing unused kernel image (initmem) memory: 2048K
[ 1.886070] Run /sbin/init as init process
[ 1.886087] with arguments:
[ 1.886099] /sbin/init
[ 1.886113] splash
[ 1.886125] with environment:
[ 1.886137] HOME=/
[ 1.886150] TERM=linux
[ 1.895799] usb 1-1: new high-speed USB device number 2 using xhci_hcd
[ 2.089181] usb 1-1: New USB device found, idVendor=2109, idProduct=3431, bcdDevice= 4.21
[ 2.089215] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[ 2.089235] usb 1-1: Product: USB2.0 Hub
[ 2.091561] hub 1-1:1.0: USB hub found
[ 2.091945] hub 1-1:1.0: 4 ports detected
[ 2.225468] systemd[1]: System time before build time, advancing clock.
[ 2.236241] usb 2-1: new SuperSpeed USB device number 2 using xhci_hcd
[ 2.267948] usb 2-1: New USB device found, idVendor=090c, idProduct=1000, bcdDevice=11.00
[ 2.267981] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2.268002] usb 2-1: Product: Flash Drive FIT
[ 2.268019] usb 2-1: Manufacturer: Samsung
[ 2.268035] usb 2-1: SerialNumber: 0307122110003205
[ 2.333496] usb-storage 2-1:1.0: USB Mass Storage device detected
[ 2.334508] scsi host0: usb-storage 2-1:1.0
[ 2.425819] usb 1-1.3: new low-speed USB device number 3 using xhci_hcd
[ 2.431787] NET: Registered PF_INET6 protocol family
[ 2.433629] Segment Routing with IPv6
[ 2.433672] In-situ OAM (IOAM) with IPv6
[ 2.512150] systemd[1]: systemd 247.3-7+rpi1+deb11u1 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +ZSTD +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=unified)
[ 2.513049] systemd[1]: Detected architecture arm.
[ 2.523888] systemd[1]: Set hostname to .
[ 2.584163] usb 1-1.3: New USB device found, idVendor=0461, idProduct=4e22, bcdDevice= 1.00
[ 2.584203] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 2.584225] usb 1-1.3: Product: USB Optical Mouse
[ 2.584243] usb 1-1.3: Manufacturer: PixArt
[ 2.596060] input: PixArt USB Optical Mouse as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3/1-1.3:1.0/0003:0461:4E22.0001/input/input0
[ 2.596722] hid-generic 0003:0461:4E22.0001: input,hidraw0: USB HID v1.11 Mouse [PixArt USB Optical Mouse] on usb-0000:01:00.0-1.3/input0
[ 2.695854] usb 1-1.4: new low-speed USB device number 4 using xhci_hcd
[ 2.834525] usb 1-1.4: New USB device found, idVendor=413c, idProduct=2113, bcdDevice=33.08
[ 2.834557] usb 1-1.4: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[ 2.834578] usb 1-1.4: Product: Dell KB216 Wired Keyboard
[ 2.846986] input: Dell KB216 Wired Keyboard as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.0/0003:413C:2113.0002/input/input1
[ 2.926775] hid-generic 0003:413C:2113.0002: input,hidraw1: USB HID v1.11 Keyboard [Dell KB216 Wired Keyboard] on usb-0000:01:00.0-1.4/input0
[ 2.935784] input: Dell KB216 Wired Keyboard System Control as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.1/0003:413C:2113.0003/input/input2
[ 3.016350] input: Dell KB216 Wired Keyboard Consumer Control as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.1/0003:413C:2113.0003/input/input3
[ 3.016931] hid-generic 0003:413C:2113.0003: input,hiddev96,hidraw2: USB HID v1.11 Device [Dell KB216 Wired Keyboard] on usb-0000:01:00.0-1.4/input1
[ 3.247399] systemd[1]: /lib/systemd/system/plymouth-start.service:16: Unit configured to use KillMode=none. This is unsafe, as it disables systemd’s process lifecycle management for the service. Please update your service to use a safer KillMode=, such as ‘mixed’ or ‘control-group’. Support for KillMode=none is deprecated and will eventually be removed.
[ 3.440515] systemd[1]: Queued start job for default target Graphical Interface.
[ 3.446313] systemd[1]: Created slice system-getty.slice.
[ 3.447730] systemd[1]: Created slice system-modprobe.slice.
[ 3.448695] systemd[1]: Created slice system-systemd\x2dfsck.slice.
[ 3.449559] systemd[1]: Created slice User and Session Slice.
[ 3.450159] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[ 3.451349] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[ 3.452028] systemd[1]: Reached target Slices.
[ 3.452244] systemd[1]: Reached target Swap.
[ 3.455809] systemd[1]: Listening on Syslog Socket.
[ 3.456641] systemd[1]: Listening on fsck to fsckd communication Socket.
[ 3.457054] systemd[1]: Listening on initctl Compatibility Named Pipe.
[ 3.458471] systemd[1]: Listening on Journal Audit Socket.
[ 3.459250] systemd[1]: Listening on Journal Socket (/dev/log).
[ 3.460235] systemd[1]: Listening on Journal Socket.
[ 3.465532] systemd[1]: Listening on udev Control Socket.
[ 3.466893] systemd[1]: Listening on udev Kernel Socket.
[ 3.467851] systemd[1]: Condition check resulted in Huge Pages File System being skipped.
[ 3.473610] systemd[1]: Mounting POSIX Message Queue File System…
[ 3.480272] systemd[1]: Mounting RPC Pipe File System…
[ 3.487510] systemd[1]: Mounting Kernel Debug File System…
[ 3.495586] systemd[1]: Mounting Kernel Trace File System…
[ 3.496897] systemd[1]: Condition check resulted in Kernel Module supporting RPCSEC_GSS being skipped.
[ 3.507690] systemd[1]: Starting Restore / save the current clock…
[ 3.516139] systemd[1]: Starting Set the console keyboard layout…
[ 3.524952] systemd[1]: Starting Create list of static device nodes for the current kernel…
[ 3.533984] systemd[1]: Starting Load Kernel Module configfs…
[ 3.541808] systemd[1]: Starting Load Kernel Module drm…
[ 3.551156] systemd[1]: Starting Load Kernel Module fuse…
[ 3.557943] systemd[1]: Condition check resulted in Set Up Additional Binary Formats being skipped.
[ 3.566337] systemd[1]: Starting File System Check on Root Device…
[ 3.604936] systemd[1]: Starting Journal Service…
[ 3.624643] systemd[1]: Starting Load Kernel Modules…
[ 3.647186] systemd[1]: Starting Coldplug All udev Devices…
[ 3.650924] fuse: init (API version 7.34)

dmesg part 2
[ 3.680579] systemd[1]: Mounted POSIX Message Queue File System.
[ 3.681591] systemd[1]: Mounted RPC Pipe File System.
[ 3.682423] systemd[1]: Mounted Kernel Debug File System.
[ 3.683231] systemd[1]: Mounted Kernel Trace File System.
[ 3.685390] systemd[1]: Finished Restore / save the current clock.
[ 3.690953] systemd[1]: Finished Create list of static device nodes for the current kernel.
[ 3.693679] systemd[1]: [email protected]: Succeeded.
[ 3.695372] systemd[1]: Finished Load Kernel Module configfs.
[ 3.697690] systemd[1]: [email protected]: Succeeded.
[ 3.699224] systemd[1]: Finished Load Kernel Module fuse.
[ 3.708031] systemd[1]: Mounting FUSE Control File System…
[ 3.715497] systemd[1]: Mounting Kernel Configuration File System…
[ 3.723646] systemd[1]: Started File System Check Daemon to report status.
[ 3.739608] i2c_dev: i2c /dev entries driver
[ 3.742862] scsi 0:0:0:0: Direct-Access Samsung Flash Drive FIT 1100 PQ: 0 ANSI: 6
[ 3.744215] sd 0:0:0:0: [sda] 125313283 512-byte logical blocks: (64.2 GB/59.8 GiB)
[ 3.744570] sd 0:0:0:0: [sda] Write Protect is off
[ 3.744597] sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00
[ 3.745419] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn’t support DPO or FUA
[ 3.753536] systemd[1]: Finished Load Kernel Modules.
[ 3.754643] systemd[1]: Mounted FUSE Control File System.
[ 3.756187] sda: sda1
[ 3.758165] sd 0:0:0:0: [sda] Attached SCSI removable disk
[ 3.857946] systemd[1]: Starting Apply Kernel Variables…
[ 3.863800] systemd[1]: [email protected]: Succeeded.
[ 3.878148] systemd[1]: Finished Load Kernel Module drm.
[ 3.879314] systemd[1]: Mounted Kernel Configuration File System.
[ 3.902497] systemd[1]: Finished Apply Kernel Variables.
[ 3.912690] systemd[1]: Finished File System Check on Root Device.
[ 3.919402] systemd[1]: Starting Remount Root and Kernel File Systems…
[ 4.048388] systemd[1]: Started Journal Service.
[ 4.138385] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null). Quota mode: none.
[ 4.209278] systemd-journald[145]: Received client request to flush runtime journal.
[ 4.224560] systemd-journald[145]: File /var/log/journal/bb4dee56fef747aa97310e5f81e20a87/system.journal corrupted or uncleanly shut down, renaming and replacing.
[ 5.903901] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 6.400756] mc: Linux media interface: v0.10
[ 6.483235] videodev: Linux video capture interface: v2.00
[ 6.592912] gpio-mux mux-controller: 8-way mux-controller registered
[ 6.764001] vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned.
[ 6.781885] bcm2835_vc_sm_cma_probe: Videocore shared memory driver
[ 6.781919] [vc_sm_connected_init]: start
[ 6.782904] [vc_sm_connected_init]: installed successfully
[ 6.787659] snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned.
[ 6.791699] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[ 6.803264] bcm2835_isp: module is from the staging directory, the quality is unknown, you have been warned.
[ 6.813353] bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev/video13
[ 6.814619] bcm2835-isp bcm2835-isp: Device node capture[0] registered as /dev/video14
[ 6.815469] bcm2835-isp bcm2835-isp: Device node capture[1] registered as /dev/video15
[ 6.817520] bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/video16
[ 6.817561] bcm2835-isp bcm2835-isp: Register output node 0 with media controller
[ 6.817587] bcm2835-isp bcm2835-isp: Register capture node 1 with media controller
[ 6.817610] bcm2835-isp bcm2835-isp: Register capture node 2 with media controller
[ 6.817633] bcm2835-isp bcm2835-isp: Register capture node 3 with media controller
[ 6.826247] bcm2835_audio bcm2835_audio: card created with 8 channels
[ 6.831724] bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev/video20
[ 6.832553] bcm2835-isp bcm2835-isp: Device node capture[0] registered as /dev/video21
[ 6.833296] bcm2835-isp bcm2835-isp: Device node capture[1] registered as /dev/video22
[ 6.834049] bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/video23
[ 6.834105] bcm2835-isp bcm2835-isp: Register output node 0 with media controller
[ 6.834137] bcm2835-isp bcm2835-isp: Register capture node 1 with media controller
[ 6.834172] bcm2835-isp bcm2835-isp: Register capture node 2 with media controller
[ 6.834198] bcm2835-isp bcm2835-isp: Register capture node 3 with media controller
[ 6.834622] bcm2835-isp bcm2835-isp: Loaded V4L2 bcm2835-isp
[ 6.879885] rpivid_hevc: module is from the staging directory, the quality is unknown, you have been warned.
[ 6.910831] bcm2835_v4l2: module is from the staging directory, the quality is unknown, you have been warned.
[ 6.985485] bcm2835_codec: module is from the staging directory, the quality is unknown, you have been warned.
[ 7.025416] rpivid feb10000.codec: Device registered as /dev/video19
[ 7.032142] input: soc:shutdown_button@e as /devices/platform/soc/soc:shutdown_button@e/input/input4
[ 7.105130] bcm2835-codec bcm2835-codec: Device registered as /dev/video10
[ 7.105190] bcm2835-codec bcm2835-codec: Loaded V4L2 decode
[ 7.114020] bcm2835-codec bcm2835-codec: Device registered as /dev/video11
[ 7.114082] bcm2835-codec bcm2835-codec: Loaded V4L2 encode
[ 7.120193] bcm2835-codec bcm2835-codec: Device registered as /dev/video12
[ 7.120243] bcm2835-codec bcm2835-codec: Loaded V4L2 isp
[ 7.125981] brcmstb-i2c fef04500.i2c: @97500hz registered in polling mode
[ 7.128843] bcm2835-codec bcm2835-codec: Device registered as /dev/video18
[ 7.128925] bcm2835-codec bcm2835-codec: Loaded V4L2 image_fx
[ 7.139563] bcm2835-codec bcm2835-codec: Device registered as /dev/video31
[ 7.139644] bcm2835-codec bcm2835-codec: Loaded V4L2 encode_image
[ 7.152922] i2c i2c-22: Added multiplexed i2c bus 0
[ 7.179117] i2c 10-001a: Fixing up cyclic dependency with fe801000.csi
[ 7.180434] i2c i2c-22: Added multiplexed i2c bus 10
[ 7.185650] brcmstb-i2c fef09500.i2c: @97500hz registered in polling mode
[ 7.416877] [drm] Initialized v3d 1.0.0 20180419 for fec00000.v3d on minor 0
[ 7.684795] checking generic (3e3cf000 7f8000) vs hw (0 ffffffffffffffff)
[ 7.684827] fb0: switching to vc4 from simple
[ 7.828550] Console: switching to colour dummy device 80x30
[ 7.878786] vc4-drm gpu: bound fe400000.hvs (ops vc4_hvs_ops [vc4])
[ 7.927691] Registered IR keymap rc-cec
[ 7.928032] rc rc0: vc4 as /devices/platform/soc/fef00700.hdmi/rc/rc0
[ 8.021457] input: vc4 as /devices/platform/soc/fef00700.hdmi/rc/rc0/input5
[ 8.086170] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 8.136231] cfg80211: Loaded X.509 cert ‘sforshee: 00b28ddf47aef9cea7’
[ 8.174915] cfg80211: loaded regulatory.db is malformed or signature is missing/invalid
[ 8.341884] vc4-drm gpu: bound fef00700.hdmi (ops vc4_hdmi_ops [vc4])
[ 8.368234] Registered IR keymap rc-cec
[ 8.506210] rc rc1: vc4 as /devices/platform/soc/fef05700.hdmi/rc/rc1
[ 8.506458] input: vc4 as /devices/platform/soc/fef05700.hdmi/rc/rc1/input6
[ 8.552734] brcmfmac: F1 signature read @0x18000000=0x15264345
[ 8.568983] vc4-drm gpu: bound fef05700.hdmi (ops vc4_hdmi_ops [vc4])
[ 8.569591] vc4-drm gpu: bound fe004000.txp (ops vc4_txp_ops [vc4])
[ 8.570046] vc4-drm gpu: bound fe206000.pixelvalve (ops vc4_crtc_ops [vc4])
[ 8.570563] vc4-drm gpu: bound fe207000.pixelvalve (ops vc4_crtc_ops [vc4])
[ 8.571004] vc4-drm gpu: bound fe20a000.pixelvalve (ops vc4_crtc_ops [vc4])
[ 8.571421] vc4-drm gpu: bound fe216000.pixelvalve (ops vc4_crtc_ops [vc4])
[ 8.571869] vc4-drm gpu: bound fec12000.pixelvalve (ops vc4_crtc_ops [vc4])
[ 8.594631] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[ 8.596962] usbcore: registered new interface driver brcmfmac
[ 8.629094] [drm] Initialized vc4 0.0.0 20140616 for gpu on minor 1
[ 8.867406] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[ 8.873185] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Nov 1 2021 00:37:25 version 7.45.241 (1a2f2fa CY) FWID 01-703fd60
[ 9.258585] Console: switching to colour frame buffer device 240x67
[ 9.258663] vc4-drm gpu: [drm] fb0: vc4drmfb frame buffer device
[ 9.639372] uart-pl011 fe201000.serial: no DMA platform data
[ 9.994774] 8021q: 802.1Q VLAN Support v1.8
[ 10.186599] bcmgenet fd580000.ethernet: configuring instance for external RGMII (RX delay)
[ 10.188595] bcmgenet fd580000.ethernet eth0: Link is Down
[ 10.253067] Adding 102396k swap on /var/swap. Priority:-2 extents:1 across:102396k SSFS
[ 10.501955] imx519: loading out-of-tree module taints kernel.
[ 10.552320] pca954x 10-0070: probe failed
[ 10.556017] imx519 10-001a: Device found is imx519
[ 10.556770] imx519 10-001a: Consider updating driver imx519 to match on endpoints
[ 12.156960] brcmfmac: brcmf_cfg80211_set_power_mgmt: power save enabled
[ 17.183095] Bluetooth: Core ver 2.22
[ 17.183158] NET: Registered PF_BLUETOOTH protocol family
[ 17.183165] Bluetooth: HCI device and connection manager initialized
[ 17.183181] Bluetooth: HCI socket layer initialized
[ 17.183191] Bluetooth: L2CAP socket layer initialized
[ 17.183205] Bluetooth: SCO socket layer initialized
[ 17.196524] Bluetooth: HCI UART driver ver 2.3
[ 17.196540] Bluetooth: HCI UART protocol H4 registered
[ 17.196601] Bluetooth: HCI UART protocol Three-wire (H5) registered
[ 17.196792] Bluetooth: HCI UART protocol Broadcom registered
[ 17.530298] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 17.530311] Bluetooth: BNEP filters: protocol multicast
[ 17.530325] Bluetooth: BNEP socket layer initialized
[ 17.550838] NET: Registered PF_ALG protocol family
[ 17.591160] cryptd: max_cpu_qlen set to 1000
[ 17.861605] Bluetooth: RFCOMM TTY layer initialized
[ 17.861627] Bluetooth: RFCOMM socket layer initialized
[ 17.861646] Bluetooth: RFCOMM ver 1.11
[ 18.048831] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 31.835820] cam-dummy-reg: disabling
[ 44.900940] v3d fec00000.v3d: MMU error from client L2T (0) at 0x3601000, pte invalid

@Ervin

Based on the information you’ve provided, I cannot identify any obvious errors.

However, to further investigate the issue, could you please test the camera again with manual focus and record a screen?

This will help us better understand the problem and find a solution.

Here are two images from the quad cam. The top left is using the command:
libcamera-still -t 0 --framerate 30 --autofocus-mode continuou

the bottom right is a pause in a video I took using the command:

libcamera-vid -t 10000 -o test.h264 --viewfinder-width 1920 --viewfinder-height 1080 --width 1920 --height 1080 --framerate 30 --autofocus-mode continuous --save-pts timestamp.pts

My goal is to take/record video but my impression is that libcamera-still is better quality. The resolution and colors look better in the still. Initially I thought it wasn’t focused very well but maybe its just the resolution. I tried the following:

libcamera-vid -n -t 10000 -o test.h264 --viewfinder-width 3840 --viewfinder-height 2160 --width 3840 --height 2160 --level 4.2 --framerate 30 --autofocus-mode auto --save-pts timestamp.pts --denoise cdn_off

but got the error

ERROR: *** failed to start output streaming ***

  1. Any thoughts? Do you think its focus? Resolution?
  2. Anything I could improve in my higher resolution command?

My problem was not auto-focus but the resolution. I was able to get 4K to work with the following command:

libcamera-vid -t 20000 --width 3840 --height 2160 --framerate 18 --mode 3840:2160 --codec mjpeg -o output1.mjpeg

During preview this creates a pretty nice looking file. However, when I try to play it in VLC, it only shows first frame. I tried to convert it with ffmpeg and how some luck but not great. Does Arducam have any recommendations on how to convert mjpeg file to mp4?

@Ervin

The reason for this issue is that the sampling rate is inconsistent with the actual playback rate of the software. To resolve this, you may need to find the correct way to play the file. You may want to consider asking for assistance on the official Raspberry Pi forum.They have a lot of experts on this.

Hi Edward,

Thanks for suggestion. I did submit a question to Raspberry Pi. They did help a bit with the mjpeg to mp4 conversion. But I noted another issue. Whether I take a h.264 1k video or mjpeg 4k video, one camera always looks good but the others look pretty bad. It can’t be focus since I’m always moving around and the same camera is always the good one. Possibly hardware or software? Any thoughts?

Here are still shots from the videos:

h.264

mjpeg

Clearly the bottom right is significantly better in each video, every video/every time.

Here are the commands I am using:

h.264
libcamera-vid -n -t 10000 -o test.h264 --save-pts timestamps.txt --width 1920 --height 1080 --autofocus-mode auto --sharpness

mjpeg
libcamera-vid -t 20000 --sharpness 2 --width 3840 --height 2160 --framerate 18 --mode 3840:2160 --codec mjpeg -o output1.mjpeg

Any thoughts would be appreciated.

@Ervin

Please adjust manually and record a video to check whether each camera’s focus function is working properly, following the example below.

Please don’t worry about this theme, they use the same repo, you just need to follow the red box

I ran the following commands:

prerequisites required

First of all, you need to make sure that your version is above 5.15.84

uname -r

Install the Camera Driver

wget -O install_pivariety_pkgs.sh https://github.com/ArduCAM/Arducam-Pivariety-V4L2-Driver/releases/download/install_script/install_pivariety_pkgs.sh
chmod +x install_pivariety_pkgs.sh
./install_pivariety_pkgs.sh -p imx519_kernel_driver_low_speed

libcamera-dev and libcamera-apps Installation

./install_pivariety_pkgs.sh -p libcamera
./install_pivariety_pkgs.sh -p libcamera_apps
``.

sudo rebeoot

I am now at 

stevedalton@raspberrypi:~ $ uname -r
6.1.21-v8+



I then downloaded the manual focus python script:
Manual focus
Download the source code
git clone https://github.com/ArduCAM/Arducam-Pivariety-V4L2-Driver.git

I think started a libcamera video with the following command:

stevedalton@raspberrypi:~ $ libcamera-vid -t 30000 -o test.h264 --save-pts timestamps.txt --width 1920 --height 1080 --autofocus-mode manual --sharpness 2


and started the manual focus script - 
# Press the Up/Down Arrow for focus adjustment, press “ctrl + c” to save, or “r” to reset
cd Arducam-Pivariety-V4L2-Driver/focus
python3 FocuserExample.py -d /dev/v4l-subdev1


unlike your video (which was very helpful to know what was supposed to happen), nothing happened to image.  It remained the same throughout the video.

I appreciate the held, and would be thankful if you can get me over this hump.

@Ervin

For video streaming, could you simply use the simplest command ‘libcamera-still -t 0’ and then switch to the manual focus script for control? I hope to be able to record a video like I did before.

Hi Edward,

Thanks for working with me. I have a 3.3 MB *.mkv file. But when I try to attach it there is an error that says:

Sorry, the file you are trying to upload is not authorized (authorized extensions: jpg, jpeg, png).

How did you post your video? Let me know and I will post.

But in running ‘libcamera-still -t 0’ and then trying to manual focus the video with the python script - nothing happened. to the appearance of the video - not like your video at all.

@Ervin

It may be that some formats are not supported, you can upload to the cloud disk, and then send me the sharing link.

@Edward

Here is the link to the video:

@Ervin

I’m still investigating the cause of the problem, so I’m not sure what’s causing it yet. It’s maybe a very serious issue, and I need to meet with the relevant people to try to reproduce and identify the root cause. I estimate that it will take 1-2 weeks to complete my investigation, and I will provide you with an update as soon as I have more information. Is it okay if I get back to you in 1-2 weeks with an update?

Thanks for the response. Yes, of course I will wait as I haven’t been able to make any progress myself. But I do hope to get it working soonest. Let me know if you have any suggestions and I will be willing to try them.