I've been trying to limit the maximum allowed CPU frequency on a 2nd gen Intel i7 CPU.
To do that, I tried:
sudo cpupower -c all frequency-set --max
;- TLP, setting both the percentage and frequency (KHz) based limits;
- Changing intel_pstate with
echo 50 | sudo tee /sys/devices/system/cpu/intel_pstate/max_perf_pct
- each of the above with ondemand.service enabled and disabled
While monitoring the frequencies with conky, the imposed limitations seemed to work as they should.
However, when running more demanding applications (specifically, games on Steam), the limitations would be ignored, and the frequencies would raise as if no restrictions existed.
The command grep . /sys/devices/system/cpu/intel_pstate/*
, suggested in another post, seems to indicate that the intel_pstate driver is being used, as it should be.
I haven't been able find an answer nor solve the issue myself.
Cordially, I thank you for your attention.
grep . /sys/devices/system/cpu/intel_pstate/*
still showedmax_perf_pct
at 50% and that the actuals were higher? Or, that something overwrote that value back to 100%? – Doug Smythies Dec 16 '20 at 00:35/sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq
, but I haven't been able to find it again. Oh, are you using the performance governor? there was a problem with it not updating max (I think). – Doug Smythies Dec 18 '20 at 01:04cpupower
, I set the governor to powersave, and the perfbias to 15. Oncpufreq-set
(which is the one that worked for me), I also set the governor as powersave. Not sure if I did so while using TLP. By the way, I have seen the "ondemand" service popping up in multiple discussions, including ways to disable it (e.g.systemctl disable ondemand
). However, I admit I am having problems understanding why some things work and what exactly they do, since it seems that lots of tools deals with similar operations (cpupower, cpufreq-set, cpufrequtils, TLP, intel_pstate...) – Frozenpick Dec 19 '20 at 12:20ondemand
service is simply to set the governor to ondemand, if available (i.e. for the acpi-cpufreq CPU scaling driver) or powersave if intel_pstste, or... after boot, because the Ubuntu kernel configuration specifies "perfromance" mode. What I want is to isolate your not supposed to be possible situation, so that I can either fix it myself or get help to. – Doug Smythies Dec 19 '20 at 14:23cpufreq-set
was the only solution that actually worked for me, so far, and I haven't tested others since then. The only "issue" is that, AFAIK, I can't set parameters for all cores at once, so I need to run the command once for each core (using&&
and etc). – Frozenpick Jan 04 '21 at 21:31echo 1000000 | sudo tee /sys/devices/system/cpu/cpufreq/policy*/scaling_min_freq
– Doug Smythies Jan 06 '21 at 06:41cpufreq-set
(which works for me) DID change the values in the path you mentioned (scaling_max_freq
, in my case). If the other tools/options were supposed to do the same, I am confused, since they should have worked – Frozenpick Jan 19 '21 at 17:44