Well, well, turns out that the new pstate
Intel driver is awesome, but first one needs to practice a bit of the ancient, lost art of reading the documentation.
I'll leave my question as it is because, judging by all the grief and frustration I see scattered all around the internet, I am not the first to have this issues.
The new CPU driver has lots of options, but I will restrict my explanation to something simple and, for me, more than enough and satisfactory. First of all:
sudo apt-get install linux-cpupower
(or the equivalent in your non-debian based distros)
There are now 2 behaviors (governors) with the names powersave
and performance
but that is quite an unfortunate naming scheme, because these governors have nothing to do with those that bear the same names in the old driver:
powersave
means now variable frequency that depends on the load, i.e. this is essentially the old ondemand
governor. You get to set the minimum and maximum frequency, and if that maximum frequency is set to the maximum frequency your CPU is able of (which I believe it's the default) then you don't save a crap. You may even crank up the minimum frequency to the second highest value, and the result will be the CPU nearly at full throttle 24/7 and the governor will still be named powersave. They should have named this governor VARIABLE or something similar, avoiding a lot of confusion among users and sparing the developers a lot of false reports of kernel bugs.
performance
means here constant frequency, no matter the load, and this depends on what the user has set as maximum. When this governor is set, the mininum frequency is ignored and the CPU runs at the frequency you set as maximum. If as such you have set a very low frequency, then you will not see any special performance or anything, you just will get a slowed down CPU at constant frequency. So they'd better named this governor CONSTANT or something similar, sparing frustration to many people like me, used to the old scheme.
So, here are some examples that work like a charm, at least with kernel 4.14. I will use as minimum and maximum frequency the values for my CPU: 0.4 and 3.1 GHz. See yours with cpupower frequency-info
CONSTANT, LOWEST FREQUENCY IN ALL CORES
This IS what I wanted! We get that by setting the constant frequency governor and setting the lowest available frequency as the maximum:
sudo cpupower frequency-set -g performance
sudo cpupower frequency-set -u 400MHz
CONSTANT, HIGHEST FREQUENCY IN ALL CORES
(You see this asked very often for desktop computers where it makes sense, although there are also people out there willing to destroy their laptop fan)
sudo cpupower frequency-set -g performance
sudo cpupower frequency-set -u 3100MHz
VARIABLE FREQUENCY BETWEEN THE MINIMUM AND MAXIMUM POSSIBLE FREQUENCIES IN ALL CORES
(this was called ondemand with the old acpi-cpufreq
driver)
sudo cpupower frequency-set -g powersave
sudo cpupower frequency-set -d 400MHz
sudo cpupower frequency-set -u 3100MHz
VARIABLE FREQUENCY BETWEEN THE MINIMUM AND A MODERATE FREQUENCY IN ALL CORES
(maybe because you want to get some more speed when required but you don't want to reach the maximum and hear the fan blowing like mad)
sudo cpupower frequency-set -g powersave
sudo cpupower frequency-set -d 400MHz
sudo cpupower frequency-set -u 1200MHz
And so on. It is very easy and works really well. You can set too a constant low frequency in one core where the heavy numerical stuff is running, while you leave a variable frequency in other core where you launch the more usual stuff (email, web browsing...). See taskset
for more info.
Best Answer
You'll have to find the code for that specific governor and add it to your kernel before recompiling it or you can also write the proper
Makefile
and compile the governor as a module. The code for the governor should be indrivers/cpufreq/
. For example, for thelulzactive
governor: drivers/cpufreq/cpufreq_lulzactive.c