clearlinux / distribution

Placeholder repository to allow filing of general bugs/issues/etc against the Clear Linux OS for Intel Architecture linux distribution
521 stars 29 forks source link

Change cpu scaling governor to powersave when on battery #978

Open HadiModarres opened 5 years ago

HadiModarres commented 5 years ago

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

MattiaVerticchio commented 5 years ago

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.

HadiModarres commented 5 years ago

@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.

MattiaVerticchio commented 5 years ago

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.

koushikkhan commented 3 years ago

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.

ElSargo commented 10 months ago

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.

fenrus75 commented 10 months ago

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: @.***>