VIM1 Ubuntu 22.04 and WiFi keeps crashing

Which system do you use? Android, Ubuntu, OOWOW or others?

Ubuntu

Which version of system do you use? Khadas official images, self built images, or others?

generic/vim1-ubuntu-22.04-server-linux-6.1-fenix-1.4-221229.img.xz

Please describe your issue below:

I installed Ubuntu 22.04 with krescue and all seems to run well, except for the WiFi interface: it appears to be buggy, slow and - bad part - it blocks and I cannot connect even via Ethernet interface until reboot!

Post a console log of your issue below:

dmesg:
[...]


[ 3322.503616] mmc2: new high speed SDIO card at address 0001
[ 3322.504636] brcmfmac: F1 signature read @0x18000000=0x1541a9a6
[ 3322.507274] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1
[ 3322.510568] brcmfmac mmc2:0001:1: Direct firmware load for brcm/brcmfmac43430-sdio.khadas,vim.bin failed with error -2
[ 3322.511307] brcmfmac mmc2:0001:1: Direct firmware load for brcm/brcmfmac43430-sdio.clm_blob failed with error -2
[ 3322.620562] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available
[ 3322.626500] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0: Oct  8 2016 15:31:47 version 7.46.57.4.ap.r4 (A1 Station/P2P) FWID 01-3621395e es6.c5.n4.a3
[ 3334.349522] ieee80211 phy216: brcmf_fw_crashed: Firmware has halted or crashed
[ 3337.057818] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
[ 3337.058428] brcmfmac: brcmf_sdio_checkdied: firmware trap in dongle
[ 3337.064473] brcmfmac: dongle trap info: type 0x3 @ epc 0x00000000
                 cpsr 0x20000003 spsr 0x20000010 sp 0x0007fc14
                 lr   0x00009ffd pc   0x00000000 offset 0x7fbc0
                 r0   0x0006ca54 r1   0x00038cd4 r2 0x00000021 r3 0x0003dd28
                 r4   0x0007ad68 r5   0x00000000 r6 0x00038cd4 r7 0x0003dd28
[ 3337.064540] ieee80211 phy216: brcmf_fil_cmd_data: bus is down. we have nothing to do.
[ 3337.072117] ieee80211 phy216: brcmf_pno_clean: failed code -5
[ 3337.077851] ieee80211 phy216: brcmf_fil_cmd_data: bus is down. we have nothing to do.
[ 3337.085570] ieee80211 phy216: brcmf_cfg80211_get_tx_power: error (-5)
[ 3337.695493] mmc2: card 0001 removed
[...]

same lines for phys 1-215 and go on until reboot

@Giacomo

How can I repeat your question, please give some guidance?

Yes, of course! Sorry for my bad explanation. I’m trying to tweak brcmfmac driver to understand what and why the wlan0 interface stop to work and start to be disconnected and reconnected ad libitum.
Following some old post I found that could be a known issue related to driver with the roam function and I’ve tried to put “options brcmfmac roamoff=1” in a file “/etc/modprobe.d/brcmfmac.conf” and I’m trying to understand if this has done the trick.
I also tried to not use at the same time the Ethernet interface (eth0): now the wlan seems to work without crash but I still have to investigate if it is because of the roamoff option or if it is because I have no ethernet connection… I will update this post with more data.
I’m also evaluating if the right thing is to try the older kernel 6.0 or even the previous distro 20.04 with even older kernel 5.x… Any advices?

Other problem, with same os image and HDMI connected… at this point my question becomes simpler: has anyone ever used Ubuntu 22.04 on eMMC / Kernel 6.1 on VIM1 successfully?

