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:
- What do I need to install in order to have ondemand module
- How can I enable it?
2 Answers 2
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. See Arch Linux CPU frequency scaling.
Theodore Ts'o wrote his explanation on Google+:
- 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
andperformance
. 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.
-
First of all, thanks for the explanation. It's clear now. I'll stay with the intel_pstate which now sounds good to me. I'm using tlp for controlling power saving on my laptop. I've set it to use "powersave" in battery mode and "performance" in ac. As "performance" will run the CPU @ its max freq all the time, do you see any issue with this? (i.e. CPU overheating or any other situation that may lead to HW issues)lviggiani– lviggiani06/03/2014 14:21:29Commented Jun 3, 2014 at 14:21
-
I find that in general laptops need to be cleaned regularly, partially disassembled to get compressed air in and blow out the dust, dirt and cat hair. There's no need for performance 100% of the time just because one is on power, usually a good balanced plan will crank up the cpu as needed.bsd– bsd06/04/2014 09:08:15Commented Jun 4, 2014 at 9:08
-
2There's a difference between the generic acpi governor
performance
and intel_pstateperformance
, right? The latter is faster than both the former and intel_pstatepowersave
?tsorn– tsorn02/11/2018 15:50:26Commented Feb 11, 2018 at 15:50 -
Sorry for resurrecting an old thread. I get these results in my machine: <pre><code> cpupower frequency-info analyzing CPU 0: driver: intel_pstate ... available cpufreq governors: performance powersave current policy: frequency should be within 400 MHz and 2.50 GHz. The governor "performance" may decide which speed to use within this range. ... </code></pre> I get from this that running
performance
doesn't mean CPUs are at 100% max frequency all the time. Am I right? And if so, what's the penalty of usingperformance
?Bruno Unna– Bruno Unna02/02/2022 12:02:11Commented Feb 2, 2022 at 12:02
How can anyone assume the guy is asking for help with an Intel CPU when the posting he did: 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
Clearly shows he has an AMD cpu
.... it makes me wonder .....
-
This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From ReviewUriel– Uriel10/11/2022 07:44:11Commented Oct 11, 2022 at 7:44
-
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.10/13/2022 12:44:22Commented Oct 13, 2022 at 12:44
You must log in to answer this question.
Explore related questions
See similar questions with these tags.
sudo cpupower frequency-info
to your question. Drop the--governors
to show full details.