[ltp] Re: Bluetooth button not working after installing Debian 2.6.29 kernel

Henrique de Moraes Holschuh linux-thinkpad@linux-thinkpad.org
Fri, 17 Apr 2009 23:06:42 -0300


On Fri, 17 Apr 2009, Bjørn Mork wrote:
> Henrique de Moraes Holschuh <hmh@hmh.eng.br> writes:
> > You should never need that, thinkpad-acpi already issues input events,
> > at most you need to use a simple HAL .fdi file to set, e.g.,
> > KEY_BATTERY on fn+f3.
> 
> You can?  Even with keys which are not reported by xev at all?  I find

Sure.  The reason you don't see them in xev is because X's crappy idea of
a key event is so limited that evdev discards anything above 255 well
before it reaches Xev.

The moment you remap all positions to keycodes below 255, they will show
up in Xev.  Except for brightness up/down and volume up/down/mute, which
have other stuff behind them (firmware, opregion bios/kernel/x.org
interface, whatever).

> the hal un(der)-documented magic, while I do have a nicely working setup
> based on acpid.  Adding the above will make that continue to work with
> CONFIG_ACPI_PROC_EVENT disabled.

Hal already HAS .fdi files to do such remappings, just look at
/usr/share/hal/fdi/./information/10freedesktop/30-keymap-module-thinkpad-acpi.fdi,
modify to taste, and place it wherever in /etc hal wants it to override
its defaults.

> And BTW, mapping to an X key is only half the solution to replace acpid
> functionality.  What is the recommended utility for mapping key events
> to some script nowadays?  I'm using xbindkeys at the moment to bind keys
> like XF86ScreenSaver (which is correctly mapped from Fn+F2 by hal).

Right now you need something in X, yes.  No, I don't like it.  But I also
don't have the time to go add functionality to HAL right now.

> I am sure you're right.  The data above were based on observed values
> from the thinkpad_acpi driver in Debian's 2.6.29 kernel.  When pushing
> Fn+F5 I get:

I removed any semblance of KEY_RADIO from thinkpad-acpi a long time ago
(i.e. before 2.6.23), so something else is crapping that keymap.  Like
some old stuff in a forgotten HAL config file in /etc somewhere?  New HAL
packages certainly don't map anything to KEY_RADIO.  Or maybe it is
hotkey_setup...

> > Those hotkey events are input events, they will be sent to the input layer
> > (thinkpad-acpi input device) excusively when the legacy reporting over
> > procfs is gone.
> 
> Yes, and Debian's acpid is patched to use netlink.  The patch uses the
> static table shown above to map input events to "fake" acpi events.

I see.  Well it turns acpid into a input event processor.  A stopgap
measure at most, acpid is for acpi events, not input events.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh