CPUIDLE not working on pinephone

Done. Added to the Gitlab isssue.

@Strit Great, thank you!

Hmm, for some yet uknown reason the device tree isnā€™t properly amended in TF-A to reflect the CPU idle states available via Crust, despite the TF-A, basically, announcing that to be performed on the serial console. Either that, or the device tree amendments made in TF-A arenā€™t propagated further. Thatā€™s bad news, but itā€™s good news that there are probably no bugs on the kernel side.

Iā€™ll add some custom debug code to the TF-A source code and use that to pinpoint the issue further, by locating the point where the execution of TF-A code actually fails to perform the expected device tree modifications, if thatā€™s the actual culprit, etc. Iā€™ll be able to work on all that on Sunday, because my schedule for tomorrow is already overflowing with all kinds of ā€œreal-lifeā€ stuff. Iā€™m looking forward to getting to the bottom of this issue! :slight_smile:

1 Like

Thanks for working on this. :slight_smile:

Thank you for providing the logs and additional debugging data. :slight_smile:

can we give that a try as Megi patched out some regulators which might be needed by crust it seems after all. That run disables that patch: [pkg-upd] 2023.01-1 (0980595f) Ā· Commits Ā· manjaro-arm / packages / core / uboot-pinephone Ā· GitLab

Sure, Iā€™ll first try a few boot loader builds with as few patches as possible, to test the things incrementally. Quite frankly, Iā€™m not sure why Megi uses the patch that disables the enabling of the regulators, it may have something to do with the fact that Megi uses p-boot on his PinePhones.

That is why I removed that patch again. Just let me know your findings ā€¦

I apologize for the delays, things were a little crazy on my side during the last week. It was all fine, but quite eventful, so to speak.

On the plus side, my PinePhone is now equipped with an external microSD card slot, for easy access to it thatā€™s pretty much required for the testing. However, I spent a few hours trying to locate my multimeter, to check the voltage of the USB-to-UART adapter Iā€™ll be using, and I was unable to locate the multimeter within the pile of hardware Iā€™ve been lucky to acquire in the last few months. Though, Iā€™ll find it as soon as possible, I promise. :slight_smile:

Woohoo, I just found the multimeter! :slight_smile: Itā€™s too late (or too early?) over here at the moment, though, so I have to go to bed.

How is the troubleshooting going? Is there some testing i could help with without the serial cable?

I should have some results available later today. Iā€™ll also provide you with the instructions how to replicate some of the tests, so we can verify the observed behavior in two different environments ā€“ if applicable, of course.

Just a brief updateā€¦ Iā€™ve been busy in the last few days writing a couple of articles for a regional long-lasting printed computer magazine, to meet the magazineā€™s publishing deadline. Those articles should be completed in a day or two, at which point Iā€™ll happily get back to debugging this issue.

As part of writing one of those articles, Iā€™ve discovered an issue with a Patriot Rage Pro, a high-performance USB flash drive, for which Iā€™ll also work on a fix through USB quirks in the Linux kernel. It would be ideal to fix that issue through a firmware update for the drive, but frankly, I donā€™t see that happening. However, Iā€™ll try contacting the drive manufacturer, once Iā€™m 100% certain about the actual culprit.

All kinds of issues just keep popping up all over the place. :slight_smile:

I see, I see. Letā€™s see how it unfolds.

1 Like

Iā€™m finally back to working on this issue. Iā€™ve been on a true rollercoaster ride in my private life for the last few weeks, but thankfully, the things are settling down.

Excited to hear what you might find.

I just added some patch to 6.1.12-2 Iā€™m currently building ā€¦

Can be downloaded here: https://gitlab.manjaro.org/manjaro-arm/packages/core/linux-pinephone/-/jobs/12051/artifacts/download?file_type=archive

Is this the missing hardware definitions to make cpuidle work or something else? I recognized the commit text to be same as in this sunxi spec page documenting something they call cpuidle but might not be same as kernel cpuidle governor? CPUIDLE - linux-sunxi.org

Most likely as the Megi kernel seems not to have them by default: linux/sun50i-a64.dtsi at orange-pi-6.1 Ā· megous/linux Ā· GitHub linux/sun50i-h5.dtsi at orange-pi-6.1 Ā· megous/linux Ā· GitHub

Just let me know if it works now ā€¦

YES, it is working now. Thanks for chasing the issue down.