April 15, 2014
 
 
RSSRSS feed

Power Management on Linux, Part 2

Five Degrees of Laptop Off

  • April 17, 2008
  • By Carla Schroder
In part 1 of this series we learned how to measure how much power our systems are using, both hardware and software, and some tricks for reducing power usage without degrading performance. Today we're going to dive into the world of power management on laptops: ACPI, APM, hard disk spindowns, and spinups.

Power management on laptops is all about squeezing out more battery time. It's a losing battle as laptops get more powerful and use bigger displays. For example, my old Thinkpad R32 runs for three hours on a charge, even on wireless. My shiny new dual-core T61 lasts a bit under two hours. The new machine is brighter and faster, and it has a magnesium roll cage. (Oo la la, like a race car.) Modern laptops with wide glossy screens are lucky to get ninety minutes.

You can get more battery time by dimming the screen, and mobile CPUs can be configured to run slower on battery. So sticking with an old slow dim machine might be a good option, because you get the same effect with no work.

Managing interruptions is a common problem for laptop users. Shutting down and starting up again takes time and eats power. And so we have a confusing array of not-really-off options:

  • Standby
  • Suspend
  • Sleep
  • Hibernate
  • Off itself, which as we learned in part 1 is usually sort of off and not really off
These terms are not used in a consistent fashion, so here are the official ACPI (Advanced Configuration and Power Interface) sleep states:
  • S1--On Linux this is usually called "standby." The CPU goes into an idle state and processor caches are flushed. All devices are still powered, the screen blanks, and any other device that is configured to enter an idle state can do so.
  • S2--This is included in the ACPI specification, but it's rarely used.
  • S3--Suspend to RAM. The contents of the CPU registers are flushed to RAM and the CPU shuts down. Everything should shut down except RAM, including networking.
  • S4--Suspend to disk, or hibernate. The current state is written to hard disk, and there should not be any devices drawing power, except for wake-on-LAN network interfaces.
Computers wake up quickly from the S1 and S3 modes, and you pick up right where you left off. These modes are vulnerable to power interruptions; you will lose any unsaved work. It takes longer to wake up from hibernate, your last state is saved to disk, and it uses the least power.
Sitemap | Contact Us