Difference between revisions of "How to make ACPI work"
(→using SoftwareSuspend2: - moved stuff to Software Suspend 2.) |
(Moved swsusp to own page) |
||
Line 76: | Line 76: | ||
==Suspend to disk (Hibernate)== | ==Suspend to disk (Hibernate)== | ||
There are two drivers for this available: | There are two drivers for this available: | ||
− | * swsusp, which is in the kernel and | + | * [[swsusp]], which is in the kernel and |
− | * [ | + | * [[Software Suspend 2]] which is more feature rich, but not yet in the kernel, so you have to patch it in yourself |
Both are reported to work fine as long as you use open-source graphic drivers. A comparison of the features can be found on [http://softwaresuspend.berlios.de/features.html this page]. | Both are reported to work fine as long as you use open-source graphic drivers. A comparison of the features can be found on [http://softwaresuspend.berlios.de/features.html this page]. | ||
Line 83: | Line 83: | ||
===using swsusp=== | ===using swsusp=== | ||
− | + | See [[swsusp]]. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
===using Software Suspend 2=== | ===using Software Suspend 2=== | ||
− | |||
See [[Software Suspend 2]]. | See [[Software Suspend 2]]. | ||
Revision as of 18:07, 6 February 2006
Contents
general
Kernel configuration
First of all you'll have to enable ACPI support in your kernel (if your distro doesn't already have an ACPI enabled kernel). To do this open your kernel config and enable ACPI Power Management:
- Power management options → <*>Power Management support (CONFIG_PM)
- Power management options → <*>ACPI (CONFIG_ACPI_SLEEP)
You'd most likely want to enable the following ACPI options:
- Power management options → ACPI → <*>Sleep States (CONFIG_ACPI_SLEEP)
- Power management options → ACPI → <*>AC Adapter (CONFIG_ACPI_AC)
- Power management options → ACPI → <*>Battery (CONFIG_ACPI_BATTERY)
- Power management options → ACPI → <*>Fan (CONFIG_ACPI_FAN)
- Power management options → ACPI → <*>Processor (CONFIG_ACPI_PROCESSOR)
- Power management options → ACPI → <*>Thermal Zone (CONFIG_ACPI_THERMAL)
If you prefer editing your .config file directly, you should set at least the following variables:
CONFIG_PM=y CONFIG_ACPI_BOOT=y CONFIG_ACPI_INTERPRETER=y CONFIG_ACPI_SLEEP=y CONFIG_ACPI_SLEEP_PROC_FS=y CONFIG_ACPI_AC=y CONFIG_ACPI_BATTERY=y CONFIG_ACPI_BUTTON=y CONFIG_ACPI_FAN=y CONFIG_ACPI_PROCESSOR=y CONFIG_ACPI_THERMAL=y CONFIG_ACPI_BUS=y CONFIG_ACPI_EC=y CONFIG_ACPI_POWER=y CONFIG_ACPI_PCI=y CONFIG_ACPI_SYSTEM=y
Then recompile your kernel.
IBM specific ACPI driver
Unfortunately, special drivers for ACPI on ThinkPads were not included with kernels prior 2.6.10. So you'll have to compile one yourself or get it as precompiled module for your kernel.
You have the choice between thinkpad-acpi and ibm-acpi, with the latter being the recommended one.
If you use a post-2.6.10 kernel and you want to use ibm-acpi, it is recommended to look on its projects page for a possibly newer version.
ACPI daemon
Also you'll need to install acpid, if it isn't present on your system. acpid is a daemon that handles the ACPI events generated by the system. Read How to configure acpid.
Screen blanking (Standby)
Make sure you have
Option "DPMS"
in the Monitor section of your /etc/X11/XF86Config or /etc/X11/xorg.conf.
Running $ xset +dpms
and then $ xset dpms force off
will turn off the backlight on a laptop screen.
Note that this may not work in combination with $ echo -n "mem" > /sys/power/state
because switching to console causes the backlight to come back on before sleeping.
Suspend to RAM (Sleep)
ACPI Sleep/suspend-to-ram with recent 2.6.x kernels usually works fine. Have a look at the acpid configuration HOWTO. It includes a specific example for going to sleep on lid close.
The following glitches may or may not occur in relation to suspending to RAM:
- If your suspend is failing, and a
# tail /var/log/acpid
shows "Permission denied" errors, be sure that your new ACPI event and action scripts have the appropriate permissions. - When resuming from a suspend-to-ram the display might remain black or might only show the pre-suspend output (the system is still rebootable via ctrlaltdel). Look here for solutions.
- When your system is equiped with a Radeon Mobility graphic controller your LCD backlight may not turn off automatically. Use radeontool to switch off your backlight prior suspend in your sleep action script.
- Also, you might want to take note of the Problem with high power drain in ACPI sleep.
- You may experience problems when using
# echo standby > /sys/power/state
or# echo mem > /sys/power/state
(machine goes to sleep and wakes up immediately). This can be avoided by using# echo -n 3 >/proc/acpi/sleep
to get it to sleep. This can be also happen if hotplug daemon is still running. - If you're running MySQL, sleep may also not work, so stop MySQL first, then sleep. Remember to restart MySQL when you wakeup.
- Problems with the serial port of the port replicator after the wake up from ram have also been experienced.
- Crash on resume
- ...when using ATI proprietary drivers can be solved by using vbetool. Note that this is no longer necessary with recent revisions of the ATI proprietary driver.
- ...might be solved by disabling APIC (@Processor type and features) in the kernel configuration
- ...when using Savage chipset, might be solved by disabling savagefb (or compiling as a module) in favor of vesafb
- Due to the fact that Sonoma chipset based laptops (R52, T43, T43p, X41, X41 Tablet) utilize the SATA layer for disk access and SATA does not have power-management support yet Suspend to RAM does not work on these machines. See the according section on the Problems with SATA and Linux page.
- There is a known Problem regarding battery info after suspend to RAM. A small patch exists for kernels 2.6.1[4|5] http://www.ussg.iu.edu/hypermail/linux/kernel/0511.0/2429.html
Suspend to disk (Hibernate)
There are two drivers for this available:
- swsusp, which is in the kernel and
- Software Suspend 2 which is more feature rich, but not yet in the kernel, so you have to patch it in yourself
Both are reported to work fine as long as you use open-source graphic drivers. A comparison of the features can be found on this page.
Just in case you are in doubt...yes, it is safe in both cases to use the same swap partition as active swap and as suspend partition.
using swsusp
See swsusp.
using Software Suspend 2
See Software Suspend 2.
ThinkPads on which it is recommended to use ACPI
- ThinkPad 770X, 770Z
- ThinkPad A20m, A20p, A20m, A20p, A21e, A21m, A21p, A22e, A22m, A22p, A30, A30p, A31, A31p
- ThinkPad G40, G41
- ThinkPad R30, R31, R32, R40, R40e, R50, R50e, R50p, R51, R52
- ThinkPad T20, T21, T22, T23, T30, T40, T40p, T41, T41p, T42, T42p, T43, T43p
- ThinkPad X20, X21, X22, X23, X24, X30, X31, X32, X40, X41, X41 Tablet
- ThinkPad TransNote