Skip to content

Fedora power management unsuitable for asahi #365

Closed

Description

@cloehle

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.

Activity

  1. cloehle commented on Jan 17, 2025

    @cloehle
    Author

    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.

  2. Conan-Kudo commented on Jan 20, 2025

    @Conan-Kudo
    Member
  3. marcan commented on Jan 20, 2025

    @marcan
  4. AdrianVovk commented on Jan 21, 2025

    @AdrianVovk

    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.

  5. Conan-Kudo commented on Jan 21, 2025

    @Conan-Kudo
    Member

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

  6. jannau commented on Jan 21, 2025

    @jannau
    Member

    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.

  7. changed the title [-]Fedora KDE power management unsuitable for asahi[/-] [+]Fedora power management unsuitable for asahi[/+] on Jan 21, 2025
  8. cloehle commented on Jan 30, 2025

    @cloehle
    Author

    Thank you Hector for fixing both issues and thanks Adrian for the explanation, I got that wrong.

    Anyway I'll report back when the merged fixes hit my asahi machine and will close then.

  9. cloehle commented on Mar 2, 2025

    @cloehle
    Author

    I can confirm this is now fixed after updating asahi fedora.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions