Prolong Your Battery Life






Prolong Your Battery Life

Throttle your CPU, dim your display, and slow your hard drive to conserve precious battery power.

GNOME has a built-in CPU-frequency-monitor applet that will show you the current speed of your processor. This is great for laptops that have CPUs that can support dynamic frequency scaling. Additionally, the same applet will also let you alter the processor-speed governors and/or lock in the speed at a fixed frequency. This will let you override the built-in processor-speed governors for maximum performance or maximum battery life, depending on your needs at the time. This isn't overclocking or anything that's possibly damaging to your CPU; rather, this will let you use the built-in SpeedStep or other CPU-throttling techniques to their maximum.

This hack does not work for Transmeta-equipped CPUs with LongRun technology. However, Ubuntu does have longrun and other tools available via apt-get for these processors.


To be able to switch CPU speeds, you must set the cpufreq-selector program to be suid root:

[email protected]:~$ sudo chmod +s /usr/bin/cpufreq-selector
         

This may be a slight security issue. If there is a vulnerability in cpufreq-selector, anyone who exploits it has the potential to get root access on the machine. See "Manage Security Updates" [Hack #68] for information on keeping up-to-date with the latest security fixes.


Once you've done this, enable the CPU Frequency Monitor if you don't have it running already. Right-click on your top GNOME panel and select "Add to Panel." Then select the CPU Frequency Monitor applet from the list and click on Add. The applet will appear in your panel. At this point, you can left-click on the applet and adjust the current CPU speed governor. If you right-click on the applet and select Preferences, you can change the menu that's displayed from Governors to "Frequencies and Governors." After setting this, you'll be able to tailor your CPU speed for any situation you may encounter (see Figure).

The CPU Frequency Monitor in action


Your choice of Governor puts some constraints on your CPU speed choices. If you want to be able to specify the CPU speed yourself, choose the userspace governor, and then select the desired speed from the Frequencies menu. The ondemand and conservative governors adjust the speed based on demand, but conservative won't raise the CPU speed as quickly as ondemand. The performance and powersave governors will keep the CPU speed at either the maximum or minimum.



 Python   SQL   Java   php   Perl 
 game development   web development   internet   *nix   graphics   hardware 
 telecommunications   C++ 
 Flash   Active Directory   Windows