[how-to] Intel CPU governing

rado84

Well-Known Member
Joined
Feb 25, 2019
Messages
776
Reaction score
633
Credits
4,916
I finally found out how to control the CPU frequencies when idle and when loaded. Up until now the CPU was constantly running at maximum frequency even when I don't play games which is pointless. But no more! :D For this guide to work you must have a Core i-series at least 2nd generation, according to the man page of cpupower. Unfortunately the man page doesn't provide any useful info, so I had to test it in the principle of "trial and error".

1. Reboot your computer and enter BIOS/UEFI. Search the menus for anything related to "Turbo mode" and disable it, otherwise the following instruction won't have effect. Don't ask me why bc IDK. It could be a flaw of cpupower but I'm not a programmer and I can't tell for sure. So, disable turbo mode, save changes and exit to boot up Linux.
2. Check if your system has cpupower installed. It should come by default with most distros but who knows for sure... That's why you need to manually check. If you don't have cpupower, install it.
3. If cpupower is installed, open terminal and type:
Code:
sudo gedit /etc/default/cpupower
My favorite editor is gedit, that's why I'm using it in this example. You can use whatever editor you like.
4. You will notice that ALL the lines are commented by the # symbol. You need to uncomment lines 3, 7 and 8.
5. Line 3 should look like this when uncommented:
Code:
governor='ondemand'
6. In lines 7 and 8 you must enter the minimum and maximum desired frequencies in MHz. Ofc you can use GHz with float numbers but I prefer to be extra specific, so I entered the numbers in MHz, like this:
Code:
min_freq="900MHz"
max_freq="3400MHz"
You can replace these frequencies with the ones you want. These above are mine and are just for the example!!!
7. Save the changes to the file and close it. You may want to copy that file to a secure location - in case you have to reinstall Linux for whatever reason, so that you don't have to do that all over again.
8. Go to your DE settings and find "Automatically started programs". Click "add", "button +" or whatever it looks like in your DE. Add a "user command". In the NAME field you can type whatever you want. In "user command", you must type this:
Code:
/etc/default/cpupower
and then confirm with "Apply", "OK" or whatever confirmation button you see.
The "comment" field can be left empty; "Delay" field - leave at 0, so that it starts before everything else.
9. Reboot your computer and if you have conky, watch the CPU frequency there.

If you have done everything right, you sould see something like this:
CR1zLKT.png
 


Great post, thanks for sharing! I think you may also find CoreCtrl interesting if you like tweaking your hardware.
 
I don't like "tweaking" it, that's the other reason I disabled turbo mode. I like using my hardware at the frequencies the producer meant it to run. But I remember how the CPU performed "on demand" in Windows 7 varying between the values I had set back then (850-3700MHz for my previous CPU). In Linux it didn't perform the same way, so I decided to find a way to have it the same here. It's pointless to run at top speed when no game is running. Not to mention it's a lot quieter this way, a lot cooler and using less power.
 


Top