There are some means to save power when using a computer which are supported by Linux: Advanced Power Management, certain harddisk settings, working without monitor and others.
From the Battery-Powered-mini-HOWTO " .. for APM to work on any notebook or energy-conscious desktop, the system BIOS ROM in the machine must support the APM standard. Furthermore, for APM to work with the Linux operating system, the system BIOS ROM must support either the 1.0 or 1.1 version of the APM standard, and it must also support 32-bit protected mode connections. A system that supports APM 1.1 is preferred, as it provides more features that the device driver and supporting utilities can take advantage of."
You may get information about the APM version with the dmesg
command and in the /proc/apm file.
When you first install Linux, you will probably have to recompile the kernel. The kernel that came with your distribution probably does not have APM enabled.
APM support consists of two parts: kernel support and user-land support.
For kernel support, enable the parameters in the corresponding kernel section. AFAIK not all features work with laptops. AFAIK the feature CONFIG_APM_POWER_OFF
works with most laptops.
The utilities for userland support may be found at WorldVisions. APMD is a set of programs that control the Advanced Power Management system found in most modern laptop computers. If you run a 2.2.x kernel and want to experiment, Gabor Kuti <seasons@falcon.sch.bme.hu> has made a kernel patch that allows you to hibernate any Linux system to disk, even if your computers APM BIOS doesn't support it directly.
Richard Gooch wrote: I'have had a look at the beta version of apmd
, and I still don't like it, because:
sync()
; sleep(0)
; sync()
; sleep(1)
; sequence)
Though this topic was discussed controversly Richard Gooch has put together a package suspendd
at
http://www.atnf.csiro.au/~rgooch/linux/ .
Also, have a look at apmcd
(apm
based crontab) at
ftp://ftp.binary9.net/pub/linux/ . A tool made by Nicolas J. Leon <nicholas@binary9.net>
http://mrnick.binary9.net/.
Note: I didn't check wether this features are merged into one package (apmd
eventually) already.
If you have another operating system preinstalled or use another operating system at the same disk, make sure there is no "hibernation" or "suspend" tool installed, which could severely interfere with Linux, e.g. it might use disk space which is occupied by Linux or vice versa.
If your machine worked with 2.0.x kernels but not with the 2.2.x series, take this advice from Klaus Franken kfr@klaus.franken.de : "The default changed in 2.2. Search in the init-scripts for halt
and change it to halt -p
or poweroff
. See man halt
, if you don't have this option you need a newer version of halt
." You may find it in the SysVinit
package.
Sometimes X windows and APM don't work smoothly together, the machine might even hang. A recommendation from Steve Rader: Some Linux systems have their X server hang when doing apm -s
. Folks with this affliction might want switch to the console virtual terminal then suspend chvt 1; apm -s
as root, or, more appropiately.sudo chvt 1; sudo apm -s
. I have these commands in a script, say, my-suspend
and then do xapmload --click-command my-suspend
.
On some new machines (for instance HP Omnibook 4150 - 366 MHz model) when accessing /proc/apm, you may get a kernel fault general protection fault: f000
. Stephen Rothwell <Stephen.Rothwell@canb.auug.org.au>
http://www.canb.auug.org.au/~sfr/ explaines: "This is your APM BIOS attempting to use a real mode segment while in protected mode, i.e. it is a bug in your BIOS. .. We have seen a few of these recently, except all the others are in the power off code in the BIOS wher we can work around it by returning to real mode before attempting to power off. Here we cannot do this."
The latest standard is ACPI. The ACPI4Linux project has started at the beginning of 1999. The ACPI4Linux project is a kernel driver project aimed at implementing full ACPI support for Linux, including fan control, dock/undock detection and a WindowMaker dockable temperature meter. You may reach it at http://phobos.fachschaften.tu-muenchen.de/acpi/ .
update
daemon, mobile-update
minimizes disk spin ups and reduces disk uptime. It flushes buffers only when other disk activity is present. To ensure a consistent file system call sync
manually. Otherwise files may be lost on power failure. mobile-update
does not use APM. So it works also on older systems.
There are some tools which allow to get information from your computer without using the monitor:
bl
: Blink Keyboard LEDs blinkd
: "Blinks keyboard LEDs for an answering machine or fax machine. Blinkd is a client/server pair, that lets the keyboard LEDs blink, indicating things like the number of incoming voice calls in the voice box or incoming faxes in the spool."
mailleds
: Shows new mails with the keyboard LEDs, mailleds
is a quiet, unobtrusive way to signify that you have new mail: a user daemon to blink LEDs when there is new mail.
tleds
: Blinks keyboard LEDs indicating TX and RX network packets. They blink Scroll-Lock LED when a network packet leaves the machine, and Num-Lock LED when one is received.
Do they only prevent the screen from being burned in or do they save power, too?
Some recommendations from Wade W. Hampton:
Screensavers usually display graphics, look for ETI, or perform other tasks. When using your screensaver in this manner, you may actually consume MORE power. For example a computer using XSETI as a screensaver might get far warmer (hence use more power) than when it was being used to edit a document or perform a compile.
To really save power, and if your X server plus monitor supports it, use the dpms
option of xset
(see the manual page for xset
). For example, to enable the DPMS (Energy Star) features of you X server: xset +dpms
You may also manually change the mode of your X display:
xset dpms force standby xset dpms force suspend xset dpms force off
AFAIK a CRT consumes on the order of 25 percent more power when displaying a plain white screen than displaying a plain black screen. So, a screensaver that's mostly black can help save power, even if it doesn't actually use DPMS to power down the screen. Of course, one that's very bright and colourful, or that keeps the CPU running fast is not much help.
Some screen saver programs:
xscreensaver
is to display pretty pictures on your screen when it is not in use, in keeping with the philosophy that unattended monitors should always be doing something interesting, just like they do in the movies. The benefit that this program has over the combination of the xlock
and xautolock
programs is the ease with which new graphics hacks can be installed: you don't need to recompile this program to add a new display mode, you just change some resource settings. Any program which can be invoked in such a way that it draws on the root window of the screen can now be used as a screensaver without modification. The programs that are being run as screensavers don't need to have any special knowledge about what it means to be a screensaver.LockVC
is a console-locking-program combined with a starfield screensaver. Executing LOCKVC on a virtual console brings up a starfield that starts to rotate around all three axes.
Robert Horn <rjh@world.std.com> wrote: "
I had a chance to discuss Energy Star with the designers of desktop printers. They confirmed that the allowable stand-by power targets depend on the device, and they only knew their targets. But they made some other interesting comments:
This savings is both from individual designs and from the resulting demand for low leakage products causing better and cheaper low leakage product designs. The old-style (e.g. typewriter) design with one motor (always on) and various clutches is no longer the least cost.
Linux halts the CPU in the idle cycle to further reduce power consumption. Early reports of OS/2, Win3.1/95, NT, and Linux showed Linux to use far less power than DOS-based O/S's that spun in the idle loop and consumed power -- this may have changed hence it would need research to validate.
Most Linux-users tend to leave their computer on for years whenever possible. However, several modern BIOS's support an unattended powerup, and with cron
you can even do an unattended shutdown
. No need to leave the computer on night after night.