Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fedora power management unsuitable for asahi #365

Open
cloehle opened this issue Jan 17, 2025 · 6 comments
Open

Fedora power management unsuitable for asahi #365

cloehle opened this issue Jan 17, 2025 · 6 comments

Comments

@cloehle
Copy link

cloehle commented Jan 17, 2025

I know this isn't a kernel issue, but this is still the best place I could find to report this. Sorry if it isn't and please point me to a different place.
I noticed when upgrading from the arch-based to fedora that EAS (energy-aware scheduling) is no longer working out of the box.
The reason is that cpufreq policy0 is set to a governor that isn't schedutil but EAS only supports schedutil at this time.

Even if asahi no longer wanted to use EAS it still transles the user request badly.
The Plasma power management settings show 3 options: Power Save, Balanced and Performance. The default is balanced.
The M1 Pro has policy0 little (CPUs 0 and 1), policy2 big (CPUs 2-4) and policy5 big (CPUs 5-7).

When changing the power settings only policy0 actually changes:

# cat /sys/devices/system/cpu/cpufreq/policy*/scaling_governor 
performance
schedutil
schedutil

with performance being "powersave", "ondemand", "performance" respectively.
Clearly policy0 contributes the smallest amount to power usage on this system generally, therefore only changing policy0 isn't translating the user request at all.

Furthermore just having all set to schedutil, at least for "Power Save" and "Balance", should yield much better power results because of EAS being used.

@cloehle
Copy link
Author

cloehle commented Jan 17, 2025

There's tuned and power-profiles-daemon in use. The profiles seem to be coming from RHEL according to here:
https://github.com/redhat-performance/tuned/blob/master/doc/manual/modules/performance/ref_tuned-profiles-distributed-with-rhel.adoc
I'll try to file a bug there as well.
I'm not sure where "only change first policy" bug originates from, though.

Edit:
This is the RHEL bug report
https://issues.redhat.com/browse/RHEL-74422
The root cause for this only affecting the first policy is still unknown.

@Conan-Kudo
Copy link

Issues need to be filed in the Red Hat Bugzilla for Fedora: https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=tuned

@marcan
Copy link
Member

marcan commented Jan 20, 2025

sigh

https://bugzilla.redhat.com/show_bug.cgi?id=2339067

@AdrianVovk
Copy link

There's tuned and power-profiles-daemon in use.

Just to clarify, there's power-profiles-daemon (PPD) and tuned, which emulates PPD's DBus API because the desktop environments integrate with PPD. These two packages conflict and cannot coexist.

Tuned is generally much more hands-on and much more willing to turn kernel knobs than PPD is (at the risk of problems like this issue), whereas PPD is mostly a wrapper around the kernel's platform power profiles, CPU-specific power management drivers like Intel pstate, and ditto for GPUs. I would assume that PPD wouldn't be turning this knob, but I'm not sure.

Does PPD exhibit this problem? If it is, I'll open a bug there.

Also, maybe Asahi should just use PPD, since the Asahi team focuses on doing power management correctly in the kernel? As far as I understand, Fedora switched to tuned to make it easier for OEMs to tune power management without needing to touch kernel drivers. If that kind of thing isn't necessary for Asahi, the real PPD is a lot smaller and less likely to cause issues.

@Conan-Kudo
Copy link

PPD doesn't do anything on Apple Silicon systems either, so it's kind of pointless one way or another.

@jannau
Copy link
Member

jannau commented Jan 21, 2025

Also, maybe Asahi should just use PPD, since the Asahi team focuses on doing power management correctly in the kernel? As far as I understand, Fedora switched to tuned to make it easier for OEMs to tune power management without needing to touch kernel drivers. If that kind of thing isn't necessary for Asahi, the real PPD is a lot smaller and less likely to cause issues.

Having a tuned Asahi specific configuration / package selection is not a goal. The ultimate goal is that the need for Asahi specific bits vanishes and standard Fedora install can be used. So that means tuned / tuned-ppp which should work reasonably well on any platform.

@cloehle cloehle changed the title Fedora KDE power management unsuitable for asahi Fedora power management unsuitable for asahi Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants