Page 1 of 1

[HowTo] Change permantly CPU scaling governor

Posted: 2024-03-16 15:15
by panpan
Whatever you try with your system, always first Backup!

1. First, at the terminal, check the current governor with:

Code: Select all

cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
2. Find the available governors:

Code: Select all

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
3. Open the file which you can find with:

Code: Select all

cat /etc/init.d/cpufrequtils
And change the GOVERNOR=

4. Save the file, reboot and the governor you select will be permanently.

Re: [HowTo] Change permantly CPU scaling governor

Posted: 2024-03-16 16:05
by CwF
almost...first a package would need to be installed that usually isn't.
https://packages.debian.org/bookworm/cpufrequtils

Next, this is appropriate for a range of processors no longer in production, mostly prior tp SandyBridge.

With this old deprecated technique you could put detailed preferences in /etc/sysfs.d/cpupolicy.conf and I'm not sure that still works. Here's some old stuff;
viewtopic.php?t=148563

For anything newer, keep in mind that user space tools are glacial slow compared to the cpu's internal MSR action.
The motherboards Bios often has controls also.

Re: [HowTo] Change permantly CPU scaling governor

Posted: 2024-03-16 17:19
by panpan
@CwF, thanks for your contribution, I think after kernel 5 the governors take care the speed of the CPU accordingly, which can be seen at any moment with:

Code: Select all

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq

Re: [HowTo] Change permantly CPU scaling governor

Posted: 2024-03-16 22:54
by fabien
panpan wrote: 2024-03-16 15:15 2. Find the available governors:

Code: Select all

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
Not so simple, governors are not necessarily all loaded. See [Testing - Trixie] [Solved] Cpu governors absent in 6.6.13

Re: [HowTo] Change permantly CPU scaling governor

Posted: 2024-03-17 02:23
by sunrat
If you want to change it with a GUI utility, cpupower-gui is a handy little program. It seems to retain its last setting afaik.