distribution icon indicating copy to clipboard operation
distribution copied to clipboard

Change cpu scaling governor to powersave when on battery

Open HadiModarres opened this issue 5 years ago • 6 comments

I've been using clear linux for a week on my laptop and I'm amazed how good it is. I have a suggestion that could improve it further. Currently when I watch a video in my browser if I set scaling governor to powersave, powertop shows around 7.5 Watts energy consumption. If I change the governor back to performance(which is the default in clear linux) consumption steadies at around 11.5 Watts. This makes battery drained a lot faster when watching something on battery.

So my suggestion is to: automatically set governor to powersave when on battery and set to performance on AC

HadiModarres avatar Jul 03 '19 23:07 HadiModarres

I'm not an expert, but on the documentation there are few considerations about that:

By default, Clear Linux OS prioritizes maximum CPU performance with the philosophy that the faster the program finishes execution, the faster the CPU can return to a low energy idle state.

Clear Linux OS sets the CPU governor to performance which calls for the CPU to operate at maximum clock frequency. In other words, P-state P0. While this may sound wasteful at first, it is important to remember that power utilization does not increase significantly simply because of a locked clock frequency without a workload.

MattiaVerticchio avatar Jul 06 '19 16:07 MattiaVerticchio

@MattiaVerticchio Well for the first argument, that philosophy is obviously flawed, because like the use case I mentioned (watching videos) the program never finishes.

and also for the second one it does in fact increase power utilization significantly.

HadiModarres avatar Jul 06 '19 22:07 HadiModarres

I understand your points, and I'd like to know the opinions of the developers on that. Also, automatic switching to powersave has already been mentioned in a previous issue.

MattiaVerticchio avatar Jul 08 '19 07:07 MattiaVerticchio

I've been using clear linux for a week on my laptop and I'm amazed how good it is. I have a suggestion that could improve it further. Currently when I watch a video in my browser if I set scaling governor to powersave, powertop shows around 7.5 Watts energy consumption. If I change the governor back to performance(which is the default in clear linux) consumption steadies at around 11.5 Watts. This makes battery drained a lot faster when watching something on battery.

So my suggestion is to: automatically set governor to powersave when on battery and set to performance on AC

How do you do that in CL? I tried installing auto-cpufreq application, but wasn't successful.

koushikkhan avatar Aug 10 '21 09:08 koushikkhan

I installed auto-cpufreq using nix. There is an issue when installing to clear linux, to resolve it use sudo mkdir /etc/tmpfiles.d and then run the installer.

ElSargo avatar Nov 03 '23 23:11 ElSargo

clear linux nowadays checks the system type and uses "performance" for servers and high end desktop, but more power friendly governors for laptops and things with batteries...

On Fri, Nov 3, 2023 at 4:19 PM Oliver Sargison @.***> wrote:

I installed auto-cpufreq using nix https://nixos.org/download. There is an issue when installing to clear linux, to resolve it use sudo mkdir /etc/tmpfiles.d and then run the installer.

— Reply to this email directly, view it on GitHub https://github.com/clearlinux/distribution/issues/978#issuecomment-1793231646, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJ54FKXMBWYEJE3HLORETTYCV3WLAVCNFSM4H5NRYCKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCNZZGMZDGMJWGQ3A . You are receiving this because you are subscribed to this thread.Message ID: @.***>

fenrus75 avatar Nov 03 '23 23:11 fenrus75