Slow boot on revpi 5

Hello everyone.

I’m currently looking to integrate the revpi 5 with mender for our company. So far everything works, but I ran into a strange issue.

It seems that if there is no output plugged in, the revpi’s boot process takes 2-3 minutes. The majority of the time seems to be kernel / pre kernel. Once the handoff has happened to the host os everything seems fine. But if there is a display connected, it boots in around 5-10 seconds. It doesnt matter if that display is plugged in or not.

I tried reading the UART to see if anything happens, but when UART is configured, the problem is also magically solved. It doesn’t matter if I connect the UART lines to my pc or not. Due to this strangeness I’m unable to debug this, because when I can see output the issue does not present itself.

Does anyone have pointers on where to look? I’m kinda at my whits end.

Also HDMI_FORCE_HOTPLUG=1 does nothing.

i noticed that on a slow boot the mmc memory appears to be waiting:

pi@RevPi192037:~$  dmesg | grep mmc
[    0.000000] Kernel command line: reboot=w coherent_pool=1M 8250.nr_uarts=1 pci=pcie_bus_safe cgroup_disable=memory numa_policy=interleave nvme.max_host_mem_size_mb=0 pcie_aspm=off  numa=fake=8 system_heap.max_order=0 iommu_dma_numa_policy=interleave smsc95xx.macaddr=88:A2:9E:46:ED:05 vc_mem.mem_base=0x3fc00000 vc_mem.mem_size=0x40000000  dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 fsck.repair=yes rootwait nosplash plymouth.ignore-serial-consoles
[    0.563489] mmc0: CQHCI version 5.10
[    0.587012] mmc0: SDHCI controller on 1000fff000.mmc [1000fff000.mmc] using ADMA 64-bit
[    0.590370] Waiting for root device /dev/mmcblk0p2...
[  133.693567] mmc0: Command Queue Engine enabled, 16 tags
[  133.693571] mmc0: new HS400 Enhanced strobe MMC card at address 0001
[  133.693974] mmcblk0: mmc0:0001 BJTD4R 29.1 GiB
[  133.694464]  mmcblk0: p1 p2 p3 p4
[  133.694624] mmcblk0: mmc0:0001 BJTD4R 29.1 GiB
[  133.694660] mmcblk0boot0: mmc0:0001 BJTD4R 4.00 MiB
[  133.694928] mmcblk0boot1: mmc0:0001 BJTD4R 4.00 MiB
[  133.695169] mmcblk0rpmb: mmc0:0001 BJTD4R 4.00 MiB, chardev (243:0)
[  133.702348] EXT4-fs (mmcblk0p2): INFO: recovery required on readonly filesystem
[  133.702351] EXT4-fs (mmcblk0p2): write access will be enabled during recovery
[  133.732280] EXT4-fs (mmcblk0p2): recovery complete
[  133.733056] EXT4-fs (mmcblk0p2): mounted filesystem a04a987c-8196-4d0d-a3cd-a912ea2325f9 ro with ordered data mode. Quota mode: none.
[  134.034667] systemd[1]: Expecting device dev-mmcblk0p1.device - /dev/mmcblk0p1...
[  134.034700] systemd[1]: Expecting device dev-mmcblk0p4.device - /dev/mmcblk0p4...
[  134.161294] EXT4-fs (mmcblk0p2): re-mounted a04a987c-8196-4d0d-a3cd-a912ea2325f9 r/w.
[  134.187757] EXT4-fs (mmcblk0p2): resizing filesystem from 1946624 to 1946624 blocks
[  135.131680] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[  137.032260] EXT4-fs (mmcblk0p4): recovery complete
[  137.034115] EXT4-fs (mmcblk0p4): mounted filesystem 41469db3-5ad9-437e-a5c2-8c2289bb40ba r/w with ordered data mode. Quota mode: none.
[  137.066805] EXT4-fs (mmcblk0p4): resizing filesystem from 3672064 to 3672064 blocks

on a fast boot the waiting for root device is not present in the logs.