Back to article

Power Saving for the Workstation, Part 1

Making It Work

July 27, 2007

Ordinarily, the only place you see these programs are in laptops and the methods should work on laptops, and there are many places to go for information on the specialized laptop tweaks and GNOME and KDE laptop configuration options.

But in an age of global warming and increasing costs per KWh, saving power on workstations by putting them to sleep when not in active use is a good idea, too. Unfortunately, this is not a part of the default Linux installation, at least not in Debian. Worse, the available methods for putting a Linux computer to sleep are considered experimental, so if you can't get anything you see here to work reliably and stably, don't trust your data to it.

Before trying this, do a complete backup. Also get a copy of Knoppix burned to CD so you can boot your computer and access your configuration files in case your energy conservation attempt turns your computer into a brick. These are "best practices" at any time.

Suspend/Hibernate provides similar functionality to the Windows OS suspend/hibernate options. Suspend means 'save the current machine state to RAM and shut down or put into reduced power states as much computer hardware as possible, restore on the first keyboard or mouse event)' , hibernate means 'save the current machine state to hard disk, power down, when machine is next powered up, reboot and reload the stored machine state from disk. Suspend-to-RAM takes seconds to suspend and restore, hibernate is somewhat faster than an ordinary reboot, but the real advantage is taking up exactly where you left off.

While I believe that this is something that should be completely setup out of the box as it was in Windows back in the 98SE days, it isn't. Here is what to do about it. It's running on my workstation as I write this.


In the case of hibernate, it takes you all the way back to your desktop, bypassing login. If this is a problem for you, setting a boot password in BIOS would do the trick. For suspend-to-RAM, set the screensaver to go on before the automatic suspend to RAM does, and set a password within it. When the computer comes up, it'll go to a password prompt.

They provide a power-saving partial shutdown by powering down the HD and optional parts of the motherboard and putting the CPU into a low-power mode when available. They usually operate when the computer has been idle from a user viewpoint, i.e. no keyboard or mouse activity for xx minutes with xx set by default or by user.

System Configuration

Biostar GeForce 6100 AM2 (nvidia chip set)
IDE HDs. (SATA/RAID available)
Athlon 64 x2 4200
Kernel: 2.6.18-4k7 (32 bit)
Debian Etch (stable)/Lenny (testing)
KDE 3.5.7 window manager (what's here should work in GNOME--but it's untested)

A note regarding Debian: KDE doesn't seem to completely recognize the default ACPI installation, and given what happens every time I try to add programs that involve it, I decided to work around the problem instead of installing the acpi software to work with the acpid daemon in the default installation. This may come up if you attempt to install some of the programs that didn't work for me.

Note regarding kernel versions: scripts may have to be modified as of kernel 2.6.21, for more information, read this Linux kernel mailing list article. Or alternately, the hibernate scripts that my monitor script points at may work without change, the PM_SUSPEND that will replace SOFTWARE_SUSPEND should work correctly with the corresponding version of hibernate, though it is possible that the hibernate-ram script may be renamed or work differently. I won't know until I upgrade to that kernel version. But I really don't expect it to make a difference to the user. I mention it to provide a heads-up for people whose hibernate/suspend setup suddenly quits after a kernel upgrade.

Sitemap | Contact Us