Chapter 4. Configuring ACPI
ACPI stands for the Advanced Configuration and Power Interface. It is an open standard for unified operating system-centric device configuration and power management.
The ACPI specification defines the following seven states (so-called global states) which an ACPI-compliant computer system can be in:
- G0 (S0) Working
- G1 Sleeping subdivides into the four states S1 through S4.
- S1: All processor caches are flushed, and the CPU(s) stop executing instructions. Power to the CPU(s) and RAM is maintained; devices that do not indicate they must remain on may be powered down.
- S2: The CPU is powered off.
- S3: Commonly referred to as Standby or Sleep. RAM is still powered.
- S4: Hibernation. All content of main memory is saved to non-volatile memory such as a hard drive, and is powered down.
- G2 (S5) Soft Off-- G2, S5, and Soft Off are synonyms. G2 is almost the same as G3 Mechanical Off, but some components remain powered so the computer can "wake" from input from the keyboard, clock, modem, LAN, or USB device.
- G3 Mechanical Off: The computer's power consumption approaches close to zero, to the point that the power cord can be removed and the system is safe for disassembly (typically, only the real-time clock is running off its own small battery).
The ACPI capabilities which are supported depends on your particular hardware/BIOS
setup and on the state of linux support for that hardware. Generally, you can do the following,
- Suspend to RAM (S3 power state)
- Suspend to disk (S4 power state)
Here are some tips if you want to accomplish the ACPI function,
- Enter BIOS setting, set the items below if you have any,
"Repost Video on S3 Resume" -> yes
"Enable Multimedia Timer" -> no
- Set the size of the SWAP partition to be at least 2*(Size of RAM).
- Edit /boot/grub/ment.lst , add "resume=/dev/'your SWAP partition' " at the end of the line beginning with "kernel", and remove the parameter "splash".
- In SLED distributions, you need create a file named "suspend" in /etc/pm/config.d/ and edit it as:
#! /bin/bash
S2RAM_OPTS="-f"
This method equals to using the command line to suspend: $ s2ram -f
If
it doesn't work, try the following variations:
$ s2ram -f -a 3
$ s2ram -f -a 2
$ s2ram -f -p -m
$ s2ram -f -p -s
$ s2ram -f -m
$ s2ram -f -s
$ s2ram -f -p
$ s2ram -f -a 1 -m
$ s2ram -f -a 1 -s
Regarding to the meanings of these options, please refer to the help document of s2ram command.
- Use menu to suspend/hibernate.
Known issues:
To implement ACPI function, the OS is better not reverted from tarball, but originally installed on the target board.
To test ACPI function during playing video through Xv, add -nosound option in command line.
For non-root user, it not proper to switch from console mode using the command "$ startx". Because ACPI function will call the command s2ram/s2disk, or pm-suspend/pm-hibernate, ans these commands ask for root privilege. If you login as a non-root user under console mode and switch to graphics mode using "$ startx", you still has no permission to use these commands. You might need to use "gdm" to login again.