Roughly checked this on 14/09/2023. Seems to work (more testers needed) - Pete

Just really quick write up but worked like this:

Installed some relevant tools (check your kernel version some tools are different for later kernels):

sudo apt-get install cpufreq cpufrequtils 
sudo apt-get install linux-tools-common 
Maybe? sudo apt-get install linux-tools-5.15.0-27-generic
Maybe? sudo apt-get install linux-cpupower 
Depends on distro used what you have to install, bookworm I think is linux-cpupower... maybe?

For trixie I believe you just need cpufrequtils and linux-cpupower only.

decide on a governor

sudo cpupower frequency-info

passable options listed in that command such as conservative ondemand userspace powersave performance schedutil etc

eg: for powersave

sudo cpupower frequency-set --governor powersave

To check if cpu is no longer scaling monitor your cpu:

watch "cat /proc/cpuinfo | grep MHz"

NOTE: If you are using intel pstates (most likely you are on intel CPU) the only control you have is setting performance or powersave. As intel controls the frequency between their values there isnt a lot you can do without disabling intel pstates. This is not recommended and you will suffer in terms of performance. While playing games use performance, for everything else use powersave if this is the situation.

You can use “sudo cpupower frequency-info” to check if you are running performance or powersave and change appropriately like “cpupower frequency-set –governor performance”

After reboot changes will be lost. To make a startup script one way is (another option shown elsewhere in this wiki is with systemd, just feel like showing you a second way):

Create script:

sudo nano /root/SetCPU.sh

In this file put this text:

#!/bin/bash
cpupower frequency-set --governor powersave

Obviously modify above to correct governor. Now to add script to reboot:

sudo crontab -e

Add this line into the crontab:

@reboot /root/SetCPU.sh

Finally make script executable:

sudo chmod +x /root/SetCPU.sh

Now test by rebooting and checking the CPU with watch command from earlier.

All done :)