How to make ACPI work on a ThinkPad T23

From ThinkWiki
Revision as of 11:56, 26 January 2006 by UnixNut (Talk | contribs) (ACPI)
Jump to: navigation, search

This page deals with installing and running Gentoo Linux (2005.1) on a ThinkPad T23, Model 2647-4MG.

Basic installation

The default kernel (2.6.12-r6) boots OK, and recognises all the devices (modem not tested).

ACPI

Getting software suspend working requires some tweaking.

First of all, update to the latest BIOS and Embedded Controller Program.

# dmesg will probably tell you that ACPI isn't enabled in the BIOS, because the T23 BIOS has no mention of ACPI. Just add lapic to the kernel arguments in /etc/lilo.conf or /boot/grub/menu.lst.

After that, you will probably get a lot of ACPI error messages, generally of the form AE_NOT_EXIST. Those can be fixed by recompiling your DSTD. To do just that, get the Intel iasl compiler source from their site and compile it. It should build without troubles. De- and re-compile the DSDT. If it gives errors or remarks, try fixing them as best as you can. Then load the new DSDT on boot with the kernel's "Custom DSDT" option.

Now # dmesg should show that the ACPI had found the ECDT and enabled the interpreter and you should find a full set of ACPI entries under /proc.

Done that, verify that the ibm-acpi driver is enabled by issuing # ls /proc/acpi/ibm/*. If you see files in this directory, everything is alright. If the directory couldn't be found, you will have to enable ibm-acpi in your kernel config (as builtin or module) and recompile your kernel.

The next step is configuring acpid, which handles the ACPI buttons through scripts in /etc/acpi.

To try if suspend to ram workd, press FnF4 or issue a # echo -n mem >/sys/power/state.

Resume problem

If your system doesn't resume from sleep after that, use the power button to switch it off and restart. To solve the issue, try disabling S3 framebuffer support in your kernel config and recompile your kernel. Should that not be enough, try unloading suspicious drivers such as USB in your suspend script and reloading them on resume.

If all that doesn't help, build a monolithic kernel having everything you need builtin and only minimal options enabled. If it works with that kernel, start reenabling other options step by step.

Button events

By default, ACPI seems to handle three button events only - the Power button, the Suspend key (FnF4) and the lid event. FnF3 (Screen blank) will need extra configuration, as well as FnF12 (Suspend to disk) (look [[How to make ACPI work#Suspend to disk (Hibernate)|here}}). FnF7, (Switch to video) at least blanks the LCD.

FnHome (LED brighter), FnEnd (LED dimmer), FnPgUp (Screen light) will work without any further effords, since they are not handled by the ACPI subsystem.

When the machine is running, the lid switch blanks the screen when pressed and restores on release, but if the machine is suspended pressing the switch does nothing and releasing it brings the machine out of suspend mode.

Commands echoed to eg: /proc/acpi/ibm/light can be mixed with the appropriate keypresses (here, FnPgUp) without problems.

Frequency Scaling

The CPU (Pentium IIIM) has power management but not throttling, and doesn't at the moment change speed automatically. There must be a way around this, but since the CPU has only two speeds it's easier to use a shell script to flip between the performance and powersave kernel governors; everything needed can be found in the /sys/devices/system/cpu/cpu0/cpufreq directory.

UltraBay LED stays lid

The Bay LED wrongly stays lit even when in suspend to ram mode, but the most recent (1.1) ibm-acpi module provides an ACPI LED device which controls most of the LEDs (the Bay LED is 4), so you can switch it off in your suspend script.

Resume

With the CPU on low speed (if it matters) and the LED off the power consumption in Suspend mode is around 580mW.

It looks as if the software to control full ACPI functionality has only stabilised within the middle of 2005, so if you have problems, try upgrading to IBM's latest BIOS and EBIOS, and a kernel >=2.12. With luck, the next version or so of the S3 driver will be free of its hang problem.