Setting CPU governor to on demand or conservative

I’m struggling with cpupower on ArchLinux. I want to set governor to ondemand or even to conservative.

First if I do $ sudo cpupower frequency-info --governors, I only get performance powersave.

So I look for available modules like this

ls -1 /lib/modules/`uname -r`/kernel/drivers/cpufreq/

…and I get

acpi-cpufreq.ko.gz
amd_freq_sensitivity.ko.gz
cpufreq_conservative.ko.gz
cpufreq_powersave.ko.gz
cpufreq_stats.ko.gz
cpufreq_userspace.ko.gz
p4-clockmod.ko.gz
pcc-cpufreq.ko.gz
powernow-k8.ko.gz
speedstep-lib.ko.gz

So, first of all no modules for “ondemand” seems to be available. What do I miss?

Then I try to enable at least conservative:

$ sudo modprobe cpufreq_conservative

then I check the module is actually loaded

$ lsmod | grep cpufreq

and check if it is now avaliable

$ sudo cpupower frequency-info --governors

but unfortunately I still get the same: performance powersave only,
and if I try to enable conservative

$ sudo cpupower frequency-set -g conservative

It says that the module is not avaliable.

So basically I have two questions:

  1. What do I need to install in order to have ondemand module
  2. How can I enable it?

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

Assuming your governor is the intel_pstate (default for Intel Sandy Bridge and Ivy Bridge CPUs as of kernel 3.9). This issue is not specific to Arch, but all distros using the new Intel pstate driver for managing CPU frequency/power management. Arch linux CPU frequency scaling.


Theodore Ts’o wrote his explanation on [Google+],(dead link)2:

  • intel_pstate can be disabled at boot-time with kernel arg intel_pstate=disable
  • The problem with the ondemand governor is that it doesn’t know the specific capabilities of the CPU
  • Executing some tasks with higher frequency will consume less power than would a lower frequency taking more time e.g. arithmetic stuff, but not true for all tasks e.g. loading something from memory
  • The intel_pstate driver knows the details of the how the CPU works and it does a better job than the generic ACPI solution
  • intel_pstate offers only two governors, powersave and performance. Intel claims that the intel_pstate “powersave” is faster than the generic acpi governor with “performance”

To change back to the ACPI driver, reboot and set the kernel arg intel_pstate=disable
Then execute modprobe acpi-cpufreq and you should have the ondemand governor available.

You can make the changes permanent by editing /etc/default/grub and adding

GRUB_CMDLINE_LINUX_DEFAULT="intel_pstate=disable"

And then updating grub.cfg ala grub-mkconfig -o /boot/grub/grub.cfg

Follow the instructions for Arch kernel module loading
and add the acpi-cpufreq module.


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x