CPU frequency too high even with 'powersave' governor
Answer Version 3.0
Kernel version 4.14.98 has finally fixed problems I've noticed for last 6 months or so:
- When system is idle CPU frequency would spike to 3,000 MHz in Turbo Mode.
- When system is busy CPU frequency would simmer down to about 1,500 MHz.
Now as you can see when system is idle system is at 800 MHz as it should be:
Answer Version 2.0
OP updated question with results of Initial Answer below and for whatever reason the governor is set to performance
mode which runs all CPU's at max speed all the time.
We need to do the reverse of this answer: Set CPU governor to performance in 18.04:
Use: sudo -H gedit /etc/rc.local
put insert this before the last line containing exit 0
:
sleep 120 # Give CPU startup routines time to settle.
echo powersave | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
echo 800000 | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_min_freq
Save the file and reboot. Two minutes after rebooting your CPU's will settle down and run normally.
What if /etc/rc.local
doesn't exist?
From this: Ubuntu 16.10 rc.local file does not exist
you need to enter:
sudo systemctl enable rc-local.service
Initial Answer
According to: intel_pstate
CPU Performance Scaling Driver, intel_pstate
status should be:
status
Operation mode of the driver: “active”, “passive” or “off”. “active” The driver is functional and in the active mode. “passive” The driver is functional and in the passive mode. “off” The driver is not functional (it is not registered as a scaling driver with the CPUFreq core)
My first step would be to remove your kernel command line parameter intel_pstate=disable
.
Reboot and type the following:
$ cd /sys/devices/system/cpu/cpu0/cpufreq
$ paste <(ls *) <(cat *)
affected_cpus 0
cpuinfo_max_freq 3500000
cpuinfo_min_freq 800000
cpuinfo_transition_latency 0
energy_performance_available_preferences default performance balance_performance balance_power power
energy_performance_preference balance_performance
related_cpus 0
scaling_available_governors performance powersave
scaling_cur_freq 832522
scaling_driver intel_pstate
scaling_governor powersave
scaling_max_freq 3500000
scaling_min_freq 800000
scaling_setspeed <unsupported>
This is what I have in a default configuration without intel_pstate=disable
.
Pay close attention to scaling_max_freq
and scaling_min_freq
.
You might want to temporarily uninstall CPU Freq Utils package:
sudo apt remove cpufrequtils
I have never found a need for it and it might be mucking your system up. Later you can install it again (if need be) with:
sudo apt install cpufrequtils
Related videos on Youtube
Admin
Updated on September 18, 2022Comments
-
Admin over 1 year
Recently I noticed my CPU sits most of the time at high frequencies, even with very little load.
It is an i5-7300HQ processor which should use frequencies between 800 MHz and 2.5 GHz (3.5 GHz with Turbo Boost).
Now even when load is about 2-8%, the frequencies I see are usually between 2.6 and 3.2 GHz, which means the CPU is almost always Turbo Boosting.
Before it was always 900 - 1200 MHz.
The scaling governor is set to powersave:
$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor powersave powersave powersave powersave
In
/etc/default/grub
I have a line:GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_pstate=disable scsi_mod.scan=sync"
In
/etc/default/cpufrequtils
:GOVERNOR="powersave"
There is no
/sys/devices/system/cpu/intel_pstate/
dirMy system specs are:
- Laptop: HP Pavilion - 15-bc203nw
- OS: Ubuntu (Xubuntu) 18.04.1 LTS
- CPU: Intel Core i5-7300HQ
EDIT
After @WinEunuuchs2Unix suggestions I again have
/sys/devices/system/cpu/intel_pstate/
dir.Typing the following:
cd /sys/devices/system/cpu/cpu0/cpufreq && paste <(ls *) <(cat *)
gives the output:
affected_cpus 0 cpuinfo_max_freq 3500000 cpuinfo_min_freq 800000 cpuinfo_transition_latency 0 energy_performance_available_preferences default performance balance_performance balance_power power energy_performance_preference balance_performance related_cpus 0 scaling_available_governors performance powersave scaling_cur_freq 3236541 scaling_driver intel_pstate scaling_governor performance scaling_max_freq 3500000 scaling_min_freq 3500000 scaling_setspeed <unsupported>
How can I set it to
powersave
(just changing it inscaling_governor
file doesn't do anything).-
Doug Smythies over 5 yearsIf you are not using the intel_pstate CPU frequency driver, then it should be using the acpi-cpufreq driver by default. That driver using the powersave governor should always be a the minimum CPU frequency. So that is odd. Anyway, I agree with @WinEunuuchs2Unix 's answer.
-
WinEunuuchs2Unix about 5 yearsI've updated my answer below. Frequencies have drastically dropped with kernel
4.14.98
a few days ago. Possibly it occurred sooner after4.14.89
which was my last kernel installed.
-
Doug Smythies over 5 yearsLet us continue this discussion in chat.
-
WinEunuuchs2Unix about 5 years@DougSmythies Kernel is finally fixed. See my answer 3.0 above.
-
Doug Smythies about 5 yearsThanks for the update. Hmmm... that actually doesn't make sense to me. I would like to understand exactly what changed and why.
-
WinEunuuchs2Unix about 5 years@DougSmythies I may have spoken too soon. This morning (after resuming from suspend) it reverted to old ways of +2,500 MHz and 2% CPU load when pausing youtube. I will do more testing and possibly revert Answer 3 version tonight.