ACPI/Configuration

Configure the kernel
Compile your kernel with ACPI enabled.

The default kernel comes with this already enabled. To check if you have ACPI compiled and enabled, see if the directory /proc/acpi/ exists. If not, in your kernel enable the following:

Install acpid
The tools for ACPI are found under.

Note: As of linux 2.6.23, you will need to manually enable the deprecated /proc/events/acpi option in the kernel. See previous section for kernel configuration.

Running acpid
You can turn it on using:

To have it start up when you start the machine, add it to the default runlevel:

If you add any config files while ACPI is running you have to restart it to reload the rules

Configuration
Following are some configuration file examples for setting up ACPI after it is emerged. Remember to make the scripts executable:

This is only recommended to use on laptops. It will hibernate the computer if it is not connected to AC power supply. On most PCs the required file /proc/acpi/ac_adapter/AC/state does not exist. There might be also issues with the graphics card on some machines, even on laptops. If you've opened a SSH connection to your computer and called hibernate-ram in it. It will shutdown completely. If you press the power-button, you can proceed in your SSH connection but you don't get anything displayed on your monitor - everything else is working fome (according to lspci, etc.).

The following script requires the package "hibernate-script":

This will set your computer to the standby-mode. There aren't high power savings. On this machine, I've got a power saving of 20% compared to idle mode. Note: Your LAN connection will possibly break, so that you cannot use SSH during standby-mode. It's better to shutdown the computer to hibernate as it will save more power. You can wake up your computer from standby-mode through pressing the power-button. Again, this script should only be used if you really have a laptop as it relies on ACPI-events that report the battery status which do not exist on PCs.

Power
This script will be executed when pressing the power-button of your computer. It should be also working on PCs with ACPI-support. This script implements three power-modes:


 * Standby (S1)
 * Suspend to disk
 * Shutdown

The default is standby. Suspend to disk is not working on most of the computers, use standby or shutdown in this case instead. If you want to use shutdown, note that you will not be able to proceed with your session. It will shutdown your computer completely. If you want to proceed with your work, use standby or suspend to disk instead, if available.

Applying changes
Having saved the scripts to disk, you need to reload the configuration. See the "Run" section how to do so. See also


 * The power management guide will help you reducing the power consumption of your laptop
 * HOWTO Automatically turn off your monitor
 * Fix common ACPI problems
 * Troubleshooting ACPI
 * The Scripts Category on the ThinkWiki has some good ACPI scripts.
 * TuxOnIce


 * http://www.gentoo-wiki.info/ACPI/Configuration