no matter what you do, or try, or if you pray to the gods of the electric: suspend on pinebook pro will not work. lots of theories and possibilities flying around. levinboot with old kernel may work. tow-boot may work. old or later u-boot may work. not sure about most.
u-boot 21.10 does not work. u-boot 22-04 does not work. tow-boot does not work. so far. been testing most of these with different distros to make sure. no success so far.
UPDATE 2022-06-09
the status so far. newer kernels and multiple styles of uboot have no success. it will just not suspend. there are rumors if you use a bsp u-boot which can be found here and use an older pinebookpro kernel it can suspend. the repo has the older 5.7 kernel. the only drawback is that nvme is not supported (sleep will not function this way either). i would rather take the nvme and use it for something else and have suspend in the pbp than not having suspend. so oh well. going to install dietpi on a 512GB sd, boot it, mount emmc, mount nvme, copy data from nvme to $emmc/home (i use the nvme for /home in manjaro), unmount nvme, image emmc with dd to 512GB sd (for backup), write bsp uboot to emmc, reboot (and pray it actually boots), install 5.7 kernel from manjaro repo, reboot again, test suspend to ram. this is quite ridiculous but if it works it will actually allow me to use my pbp day to day without leaving it on all the time (which is a pain… i got it to use a charger less).
cd ./out/u-boot
sudo dd if=./idbloader.img of=/dev/sdx bs=512 seek=64
sudo dd if=./uboot.img of=/dev/sdx bs=512 seek=16384
sudo dd if=./trust.img of=/dev/sdx bs=512 seek=24576
sync
these are the commands required to write u-boot bsp to <device> (i think).
downgrading the kernel was a failure. but Venom668 in #pinebook on pine64 irc created an image for testing that uses levinboot and a minimal arch linux install. first attempt went off without a hitch. i left it in suspend to ram for a few minutes and tried again. worked. so the issue lies in u-boot. seems like using levinboot may be a sane option.
1. install a patched kernel
2. make sure you’re using GPT on eMMC
3. remount boot partition somewhere else and move its content to /boot on your root partition
4. change the boot partition GUID to levinboot’s
5. install levinboot, flash the payload
quite the learning curve here. so i’ll work on it and see if i can get rid of u-boot in favor of levinboot on the emmc which already has manjaro installed. this would be the best outcome.
Update 2022-06-12
ok. played it fast and loose without an emmc backup because i just wanted to try it out. so there are quite a few steps in getting it to work but it does indeed seem that levinboot can suspend the pinebook pro. i do not think the nvme can work though. i tested it with the ribbon cable pulled on it but when i reconnected and mounted it it seemed to work (it suspended then came back to life with the power button) but then spat out error messages about nvme io. i also was able to use the 2nd partition (/dev/mmcblk2p1) for the levinboot payload. i moved u-boot related things to p2 (under /boot) so all i really did was unmount /boot, mount p1 elsewhere, copied everything to /boot, removed references to p1 in /etc/fstab, reboot. you also need to edit /boot/extlinux/extlinux.conf and change /whatever to /boot/whatever (everything). after that it will boot with u-boot in case i need to revert back.
i am going to do some more testing of suspend with levinboot and make a more detailed post on how all of this was done in a separate one if things go according to plan. i don’t mind losing the nvme but if you do then i do not think there is a solution for that yet. better off getting a larger emmc like i did or using sd for “permanent” storage and mounting it in fstab. you lose the ability to use the sd slot for hotswapping storage though. just a warning.
unfortunately had to yank the nvme. this still doesn’t seem to work. but i have a 128GB emmc that is in it. that’s fine. nvme isn’t a deal breaker but non-functional suspend is. just tested it with the sleep button (fn+esc) and lid settings enabled in manjaro.
A special thanks to Venom668 and dsimic for walking me through this.
[ 163.124393] PM: resume devices took 1.320 seconds
[ 163.124393] PM: resume devices took 1.320 seconds
[ 163.125310] OOM killer enabled.
[ 163.125310] OOM killer enabled.
[ 163.125902] Restarting tasks … done.
[ 163.125902] Restarting tasks … done.
[ 163.141350] PM: suspend exit
[ 163.141350] PM: suspend exit
[ 224.302491] PM: suspend entry (deep)
[ 224.302491] PM: suspend entry (deep)
[ 224.367101] Filesystems sync: 0.063 seconds
[ 224.367101] Filesystems sync: 0.063 seconds
[ 225.130600] Freezing user space processes … (elapsed 0.004 seconds) done.
[ 225.130600] Freezing user space processes … (elapsed 0.004 seconds) done.
[ 225.136269] OOM killer disabled.
[ 225.136269] OOM killer disabled.
[ 225.136864] Freezing remaining freezable tasks … (elapsed 0.001 seconds) done.
[ 225.136864] Freezing remaining freezable tasks … (elapsed 0.001 seconds) done.
[ 225.302601] LDO_REG2: No configuration
[ 225.302601] LDO_REG2: No configuration
[ 225.303319] LDO_REG1: No configuration
[ 225.303319] LDO_REG1: No configuration
[ 225.451155] PM: suspend devices took 0.310 seconds
[ 225.451155] PM: suspend devices took 0.310 seconds
[ 225.457671] Disabling non-boot CPUs …
[ 225.457671] Disabling non-boot CPUs …
[ 225.461681] psci: CPU1 killed (polled 0 ms)
[ 225.461681] psci: CPU1 killed (polled 0 ms)
[ 225.466308] psci: CPU2 killed (polled 0 ms)
[ 225.466308] psci: CPU2 killed (polled 0 ms)
[ 225.470344] psci: CPU3 killed (polled 0 ms)
[ 225.470344] psci: CPU3 killed (polled 0 ms)
[ 225.474296] psci: CPU4 killed (polled 0 ms)
[ 225.474296] psci: CPU4 killed (polled 0 ms)
[ 225.477945] psci: CPU5 killed (polled 0 ms)
[ 225.477945] psci: CPU5 killed (polled 0 ms)