khadas@Khadas:~$ dmesg
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 6.1.0 (root@fenix) (aarch64-none-linux-gnu-gcc (GNU Toolchain for the Arm Architecture 11.2-2022.02 (arm-11.14)) 11.2.1 20220111, GNU ld (GNU Toolchain for the Arm Architecture 11.2-2022.02 (arm-11.14)) 2.37.20220122) #1.4 SMP Thu Dec 29 02:16:25 UTC 2022
[    0.000000] Machine model: Khadas VIM
[    0.000000] Machine model: Khadas VIM
[    0.000000] Reserved memory: created CMA memory pool at 0x0000000043400000, size 896 MiB
[    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000000000000-0x000000007fffffff]
[    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-0x0000000000ffffff]
[    0.000000]   node   0: [mem 0x0000000001000000-0x0000000004ffffff]
[    0.000000]   node   0: [mem 0x0000000005000000-0x00000000072fffff]
[    0.000000]   node   0: [mem 0x0000000007300000-0x000000000fffffff]
[    0.000000]   node   0: [mem 0x0000000010000000-0x00000000101fffff]
[    0.000000]   node   0: [mem 0x0000000010200000-0x000000007fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000007fffffff]
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv0.2 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: Trusted OS migration not required
[    0.000000] percpu: Embedded 20 pages/cpu s43176 r8192 d30552 u81920
[    0.000000] pcpu-alloc: s43176 r8192 d30552 u81920 alloc=20*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: detected: ARM erratum 845719
[    0.000000] alternatives: applying boot alternatives
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 516096
[    0.000000] Kernel command line: root=UUID=c0c1cd59-50f3-4183-948e-7753a0face21 rootfstype=ext4 rootflags=data=writeback rw ubootpart=2e157445-01 console=ttyAML0,115200n8  no_console_suspend consoleblank=0 loglevel=0 osd12  fbcon=rotate:0 fsck.repair=yes net.ifnames=0    jtag=disable mac=4e:63:1f:9a:41:70  fan=auto khadas_board=VIM1 hwver=VIM1.V14 coherent_pool=2M pci=pcie_bus_perf  imagetype=EMMC_MBR uboottype=mainline splash quiet plymouth.ignore-serial-consoles vt.handoff=7 
[    0.000000] uboot setup mac-addr: 4e:63:1f:9a:41:70
[    0.000000] Unknown kernel command line parameters "osd12 splash ubootpart=2e157445-01 jtag=disable mac=4e:63:1f:9a:41:70 fan=auto khadas_board=VIM1 hwver=VIM1.V14 imagetype=EMMC_MBR uboottype=mainline", will be passed to user space.
[    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 1051224K/2097152K available (13056K kernel code, 1904K rwdata, 4364K rodata, 2944K init, 841K bss, 128424K reserved, 917504K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu: 	RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
[    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 24.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000000] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000302] Console: colour dummy device 80x25
[    0.000339] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=96000)
[    0.000350] pid_max: default: 32768 minimum: 301
[    0.000633] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.000648] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.002177] cblist_init_generic: Setting adjustable number of callback queues.
[    0.002193] cblist_init_generic: Setting shift to 2 and lim to 1.
[    0.002333] rcu: Hierarchical SRCU implementation.
[    0.002337] rcu: 	Max phase no-delay instances is 1000.
[    0.003540] smp: Bringing up secondary CPUs ...
[    0.004100] Detected VIPT I-cache on CPU1
[    0.004247] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[    0.004889] Detected VIPT I-cache on CPU2
[    0.005012] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
[    0.005590] Detected VIPT I-cache on CPU3
[    0.005708] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
[    0.005796] smp: Brought up 1 node, 4 CPUs
[    0.005802] SMP: Total of 4 processors activated.
[    0.005807] CPU features: detected: 32-bit EL0 Support
[    0.005810] CPU features: detected: 32-bit EL1 Support
[    0.005815] CPU features: detected: CRC32 instructions
[    0.005883] CPU: All CPU(s) started at EL2
[    0.005901] alternatives: applying system-wide alternatives
[    0.007713] devtmpfs: initialized
[    0.014967] Registered cp15_barrier emulation handler
[    0.014984] Registered setend emulation handler
[    0.015175] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.015197] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.036399] pinctrl core: initialized pinctrl subsystem
[    0.037556] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.038939] DMA: preallocated 2048 KiB GFP_KERNEL pool for atomic allocations
[    0.039468] DMA: preallocated 2048 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    0.039971] DMA: preallocated 2048 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.040163] audit: initializing netlink subsys (disabled)
[    0.040424] audit: type=2000 audit(0.040:1): state=initialized audit_enabled=0 res=1
[    0.040896] thermal_sys: Registered thermal governor 'step_wise'
[    0.040951] cpuidle: using governor ladder
[    0.040967] cpuidle: using governor menu
[    0.041232] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.041323] ASID allocator initialised with 65536 entries
[    0.053008] platform c883a000.hdmi-tx: Fixing up cyclic dependency with d0100000.vpu
[    0.055838] platform hdmi-connector: Fixing up cyclic dependency with c883a000.hdmi-tx
[    0.056655] KASLR disabled due to lack of seed
[    0.065019] cryptd: max_cpu_qlen set to 1000
[    0.067046] iommu: Default domain type: Translated 
[    0.067058] iommu: DMA domain TLB invalidation policy: strict mode 
[    0.067338] SCSI subsystem initialized
[    0.067510] usbcore: registered new interface driver usbfs
[    0.067541] usbcore: registered new interface driver hub
[    0.067574] usbcore: registered new device driver usb
[    0.067917] mc: Linux media interface: v0.10
[    0.067941] videodev: Linux video capture interface: v2.00
[    0.068041] pps_core: LinuxPPS API ver. 1 registered
[    0.068045] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.068603] Advanced Linux Sound Architecture Driver Initialized.
[    0.069296] vgaarb: loaded
[    0.069762] clocksource: Switched to clocksource arch_sys_counter
[    0.070141] FS-Cache: Loaded
[    0.076429] NET: Registered PF_INET protocol family
[    0.076625] IP idents hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    0.078385] tcp_listen_portaddr_hash hash table entries: 1024 (order: 2, 16384 bytes, linear)
[    0.078419] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.078431] TCP established hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.078583] TCP bind hash table entries: 16384 (order: 7, 524288 bytes, linear)
[    0.078983] TCP: Hash tables configured (established 16384 bind 16384)
[    0.079247] MPTCP token hash table entries: 2048 (order: 3, 49152 bytes, linear)
[    0.079345] UDP hash table entries: 1024 (order: 3, 32768 bytes, linear)
[    0.079388] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes, linear)
[    0.079590] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.080077] RPC: Registered named UNIX socket transport module.
[    0.080087] RPC: Registered udp transport module.
[    0.080090] RPC: Registered tcp transport module.
[    0.080093] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.080101] NET: Registered PF_XDP protocol family
[    0.080116] PCI: CLS 0 bytes, default 64
[    0.080480] Trying to unpack rootfs image as initramfs...
[    0.086769] hw perfevents: enabled with armv8_cortex_a53 PMU driver, 7 counters available
[    0.087397] kvm [1]: IPA Size Limit: 40 bits
[    0.088758] kvm [1]: vgic interrupt IRQ9
[    0.089381] kvm [1]: Hyp mode initialized successfully
[    0.091352] Initialise system trusted keyrings
[    0.091556] workingset: timestamp_bits=46 max_order=19 bucket_order=0
[    0.096792] zbud: loaded
[    0.098689] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.099557] NFS: Registering the id_resolver key type
[    0.099596] Key type id_resolver registered
[    0.099599] Key type id_legacy registered
[    0.099689] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.099695] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    0.100634] Key type cifs.idmap registered
[    0.137106] NET: Registered PF_ALG protocol family
[    0.137126] Key type asymmetric registered
[    0.137130] Asymmetric key parser 'x509' registered
[    0.504839] Freeing initrd memory: 10412K
[    0.518058] alg: self-tests for CTR-KDF (hmac(sha256)) passed
[    0.518178] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245)
[    0.518285] io scheduler mq-deadline registered
[    0.518292] io scheduler kyber registered
[    0.518537] io scheduler bfq registered
[    0.519249] irq_meson_gpio: 110 to 8 gpio interrupt mux initialized
[    0.536526] soc soc0: Amlogic Meson GXL (S905X) Revision 21:d (84:2) Detected
[    0.539895] c11084c0.serial: ttyAML1 at MMIO 0xc11084c0 (irq = 18, base_baud = 1500000) is a meson_uart
[    0.540070] serial serial0: tty port ttyAML1 registered
[    0.540687] c81004c0.serial: ttyAML0 at MMIO 0xc81004c0 (irq = 19, base_baud = 1500000) is a meson_uart
[    0.540810] printk: console [ttyAML0] enabled
[    0.541636] c81004e0.serial: ttyAML4 at MMIO 0xc81004e0 (irq = 20, base_baud = 1500000) is a meson_uart
[    0.543511] gpiomem-aml da834000.gpiomem: Initialised: Registers at 0xda834000
[    0.543881] gpiomem-aml c8100000.gpiomem_ao: Initialised: Registers at 0xc8100000
[    0.556970] brd: module loaded
[    0.564569] loop: module loaded
[    0.587636] Loading iSCSI transport class v2.0-870.
[    0.589482] iscsi: registered transport (tcp)
[    0.598393] tun: Universal TUN/TAP device driver, 1.6
[    0.600170] usbcore: registered new interface driver rtl8150
[    0.604241] mousedev: PS/2 mouse device common for all mice
[    0.605727] i2c_dev: i2c /dev entries driver
[    0.616339] meson-gx-mmc d0072000.mmc: Got CD GPIO
[    0.617219] meson-gx-mmc d0074000.mmc: allocated mmc-pwrseq
[    0.618661] ledtrig-cpu: registered to indicate activity on CPUs
[    0.619538] meson-sm: secure-monitor enabled
[    0.620811] gxl-crypto c883e000.crypto: will run requests pump with realtime priority
[    0.621037] gxl-crypto c883e000.crypto: will run requests pump with realtime priority
[    0.621343] hid: raw HID events driver (C) Jiri Kosina
[    0.622709] usbcore: registered new interface driver usbhid
[    0.622725] usbhid: USB HID core driver
[    0.623162] platform-mhu c883c404.mailbox: Platform MHU Mailbox registered
[    0.633403] NET: Registered PF_INET6 protocol family
[    0.648094] Segment Routing with IPv6
[    0.648157] In-situ OAM (IOAM) with IPv6
[    0.648261] NET: Registered PF_PACKET protocol family
[    0.648461] Key type dns_resolver registered
[    0.648986] registered taskstats version 1
[    0.649017] Loading compiled-in X.509 certificates
[    0.649451] zswap: loaded using pool lzo/zbud
[    0.672255] meson-drm d0100000.vpu: Queued 1 outputs on vpu
[    0.673610] meson-drm d0100000.vpu: CVBS Output connector not available
[    0.701899] meson-dw-hdmi c883a000.hdmi-tx: Detected HDMI TX controller v2.01a with HDCP (meson_dw_hdmi_phy)
[    0.702472] meson-dw-hdmi c883a000.hdmi-tx: registered DesignWare HDMI I2C bus driver
[    0.703086] meson-drm d0100000.vpu: bound c883a000.hdmi-tx (ops meson_dw_hdmi_ops)
[    0.703712] [drm] Initialized meson 1.0.0 20161109 for d0100000.vpu on minor 0
[    0.809461] mmc1: new HS200 MMC card at address 0001
[    0.810413] mmcblk1: mmc1:0001 8GTF4R 7.28 GiB 
[    0.812433]  mmcblk1: p1 p2
[    0.813455] mmcblk1boot0: mmc1:0001 8GTF4R 4.00 MiB 
[    0.815451] mmcblk1boot1: mmc1:0001 8GTF4R 4.00 MiB 
[    0.817037] mmcblk1rpmb: mmc1:0001 8GTF4R 512 KiB, chardev (239:0)
[    1.381766] ------------[ cut here ]------------
[    1.381776] [CRTC:40:meson_crtc] vblank wait timed out
[    1.381811] WARNING: CPU: 3 PID: 52 at drm_atomic_helper_wait_for_vblanks.part.0+0x280/0x2a4
[    1.381833] Modules linked in:
[    1.381842] CPU: 3 PID: 52 Comm: kworker/u8:1 Not tainted 6.1.0 #1.4
[    1.381850] Hardware name: Khadas VIM (DT)
[    1.381855] Workqueue: events_unbound deferred_probe_work_func
[    1.381866] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[    1.381873] pc : drm_atomic_helper_wait_for_vblanks.part.0+0x280/0x2a4
[    1.381882] lr : drm_atomic_helper_wait_for_vblanks.part.0+0x280/0x2a4
[    1.381891] sp : ffff800009ea33f0
[    1.381893] x29: ffff800009ea33f0 x28: 0000000000000001 x27: 0000000000000000
[    1.381903] x26: 0000000000000000 x25: 0000000000000001 x24: 0000000000000038
[    1.381912] x23: ffff000003ca9000 x22: 0000000000000001 x21: ffff000003983080
[    1.381922] x20: ffff000001930880 x19: 0000000000000000 x18: ffffffffffffffff
[    1.381931] x17: 0000000000006a50 x16: 0000000000006a4c x15: ffff8000095edd3c
[    1.381940] x14: 0000000000000000 x13: 0a74756f2064656d x12: 6974207469617720
[    1.381949] x11: ffff800009426348 x10: 000000000000003a x9 : 0000000000000028
[    1.381958] x8 : ffff800009426300 x7 : ffff800009ea3210 x6 : 000000000000000d
[    1.381967] x5 : 00000000ffffe0c5 x4 : 0000000000000000 x3 : 0000000000000000
[    1.381976] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff000001832880
[    1.381986] Call trace:
[    1.381989]  drm_atomic_helper_wait_for_vblanks.part.0+0x280/0x2a4
[    1.381999]  drm_atomic_helper_commit_tail_rpm+0x84/0xa0
[    1.382007]  commit_tail+0xa4/0x1a4
[    1.382016]  drm_atomic_helper_commit+0x16c/0x190
[    1.382024]  drm_atomic_commit+0x8c/0x120
[    1.382033]  drm_client_modeset_commit_atomic+0x200/0x260
[    1.382044]  drm_client_modeset_commit_locked+0x5c/0x1a0
[    1.382053]  drm_client_modeset_commit+0x30/0x60
[    1.382061]  drm_fb_helper_set_par+0xc8/0x120
[    1.382070]  fbcon_init+0x264/0x520
[    1.382080]  visual_init+0xb4/0x104
[    1.382089]  do_bind_con_driver.isra.0+0x1c4/0x394
[    1.382098]  do_take_over_console+0x144/0x1fc
[    1.382107]  do_fbcon_takeover+0x6c/0xe4
[    1.382115]  fbcon_fb_registered+0x1e4/0x1f0
[    1.382124]  register_framebuffer+0x214/0x310
[    1.382131]  __drm_fb_helper_initial_config_and_unlock+0x318/0x570
[    1.382139]  drm_fbdev_client_hotplug+0x134/0x224
[    1.382147]  drm_fbdev_generic_setup+0xb4/0x1a0
[    1.382155]  meson_drv_bind_master+0x3d4/0x4a0
[    1.382163]  meson_drv_bind+0x14/0x20
[    1.382170]  try_to_bring_up_aggregate_device+0x1f0/0x300
[    1.382179]  __component_add+0xa4/0x190
[    1.382187]  component_add+0x14/0x20
[    1.382194]  meson_dw_hdmi_probe+0x1c/0x30
[    1.382200]  platform_probe+0x68/0xe0
[    1.382209]  really_probe+0xc0/0x3dc
[    1.382215]  __driver_probe_device+0x7c/0x190
[    1.382222]  driver_probe_device+0x3c/0x110
[    1.382229]  __device_attach_driver+0xbc/0x160
[    1.382236]  bus_for_each_drv+0x78/0xd0
[    1.382243]  __device_attach+0xa8/0x1e4
[    1.382249]  device_initial_probe+0x14/0x20
[    1.382256]  bus_probe_device+0x9c/0xa4
[    1.382263]  deferred_probe_work_func+0x9c/0xf0
[    1.382269]  process_one_work+0x1dc/0x3a0
[    1.382278]  worker_thread+0x270/0x530
[    1.382286]  kthread+0xdc/0xf0
[    1.382294]  ret_from_fork+0x10/0x20
[    1.382302] ---[ end trace 0000000000000000 ]---
[    1.382337] Console: switching to colour frame buffer device 240x67
[   11.485770] meson-drm d0100000.vpu: [drm] *ERROR* flip_done timed out
[   11.485781] meson-drm d0100000.vpu: [drm] *ERROR* [CRTC:40:meson_crtc] commit wait timed out
[   21.725763] meson-drm d0100000.vpu: [drm] *ERROR* flip_done timed out
[   21.725769] meson-drm d0100000.vpu: [drm] *ERROR* [CONNECTOR:32:HDMI-A-1] commit wait timed out
[   31.965763] meson-drm d0100000.vpu: [drm] *ERROR* flip_done timed out
[   31.965769] meson-drm d0100000.vpu: [drm] *ERROR* [PLANE:34:meson_primary_plane] commit wait timed out

