Closed emulti closed 1 year ago
Hey, thanks for reporting this one. This is a very serious bug.
Yes, I noticed it on PostmarketOS and the Danctnix distros when investigating why the battery runtime was so short...
I think it could affect other distributions too due to the tendency to share base-level work like u-boot.
I tried to test with p-boot, but have reached a block at the moment because your images use a GPT partition table and p-boot only supports MSDOS/FAT.
Now fixed in PostmarketOS master branch with change to u-boot script
https://gitlab.com/postmarketOS/pmaports/-/merge_requests/3806
@Danct12 Megi wrote a blog post about implementing this in distros: https://xnux.eu/log/#077
New kernel and U-Boot available in testing, please check it out to see if this fixes the issue for you. It does for me:
[alarm@danctnix ~]$ sudo cpupower idle-info
[sudo] password for alarm:
CPUidle driver: psci_idle
CPUidle governor: menu
analyzing CPU 0:
Number of idle states: 3
Available idle states: WFI cpu-sleep cluster-sleep
WFI:
Flags/Description: ARM WFI
Latency: 1
Usage: 34591
Duration: 27730553
cpu-sleep:
Flags/Description: cpu-sleep
Latency: 2300
Usage: 1020
Duration: 3543460
cluster-sleep:
Flags/Description: cluster-sleep
Latency: 2350
Usage: 354
Duration: 846149
No apparent regressions for me. cpuidle working again.
When I run the command, I get:
[alarm@pinephone ~]$ sudo cpupower idle-info
CPUidle driver: psci_idle
CPUidle governor: menu
analyzing CPU 0:
Number of idle states: 3
Available idle states: WFI cpu-sleep cluster-sleep
WFI:
Flags/Description: ARM WFI
Latency: 1
Usage: 1583163
Duration: 3619225080
cpu-sleep:
Flags/Description: cpu-sleep
Latency: 2300
Usage: 0
Duration: 0
cluster-sleep:
Flags/Description: cluster-sleep
Latency: 2350
Usage: 0
Duration: 0
Is it expected to see:
Usage: 0
Duration: 0
?
Steps to reproduce
Boot phone, update to latest packages, install cpupower utility, check for items below
Expected behavior
(note: taken from https://gitlab.com/postmarketOS/pmaports/-/issues/1901
Actual behavior
on linux-megi 6.0.10-1-danctnix image:
Logfiles and additional information
See https://gitlab.com/postmarketOS/pmaports/-/issues/1901 Seen on latest released danctnix image and also same image updated to latest kernel 6.0.1 Issue appears to be caused by overwriting DTB in u-boot user script, so the cpuidle nodes added by ARM TF-A are not used. However, at time of this posting, fixing the overwrite causes major regressions such as loss of charging, screen brightness etc, which are being worked on. Megi's p-boot does not exhibit this issues as it passes the TF-A modified DTB direct to the kernel. I intend to try and test this to confirm