Hello, all… Wondering if anyone’s devised a method by which the Power Mode can be selected as “Performance” when plugged in, “Balanced” when above a specific battery charge percentage, and automatically switch to “Power Saver” when the battery level falls below a certain threshold.
While I was using GNOME, I found an extension called “Power Profile Swticher” that allows you to set which profile to use when you’re on battery or when it is plugged in:
I think it can be done somewhat with custom profiles for TuneD (if that is what your system is using), but it’ll require reading through some of the documentation available on Red Hat. Unfortunately, the Fedora documentation for TuneD is a bit lacking or missing.
Thanks, @theqlp, for that extension link. It didn’t work on my system, throwing an error about a missing file, and looking through the developer’s git for it shows a relatively lackluster response rate to reported issues. I did, however, find the “Auto Power Profiles” extension (GitHub, GNOME Extensions), which looks like it performs similar duties. I have it installed now and will report back after a while of testing.
I also came across some discussion of using policies either with power-profiles-daemon or tuned, depending on what was being used and agree there doesn’t seem to be great documentation on it yet. I, like you @mpphill2, kind of wanted something already baked into Fedora and not yet another extension.
After testing the “Auto Power Profiles” extension for about the last week, I can report that it does exactly what I was looking for. Occasionally, there will be some “hiccups” when I unplug from a power source while still logged in, like screen flickering, but I so rarely do that I don’t think it’s that big of a deal.
I would still prefer a way to do this natively, without an extension and (perhaps) with tuned, so time to play around…
I’m not sure if udev can detect battery levels, but I remove tuned (F41) and use udev scripts to change CPU power states AC or battery with x86_energy_perf_policy (notes)
Iirc it would override my udev script for the CPU EPP level and set something slightly lower than performance on AC even with Performance selected in GNOME.
I figure tuned could be configured, but I wasn’t a fan of TLP back in the day for messing with PCI and ASPM stuff. I like the confidence of all my hardware running as power-hungry and max-performance as possible, believe the CPU to be the main power usage, and like the idea of Intel handling the power states of their CPU with their own tech vs something OS-side doing it in a more-generic manner.
I find it easier to remove tuned to knowingly not have it auto-affecting any other device, and like my more simple approach for AC/BATT CPU states