NetBSD: Fix Thinkpad R61 acpi lid detection


NetBSD 5.99 out of the box don’t detect the closed/open lid in my Thinkpad R61. I  found the solution in this article:

http://forum.thinkpads.com/viewtopic.php?f=32&t=85344

I must say this solution is for T60 and T61, but R61 architecture is pretty similar to those, so it works in mine.

So, first I dump the R61 dsdt:

acpidump -o r61.dsdt
acpi-iasl -d r61.dsdt

Then edit the new ‘r61.dsl’ file generated previously with the second order, and find the string ‘Method (_LID’. Change this routine to be like:

Method (_LID, 0, NotSerialized)
            {
                    Store (^^PCI0.LPC.EC.HPLD, LIDS)
                    XOr (LIDS, One, Local0)
                    If (Local0)                       
                    {
                        Notify (SLPB, 0x80)               
                    }
                    Return (LIDS)
            }

Then compile the new dsl file:

acpi-iasl -tc r61.dsl

Put the ‘r61.hex’ file obtained before in an appropiate place in order to compile the kernel with it. In my case I put it in ‘/usr/src/sys/arch/i386/conf/’. Next edit your kernel configuration file and add the following lines:

options ACPI_DSDT_OVERRIDE
options ACPI_DSDT_FILE=”\”/usr/src/sys/arch/i386/conf/r61.hex\””

Now compile your kernel:

cd /usr/src/sys/arch/i386/conf
config MYKERNEL
cd ../compile/MYKERNEL
make depend
make
cp /netbsd /netbsd.old
cp netbsd /

and reboot. Now your thinkpad T/R60/1 should suspend/resume when lid is open or closed.

About jjjesss

I'm a guy interested in technology, bsd fan and concerned about the world around.
This entry was posted in BSD, NetBSD, Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s