JakeRoggenbuck / auto-clock-speed

A utility to check stats about your CPU, and auto regulate clock speeds to help with either performance or battery life.
https://autoclockspeed.org
MIT License
33 stars 9 forks source link

Add more granular control for frequency in config #544

Open JakeRoggenbuck opened 1 year ago

JakeRoggenbuck commented 1 year ago

Allow custom frequency options set in config.

Add to config: max when on battery min when on battery max when on charging min when on charging

max when on powersave min when on powersave max when on performance min when on performance

Camerooooon commented 1 year ago

Currently running the following command results in a permission denied error

~ » sudo echo "2000000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
bash: /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: Permission denied

Is there another way to set the max frequency? Or maybe my computer specifically does not let me change the max frequency?

JakeRoggenbuck commented 1 year ago

I checked and it doesn't work with sudo but does with with root. There is a small intersection of hardware things that don't accept sudo but do accept root.

JakeRoggenbuck commented 1 year ago

However, when I set the value for scaling_max_freq it instantly reset to it's default

JakeRoggenbuck commented 1 year ago

Found it: /sys/devices/system/cpu/cpuX/cpufreq/scaling_setspeed

JakeRoggenbuck commented 1 year ago

It says here that you can set the speed https://wiki.archlinux.org/title/CPU_frequency_scaling