How to apply a custom DSDT to fix continuous lid events

On my Acer Travelmate 8104 wlmi laptop, depressing the lid button (i.e. closing the lid) resulted in continuous ACPI events, causing 100% CPU usage and a flickering screen. (See Continuous ACPI lid events and 100% CPU usage for example of log messages.)

The solution is to apply a custom DSDT, provided by ykzhao via the kernel bug tracker: Bug 10485 - Interrupt storm when lid closed on Acer Travelmate 8104.

A helpful article linked to from the bug tracker explains how to override a DSDT - Linux ACPI FAQ - but it does have some mistakes, so I've written this article to describe exactly how I applied the DSDT.

Warning: Using a custom DSDT involves recompiling the kernel. Don't do this unless you're familiar with the process. Back up your machine beforehand. Follow this guide at your own risk. Etc, etc.

How to apply the custom DSDT

1. Get a copy of your DSDT data:

cp /proc/acpi/dsdt DSDT.dat

2. Disassemble it:

iasl -d DSDT.dat

This will create DSDT.dsl, which is your version of the file provided by ykzhao via the kernel bug tracker (see above).

3. Apply the changes to your DSDT.dsl:

You can not directly use the file provided by ykzhao because it references config local to his machine (inspecting his file, you'll see mention of /home/acpi/10485/rsdt/DSDT.aml, which won't exist on your machine). If you compare your DSDT.dsl with his file, you'll probably see a line has been added to the "Method (_L1B, 0, NotSerialized)" block:

Old:

        Method (_L1B, 0, NotSerialized)
        {
            Notify (\_SB.LID, 0x80)
        }

New:

        Method (_L1B, 0, NotSerialized)
        {
	    Not (LIDP, LIDP)
            Notify (\_SB.LID, 0x80)
        }

Make sure your DSDT.dsl has this new line.

4. Build it:

iasl -tc DSDT.dsl

This will create two new files, DSDT.aml and DSDT.hex.

5. Copy DSDT.hex to a location into your kernel's include directory (e.g. /usr/src/linux/include/):

cp DSDT.hex /usr/src/linux/include/

6. Make changes to your kernel configuration (e.g. /usr/src/linux/.config) so that it reads the custom DSDT:

CONFIG_STANDALONE=n
CONFIG_ACPI_CUSTOM_DSDT=y
CONFIG_ACPI_CUSTOM_DSDT_FILE="DSDT.hex"

7. Compile your kernel (I compiled the modules as well, though I'm not sure this is necessary) by changing to your kernel directory (e.g. /usr/src/linux/) and running make:

cd /usr/src/linux/
make && make modules_install

8. Add the new kernel to your boot config. Since every machine differs, I'll leave this to you. The rough example below shows what I did for my machine (from the /usr/src/linux/ directory):

cp .config /boot/config-linux-2.6.18-gentoo-r6-dsdt
cp arch/i386/boot/bzImage /boot/linux-2.6.18-gentoo-r6-dsdt
vim /boot/grub/grub.conf
--- Add new kernel ---
title Gentoo 2.6.18 gentoo r6 with custom DSDT.
root (hd0,5)
kernel /boot/linux-2.6.18-gentoo-r6-dsdt root=/dev/sda8
----------------------

9. Restart machine with fingers crossed, choosing the new kernel.

References

Last modified: 28/07/2008 Tags: (none)

This website is a personal resource. Nothing here is guaranteed correct or complete, so use at your own risk and try not to delete the Internet. -Stephan

Site Info

Privacy policy

Go to top