LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 12-19-2004, 01:17 PM   #1
zero79
Member
 
Registered: Nov 2003
Location: Ohio
Distribution: Debian Unstable
Posts: 460

Rep: Reputation: 30
Post Enabling power save/power management/cpu freq scaling features for a Debian system


Hi,

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 also...you 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

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

Code:
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

Code:
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

Code:
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

Code:
acpi
cpufreq_userspace
cpufreq_powersave
speedstep_lib
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.

Code:
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 confusing...it 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!

Last edited by zero79; 12-19-2004 at 01:34 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
cpu freq. scaling problem sonis Linux - Laptop and Netbook 4 04-25-2005 07:24 AM
Power-Off Safety Features? Brett-NZ Linux - Newbie 3 03-09-2005 09:39 AM
cpu freq. scaling problem sonis Suse/Novell 3 01-12-2005 05:04 PM
Power Management(sysfs) /sys/power/state mavrick613 Linux - General 0 05-24-2004 03:04 PM
Cpu power scaling SlackinMonkeee Slackware 1 02-07-2004 02:12 PM


All times are GMT -5. The time now is 09:28 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration