Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[HowTo] Change permantly CPU scaling governor

Share your HowTo, Documentation, Tips and Tricks. Not for support questions!.
Post Reply
Message
Author
panpan
Posts: 69
Joined: 2015-09-18 17:07
Has thanked: 3 times
Been thanked: 2 times

[HowTo] Change permantly CPU scaling governor

#1 Post 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.

CwF
Global Moderator
Global Moderator
Posts: 2719
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 201 times

Re: [HowTo] Change permantly CPU scaling governor

#2 Post 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.

panpan
Posts: 69
Joined: 2015-09-18 17:07
Has thanked: 3 times
Been thanked: 2 times

Re: [HowTo] Change permantly CPU scaling governor

#3 Post 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

User avatar
fabien
Forum Helper
Forum Helper
Posts: 688
Joined: 2019-12-03 12:51
Location: Anarres (Toulouse, France actually)
Has thanked: 62 times
Been thanked: 161 times

Re: [HowTo] Change permantly CPU scaling governor

#4 Post 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

User avatar
sunrat
Administrator
Administrator
Posts: 6511
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 119 times
Been thanked: 489 times

Re: [HowTo] Change permantly CPU scaling governor

#5 Post 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.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

Post Reply