PowerManagement

Differences between revisions 3 and 4
Revision 3 as of 2008-07-02 10:22:57
Size: 3411
Editor: p5B034CE5
Comment:
Revision 4 as of 2008-07-02 12:29:47
Size: 3436
Editor: p5B034CE5
Comment:
Deletions are marked like this. Additions are marked like this.
Line 10: Line 10:
They make those kind of hard events like the end of battery power or the pressing of the suspend button available to our software world. They make those kind of "hard" events like the end of battery power or the pressing of the suspend button available to our software world.
Line 16: Line 16:
The package '''acpi-support''' provides a set of such scripts under /etc/acpi that deal with handling special acpi keys on laptops. The package '''acpi-support''' provides a set of such scripts under /etc/acpi that deal with handling special acpi buttons on laptops.
Line 20: Line 20:
The '''gnome-power-manager''' is a program with a graphical user interface that subscribes itself to power events and acts on them. It shows you the battery status on laptops and dimms down the screen if on battery for example. But it will also shutdown or hibernate the computer after some idle time or before the battery runns out. The '''gnome-power-manager''' is a program with a graphical user interface that subscribes itself to power events and acts on them. It shows you the battery status on laptops and dimms down the screen if on battery for example. It will also shutdown or hibernate the computer after some idle time or before the battery runns out, if a user is logged in.

The different parts of power management

Foremost there is the apm and acpi support in the linux kernel.

They make those kind of "hard" events like the end of battery power or the pressing of the suspend button available to our software world.

Then there are event manager deamons apmd and acpid

They provide means to execute commands on these external events. They run the scripts they find in their config directory tree unter /etc/acpi, or /etc/apm respectively.

The package acpi-support provides a set of such scripts under /etc/acpi that deal with handling special acpi buttons on laptops.

The package pm-tools provides the pm-action, pm-hibernate, pm-suspend and pm-suspend-hybrid commands. They allow to trigger hard power management events by software. The pm-tools also provide script directories to hook-in other software when switching power (saving) states.

The gnome-power-manager is a program with a graphical user interface that subscribes itself to power events and acts on them. It shows you the battery status on laptops and dimms down the screen if on battery for example. It will also shutdown or hibernate the computer after some idle time or before the battery runns out, if a user is logged in.

Disk idleing

A separate task is allowing harddisks to idle, so they can be parked and spun-down for long enough periods of time. This is done by a package that is a little bit misleadingly called laptop-mode-tools but not "disk-idle". Disk idleing has to deal with things like reading ahead and postponeing disk activity. The program got its name from a kernel feature that is called laptop_mode and allows linux to chunk up writes to filesystems and not write in between. But to really let a disk idle one has to manage other parts of the system that are relevant to letting disks idle also, like drive parameters, mount options, filsystem settings, cache sizes, sync logging programs etc. "laptop_mode" will do all that.

Disk idling is commonly needed, thus laptop-mode enabled, when laptops operate on batteries to extend the battery times. But for example in vehicles with external power supply disk idling may be needed even on AC. Not nessecarily to leave the disk spun down, but to leave the heads parked for shock protection.

Disk spin-down and head parking should not be activated without controlled disk idling. The regular uncoordinated logging or journaling activity may spin up the disks back up almost imediately after spinning down and lead to excessive load cycling.

Power (saving) states

The Common power (saving) states are awake, standby, suspend and hibernate.

During the awake state all components of the computer are running.

During standby the CPU keeps running your programs but some components like the monitor and harddisks may be turned off. When you touch the mouse or keyboard or a harddisk is accessed by software they quickly wake up again.

In both the awake and the standby state the speed of modern CPUs may be throttled down,though. For example if not in use.

During suspend however the CPU ist allways stoped. In modern PCs even all other components exept the RAM memory can be turned off. The RAM will hold the state.

During hibernation the state is written to harddisk and the whole computer is turned off.

PowerManagement (last edited 2010-04-15 11:28:39 by 62-2-76-204)