Difference between revisions of "How to make ACPI work"

From ThinkWiki
Jump to: navigation, search
(add back T20 and T21, since there are ACPI success reports for these models.)
(ThinkPads on which it is recommended to use ACPI)
Line 80: Line 80:
 
*ThinkPad {{A20m}}, {{A20p}}, {{A20m}}, {{A20p}}, {{A21e}}, {{A21m}}, {{A21p}}, {{A22e}}, {{A22m}}, {{A22p}}, {{A30}}, {{A30p}}, {{A31}}, {{A31p}}
 
*ThinkPad {{A20m}}, {{A20p}}, {{A20m}}, {{A20p}}, {{A21e}}, {{A21m}}, {{A21p}}, {{A22e}}, {{A22m}}, {{A22p}}, {{A30}}, {{A30p}}, {{A31}}, {{A31p}}
 
*ThinkPad {{G40}}, {{G41}}
 
*ThinkPad {{G40}}, {{G41}}
*ThinkPad {{R30}}, {{R31}}, {{R32}}, {{R40}}, {{R40e}}, {{R50}}, {{R50e}}, {{R50p}}, {{R51}}, {{R52}}
+
*ThinkPad {{R30}}, {{R31}}, {{R32}}, {{R40}}, {{R40e}}, {{R50}}, {{R50e}}, {{R50p}}, {{R51}}, {{R52}}, {{R60}}
 
*ThinkPad {{T22}}, {{T23}}, {{T30}}, {{T40}}, {{T40p}}, {{T41}}, {{T41p}}, {{T42}}, {{T42p}}, {{T43}}, {{T43p}}
 
*ThinkPad {{T22}}, {{T23}}, {{T30}}, {{T40}}, {{T40p}}, {{T41}}, {{T41p}}, {{T42}}, {{T42p}}, {{T43}}, {{T43p}}
 
*ThinkPad {{X20}}, {{X21}}, {{X22}}, {{X23}}, {{X24}}, {{X30}}, {{X31}}, {{X32}}, {{X40}}, {{X41}}, {{X41T}}
 
*ThinkPad {{X20}}, {{X21}}, {{X22}}, {{X23}}, {{X24}}, {{X30}}, {{X31}}, {{X32}}, {{X40}}, {{X41}}, {{X41T}}

Revision as of 20:13, 24 May 2007

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.

Hint:
ACPI SLEEP States option did only show up for me after patching Software Suspend 2 into the kernel. With a vanilla 2.6.17 kernel, one must enable CONFIG_SMP and CONFIG_HOTPLUG_CPU for the option to appear, cf. Debian bug #383059 .

Kernel boot parameters

Many ThinkPads have been hit by a recent (kernel 2.6.16) change to ACPI4Linux that changed the default means of accessing the ACPI Embedded Controller as a way to shake out underlying bugs in the EC access code. If your ThinkPad fails to resume properly (a blinking Sleep light on resume that doesn't go away, or a hang when trying to suspend/standby a second time), adding ec_intr=0 to your kernel command line may help.

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.

Hint:
Generally it is a good idea to read the README included with the driver.

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.

For Troubleshooting, look at the Problems with ACPI suspend-to-ram page.

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.

See the according drivers page for instructions.

ThinkPads on which it is recommended to use ACPI