[ltp] ACPI dock/undock events?

David Abrahams linux-thinkpad@linux-thinkpad.org
Mon, 28 Apr 2008 15:53:19 -0400


Stephan Groß wrote:
> On Montag, 25. Februar 2008, Henrique de Moraes Holschuh wrote:
> 
> Hello David,
> 
>> On Sun, 24 Feb 2008, David Abrahams wrote:
>>> on Sun Feb 24 2008, Henrique de Moraes Holschuh <hmh-AT-hmh.eng.br> wrote:
>>>> On Sun, 24 Feb 2008, David Abrahams wrote:
>>>>> support, I've been unable to find an ACPI event that will tell me that
>>>>> I've docked or undocked.  Is there such an event hiding somewhere? 
>>>>> I'd
>>>> Yes.  Look at uevents, using udev.
>>> Hey, thanks.  I just barely got the hang of ACPI -- can you give any
>>> more details?
> 
> I am running two ThinkPads (X61T and X41T) with Fedore 8. To support my 
> docking station I added a config file 98-docking.rules to /etc/udev/rules.d:
> 
> ---------------------------------8<--------------------------------
> # /etc/udev/rules.d/98-docking.rules
> #
> # Handle docking events
> #
> KERNEL=="dock.0", RUN+="docking.sh"
> ---------------------------------8<--------------------------------

First, thank you both for responding, and I'm sorry that it's taken me
so long to follow up on this.  Second, this isn't working for me with
Ubuntu Hardy (kernel 2.6.24-16-generic).  udev does appear to be working
in general; events show up in its log.  However, even when install the
above rules and I set the logging level to "debug" in udev.conf, nothing
shows up when I press the undock button.  The only thing I /do/ notice
is lines like this in /var/log/syslog:

Apr 28 15:11:49 mcbain kernel: [   76.886368] ACPI: \_SB_.GDCK - undocking
Apr 28 15:25:47 mcbain kernel: [   52.232789] ACPI: \_SB_.GDCK - docking
A

which appears to mean that ACPI knows about the docking events.  Is
there any way to hook these?

Thanks again,

-- 
Dave Abrahams
Boost Consulting
http://boost-consulting.com