-   Debian (
-   -   Enabling power save/power management/cpu freq scaling features for a Debian system (

zero79 12-19-2004 01:17 PM

Enabling power save/power management/cpu freq scaling features for a Debian system

This is a quick doc on how to get the most power-wise from your Debian 3.1 (Sarge) or newer system with a 2.6 Linux kernel (these packages may be available for Woody can try it, but be aware that you need a 2.6 kernel). I got a reasonable boost in battery life on my laptop using this. Moderator, I suggest this be stickied as I think it is very useful.

First of all, open a terminal and become root


and type in your root/administrator password. If you don't have a 2.6 kernel, you can install it now by simply doing


apt-get instal kernel-image-2.6.8-1-386
Note that newer kernels may be available (2.6.8 is the newest on Sarge at the time of this writing). Also, you may want to install a kernel optimized for your processor specifically. For example, if you have a Pentium II or better, replace 386 with 686, or if you have an Athlon, replace 386 with k7. After the installation is completed, you need to reboot your system so that you are in the new kernel. Note that the only time you ever need to reboot a Linux system is if you update or upgrade the kernel.

Now, lets get started with installing power management features. You need to load a few modules into the kernel, so do


modprobe acpi cpufreq_userspace cpufreq_powersave
acpi is the Advanced Configurable Power Interface (a more advanced hardware power control than the stock Debian APM, Advanced Power Management). cpufreq_userspace allows user control of the processor frequency. cpufreq_powersave enables the kernel to use processor power saving features.

Now you need to load the cpu frequency scaling module for your specific processor. You must choose one of 7 modules (powernow-k6, powernow-k7, or powernow-k8 for AMD processors; speedstep-lib, speedstep-centrino, speedstep-ich, or speedstep-smi for Intel processors). I, for example, have an older Pentium IV M processor, and I load the module with


modprobe speedstep-lib
If you have a newer centrino laptop, then you probably want to replace speedstep-lib with speedstep-centrino. If you choose the wrong module, you will get a message that says that it can't be loaded, so just try the other ones until you find the correct one for your system.

Now that we know all of the modules that we need, we want to set them up so that they are loaded into the kernel at every boot. Open up /etc/modules with your favorite editor (i did gedit /etc/modules) and add the following at the end



where you should replace speedstep-lib with the kernel module that worked on your system.

Finally, we want to install the software that will actually intelligently use these modules to enhance power efficiency.


apt-get install acpid powernowd gnome-cpufreq-applet
acpid is a service that controls ACPI features. powernowd intelligently scales the cpu frequency for optimal power usage (note that the name of this app is sort of sounds like the AMD-specific PowerNow! technology, but it works for both AMD and Intel cpus). If you use the GNOME desktop environment, the gnome-cpufreq-applet is a nice utility that lets you monitor and control the cpu frequency. to add it to GNOME, right-click on a panel and select Add to Panel, scroll through the list and Add CPU Frequency Scaling Monitor. Note that you can only control the frequency through this applet if you opt to install the package with suid. If you missed that during the install above, just do dpkg-reconfigure gnome-cpufreq-applet.

Thats it! You should now have a power efficient beast of a FOSS system. Congratulations! :D

All times are GMT -5. The time now is 08:55 AM.