Finally I’m start to think my VIM1 board is someway broken: I found same error about brcmfmac and meson-drm (see dmesg log) also after downgraded to Linux 6.0 (image
vim1-ubuntu-22.04-server-linux-6.0-fenix-1.1.8-221014.img.xz) and even to Ubuntu 20.04 (image https://dl.khadas.com/products/vim1/firmware/ubuntu/generic/vim1-ubuntu-20.04-server-linux-5.18-fenix-1.1.1-220725.img.xz)
Any insight about how to confirm it is broken?

Some way to check?

Please advise!!!

46.046805] meson-drm d0100000.vpu: [drm] *ERROR* flip_done timed out
[   46.047791] meson-drm d0100000.vpu: [drm] *ERROR* [CRTC:40:meson_crtc] commit wait timed out
[   56.286570] meson-drm d0100000.vpu: [drm] *ERROR* flip_done timed out
[   56.287530] meson-drm d0100000.vpu: [drm] *ERROR* [CONNECTOR:32:HDMI-A-1] commit wait timed out
[   66.526583] meson-drm d0100000.vpu: [drm] *ERROR* flip_done timed out
[   66.527556] meson-drm d0100000.vpu: [drm] *ERROR* [PLANE:34:meson_primary_plane] commit wait timed out
[   66.638533] ------------[ cut here ]------------
[   66.638619] [CRTC:40:meson_crtc] vblank wait timed out
[   66.638916] WARNING: CPU: 2 PID: 915 at drm_atomic_helper_wait_for_vblanks.part.0+0x280/0x298
[   66.639110] Modules linked in: zram zsmalloc governor_simpleondemand lima drm_shmem_helper hci_uart btqca btbcm gpu_sched bluetooth meson_vdec(C) ir_nec_decoder videobuf2_dma_contig v4l2_mem2mem videobuf2_memops ecdh_generic rc_khadas videobuf2_v4l2 ecc meson_ir videobuf2_common leds_pwm brcmfmac brcmutil cfg80211 rfkill ip_tables x_tables btrfs blake2b_generic zlib_deflate raid6_pq zstd_compress libcrc32c rtc_meson_vrtc rtc_hym8563 gpio_keys_polled
[   66.640373] CPU: 2 PID: 915 Comm: plymouthd Tainted: G        WC        5.18.0 #1.1.1
[   66.640473] Hardware name: Khadas VIM (DT)
[   66.640521] pstate: 40000005 (nZcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[   66.640621] pc : drm_atomic_helper_wait_for_vblanks.part.0+0x280/0x298
[   66.640746] lr : drm_atomic_helper_wait_for_vblanks.part.0+0x280/0x298
[   66.640858] sp : ffff8000089939e0
[   66.640901] x29: ffff8000089939e0 x28: 0000000000000001 x27: 0000000000000000
[   66.641053] x26: 0000000000000001 x25: 0000000000000038 x24: 0000000000000000
[   66.641196] x23: ffff000003a84000 x22: 0000000000000001 x21: ffff0000038d5880
[   66.641343] x20: ffff0000049eb680 x19: 0000000000000000 x18: 0000000000000001
[   66.641486] x17: 0048015002560465 x16: 0441043c04650438 x15: ffff000001815548
[   66.641631] x14: 000000000000022f x13: ffff000001815548 x12: 00000000ffffffea
[   66.641774] x11: 00000000ffffdfff x10: 00000000ffffdfff x9 : ffff80000a566040
[   66.641918] x8 : 000000000002ffe8 x7 : c0000000ffffdfff x6 : 0000000000000001
[   66.642056] x5 : ffff00007fba4758 x4 : 0000000000000000 x3 : 0000000000000027
[   66.642196] x2 : 0000000000000023 x1 : 268a456b441c8800 x0 : 0000000000000000
[   66.642339] Call trace:
[   66.642377]  drm_atomic_helper_wait_for_vblanks.part.0+0x280/0x298
[   66.642504]  drm_atomic_helper_commit_tail_rpm+0x64/0x80
[   66.642623]  commit_tail+0xa4/0x198
[   66.642726]  drm_atomic_helper_commit+0x144/0x3f0
[   66.642835]  drm_atomic_commit+0x58/0x68
[   66.642921]  drm_atomic_helper_set_config+0xcc/0x108
[   66.643029]  drm_mode_setcrtc+0x1a4/0x688
[   66.643124]  drm_ioctl_kernel+0xc0/0x178
[   66.643203]  drm_ioctl+0x214/0x430
[   66.643277]  __arm64_sys_ioctl+0x94/0xd8
[   66.643384]  invoke_syscall+0x44/0x108
[   66.643485]  el0_svc_common.constprop.0+0x50/0x1a0
[   66.643584]  do_el0_svc+0x24/0x88
[   66.643674]  el0_svc+0x2c/0xb8
[   66.643758]  el0t_64_sync_handler+0xb0/0xb8
[   66.643840]  el0t_64_sync+0x19c/0x1a0
[   66.643923] ---[ end trace 0000000000000000 ]---

Hello @Giacomo

Please check with the 4.9 kernel image.

http://dl.khadas.com/firmware/vim1/ubuntu/emmc/vim1-ubuntu-18.04-xfce-linux-4.9-fenix-1.1.1-220725-emmc.img.xz

VIM1 Install OS into eMMC via USB Flash Tool [Khadas Docs]

Thank you @numbqq ! I’ve just tried. Undoubtedly it runs better. There are still some errors in dmesg, but it seems to not crash anymore and wifi is stable. I wonder if such difference is only related to the old kernel (4.9 vs 5.x vs 6.x) or also to the flashing method (am-burn vs krescue), because is a little bit sad to go back of 4 years to Ubuntu 18.04 from 22.04…

khadas@Khadas:~$ dmesg --level=emerg,alert,crit,err
[    0.000000] Reserved memory: unable to setup CMA region
[    0.285013] codec_mm_module_init
[    0.297073] clkmsr c110875c.meson_clk_msr: failed to get msr ring reg0
[    0.570578] dmi: Firmware registration failed.
[    1.106267] mtdoops: mtd device (mtddev=name/number) must be supplied
[    1.132276] c81004c0.serial: clock gate not found
[    1.158737] c11084c0.serial: clock gate not found
[    1.163637] c81004e0.serial: clock gate not found
[    1.169680] amlogic-new-usb3 d0078080.usb3phy: This phy has no usb port
[    1.185154] meson-remote c8100580.rc: don't find the node <led_blink>
[    1.186162] meson-remote c8100580.rc: don't find the node <led_blink_frq>
[    1.199204] ge2d: register address resource is not found
[    1.202421] fb: failed to init reserved memory
[    1.336206] get fclk_div5 err
[    1.336236] vdin_drv_probe: vdin cannot get msr clk !!!
[    1.339725] get fclk_div5 err
[    1.342215] vdin_drv_probe: vdin cannot get msr clk !!!
[    1.351310] amlvideo2 probe called
[    1.351649] amlvideo2 probe called
[    1.355395] Reserved memory: failed to init DMA memory pool at 0x0000000075000000, size 0 MiB
[    1.369754] meson-mmc: >>>>>>>>hostbase ffffff800878a000, dmode 
[    1.418260] meson-mmc: >>>>>>>>hostbase ffffff80087c6000, dmode 
[    1.460085] meson-mmc: >>>>>>>>hostbase ffffff80087e2000, dmode 
[    1.499395] cectx c810023c.aocec: cec driver date:2019/6/13:early suspend not report pw status
               
[    1.504594] cectx c810023c.aocec: compatible:amlogic, amlogic-aocec
[    1.510718] cectx c810023c.aocec: cecb_ver:0x0
[    1.515212] cectx c810023c.aocec: line_reg:0x0
[    1.519812] cectx c810023c.aocec: line_bit:0x8
[    1.524267] cectx c810023c.aocec: ee_to_ao:0x0
[    1.529254] cectx c810023c.aocec: not find 'port_num'
[    1.534135] cectx c810023c.aocec: using cec:0
[    1.538655] cectx c810023c.aocec: get sleep state error!
[    1.544130] cectx c810023c.aocec: no hdmirx regs
[    1.548920] cectx c810023c.aocec: no hhi regs
[    1.553428] cectx c810023c.aocec: no periphs regs
[    1.558228] cectx c810023c.aocec: not find 'output'
[    1.566406] cectx c810023c.aocec: irq cnt:1
[    1.567935] cectx c810023c.aocec: wakeup_reason:0x0
[    1.572394] cectx c810023c.aocec: cev val1: 0x0;val2: 0x0
[    1.578068] cectx c810023c.aocec: aml_cec_probe success end
[    1.612043] meson-mmc: Tuning transfer error: nmatch=0 tuning_err:0xffffffac
[    1.616958] meson-mmc: emmc: warning... response crc,vstat:0xa1ff2400,virqc:3fff
[    1.621123] meson-mmc: emmc: err: wait for irq service, bus_fsm:0x8
[    1.627502] meson-mmc: emmc: cmd 18, arg 0x12000, operation is in [reserved] disk!
[    1.635194] meson-mmc: meson_mmc_irq_thread() 2786: set 1st retry!
[    1.641499] meson-mmc: retry cmd 18 the 10-th time(s)
[    1.646666] meson-mmc: cmd_delay change to 2
[    1.651071] meson-mmc: emmc: resp_timeout,vstat:0xa1ff2800,virqc:3fff
[    2.054768] defendkey c8834500.defendkey: Reserved memory is not enough!
[    2.066410] spdif-dit spdif_codec: audio_spdif_in_mute can't get pinctrl
[    2.067653] spdif-dit spdif_codec: audio_spdif_in can't get pinctrl
[    2.284387] aml_meson_snd_card aml_sound_meson: ASoC: no source widget found for LOUTL
[    2.286867] aml_meson_snd_card aml_sound_meson: ASoC: Failed to add route LOUTL -> direct -> Ext Spk
[    2.296071] aml_meson_snd_card aml_sound_meson: ASoC: no source widget found for LOUTR
[    2.304089] aml_meson_snd_card aml_sound_meson: ASoC: Failed to add route LOUTR -> direct -> Ext Spk
[    2.852765] hub 2-0:1.0: config failed, hub doesn't have any ports! (err -19)
[    2.854671] usb usb2: Unsupported the hub
[    2.859185] rtc-hym8563 1-0051: hctosys: unable to read the hardware clock
[    2.869210] thermal: read num_of_pp failed
[   12.850537] cgroup: cgroup2: unknown option "nsdelegate"
[   13.298141] thermal thermal_zone0: binding zone soc_thermal with cdev thermal-gpufreq-0 failed:-22
[   14.163984] snd_i2s_dai: Fine tdm clk setting range (0~2000000), 12287985
[   14.165464] snd_spdif_dai: Fine spdif sysclk setting range(0~2000000), 24575970
[   14.447486] meson-mmc: sdio: resp_timeout,vstat:0xa3ff2800,virqc:3fff
[   14.448460] meson-mmc: sdio: err: wait for irq service, bus_fsm:0x8
[   14.456039] meson-mmc: sdio: resp_timeout,vstat:0xa3ff2800,virqc:3fff
[   14.461399] meson-mmc: sdio: err: wait for irq service, bus_fsm:0x8
[   14.472872] meson-mmc: sdio: resp_timeout,vstat:0xa3ff2800,virqc:3fff
[   14.474336] meson-mmc: sdio: err: wait for irq service, bus_fsm:0x8
[   14.513013] Amlogic A/V streaming port init
[   15.613366] meson-remote c8100580.rc: remote_ioctl invalid user space pointer
[   15.854577] snd_i2s_dai: Fine tdm clk setting range (0~2000000), 12287985
[   15.858454] snd_spdif_dai: Fine spdif sysclk setting range(0~2000000), 24575970

Hello @Giacomo

These information are not harmful, just ingnore it.

Ok. Thank you!
Anyway, it would be interesting to know if others have experimented same issues with newer images and how they would solve them, in case some of you would share its experiences!!

On the VIM 3 I have the same problem with Ubuntu Server 22.04 image installed via OOWOW.

The Wifi is very unstable and often locks up or can’t even see the Access Point.

I didn’t have any issues with Wifi when running Armbian.

I further write that the Wifi stability appears to be related to how hot the board gets. When its warm the Wifi lasts at most a few minutes, when the board has not been used and is cold then Wifi is ok until it warms up again.

UPDATE: Have installed Ubuntu 20.04 and Wifi stability under load has been ok so far. The CPU Fan is actually throttling properly to keep the CPU temp down.

Under Ubuntu 22.04 the CPU fan is not operating correctly and the board gets hot causing Wifi instability.

Thank you for your answer! Anyway I don’t guess the issue is (only) related to the fan and the temperature: I’m working without any fan, but the issue seems to appear both when the cpu is working hard and also when the board is just started… I can confirm that with Ubuntu 18.04 installed via am-burn usb tool I found no issues, never! This is very disappointing because that OS is too old and I run into many other issues trying to compile my software with to obsolete libraries… if I don’t find a solution to this issue I fear I will be forced to go back on a mere Raspberry PI4 with Ubuntu 22.04 :roll_eyes:

Not very likely you are still looking for a solution, but I got the same issue on VIM 3 running Ubuntu 22.04-gnome-linux-6.1-fenix-1.4-221229. Ubuntu 20.04 with 4.9 kernel worked perfectly. Good news is that I found a solution in this forum here. This patch came out in Feburary, but newer images for 22.04 has not been released since last December. Guess that’s why people keep having this issue.