CPU Frequency Scaling
From ArchWiki
| i18n |
|---|
| English (SpeedStep) |
| Deutsch (SpeedStep) |
| Français (SpeedStep) |
| English (PowerNow) |
| Русский |
| 简体中文 |
| Español |
| Português |
CPU Frequency Scaling is a technology primarily for notebooks that enables the OS to scale the CPU speed to system and/or power use. For instance, slowing down the CPU when a notebook is on battery power, saves battery life. Intel calls this technology SpeedStep.The equivalent AMD technology is called PowerNow! or Cool'n'Quiet.
[edit] Steps
1. Install cpufrequtils
# pacman -S cpufrequtils
2. Load kernel module
Intel:
# modprobe acpi-cpufreq
AMD:
# modprobe powernow-k{6,7,8}
3. Load scaling governor(s)
# modprobe cpufreq_ondemand # modprobe cpufreq_powersave
To load everything automatically at startup, add the appropriate drivers to the MODULES array within /etc/rc.conf. For example:
MODULES=( acpi-cpufreq cpufreq_ondemand cpufreq_powersave vboxdrv fuse fglrx iwl3945 ... )
4. Edit /etc/conf.d/cpufreq as root, selecting the desired governor:
#configuration for cpufreq control # valid governors: # ondemand, performance, powersave, # conservative, userspace governor="ondemand" # valid suffixes: Hz, kHz (default), MHz, GHz, THz min_freq="1GHz" max_freq="2GHz"
Note: the min_freq and max_freq lines can be commented out, as the kernel driver should see your values automatically. To ensure it does run
# cpufreq-info
and check the output.
5. Start the cpufreq daemon:
# /etc/rc.d/cpufreq start
Add cpufreq to the DAEMONS list in /etc/rc.conf.
6. (Optional) Install and setup a GUI tool in your desktop environment. For KDE there is KLaptop and KPowersave. The latter is available via AUR and has more features. The devel-version is recommended, as it no longer depends on powersave.
More information can be found on the cpufrequtils page.
Notes for Dual/MultiCore processors:
1. Scaling will only work for the primary cpu0 core. Add these lines to your /etc/rc.local to make all cores scaling.
# echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor # echo "ondemand" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor ...more if needed
2. If the second CPU does not follow the frequency rules after suspend to ram, edit /usr/lib/hal/scripts/linux/hal-system-power-suspend-linux and add the respective line, e.g.
# echo "ondemand">/sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
before the final line ("exit $RET").
[edit] Other resources
cpufrequtils - info for advanced users