First, check whether you already have cpu frequency scaling enabled by running cpufreq-info:
cpufrequtils 004: cpufreq-info (C) Dominik Brodowski 2004-2006
Report errors and bugs to firstname.lastname@example.org, please.
analyzing CPU 0:
CPUs which need to switch frequency at the same time: 0
hardware limits: 600 MHz - 1.70 GHz
available frequency steps: 1.70 GHz, 1.40 GHz, 1.20 GHz, 1000 MHz, 800 MHz, 600 MHz
available cpufreq governors: conservative, userspace, powersave, ondemand, performance
current policy: frequency should be within 600 MHz and 1.70 GHz.
The governor “ondemand” may decide which speed to use
within this range.
current CPU frequency is 600 MHz (asserted by call to hardware).
cpufreq stats: 1.70 GHz:4.56%, 1.40 GHz:0.18%, 1.20 GHz:0.00%, 1000 MHz:0.21%, 800 MHz:0.18%, 600 MHz:94.86% (10)
If you do not have an output like the one above, you need to configure your cpufreq-stuff. If you do not have cpufreq-info installed, run
apt-get install cpufrequtils sysfsutils
Afterwards, you have to load your cpu scaling manager. I usually use acpi_cpufreq:
Afterwards, you need to decided the policy manager. See this previous entry for more information.
You can use cpufreq_ondemand for example:
Finally, you have to enable the frequency scaling by enabling the governor:
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
To make things permanent, you can run:
echo acpi_cpufreq >> /etc/modules
echo cpufreq_ondemand >> /etc/modules
echo “devices/system/cpu/cpu0/cpufreq/scaling_governor = ondemand” >> /etc/sysfs