[solved] Change default CPU governor

Hello everyone, I seems to have a problem finding out where exactly the default CPU governor is set in the system.
There are tons of ways to change CPU governor at runtime, but I’d like to permanently change my governor from ondemand to schedutil and can’t find a way to do so.
Is it something set in the kernel at compile time?

use a system startup script?

The only way that I know of to change the government before runtime is to manually compile your kernel with the desired governor.

Yes.
If you run make menuconfig, it’s under Power management and ACPI options → CPU Frequency scaling → Default CPUFreq governor
(CPU_FREQ_DEFAULT_GOV_*)

Keep in mind that a lot of distributions have packages for utilities that can automatically set a CPU governor at boot(cpufreq-utils or cpupower).
Saves you the trouble of recompiling.
(On some low-end hardware you can get a slighly lower boot time by setting a CPU-governor at kernel time - I’ve seen this in some embedded systems, but I doubt a mordern-ish desktop system will benefit from it, as the boot process should be mostly IO-bound.)

3 Likes

@TheVault It was more educational question, rather than practical :slight_smile:

@anon75264233 yeah, that’s what I thought

@max1220 thanks a lot for detailed response. I wasn’t really looking for boot speed boost, more got confused, why Fedora is using ondemand rather than schedutil for Ryzen-based installations again.