elementary / wingpanel-indicator-power

Wingpanel Power Indicator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow to change CPU frequency or governor

vikanezrimaya opened this issue · comments

commented

Problem

Currently the cpufreq governor (that controls CPU frequency) can only be switched using command-line or third-party utilities. It would make sense to have CPU frequency adjustment handled by the power indicator, so one could quickly switch to a powersaving mode when needed to save battery or boost frequency when something needs just a little bit more juice (for me, performance governor boosts FFMpeg's encoding performance by up to 25% due to frequency boost being locked at max, and powersave allows to save a lot of battery life, which is critical with my battery damaged from underuse and age).

Proposal

Allow switching between CPUFreq governors within the power indicator, with UI somewhat similar to proposed for switching audio I/O devices in elementary/wingpanel-indicator-sound#187. Authenticate the user via PolKit if neccesary, as only root can change cpufreq-related settings by default.

Prior Art

In Windows 10's power indicator, there are settings that affect several things, including CPU frequency. A slider allowing to choose between extreme power saving (disabling some userspace features such as cloud file sync and automatically reducing brightness), some power-saving (clocking down the CPU to save power), normal performance or maximum performance (that acts somewhat like performance governor in Linux).

The cpupower command in Linux allows to change governors and CPU frequency (if the governor is set to userspace). Internally it modifies files in /sys/devices/system/cpu/cpu*/cpufreq to tweak those values.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Personally I think this is TMI for the average user and I can't imagine it works consistently enough to ship (regardless of whether it's even implementable with good UX)
I've had terrible experience with changing cpu and motherboard related settings on a thinkpad and don't think that this is even worst case scenario.

I agree with @hanaral although I think there is a library available to not use sysFS. But the problem is that not all cpus support a generic set of governors. Which makes this request very challenging to get good consistent UI/UX even for some what more advanced user.

Maybe we could do something with the switchboard-power-plugin instead? For more advanced settings?

Because it is still a valid concern and industry standard now a days. Maybe we should brainstorm about this.

I feel that adding power profiles to indicator would be a good change, especially if done with this design (source):

commented

Power profiles management in the power indicator is probably the best way to solve this issue right now, especially considering my original example in Windows (and how some Linux apps, like Evolution, modify their behavior if the powersaver profile is set).

commented

Closing in favour of #132.