@BobbyTheBuilder, @megous, @emulti: Copied in because of your participation in the previous bug report #1901 (closed)
And also @Arnavion, because you have been working on trying to debug this in Pine64 PinePhone matrix channel together with Megi and Norayr.
We can keep track of the issue and attempts over here to get some good record keeping.
What I already tried so far was building a kernel with disabled configuration CONFIG_ARM_ALLWINNER_SUN50I_CPUFREQ_NVMEM and CONFIG_ARM_SCPI_CPUFREQ, which seem to be unset in Megi's personal pp-6.1 kernel configuration. I was thinking that maybe one of these modules, which relate to cpu-idle as well interfered.
This does not seem to be the case. So i'll try to investigate the kernel configuration differences some more.
Generally, an interrupt received when trying to enter an idle state causes the idle state entry request to be rejected, in which case the CPUIdle driver may return an error code to indicate that this was the case. The usage and rejected files report the number of times the given idle state was entered successfully or rejected, respectively.
Also, based on talking to him yesterday which was basically the same as discussed in #1901 (closed) , and also while I was investigating a way to use a different device tree because of #1945 , I wonder what would happen if we made u-boot use the dtb from the kernel and let the TF-A modifications remain. AFAICT @BobbyTheBuilder had a way of doing that in #1901 (comment 1238125161) . The problem with that attempt was that u-boot's own DTS is not as good as the kernel's, which is why I'm proposing lifting the DTSes from the kernel and transplanting them into the u-boot build first. That way the net result would be u-boot uses up-to-date DTB from kernel -> T-FA applies modifications -> kernel uses this TF-A modified DTB.
If nothing else that would at least bring it closer to what megi's p-boot does?
That should be done in a separate fork then is my guess.
uBoot makes use of the upstream mainline DTS (for compatibility reasons)
A lot of additions which are in Megi's branch can't simply be copied over, because this would probably break the mainline support.
We sort of already have that fork - PP is supposed to use u-boot-pinephone and that already does a bunch of PP-specific patches to u-boot (two patches plus a sed in the APKBUILD). I actually did experiment with adding the 1.2b DTS from the kernel to it yesterday and got it to compile the 1.2b DTB, though I missed something because it didn't actually switch to the new DT after boot.
... per BobbyTheBuilder's script. With this, booting shows the pmOS splash screen and then "initramfs-extra not found". Of course /boot/initramfs-extra exists and is fine. Reverting back to load mmc makes boot work again.
Edit: Even this simple script that just passes ${fdtcontroladdr} directly to the kernel has the same issue:
Commands like fdt addr ${fdtcontroladdr} succeed, indicating there is a valid FDT at that address. But I don't have a serial so I can't print its properties to inspect what's causing init.sh to not find the pmOS_boot partition.
I suspect some other changes to the u-boot config (pinephone_defconfig) are needed that BobbyTheBuilder didn't mention. I already tried appended CONFIG_OF_CONTROL=y since the documentation indicates it's necessary, but that didn't help.
But I don't have a serial so I can't print its properties to inspect what's causing init.sh to not find the pmOS_boot partition.
I finally got a serial and figured out the problem. Boot device is being mixed up between mmcblk1 and mmcblk2, so pmos initrd was trying to mount boot from mmcblk2 but actual device is mmcblk1 when booted using original DTB. I assume BobbyTheBuilder didn't have this problem because, based on the steps in his post, they were booting from SD card.
So setting bootdev to 1 instead of 2 fixes that problem and I'm now able to boot with original DTB.
You have a serial cable?
I still need to obtain one myself, it seems like it's very handy to debug early boot troubles.
So we need to alter the boot script to automatically load from the correct location.
Force setting it isn't the way to go forward as some people have pmOS on eMMC and some are running it in SD.
It suggests something in this conditional test isn't working properly:
if test ${mmc_bootdev} -eq 0 ; then
echo "Booting from SD";
setenv bootdev 0;
else
echo "Booting from eMMC";
setenv bootdev 2;
fi;
So we need to alter the boot script to automatically load from the correct location.
Force setting it isn't the way to go forward as some people have pmOS on eMMC and some are running it in SD.
No, I'm not proposing changing anything right now. I was just documenting the problem I had for the sake of anyone else attempting it.
First I need to get it working with proper FDT instead of u-boot's default neutered one, and confirm that the original issue of CPU idle states is fixed by this effort. Only then do we need to think about changes to the u-boot script, if any.
One last wrinkle I had was that my changes to u-boot seemed to not be getting picked up even though I was installing it with update-u-boot. I was previously using tow-boot but I assumed that update-u-boot would overwrite it. I realized that assumption was wrong - update-u-boot writes to /dev/mmcblk# but tow-boot wrote itself to /dev/mmcblk#boot0 which takes precedence. I had to boot the tow-boot installer image via SD card and "Erase the eMMC contents" aka wipe /dev/mmcblk#boot0, then my phone reverted to booting via u-boot and my changes were picked up.
So currently I can confirm that, when booted this way:
cpupower idle-info mentions all three states WFI, cpu-sleep and cluster-sleep. Both cpu-sleep and cluster-sleep now have >0 Duration.
BobbyTheBuilder had mentioned "low screen brightness", "USB-C port not functional" and "laggy UI" issues in his attempt in the other issue. These issues are not present, so that's good. However, the modem is not detected.
$ lsusbBus 002 Device 001: ID 1d6b:0002 Linux 6.1.9 ehci_hcd EHCI Host ControllerBus 004 Device 001: ID 1d6b:0001 Linux 6.1.9 ohci_hcd Generic Platform OHCI controllerBus 001 Device 001: ID 1d6b:0002 Linux 6.1.9 ehci_hcd EHCI Host ControllerBus 003 Device 001: ID 1d6b:0001 Linux 6.1.9 ohci_hcd Generic Platform OHCI controller
This has happened despite booting with the DTB from the kernel. I did note that there are some comments in the DTS like "power is already turned on by the bootloader", and in p-boot's source I see some modifications it makes to the FDT, so those might need to be replicated in boot.scr or in the built-in DTB. I'll check with megi.
To summarize, the current state of that branch is:
Good: It is demonstrably possible to have u-boot boot with a full FDT based on the kernel DTS, let TF-A modify it to add sleep states etc, and then have the kernel use that FDT as-is. CPU sleep states work in the booted kernel.
Good: All other devices (IIO, charging through USB-C port, connecting devices to USB-C port) seem to work, except...
Needs investigation: Modem doesn't work, for unknown reason. This is a blocker.
Needs investigation: Some invisible things related to power and safety might be broken, based on comments in the DTS and on p-boot code.
Bad: The branch uses a hacky patch to import the DTS from kernel tree into u-boot.
Possible solution: It might work to have u-boot-pinephone have a makedepends on linux-postmarketos-allwinner, so that it can do EXT_DTB=/kernel/buildroot/.../pinephone.dtb to import the DTB from kernel build output. That way we don't have to worry about patching u-boot. However...
Bad: The branch only uses the pinephone-1.2.dtb for the sake of simplicitly, so it will break for 1.1 PinePhones.
The EXT_DTB solution in the previous point will probably not work for embedding both DTBs, based on my reading of u-boot source.
Kinda bad: This change to u-boot only takes effect when the phone is booted using u-boot. The changes to the boot.scr will be incompatible with booting from tow-boot - the mmc device is numbered different so the init.sh won't find the /boot partition, and even if it does get found it'll use the FDT built from upstream u-boot's DTS and thus be missing most functionality.
Possible solution: The boot.scr can probably test the FDT to determine if the one it got from bootloader is good enough to use, or if it should ignore it and load mmc the full one from disk like it does today. So tow-boot users will still have a working device, just without the sleep states etc.
Kinda bad: All this effort will need to be revisited if / when the PinePhone switches from u-boot to tow-boot + UEFI (!3068 (closed))
Needs investigation: Modem doesn't work, for unknown reason. This is a blocker.
This is fixed. I diffed /proc/devicetree between original and modified u-boot and realized I'd made a typo copying the patched DTS over.
Needs investigation: Some invisible things related to power and safety might be broken, based on comments in the DTS and on p-boot code.
I went through p-boot source and matched up the modifications it makes to the fdt, and they all seem to be no-ops. So this is also fine.
As an aside, diffing the devicetrees also gave me the ability to check for differences in how the cpus/idle-states are defined between original and modified trees. And the answer is that there's no difference, so I'm not sure why the modified tree lets the CPU go into sleep states but the original does not.
I've updated my branch. At this point my phone is fully functional and can go into lower sleep states.
I'll send an MR tomorrow with my branch, and then we can bikeshed about how hacky it is and what better ways there are of achieving this.
I do not replicate the mentioned behavior, here's the boot log of one of my PP on Edge with all packages update as of today
Detecting psci idle stateWorking FDT set to f9f39ee0PSCI idle state enabledLoading DTB53815 bytes read in 5 ms (10.3 MiB/s)Working FDT set to 4fa00000ram_freq=624Adding FTD RAM clockApplying PSCI DTBO1130 bytes read in 2 ms (551.8 KiB/s)Loading Initramfs
U-Boot SPL 2023.01 (Jan 14 2023 - 18:27:51 +0000)DRAM: 3072 MiBTrying to boot from MMC2NOTICE: BL31: v2.8(release):NOTICE: BL31: Built : 18:16:06, Jan 14 2023NOTICE: BL31: Detected Allwinner A64/H64/R18 SoC (1689)NOTICE: BL31: Found U-Boot DTB at 0x208fb48, model: Pine64 PinePhone (1.2)U-Boot 2023.01 (Jan 14 2023 - 18:27:51 +0000) Allwinner TechnologyCPU: Allwinner A64 (SUN50I)Model: Pine64 PinePhone (1.2)DRAM: 3 GiB @ 552 MHzCore: 71 devices, 18 uclasses, devicetree: separateWDT: Not starting watchdog@1c20ca0MMC: mmc@1c0f000: 0, mmc@1c10000: 2, mmc@1c11000: 1Loading Environment from FAT... Unable to use mmc 1:1...Warning: HDMI PHY init timeout!Warning: HDMI PHY init timeout!Warning: HDMI PHY init timeout!Warning: HDMI PHY init timeout!In: serialOut: serialErr: serialNet: No ethernet found.Hit any key to stop autoboot: 0 switch to partitions #0, OKmmc1(part 0) is current deviceScanning mmc 1:1...Found U-Boot script /boot.scr1627 bytes read in 2 ms (793.9 KiB/s)## Executing script at 4fc00000gpio: pin 98 (gpio 98) value is 1gpio: pin 114 (gpio 114) value is 1Booting from eMMCarch=armbaudrate=115200board=sunxiboard_name=sunxiboot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}boot_efi_binary=load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} efi/boot/bootaa64.efi; if fdt addr -q ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r};else bootefi ${kernel_addr_r} ${fdtcontroladdr};fiboot_efi_bootmgr=if fdt addr -q ${fdt_addr_r}; then bootefi bootmgr ${fdt_addr_r};else bootefi bootmgr;fiboot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}${boot_syslinux_conf}boot_prefixes=/ /boot/boot_script_dhcp=boot.scr.uimgboot_scripts=boot.scr.uimg boot.scrboot_syslinux_conf=extlinux/extlinux.confboot_targets=fel mmc_auto pxe dhcp bootargs=init=/init.sh rw console=tty0 console=ttyS0,115200 earlycon=uart,mmio32,0x01c28000 panic=10 consoleblank=0 loglevel=1 PMOS_NO_OUTPUT_REDIRECT PMOS_FORCE_PARTITION_RESIZE pmos_boot=/dev/mmcblk2p1 pmos_root=/dev/mmcblk2p2bootcmd=run distro_bootcmdbootcmd_dhcp=devtype=dhcp; if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr}; fi;setenv efi_fdtfile ${fdtfile}; setenv efi_old_vci ${bootp_vci};setenv efi_old_arch ${bootp_arch};setenv bootp_vci PXEClient:Arch:00011:UNDI:003000;setenv bootp_arch 0xb;if d;bootcmd_fel=if test -n ${fel_booted} && test -n ${fel_scriptaddr}; then echo '(FEL boot)'; source ${fel_scriptaddr}; fibootcmd_mmc0=devnum=0; run mmc_bootbootcmd_mmc1=devnum=1; run mmc_bootbootcmd_mmc_auto=if test ${mmc_bootdev} -eq 1; then run bootcmd_mmc1; run bootcmd_mmc0; elif test ${mmc_bootdev} -eq 0; then run bootcmd_mmc0; run bootcmd_mmc1; fibootcmd_pxe=dhcp; if pxe get; then pxe boot; fibootdelay=0bootdev=2bootfstype=ext4bootm_size=0xa000000console=ttyS0,115200cpu=armv8devplist=1dfu_alt_info_ram=kernel ram 0x40080000 0x1000000;fdt ram 0x4FA00000 0x100000;ramdisk ram 0x4FF00000 0x4000000distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; doneefi_dtb_prefixes=/ /dtb/ /dtb/current/ethaddr=02:ba:0c:1b:a1:48fdt_addr_r=0x4FA00000fdtcontroladdr=f9f39ee0fdtfile=allwinner/sun50i-a64-pinephone-1.2.dtbfdtoverlay_addr_r=0x4FE00000fileaddr=4fc00000filesize=65bkernel_addr_r=0x40080000kernel_comp_addr_r=0x44000000kernel_comp_size=0xb000000load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}${efi_fdtfile}loadaddr=0x42000000mmc_boot=if mmc dev ${devnum}; then devtype=mmc; run scan_dev_for_boot_part; fimmc_bootdev=1partitions=name=loader1,start=8k,size=32k,uuid=${uuid_gpt_loader1};name=loader2,size=984k,uuid=${uuid_gpt_loader2};name=esp,size=128M,bootable,uuid=${uuid_gpt_esp};name=system,size=-,uuid=${uuid_gpt_system};pxefile_addr_r=0x4FD00000ram_freq=552ramdisk_addr_r=0x4FF00000scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;run scan_dev_for_efi;scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done; setenv devplistscan_dev_for_efi=setenv efi_fdtfile ${fdtfile}; for prefix in ${efi_dtb_prefixes}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${efi_fdtfile}; then run load_efi_dtb; fi;done;run boot_efi_bootmgr;if test -e ${devtype} ${devnum}:${distro_bootpart} efi/bootescan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${boot_syslinux_conf}; then echo Found ${prefix}${boot_syslinux_conf}; run boot_extlinux; echo EXTLINUX FAILED: continuing...; fiscan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; donescriptaddr=0x4FC00000serial#=92c0a9ba0c1ba148soc=sunxistderr=serial,vidconsolestdin=serialstdout=serial,vidconsoleuuid_gpt_esp=c12a7328-f81f-11d2-ba4b-00a0c93ec93buuid_gpt_system=b921b045-1df0-41c3-af44-4c6f280d3faeEnvironment size: 4678/65532 bytesDetecting psci idle stateWorking FDT set to f9f39ee0PSCI idle state enabledLoading DTB53815 bytes read in 4 ms (12.8 MiB/s)Working FDT set to 4fa00000ram_freq=552Adding FTD RAM clockApplying PSCI DTBO1130 bytes read in 2 ms (551.8 KiB/s)Loading Initramfs2348624 bytes read in 58 ms (38.6 MiB/s)Loading Kernel19021832 bytes read in 426 ms (42.6 MiB/s)gpio: pin 115 (gpio 115) value is 1Loading user scriptFailed to load 'user.scr'No user script foundBooting kernelgpio: pin 116 (gpio 116) value is 1gpio: pin 98 (gpio 98) value is 0Moving Image from 0x40080000 to 0x40200000, end=414a0000## Flattened Device Tree blob at 4fa00000 Booting using the fdt blob at 0x4fa00000Working FDT set to 4fa00000 Loading Ramdisk to 49dc2000, end 49fff650 ... OK Loading Device Tree to 0000000049daf000, end 0000000049dc1fff ... OKWorking FDT set to 49daf000Warning: HDMI PHY init timeout!Starting kernel ...[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034][ 0.000000] Linux version 6.1.9 (pmos@build) (aarch64-alpine-linux-musl-gcc (Alpine 12.2.1_git20220924-r9) 12.2.1 20220924, GNU ld (GNU Binutils) 2.40) #2-postmarketos-allwinner SMP PREEMPT Sun Feb 19 20:40:18 UTC 20[ 0.000000] Machine model: Pine64 PinePhone (1.2)[ 0.000000] earlycon: uart0 at MMIO32 0x0000000001c28000 (options '')[ 0.000000] printk: bootconsole [uart0] enabled### postmarketOS initramfs ###Configuring kernel firmware image search pathNOTE: Waiting 10 seconds for the framebuffer /dev/fb0.If your device does not have a framebuffer, disable this with:no_framebuffer=true in <https://postmarketos.org/deviceinfo>Setting framebuffer mode to: U:720x1440p-0720x1440 @ 68x136mm, dpi=268, logo_size_px=450.000000Setup usb network /sys/class/android_usb does not exist, skipping android_usb Setting up an USB gadget through configfsStarting unudhcpd Using interface usb0 Starting the DHCP daemonTrying to start server with parameters: Server IP addr: 172.16.42.1:67, client IP addr: 172.16.42.2, interface: usb0Trying to bind to interface: usb0Server started!Mount boot partition (/dev/mmcblk2p1) to /boot (read-only)Detected ext filesystemExtract /boot/initramfs-extracpio: lib/ld-musl-aarch64.so.1 not created: newer or same age file existscpio: lib/libc.musl-aarch64.so.1 not created: newer or same age file existscpio: lib/libdevmapper.so.1.02 not created: newer or same age file existscpio: lib/modules/6.1.9/modules.alias not created: newer or same age file existscpio: lib/modules/6.1.9/modules.alias.bin not created: newer or same age file existscpio: lib/modules/6.1.9/modules.builtin not created: newer or same age file existscpio: lib/modules/6.1.9/modules.builtin.bin not created: newer or same age file existscpio: lib/modules/6.1.9/modules.builtin.modinfo not created: newer or same age file existscpio: lib/modules/6.1.9/modules.dep not created: newer or same age file existscpio: lib/modules/6.1.9/modules.dep.bin not created: newer or same age file existscpio: lib/modules/6.1.9/modules.order not created: newer or same age file existscpio: lib/modules/6.1.9/modules.symbols not created: newer or same age file existscpio: lib/modules/6.1.9/modules.symbols.bin not created: newer or same age file exists34156 blocksReceived DHCP DISCOVER from client: b6:a1:3d:d4:49:94Received DHCP REQUEST from client: b6:a1:3d:d4:49:94unable to add device to libinput context: No such file or directory720x1440 @ 68x136mm, dpi=268, logo_size_px=450.000000Mount root partition (/dev/mapper/root) to /sysroot (read-only)Detected ext4 filesystemMount boot partition (/dev/mmcblk2p1) to /sysroot/boot (read-write)Detected ext filesystemumount: can't unmount /dev: Invalid argument OpenRC 0.46 is starting up Linux 6.1.9 (aarch64)/lib/rc/sh/init.sh: line 15: can't create /dev/null: Read-only file system * md5sum is missing, which suggests /usr is not mounted * If you have separate /usr, it must be mounted by initramfs * If not, you should check coreutils is installed correctly * Mounting /proc ... [ ok ] * Mounting /run ... * /run/openrc: creating directory * /run/lock: creating directory * /run/lock: correcting owner/lib/rc/sh/init.sh: line 98: can't create /dev/null: Read-only file system/lib/rc/sh/gendepends.sh: line 53: can't create /dev/null: Read-only file systemzram swap: activating with size: 1497 MB * Caching service dependencies ... [ ok ] * Mounting devtmpfs on /dev ... [ ok ] * Mounting /dev/mqueue ... [ ok ] * Mounting /dev/pts ... [ ok ] * Mounting /dev/shm ... [ ok ] * Mounting /sys ... [ ok ] * Mounting security filesystem ... [ ok ] * Mounting debug filesystem ... [ ok ] * Mounting config filesystem ... [ ok ] * Mounting fuse control filesystem ... [ ok ] * Starting udev ... [ ok ] * Generating a rule to create a /dev/root symlink ... [ ok ] * Populating /dev with existing devices through uevents ... [ ok ] * Waiting for uevents to be processed ... [ ok ] * Loading modules ... [ ok ] * Setting system clock using the hardware clock [UTC] ... [ ok ] * Checking local filesystems ... [ ok ] * Remounting root filesystem read/write ... [ ok ] * Remounting filesystems ... [ ok ] * Mounting local filesystems ... [ ok ] * Configuring kernel parameters ...sysctl: error: 'kernel.unprivileged_bpf_disabled' is an unknown key [ ok ] * Creating user login records ... [ ok ] * Setting hostname ... [ ok ] * Starting busybox syslog ... [ ok ] * /run/dbus: creating directory * /run/dbus: correcting owner * Starting System Message Bus ... [ ok ] * Loading nftables rules and starting firewall ... [ ok ] * Starting haveged ... [ ok ] * /var/run/wpa_supplicant: creating directory * Starting WPA Supplicant ... [ ok ] * Starting networkmanager ... [ ok ] * Starting chronyd ... [ ok ] * Starting modemmanager ... [ ok ] * Starting eg25-manager ... [ ok ] * Bringing up network interface lo ...RTNETLINK answers: File exists [ ok ] * Starting gpsd ... [ ok ] * Starting HKDM ... [ ok ] * Starting iio-sensor-proxy ... [ ok ] * Starting kill-pbsplash ... [ ok ] * Starting postmarketos-tweakd ...Scanning /usr/share/postmarketos-tweaks Loading /usr/share/postmarketos-tweaks/unlocker.yml Loading /usr/share/postmarketos-tweaks/pinephone.yml Loading /usr/share/postmarketos-tweaks/fonts.yml Loading /usr/share/postmarketos-tweaks/phosh.yml Loading /usr/share/postmarketos-tweaks/about.yml Loading /usr/share/postmarketos-tweaks/appearance.yml Loading /usr/share/postmarketos-tweaks/sound.yml Loading /usr/share/postmarketos-tweaks/power.ymlScanning /etc/postmarketos-tweaks/sys/class/power_supply/axp20x-battery/voltage_max_design = 4200000 [ ok ] * Restoring rfkill configuration ... [ ok ] * Starting sensord ... [ ok ] * Starting sshd ... [ ok ] * Activating swap file ...Configured swap file size is 0, skipping creation. [ ok ] * Starting System login manager ... [ ok ] * Starting tinydm ... [ ok ] * Starting wake daemon ... [ ok ] * Starting local ... [ ok ]Welcome to postmarketOSKernel 6.1.9 on an aarch64 (/dev/ttyS0)shigusa login:
U-Boot SPL 2023.01 (Mar 12 2023 - 09:48:01 +0000)DRAM: 3072 MiBTrying to boot from MMC2NOTICE: BL31: v2.8(release):NOTICE: BL31: Built : 18:16:06, Jan 14 2023NOTICE: BL31: Detected Allwinner A64/H64/R18 SoC (1689)NOTICE: BL31: Found U-Boot DTB at 0x208fb48, model: Pine64 PinePhone (1.2)U-Boot 2023.01 (Mar 12 2023 - 09:48:01 +0000) Allwinner TechnologyCPU: Allwinner A64 (SUN50I)Model: Pine64 PinePhone (1.2)DRAM: 3 GiB @ 552 MHzCore: 73 devices, 18 uclasses, devicetree: separateWDT: Not starting watchdog@1c20ca0MMC: mmc@1c0f000: 0, mmc@1c10000: 1, mmc@1c11000: 2Loading Environment from FAT... Unable to use mmc 2:1...Warning: HDMI PHY init timeout!Warning: HDMI PHY init timeout!Warning: HDMI PHY init timeout!Warning: HDMI PHY init timeout!In: serialOut: serialErr: serialNet: No ethernet found.Hit any key to stop autoboot: 0 switch to partitions #0, OKmmc2(part 0) is current deviceScanning mmc 2:1...Found U-Boot script /boot.scr1232 bytes read in 1 ms (1.2 MiB/s)## Executing script at 4fc00000gpio: pin 98 (gpio 98) value is 1gpio: pin 114 (gpio 114) value is 1Booting from eMMCarch=armbaudrate=115200board=sunxiboard_name=sunxiboot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}boot_efi_binary=load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} efi/boot/bootaa64.efi; if fdt addr -q ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r};else bootefi ${kernel_addr_r} ${fdtcontroladdr};fiboot_efi_bootmgr=if fdt addr -q ${fdt_addr_r}; then bootefi bootmgr ${fdt_addr_r};else bootefi bootmgr;fiboot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}${boot_syslinux_conf}boot_prefixes=/ /boot/boot_script_dhcp=boot.scr.uimgboot_scripts=boot.scr.uimg boot.scrboot_syslinux_conf=extlinux/extlinux.confboot_targets=fel mmc_auto pxe dhcp bootargs=init=/init.sh rw console=tty0 console=ttyS0,115200 earlycon=uart,mmio32,0x01c28000 panic=10 consoleblank=0 loglevel=1 PMOS_NO_OUTPUT_REDIRECT PMOS_FORCE_PARTITION_RESIZE pmos_boot=/dev/mmcblk2p1 pmos_root=/dev/mmcblk2p2bootcmd=run distro_bootcmdbootcmd_dhcp=devtype=dhcp; if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr}; fi;setenv efi_fdtfile ${fdtfile}; setenv efi_old_vci ${bootp_vci};setenv efi_old_arch ${bootp_arch};setenv bootp_vci PXEClient:Arch:00011:UNDI:003000;setenv bootp_arch 0xb;if d;bootcmd_fel=if test -n ${fel_booted} && test -n ${fel_scriptaddr}; then echo '(FEL boot)'; source ${fel_scriptaddr}; fibootcmd_mmc0=devnum=0; run mmc_bootbootcmd_mmc2=devnum=2; run mmc_bootbootcmd_mmc_auto=if test ${mmc_bootdev} -eq 2; then run bootcmd_mmc2; run bootcmd_mmc0; elif test ${mmc_bootdev} -eq 0; then run bootcmd_mmc0; run bootcmd_mmc2; fibootcmd_pxe=dhcp; if pxe get; then pxe boot; fibootdelay=0bootdev=2bootfstype=ext4bootm_size=0xa000000console=ttyS0,115200cpu=armv8devplist=1dfu_alt_info_ram=kernel ram 0x40080000 0x1000000;fdt ram 0x4FA00000 0x100000;ramdisk ram 0x4FF00000 0x4000000distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; doneefi_dtb_prefixes=/ /dtb/ /dtb/current/ethaddr=02:ba:0c:1b:a1:48fdt_addr_r=0x4FA00000fdtcontroladdr=f9f37440fdtfile=allwinner/sun50i-a64-pinephone-1.2.dtbfdtoverlay_addr_r=0x4FE00000fileaddr=4fc00000filesize=4d0kernel_addr_r=0x40080000kernel_comp_addr_r=0x44000000kernel_comp_size=0xb000000load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}${efi_fdtfile}loadaddr=0x42000000mmc_boot=if mmc dev ${devnum}; then devtype=mmc; run scan_dev_for_boot_part; fimmc_bootdev=2partitions=name=loader1,start=8k,size=32k,uuid=${uuid_gpt_loader1};name=loader2,size=984k,uuid=${uuid_gpt_loader2};name=esp,size=128M,bootable,uuid=${uuid_gpt_esp};name=system,size=-,uuid=${uuid_gpt_system};pxefile_addr_r=0x4FD00000ram_freq=552ramdisk_addr_r=0x4FF00000scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;run scan_dev_for_efi;scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done; setenv devplistscan_dev_for_efi=setenv efi_fdtfile ${fdtfile}; for prefix in ${efi_dtb_prefixes}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${efi_fdtfile}; then run load_efi_dtb; fi;done;run boot_efi_bootmgr;if test -e ${devtype} ${devnum}:${distro_bootpart} efi/bootescan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${boot_syslinux_conf}; then echo Found ${prefix}${boot_syslinux_conf}; run boot_extlinux; echo EXTLINUX FAILED: continuing...; fiscan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; donescriptaddr=0x4FC00000serial#=92c0a9ba0c1ba148soc=sunxistderr=serial,vidconsolestdin=serialstdout=serial,vidconsoleuuid_gpt_esp=c12a7328-f81f-11d2-ba4b-00a0c93ec93buuid_gpt_system=b921b045-1df0-41c3-af44-4c6f280d3faeEnvironment size: 4678/65532 bytesLoading DTBWorking FDT set to f9f37440Working FDT set to 4fa00000ram_freq=552Adding FTD RAM clockLoading Initramfs2348624 bytes read in 57 ms (39.3 MiB/s)Loading Kernel19021832 bytes read in 426 ms (42.6 MiB/s)gpio: pin 115 (gpio 115) value is 1Loading user scriptFailed to load 'user.scr'No user script foundBooting kernelgpio: pin 116 (gpio 116) value is 1gpio: pin 98 (gpio 98) value is 0Moving Image from 0x40080000 to 0x40200000, end=414a0000## Flattened Device Tree blob at 4fa00000 Booting using the fdt blob at 0x4fa00000Working FDT set to 4fa00000 Loading Ramdisk to 49dc2000, end 49fff650 ... OK Loading Device Tree to 0000000049daf000, end 0000000049dc1fff ... OKWorking FDT set to 49daf000Warning: HDMI PHY init timeout!Starting kernel ...[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034][ 0.000000] Linux version 6.1.9 (pmos@futaba) (aarch64-alpine-linux-musl-gcc (Alpine 12.2.1_git20220924-r9) 12.2.1 20220924, GNU ld (GNU Binutils) 2.40) #5-postmarketos-allwinner SMP PREEMPT Sun Mar 12 09:47:34 UTC 20[ 0.000000] Machine model: Pine64 PinePhone (1.2)[ 0.000000] earlycon: uart0 at MMIO32 0x0000000001c28000 (options '')[ 0.000000] printk: bootconsole [uart0] enabled### postmarketOS initramfs ###Configuring kernel firmware image search pathNOTE: Waiting 10 seconds for the framebuffer /dev/fb0.If your device does not have a framebuffer, disable this with:no_framebuffer=true in <https://postmarketos.org/deviceinfo>Setting framebuffer mode to: U:720x1440p-0720x1440 @ 68x136mm, dpi=268, logo_size_px=450.000000Setup usb network /sys/class/android_usb does not exist, skipping android_usb Setting up an USB gadget through configfsStarting unudhcpd Using interface usb0 Starting the DHCP daemonTrying to start server with parameters: Server IP addr: 172.16.42.1:67, client IP addr: 172.16.42.2, interface: usb0Trying to bind to interface: usb0Server started!Mount boot partition (/dev/mmcblk2p1) to /boot (read-only)Detected ext filesystemExtract /boot/initramfs-extracpio: lib/ld-musl-aarch64.so.1 not created: newer or same age file existscpio: lib/libc.musl-aarch64.so.1 not created: newer or same age file existscpio: lib/libdevmapper.so.1.02 not created: newer or same age file existscpio: lib/modules/6.1.9/modules.alias not created: newer or same age file existscpio: lib/modules/6.1.9/modules.alias.bin not created: newer or same age file existscpio: lib/modules/6.1.9/modules.builtin not created: newer or same age file existscpio: lib/modules/6.1.9/modules.builtin.bin not created: newer or same age file existscpio: lib/modules/6.1.9/modules.builtin.modinfo not created: newer or same age file existscpio: lib/modules/6.1.9/modules.dep not created: newer or same age file existscpio: lib/modules/6.1.9/modules.dep.bin not created: newer or same age file existscpio: lib/modules/6.1.9/modules.order not created: newer or same age file existscpio: lib/modules/6.1.9/modules.symbols not created: newer or same age file existscpio: lib/modules/6.1.9/modules.symbols.bin not created: newer or same age file exists34156 blocksReceived DHCP DISCOVER from client: a6:75:46:de:6c:dfReceived DHCP REQUEST from client: a6:75:46:de:6c:dfunable to add device to libinput context: No such file or directory720x1440 @ 68x136mm, dpi=268, logo_size_px=450.000000Mount root partition (/dev/mapper/root) to /sysroot (read-only)Detected ext4 filesystemMount boot partition (/dev/mmcblk2p1) to /sysroot/boot (read-write)Detected ext filesystemumount: can't unmount /dev: Invalid argument OpenRC 0.46 is starting up Linux 6.1.9 (aarch64)/lib/rc/sh/init.sh: line 15: can't create /dev/null: Read-only file system * md5sum is missing, which suggests /usr is not mounted * If you have separate /usr, it must be mounted by initramfs * If not, you should check coreutils is installed correctly * Mounting /proc ... [ ok ] * Mounting /run ... * /run/openrc: creating directory * /run/lock: creating directory * /run/lock: correcting owner/lib/rc/sh/init.sh: line 98: can't create /dev/null: Read-only file system/lib/rc/sh/gendepends.sh: line 53: can't create /dev/null: Read-only file systemzram swap: activating with size: 1497 MB * Caching service dependencies ... [ ok ] * Mounting devtmpfs on /dev ... [ ok ] * Mounting /dev/mqueue ... [ ok ] * Mounting /dev/pts ... [ ok ] * Mounting /dev/shm ... [ ok ] * Mounting /sys ... [ ok ] * Mounting security filesystem ... [ ok ] * Mounting debug filesystem ... [ ok ] * Mounting config filesystem ... [ ok ] * Mounting fuse control filesystem ... [ ok ] * Starting udev ... [ ok ] * Generating a rule to create a /dev/root symlink ... [ ok ] * Populating /dev with existing devices through uevents ... [ ok ] * Waiting for uevents to be processed ... [ ok ] * Loading modules ... [ ok ] * Setting system clock using the hardware clock [UTC] ... [ ok ] * Checking local filesystems ... [ ok ] * Remounting root filesystem read/write ... [ ok ] * Remounting filesystems ... [ ok ] * Mounting local filesystems ... [ ok ] * Configuring kernel parameters ...sysctl: error: 'kernel.unprivileged_bpf_disabled' is an unknown key [ ok ] * Creating user login records ... [ ok ] * Setting hostname ... [ ok ] * Starting busybox syslog ... [ ok ] * /run/dbus: creating directory * /run/dbus: correcting owner * Starting System Message Bus ... [ ok ] * Loading nftables rules and starting firewall ... [ ok ] * Starting haveged ... [ ok ] * /var/run/wpa_supplicant: creating directory * Starting WPA Supplicant ... [ ok ] * Starting networkmanager ... [ ok ] * Starting chronyd ... [ ok ] * Starting modemmanager ... [ ok ] * Starting eg25-manager ... [ ok ] * Bringing up network interface lo ...RTNETLINK answers: File exists [ ok ] * Starting gpsd ... [ ok ] * Starting HKDM ... [ ok ] * Starting iio-sensor-proxy ... [ ok ] * Starting kill-pbsplash ... [ ok ] * Starting postmarketos-tweakd ...Scanning /usr/share/postmarketos-tweaks Loading /usr/share/postmarketos-tweaks/unlocker.yml Loading /usr/share/postmarketos-tweaks/pinephone.yml Loading /usr/share/postmarketos-tweaks/fonts.yml Loading /usr/share/postmarketos-tweaks/phosh.yml Loading /usr/share/postmarketos-tweaks/about.yml Loading /usr/share/postmarketos-tweaks/appearance.yml Loading /usr/share/postmarketos-tweaks/sound.yml Loading /usr/share/postmarketos-tweaks/power.ymlScanning /etc/postmarketos-tweaks/sys/class/power_supply/axp20x-battery/voltage_max_design = 4200000 [ ok ] * Restoring rfkill configuration ... [ ok ] * Starting sensord ... [ ok ] * Starting sshd ... [ ok ] * Activating swap file ...Configured swap file size is 0, skipping creation. [ ok ] * Starting System login manager ... [ ok ] * Starting tinydm ... [ ok ] * Starting wake daemon ... [ ok ] * Starting local ... [ ok ]Welcome to postmarketOSKernel 6.1.9 on an aarch64 (/dev/ttyS0)shigusa login:
I use 552 for the RAM speed (I assume it must've been the default at some point). Default 528 also has the same effect. I never tried 624 like you have.
Also, as soon as ssh and wlan0 are up, which happens while phosh and gnome-session are still spinning all cores at 100% as part of their startup, cpupower idle-info over ssh already reports >0 usage for the lower states. So difference in user activity cannot be the reason anyway.
Here's what's most likely to have an impact on your device (missing definitions in U-Boot DTB):
sram@40000 node
scpi node
I did not find from where those changes do come from in the kernel sources yet...
Can you check with Megi if it makes sense to him ? I still don't understand why I do not replicate the behavior on my devices (pmOS CE, KDE CE, Mobian CE && PP OG)...
Are these changes in both u-Boot DTS's, I mean when booting from SD compared to eMMC.
Strange thing is that the CPU-Idle gets initiated when booting from Sd.
When you flash the exact same image to eMMC, CPU-Idle is broken, while it was working for exact the same image on SD.
Are these changes in both u-Boot DTS's, I mean when booting from SD compared to eMMC.
The diff is U-Boot DTS against Kernel DTS, they are different mainly because U-Boot does not need to have the whole hardware initialized.
I used the same pmOS iso which was flashed to a SD card. I then booted on the SD card and verified that cpu-idle worked. It did. Then I flashed the same pmOS iso on the eMMC, shut down the phone, removed the SD card and let the phone boot. CPU idle did work when booted from the eMMC. Note: I never touched my SPI, it's empty.
Strange thing is that the CPU-Idle gets initiated when booting from Sd.
Actually, looking at the logs from Arnav's phone cpu-idle always get initialized whether booted from eMMC or mSD.
The issue is that the CPU never enters the idle state when booted from the eMMC.
When you flash the exact same image to eMMC, CPU-Idle is broken, while it was working for exact the same image on SD.
Not on any of my devices, and I tested this on 4 different PP.
Also we did not encounter this behavior when many people tested #1901 (closed) !3806
I've went through the whole discussion and looked at Arnav's MR and what I understand is, in his situation, if U-Boot DTS is replaced by the one from the kernel then the CPU can enter idle states when booting from the eMMC.
So, from this information I did decompile both DTB (from U-Boot and kernel) to compare them.
The above post shows which nodes are the most likely to have an impact on the cpu-idle based on the diff.
I'm just trying to narrow down the possibilities to help identify from where the issue comes from.
Do you reliably reproduce the behavior on you PP ? if so can you give this a try first: #1946 (comment 1310647139)
Maybe we can follow-up in IRC as well, I'm connected so ping me whenever you're available.
Strange thing is that the CPU-Idle gets initiated when booting from Sd.
Actually, looking at the logs from Arnav's phone cpu-idle always get initialized whether booted from eMMC or mSD. The issue is that the CPU never enters the idle state when booted from the eMMC.
To be clear, there are three known people who have the issue that, when booted from eMMC with default pmos packages, the idle states are recognized (due to the hard-coded overlay merged by boot.scr, so this is unsurprising) but never entered (cpupower idle-info and sysfs report 0 duration, which is this issue). Those are the person who initially reported this in #pinephone (norayr on Matrix, mentioned in the first comment in this thread), me and PsychoGame. luigi311 on Discord also reported the same thing except that they use Mobian, and I can't find the source of Mobian's u-boot package to see what it does.
And lastly, there is one person for whom !3931 's approach of using kernel DTS in u-boot fixes the problem: me, and there is one person for whom that MR makes the phone not boot: PsychoGame (I need boot logs to know why).
Not on any of my devices, and I tested this on 4 different PP.
To be precise, I have a 1.2b. Is that what you referred to as "PP OG" ? I've only heard "OG" used to refer to all models of the PinePhone to distinguish it from the PinePhone Pro.
I'm still curious to know if removing the battery to drain capacitors makes any difference...
Anyways, your MR indicates that a change in the DTB is needed to resolve the situation on your device, at least, and I'm curious to narrow down which one it is. Then we'll be able to dig further on the problem. Once it's fully understood we'll be able to decide what's the best way to handle it.
Please invite any other users to participate in this thread.
It might be easier to investigate why the current pmaports situation (upstream u-boot DTS in u-boot + FDT discarded and replaced with full DTS by boot.scr) works when booting from SD card but not when booting from eMMC. ("works" == "idle states are entered", as mentioned in #1946 (comment 1312627115) )
How would I go to try it out, can you point me to a wiki or something? I'm using stable v22.12. So in this case I guess I should first install edge and then try your changes?
Confirm that you still have the issue. If you don't have the issue stop here.
Uninstall Tow-Boot. Reboot back into pmOS.
Confirm that you still have the issue. If you don't have the issue stop here.
Run apk list | grep device-pine64-pinephone and make a note of all the packages in the output.
Run mrtest add 3931 and choose the u-boot-pinephone and device-pine64-pinephone packages, plus any other packages that showed up in the output of step (5).
Run update-u-boot.
Reboot.
Confirm that you no longer have the issue.
If you make your phone unbootable at any point, you can recover using one of two methods:
Method 1: Using mass storage mode plus another computer.
Install Tow-Boot.
Reboot and put the phone in mass storage mode.
Mount the root partition (cryptsetup open /dev/... phone-root; mount /dev/mapper/phone-root /mnt
chroot into the root partition.
Run mrtest zap to uninstall the mrtest dummy package, and apk upgrade -Ua to restore the u-boot-pinephone and device-pine64-pinephone packages back to pmaports versions.
Exit the chroot, umount /mnt; cryptsetup close phone-root, and reboot the phone.
Phone should boot fine now.
Run update-u-boot. This will restore the pmaports u-boot.
At this point you can uninstall Tow-Boot if you want.
Method 2: Using an SD card.
Make an SD card with pmOS Edge.
Boot from the SD card.
Do steps (3), (4) and (5) as above.
Exit the chroot, umount /mnt; cryptsetup close phone-root.
Run update-u-boot, but make sure that update-u-boot flashes to the eMMC, not the SD card.
Shut down the phone, remove the SD card and reboot the phone. It should boot fine now.
At this point you can uninstall Tow-Boot if you want.
Uninstalling Tow-Boot doesn't wipe the entire eMMC. The option in the uninstaller that you're referring to wipes just the partition that Tow-Boot installed itself to (mmcblk#boot0).
I don't have any Tow-Boot uninstaller, I looked everywhere in PostmarketOS and Tow-Boot docs and nothing. Tow-Boot installer has just the options of installing or erasing the eMMC content which I want to avoid to don't install pmOS edge again.
Can I just remove mmcblk#boot0 partition manually? Also what's the other mmcblk#boot1 ro partition that I see in the internal eMMC?
Thanks Arnav, I haven't read it with attention before. The erase eMMC option in Tow-Boot installed refers only to the Boot portion.
I stopped at step 3. since I got attached output from cpupower idle-info command.
idle_info.txt
Please let me know if you want me to test something else. Happy to help.
So just to be clear, that cpupower idle-info was run on a new Edge installation to eMMC, right?
If so, make sure it continues to work after a reboot. And if it still works, you can gradually add whatever packages / customizations you originally had and rebooting after each one, and if any of those make the idle states stop reporting, that will tell us what breaks it.
Yes exactly, new Edge installation to eMMC (no SD card inserted), no additional packages installed, only cpupower and erased Tow-Boot.
I just restarted and re-tested and cpupower idle-info still reports idle states (increased usage).
I'll continue testing adding packages and let you know how it goes.
I found out that when calling cpupower idle-info, I get a random CPU usage. So I need to use the option --cpu to select a CPU like: cpupower --cpu 0 idle-info.
Is it normal that if I keep calling cpupower --cpu 0 idle-info from the same terminal session, repeatedly, I get Usage and Duration values for all 3 states (WFI, cpu-sleep and cluster-sleep) increased?
Is it normal that if I keep calling cpupower --cpu 0 idle-info from the same terminal session, repeatedly, I get Usage and Duration values for all 3 states (WFI, cpu-sleep and cluster-sleep) increased?
I installed more packages but nothing changed. So I installed Tow-Boot again and the issue came back, then I erased it and the issue disappeared. Also I noticed that when inserting a newly created pmOS v22.12 SD card, it will boot without the need to press volume down when having Tow-Boot installed. Is this because pmOS still creates images with uboot so Tow-Boot is ignored in that case?
My personal conclusion is that this issue occurs for OG PP v1.2b, pmOS Edge and v22.12 stable on eMMC with Tow-Boot.
Added edge and v22.12 labels. Pretty sure this affects v22.12 as well, given that we backported what was supposed to fix broken cpuidle from edge to stable in SP 1.
I'm on v22.12 (plasma-mobile on emmc, Pinephone 1.2a) and I can't reproduce this issue (ie cpupower idle-info reports usage values for sleep states).
cpupower idle-infoCPUidle driver: psci_idleCPUidle governor: menuanalyzing CPU 0:Number of idle states: 3Available idle states: WFI cpu-sleep cluster-sleepWFI:Flags/Description: ARM WFILatency: 1Usage: 388119Duration: 370604041cpu-sleep:Flags/Description: cpu-sleepLatency: 2300Usage: 39218Duration: 364696000cluster-sleep:Flags/Description: cluster-sleepLatency: 2350Usage: 17008Duration: 160999341
I never installed tow-boot on the system or did anything u-boot specific, just the occasional apk upgrade and update-u-boot (though it is a self-built image, from v21.06 iirc)
I do have a power related issue, but its probably caused by something different considering my cpupower output -> #2014
While working on a fix for another issue, I went back from using the packages from !3931 to default packages of linux-postmarketos-allwinner, u-boot-pinephone and device-pine64-pinephone, and installed that default u-boot via update-u-boot. For whatever reason this issue does not repro for me any more, ie the idle states are now reporting >0 usage with default packages from pmaports. To be precise, this is with:
device-pine64-pinephone-0.46-r0
linux-postmarketos-allwinner-6.3.0_git20230426-r0
u-boot-pinephone-2023.01-r0
From the time ~6 weeks ago when I did have the issue with default packages, the change since then is only the kernel package, since boot.scr and u-boot have not changed since then.
The issue for me seems to be resolved
It seemed that some remnants of Tow-Boot werd stille installed.
After erasing the Tow-Boot from eMMC again using the installer image, the cpu-idle works again for me in pmOS on eMMC.
To start a small discussion as well, I think we should actively start to discontinue support for Tow-Boot in PP and also PPP.
The package doesn't seem to be actively maintained anymore and laggs behind on upstream uBoot (which incorporates important fixes for both platforms in the meantime)
I think we should actively start to discontinue support for Tow-Boot in PP and also PPP.
No, not going to happen. Tow-Boot has maintenance problems yes we agree there, but we're currently actively talking with upstream on resolving that. Tow-Boot solves some actual problems and makes booting a whole lot easier and at least I personally have no intention to revert that.
I rather have us spend time on fixing cpu-idle with Tow-Boot than dropping it.
With the 2022.07-006 release that was just cut a few hours ago, the two lower idle states are still broken. Actually there was some weirdness because on the first boot after install the modem and USB-power were also broken, but on reboot they magically fixed themselves, though wifi remained broken. In any case idle counters for the two lower states were still 0.
Yes, though whatever issue there was with the kernel has long been fixed. Currently it only repros if the user is also using Tow-Boot, so "default" installs will not be affected.
Regarding whether to switch the PP to Tow-Boot, or to switch the PPP back from Tow-Boot, I'd say that is something the device maintainers and other people that actually test and do the work on these devices should decide.