I'm trying to lower my cpu max frequency. I'm using a laptop which easily overheat. I've tried a number of different things but couldnt get it to work as intended. From what I can see, my cpu max frequencies are set to 2.4 GHz, but they often exceed that and reach 3.4 GHz (turbo).
- ubuntu 18
- kernel: 4.15.0-58-generic
- Scaling governor: ondemand
- Scaling driver: acpi-cpufreq
Solved
As Doug Smythies posted in the comments. First read this file to see what cpu frequencies are available:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
I want to set 2400000Hz (2.4GHz) as my max cpu frequency. I believe the same frequency must be set on all CPU's.
for file in /sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq; do echo "2400000" > $file; done
(This action requires root privileges). The effect should take place immediately.
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_driver
andcat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
and add the results to you question. see also here – Doug Smythies Sep 01 '19 at 15:35sudo cpufreq-set --cpu 0 --governor performance
- do this command for every core that Your CPU has. This one command sets governor only for core 0. – Michal Przybylowicz Sep 01 '19 at 19:31