ACPI

To get ACPI working, you have to install opt/acpid. It comes with a script called /etc/acpi/default.sh which binds ACPI events to actions. If you take a look at it, you'll see that the event reported by the ACPI daemon called button/powerPWRF, which is generated when you use the power slide above the keyboard, leads to /sbin/init 0, which turns of the computer. Using this as an example, you can define your own event actions. Open a terminal and become root. After that, do:

# /etc/rc.d/acpid start
# tail -f /var/log/acpid


Now start generating ACPI events (close the lid, press a button, but don't slide the power slide, because that will turn off your computer) and note the action code which appears in the message log. Put that in the script along with the command you wish to be executed when that event is generated. More information is in the acpid(8) man page.

One warning: other processes you might have running like hal or klaptop might step in before acpid and take over. I found this out when my Armada went to sleep after I closed the lid without having acpid running. Watch out.

Sleep states

The old way of echoing sleep states to /proc/acpi/sleep is deprecated. The new and improved way of getting the laptop to conserve power when it isn't used, is echoing to the more generic and hardware independent /sys/power/state. To put your Armada in standby (Power-on Suspend) mode, do:

# echo "standby" > /sys/power/state

Standby is the most minimal sleep state. The CPU is kept under power and no operating state is lost, so it comes back up easiest.

# echo "mem" > /sys/power/state

will put the Armada in Suspend-to-RAM mode. Only the memory is kept under power and the rest of the system powers down. You conserve more power, but it takes one or two seconds extra for the system to come back up.

Instead of creating your own /etc/acpi/default.sh, you can download mine from the section called “Files”, which will put your Armada to standby when you press the blue button and Suspend-to-RAM when you close the lid. I like it that way, but since you've read all of the above you can change whatever you like. Read more in power/states.txt in your kernel documentation.

Suspend to disk/hibernate

Suspend to disk completely powers down the laptop and saves the operating state on your swap partition. It doesn't use any power anymore, so this state can be held indefinitely. To get it working add:

append="resume=/dev/<your swap partition>"

to the global options section of your /etc/lilo.conf. Don't forget to type

# lilo

after changing /etc/lilo/conf. You initiate software suspend with:

echo "disk" > /sys/power/state

Saving the operating state takes some time, but after that the machine switches off. When you turn it on again, at a certain point normal booting cuts off and the earlier system state is being restored. This doesn't save you a whole lot of time when you're working from the console, but if you're using KDE, using software suspend instead of powering down will bring up your Armada much faster.

Sleep state entering and exiting times for my Armada from KDE

sleep state

enter

exit

Power-on Suspend (standby)

4.3 s

12.1 s

Suspend to RAM

5.4 s

13.2 s

Suspend to disk

1:07.2

1:59.5