Home | Hardware | Internet News |Web Hosting |IT Management |Network Storage
LinuxPlanet
Search 
  Power Search | Tips 

 Front Door
 Discussion
 LinuxEngine
 Opinions
 Reports
 Reviews
 Tutorials
 News
 Technology Jobs

 Browse by subject.
Free Newsletter

Linux Planet
Linux Today
More Free Newsletters

Be a Commerce Partner


















internet.com
IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

Print this article
Email this article

   LinuxPlanet / Tutorials



Power Management on Linux, Part 2
The Easy Way

Carla Schroder
Thursday, April 17, 2008 08:59:18 AM

If you need easy, reliable power management for your laptop then I officially recommend using a Linux distribution that does it correctly out of the box, because trying to set it up from scratch is a heroic undertaking. This includes recent releases of Fedora, Ubuntu, SUSE, and Mandriva, and I'm sure there are more. Fedora has a good configuration menu in the Preferences menu, and the shutdown command includes Suspend and Hibernate. It also suspends or hibernates when you close the lid, and wakes up reliably. Nice and easy just like it should be.

Most modern Linux distributions default to ACPI. You can check your own distribution; this command shows you if your kernel supports ACPI:

$ grep -i acpi_sleep  /boot/config-'uname -r'
CONFIG_ACPI_SLEEP=y
CONFIG_ACPI_SLEEP_PROC_FS=y
CONFIG_ACPI_SLEEP_PROC_SLEEP=y
Or check which daemon is running:
$ ps ax|egrep "apmd|acpi"
 4720 ?   S      0:00 hald-addon-acpi: listening \
               on acpid socket /var/run/acpid.socket
 5239 ?   Ss     0:00 /usr/sbin/acpid -c \
               /etc/acpi/events -s /var/run/acpid.socket

These examples show that ACPI is supported and running.

The laptop-mode-tools package is an interesting tool for configuring your laptop hard drive to save power, plus a few other devices as well, but its main claim to fame is controlling hard drive spin-down. The Linux kernel likes a nice balanced I/O, so your hard drive works at a fairly steady pace. laptop-mode-tools changes this behavior by caching writes for longer periods in memory, then committing writes in bursts. So your hard drive can spin down between bursts, which saves a bit of power. You only want to do this with laptop hard disks, which are built to survive 600,000 or more spinups. Desktop hard drives are rated for up to 50,000 spinups, so using laptop-mode-tools will kill them quickly. 30 seconds to a minute are optimal spindown intervals; anything greater than that doesn't save more power.

laptop-mode-tools is included in Debian and Ubuntu, and packages for other distributions are at Laptop Mode. It integrates itself with ACPI, so it already knows to go to work only when you're on battery power.

Resources

LessWatts.org, everything you'll ever want to know about ACPI
Laptops, power management, and Ubuntu
Battery Powered Linux Mini-HOWTO is a bit dated, but still informative

Carla Schroder is the author of the Linux Cookbook and the newly-released Linux Networking Cookbook, and is a regular contributor to LinuxPlanet.

« Back: Five Degrees of Laptop Off

Skip Ahead

1 Five Degrees of Laptop Off
2 ACPI vs. APM
3 The Easy Way





Linux is a trademark of Linus Torvalds.


internet.com home | search | help! | about us

Jupiter Online Media

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers