After installing pmOS for my PinePhone Pro it fails to boot, giving errors indicating problems reading the boot media (see attached logs). Messages about MMC I/O errors, CQHCI register dumps, and CQE recovery continue in a loop, never managing to boot up. This happens whether I install to eMMC or SD card, including different SD cards from different brands. Manjaro boots just fine, both from eMMC and SD card.
I found a possible fix of adding sdhci.debug_quirks=0x2020000 to the kernel commandline. This produced the same results, but with messages at about 20x the rate.
I am running Tow-Boot on this device.
How to reproduce your issue?
I can reproduce this 100% of the time, it happens no matter how try to install pmOS to this device. Seems like no one else is having this issue though.
What device are you using?
pine64-pinephonepro
On what postmarketOS version did you encounter the issue?
Thanks, here's where your boot log differs from mine:
Yours:
[ 0.490806] pwm-backlight backlight: supply power not found, using dummy regulator[ 0.525355] cacheinfo: Unable to detect cache hierarchy for CPU 0[ 0.564700] rk818-battery rk818-battery: DMA mask not set[ 0.612138] rk818-charger rk818-charger: DMA mask not set[ 0.622189] dw_wdt ff848000.watchdog: No valid TOPs array specified[ 0.644445] rk3399-dmc-freq ffa80000.dmc: supply center not found, using dummy regulator>[ 0.704818] mmc1: Problem switching card into high-speed mode![ 0.770086] mmc0: running CQE recovery
Mine:
[ 0.491553] pwm-backlight backlight: supply power not found, using dummy regulator[ 0.526437] cacheinfo: Unable to detect cache hierarchy for CPU 0[ 0.565576] rk818-battery rk818-battery: DMA mask not set[ 0.616106] rk818-charger rk818-charger: DMA mask not set[ 0.626032] dw_wdt ff848000.watchdog: No valid TOPs array specified[ 0.648412] rk3399-dmc-freq ffa80000.dmc: supply center not found, using dummy regulator>[ 1.818298] [drm] unsupported AFBC format[3231564e][ 1.826847] cdn-dp fec00000.dp: Direct firmware load for rockchip/dptx.bin failed with error -2### postmarketOS initramfs ###
And this Unexpected interrupt latency is worrisome:
[ 0.776816] ------------[ cut here ]------------[ 0.782046] WARNING: CPU: 0 PID: 129 at drivers/mmc/host/cqhci-core.c:786 cqhci_irq+0x4c4/0x630[ 0.789676] dwmmc_rockchip fe310000.mmc: Unexpected interrupt latency[ 0.799587] ---[ end trace e07e4f8564e3ce6c ]---
Before I cc more knowledgeable people:
Can you confirm which pmaports rev you used ?
Is anything's plugged in the USB port while you boot?
Can you send the boot log while booting on a mSD card ?
Also, if you still have a mSD card inserted with an old pmOS intall while you try to boot on eMMC it'll lead to weird behavior. Perhaps related to #1485 (closed)
Is anything's plugged in the USB port while you boot?
Nothing is plugged in to USB.
Can you send the boot log while booting on a mSD card ?
Sorry, I forgot to specify: The boot log I already posted was booting from mSD. I also just now tried booting from eMMC with no mSD inserted, attached is the log for that:
pmos_emmc.log
https://www.najdan.com/pine64-pinephonepro.imgSHA256: 70f4bcbf670506e2674946e28e62518cd2ca81c01f2e987b2ea673bfeff82d06*Link will stay active for the next 7 days
Steps:
Reboot PPP in flash mode (Hold Volume UP until atfer second vibration)
Flash the image dd if=pine64-pinephonepro.img of=/dev/sdX oflag=direct status=progress
Thanks for the image. I downloaded it, confirmed the SHA256, and flashed it to eMMC as instructed. I'm afraid the result was the same as earlier. I've attached the boot log.
I tested this new kernel on my PPP and it booted fine in phosh.
You can test this kernel by either:
backport my changes in your local pmaports repo and build a new image
download the same image I built and tested
https://www.najdan.com/pine64-pinephonepro-5.17.6.imgSHA256: cd3641fff5021d4e5164e6db1d8a443178c2d86a80e0f124daadd63080e5f37c*Link will stay active for the next 7 days
DISCLAIMER: This comes with absolutely no warranty
If I install with pmbootstrap to eMMC, on boot it gets stuck on "Configuring kernel firmware image search path" for a long time (at least 10 minutes), until it fails to boot with "ERROR: boot partition not found!". Serial log: pmos_5.17.9_emmc.log
If I install with pmbootstrap to SD, on boot it gets stuck on the same message for a long time, but then finally it boots successfully.
If I put the pre-built installer image (20220713-1209-postmarketOS-edge-sxmo-de-sway-1.9.0-pine64-pinephonepro-installer.img.xz) on an SD card it takes the same long amount of time to boot. When I select to install to eMMC in the installer, it fails when trying to write a partition table to the eMMC:
Error: I/O error during read on /dev/mmcblk0Error: I/O error during write on /dev/mmcblk0Warning: Error fsyncing/closing /dev/mmcblk0: I/O error
Seems to me like it fails to access the eMMC in all instances, and the long boot time from SD is because it's trying to read the eMMC and eventually gives up.
@BobbyTheBuilder Sorry, I never actually got around to filing an issue on pine64-org/linux. However, I just tested flashing the latest edge with pmbootstrap to my PinePhone Pro, and it boots without any of the issues described here! The latest v22.06 image still has the same issues, but I assume that the next release will work since edge works.
No idea if it's related, but I had similar issues booting the Pro after updating. I had left it un-updated for quite some time, so I expected some issues.
I found that the /boot/grub/grub.cfg was very different from the /boot/grub/grub.cfg.backup so I just swapped the two on a whim, and it booted just fine. Wouldn't even begin to be able to tell you why that worked, but hey, it's worth a shot.
EDIT: Oops, didn't realize how old this issue was, as it just popped up in my RSS feed. Sorry.:
I don't believe it was solely caused by Tow-Boot, as I can still reproduce the issue when running the latest Tow-Boot if I boot from pmOS v22.06, but not when I boot from Edge. Either way, the problem is solved, so I suppose no further investigation is needed.