Last revision : Mai 5th, 2007
This article is intended to give general tips on how to properly manage power consumption and its different aspects (CPU frequency management, suspend/resume, and other common functionalities).
While most laptop users should care, any desktop user concerned with the environment (or their electricity bill) might want to put some efforts in this.
Keep in mind that the present tutorial contains only general guidelines and examples : the exact procedure will most likely differ on your machine.
To higher your chances of success, I suggest the use of a recent Linux distribution (like Debian Etch or Ubuntu Edgy), based on a recent Linux kernel (Etch will ship with a 2.6.18 kernel, Ubuntu Edgy ships with a 2.6.17 one : that's about what you need). The instructions posted here have been tested on Debian & Ubuntu.
This is perhaps the main area where you can save energy. Please refer to this tutorial for more.
The X server configuration is equally important. I shall divide this question in 2 aspects : first, optimizations related to CPU/GPU consumption, and second, modifications concerning your machine's ability to suspend/resume properly.
The file to edit here is /etc/X11/xorg.conf (or /etc/X11/XF86Config-4 for Debian Sarge users).
For the energy conservation minded laptop user, a few general guidelines are to be followed. First, always use 16 bit color depth instead of the default 24 (it will render 3D and images about 50% faster, or consume that much less power for about the same visual result). So in Section "Screen", make sure you have this line :
Also, to make proper use of your graphic card memory (as a buffer of images), one might want to use :
Option "backingstore" "true"
in Section "Device".
Also, to make sure hardware rendering is enabled, the line :
Option "RenderAccel" "true"
should be present in Section "Device".
ATI cards users have an extra trick on hands (given the ATI proprietary driver is installed), as this line of code in Section "Device" activates GPU frequency management on their video card :
Option "DynamicClocks" "true"
This option refer to a feature called powerplay (by ATI), which allows you to change GPU clocking of your card on-the-fly (see the Notes section of the present tutorial for more details).
A specific option can help your laptop properly resume from suspend to RAM. The code is :
Option "VBERestore" "true"
which should be included in Section "Device" (again in your /etc/X11/xorg.conf).
For suspend to RAM to work properly, you will need a bit of luck and a bit work.
I personally use Powersave in conjunction with a collection of little subsidiary tools like laptop-mode-tools, hdparm, and others.
So minimally you would need to install those packages :
sudo apt-get install acpi acpid acpi-tools hdparm sdparm laptop-detect laptop-mode-tools powersaved
Also, many users will prefer a graphical front end to manage those utilities : the recommended one for KDE is kpowersave, while GNOME fans have gnome-power-manager.
It is to be noted that for powersaved to work correctly, you need to make your user part of the group powerdev :
sudo adduser your_username powerdev
Obviously this is the tricky part, though in my experience it does work without too much effort on most recent laptops.
The main configuration file for powersaved is /etc/powersave/sleep. Fortunately only a few lines need to be changed, if any.
For example, on my Asus Z63A laptop, 5 lines needed to be changed :
In ideal conditions, no changes at all should be required for the file discussed here (/etc/powersave/sleep). So you might as well try it before hacking it.
You can put your machine in suspend to RAM state by clicking on the battery icon in your system tray, and choosing "suspend". You can resume by (quickly) pressing the power button of your machine.
That's it folks !
If you hesitated on any aspects of the X server configuration, you can check out some working examples I prepared (and tested) :
INTEL card xorg.conf
ATI card xorg.conf using proprietary drivers
NVIDIA card xorg.conf using proprietary drivers
You can verify that a certain feature related to the X server is enabled by looking at the output of
For example, on a properly configured ATI card, the output of
cat /var/log/Xorg.0.log | grep -i dynamic
should look like that :
(**) RADEON(0): Option "DynamicClocks" "on"
(II) RADEON(0): Dynamic Clock Scaling Enabled
As stated earlier, machines equipped with ATI video cards can make use of the powerplay feature, provided the official ATI drivers are installed.
Several powerstates might be available depending of the card's model. This command will give you the complete list :
You can find out more about this specific feature at thinkwiki.org
Wednesday, January 31, 2007
Last revision : Mai 5th, 2007