And after the boot I can check that intel_pstate is being used:
$ cpupower frequency-info
analyzing CPU 0:
driver: intel_pstate
CPUs which run at the same hardware frequency: 0
CPUs which need to have their frequency coordinated by software: 0
maximum transition latency: Cannot determine or is not supported.
hardware limits: 400 MHz - 5.00 GHz
available cpufreq governors: performance powersave
current policy: frequency should be within 400 MHz and 5.00 GHz.
The governor "powersave" may decide which speed to use
within this range.
current CPU frequency: Unable to call hardware
current CPU frequency: 1.42 GHz (asserted by call to kernel)
boost state support:
Supported: yes
Active: yes
intel_pstate is very conservative. Even if I set the governor to performance, all cores are very slowly pacing, keeping the CPU package temperature under 60°C under the full load of every core. I usually get much better results with Schedutil governor, for which I have to disable intel_pstate. How? What am I missing?
I am sorry, but I don’t think you read my message carefully. I posted the actual kernel command line that was used during the boot process. You might have assumed that I’ve done the previous steps correctly, since whatever magic was used with grub, it probably was correct (and thus irrelevant) because the intel_pstate=disable parameter was passed to the kernel.
I’ve done that ( mkinitcpio -P is absolutely useless in this case, btw). The parameter is being passed to the kernel command line.
intel_pstate is not a loadable module, you cannot blacklist it, the maximum you can do with udev is change the governor or some other parameters of intel_pstate. You cannot entirely disable it with udev.
My question is: why intel_pstate=disable passed to the kernel has no effect? Can you answer this?
My hypothesis would be that presently the kernel hasn’t implemented any alternative to intel_pstate for my CPU (12th Gen Intel Core i9) yet, and, thus, even if you pass intel_pstate=disable, the kernel simply ignores it and loads intel_pstate anyway.
create a file “99-governor-rules.rules” and store it in /etc/udev/rules.d
## ACTION TO DO WHEN ON BATTERY
SUBSYSTEM=="power_supply", ACTION=="change", ENV{POWER_SUPPLY_ONLINE}=="0", ENV{POWER}="off", ENV{DISPLAY}=":0", ENV{XAUTHORITY}="/home/YOURUSERNAME/.Xauthority", RUN+="/usr/bin/cpupower frequency-set --governor ondemand"
## ACTION TO DO WHEN ON CHARGER
SUBSYSTEM=="power_supply", ACTION=="change", ENV{POWER_SUPPLY_ONLINE}=="1", ENV{POWER}="on", ENV{DISPLAY}=":0", ENV{XAUTHORITY}="/home/YOURUSERNAME/.Xauthority", RUN+="/usr/bin/cpupower frequency-set --governor performance"
Setting intel_pstate=passive did help to get schedutil governor available. Strangely, cpufreq.default_governor=schedutil didn’t work, but I could set the governor after login. However, schedutil didn’t solve the main issue: the performance is still low, something keeps the CPU temperature under 57 °C (strange number, maybe whoever wrote the configuration was an American and thought of 135 °F?). This is another issue, though, so I mark this topic as resolved and will continue digging.
P.S. A funny consequence of this issue is that on this machine, Linux is faster running inside a VirtualBox from Windows than on the real hardware.