Bug 5035 - ibm_acpi hotkeys for ThinkPad 600X
Summary: ibm_acpi hotkeys for ThinkPad 600X
Status: CLOSED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Platform (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Borislav Deianov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-09 08:53 UTC by Jochen Hein
Modified: 2010-10-08 18:17 UTC (History)
3 users (show)

See Also:
Kernel Version: 2.6.13-rc6
Tree: Mainline
Regression: ---


Attachments
enable specific hotkey driver as default (725 bytes, patch)
2005-08-12 00:31 UTC, Luming Yu
Details | Diff
ibm-acpi-0.12 (replaces drivers/acpi/ibm_acpi.c) (44.13 KB, text/plain)
2005-08-16 23:38 UTC, Borislav Deianov
Details
dmesgs from loading ibm_acpi and trying Fn-Fx keys (2.27 KB, application/octet-stream)
2006-03-27 12:58 UTC, Sanjoy Mahajan
Details

Description Jochen Hein 2005-08-09 08:53:58 UTC
Distribution: Debian/sarge
Hardware Environment: IBM Thinkpad R40

Problem Description:

I use the following in my startup scripts:
echo "Enable Thinkpad Hotkeys for ACPI"
test -f /proc/acpi/ibm/hotkey && echo enable > /proc/acpi/ibm/hotkey

with 2.6.13-rc6 there is no file /proc/acpi/ibm/hotkey, but the documentation
in Documentation/ibm-acpi.txt still refers to that file.

Relevant dmesg:
# dmesg | grep ibm
ibm_acpi: Using generic hotkey driver
Comment 1 Sanjoy Mahajan 2005-08-09 21:37:55 UTC
I have the same problem (TP 600X) with 2.6.13-rc6.  Earlier 2.6.13-rc kernels I
compiled with the generic hotkey driver as a module (same problem), so for this
one I didn't include the generic hotkey driver.  Either way I get this error: 

# modprobe ibm_acpi
FATAL: Error inserting ibm_acpi
(/lib/modules/2.6.13-rc6/kernel/drivers/acpi/ibm_acpi.ko): No such device

The ibm_acpi module used to work for me (kernel 2.6.11.4), but that may have
been because I had used the most recent version (at the time) from the project's
website.  Or maybe something happened in the kernel code.
Comment 2 Luming Yu 2005-08-12 00:31:38 UTC
Created attachment 5613 [details]
enable specific hotkey driver as default
Comment 3 Sanjoy Mahajan 2005-08-12 09:30:20 UTC
The patch improves matters for me.  modprobe ibm_acpi' still produces

FATAL: Error inserting ibm_acpi
(/lib/modules/2.6.13-rc6-2612-with-preempt+work\around+hotkey+ec_burst/kernel/drivers/acpi/ibm_acpi.ko):
No such device

but dmesg shows 

 nsutils-0961 [01] ns_get_node_by_path   : \/^D_SB_PCI0ISA_EC__, AE_NOT_FOUND
 nsutils-0961 [01] ns_get_node_by_path   : \/^D_SB_PCI0LPC_EC__, AE_NOT_FOUND
ibm_acpi: ec object not found

A few months ago I saw that same last line about ec object not found, which the
author of ibm_acpi.c solved by sending me v0.10f (the kernel has 0.8), which
worked well with 2.6.11.4.  I just tried to compile 0.11 (against 2.6.13-rc6)
from the project's website, but it doesn't compile.  I'll sort that out soon or
ask the author.  Meanwhile here's the compile error when running 'make' after
unpacking the source:

make -C
/lib/modules/2.6.13-rc6-2612-with-preempt+workaround+hotkey+ec_burst/build
SUBDIRS=/usr/src/ibm_hotkey/ibm-acpi-0.11 modules
make[1]: Entering directory `/usr/src/linux-2.6.13-rc6'
  CC [M]  /usr/src/ibm_hotkey/ibm-acpi-0.11/ibm_acpi.o
/usr/src/ibm_hotkey/ibm-acpi-0.11/ibm_acpi.c:1756: error: conflicting types for
`device_add'
include/linux/device.h:326: error: previous declaration of `device_add'

Changing acpi_device to device in line 1755 gets rid of that error, and then it
compiles only with warnings.  Not sure if the warnings are worth worrying about
(haven't tried using the module yet).  Here are the warnings:

  CC [M]  /usr/src/ibm_hotkey/ibm-acpi-0.11/ibm_acpi.o
/usr/src/ibm_hotkey/ibm-acpi-0.11/ibm_acpi.c:1756: warning: static declaration
for `device_add' follows non-static
/usr/src/ibm_hotkey/ibm-acpi-0.11/ibm_acpi.c: In function `register_driver':
/usr/src/ibm_hotkey/ibm-acpi-0.11/ibm_acpi.c:1773: warning: assignment from
incompatible pointer type
Comment 4 Len Brown 2005-08-15 13:52:24 UTC
per bug 4953, the patch in comment #2 has been applied to-linus
and thus the orignal comment and comment #1 should be taken care of.

Assigning this to Boris to deal with comment #3.
Comment 5 Borislav Deianov 2005-08-16 23:38:21 UTC
Created attachment 5655 [details]
ibm-acpi-0.12 (replaces drivers/acpi/ibm_acpi.c)

Please try the attached version. It's basically 0.11 with the compilation
error fixed. It's been submitted for inclusion in 2.6.14 (see
http://bugzilla.kernel.org/show_bug.cgi?id=4947#c5 )
Comment 6 Sanjoy Mahajan 2005-08-17 10:03:23 UTC
Tested against 2.6.13-rc6-git8 (TP 600X with hacked DSDT including a hotkey fix
from you -- see the dsdt at Bug #4989).  

The v0.12 compiles and loads fine, but not more.  fn-F4 produces in /var/log/acpid:

[Wed Aug 17 12:56:19 2005] received event "button/sleep SLPB 00000080 00000001"
[Wed Aug 17 12:56:19 2005] completed event "button/sleep SLPB 00000080 00000001"

And fn-F7 blanks the screen.  But no other hotkeys do anything, and no hotkey
produces an HKEY msg.
Comment 7 Borislav Deianov 2005-08-17 10:50:10 UTC
Hi Sanjoy,

I believe your issue is specific to the TP 600X and can be resolved
with a DSDT change. I'll contact you by email with some ideas.

Boris 
Comment 8 Len Brown 2005-09-02 22:55:29 UTC
So comment #1 and comment #3 are now resolved,
and the remaining issue is comment #6
which is specific to the 600X hotkeys.

updating summary from a regression to
"ibm_acpi hotkeys for ThinkPad 600X"
and un-resolving.
Comment 9 Sanjoy Mahajan 2005-09-02 23:23:37 UTC
> the remaining issue is comment #6 which is specific to the 600X
> hotkeys.

Specific to the substandard DSDT that IBM included with the 600X...

And Borislav sent me fixes for it, so now the hotkeys work mostly fine.
I haven't tested it enough to say "totally fine" but I didn't find
any immediately problems.

Hopefully ibm_acpi v0.12 will go into the mainline kernel.

Comment 10 Adrian Bunk 2006-03-26 05:45:11 UTC
Kernel 2.6.16 contains ibm_acpi 0.12a.

Is any part of this bug still present in 2.6.16?
Comment 11 Jochen Hein 2006-03-26 07:43:19 UTC
My originaly reported problem is solved.
Comment 12 Sanjoy Mahajan 2006-03-27 12:58:07 UTC
Created attachment 7689 [details]
dmesgs from loading ibm_acpi and trying Fn-Fx keys

I have 2.6.16-rc5 handy, which also has v0.12a.  It's the vanilla 2.6.16-rc5
with a vanilla DSDT.  Mostly it doesn't work.  I've attached the dmesgs from
loading ibm_acpi, enabling it, and then trying Fn-Fx keys and watching
/var/log/acpid.  No key produced any output in /var/log/acpid, and only Fn-F7
had any effect at all (blanked the screen).

Borislav sent me DSDT fixes for an earlier ibm_acpi and they worked, but I'm
now of the view, learnt from Len Brown, that I should leave the DSDT alone if
possible.  Is there a way that ibm_acpi can work around the half-baked DSDT on
the 600X?  Also, the dmesgs attached show strange node names being accessed,
like in this line:

\/_SB_PCI0ISA_EC0_, AE_NOT_FOUND
Sorry for the garbage chars, but that's what it is in the dmesgs.  Maybe the
strange names are part of the problem, or symptomatic of it?
Comment 13 Len Brown 2007-03-07 22:56:12 UTC
> My originaly reported problem is solved.

closed.

Note You need to log in before you can comment on or make changes to this bug.