[ltp] Re: Fn+F5 woes again - solved

Yves-Alexis Perez linux-thinkpad@linux-thinkpad.org
Fri, 13 Nov 2009 11:48:48 +0100


Yves-Alexis Perez a écrit :
> Yves-Alexis Perez a écrit :
>> On dim., 2009-11-08 at 20:35 +0100, Bjørn Mork wrote:
>>> Yves-Alexis Perez <corsac@debian.org> writes:
>>>> On dim., 2009-11-08 at 10:08 +0100, Bjørn Mork wrote:
>>>>> This is Debian specific, but I need to let some frustations out
>>> before
>>>>> filing a bug.  Again...
>>>>>
>>>>> Due to great help from Henrique and others in this forum, I've had
>>> Fn+F5
>>>>> working the way I want it to for some time now (toggling bluetooth
>>> on
>>>>> and off).  But it stops working with the Debian hal version
>>> 0.5.13-4,
>>>>> and I can't find a way to get it working again except by
>>> downgrading to
>>>>> 0.5.13-3 
>>>> It might be X301 specific, because on my T61, using hal 0.5.13-4,
>>> Fn+F5
>>>> works fine.
>>> I got a hint from the hal maintainer to look at
>>>   /usr/share/doc/udev/README.keymap.txt
>>> which I don't have as I'm running the udev from lenny (0.125-7+lenny3
>>> to
>>> be exact).
>> Uh, then yes, maybe the unconsistent install explains it. I run full
>> unstable here.
>>> But that might explain the difference.  Are you using udev from
>>> unstable?
>>> Then I guess this is mostly a missing update of the hal dependency on
>>> udev.  The newest version probably requires udev >= 146-?
>>>
>>>
>>>> Well, in fact I'm remapping Fn+F5 to toggle bluetooth and Fn+F6 to
>>>> toggle wlan, with:
>>>>
>>>> cat /etc/hal/fdi/policy/thinkpad-acpi.fdi
>>>> <match key="info.product" string="ThinkPad Extra Buttons">
>>>>   <append key="input.keymap.data"
>>> type="strlist">0x04:bluetooth</append> <!-- Fn+F5 bluetooth -->
>>>>   <append key="input.keymap.data" type="strlist">0x05:wlan</append>
>>> <!-- Fn+F6 wifi -->
>>>> </match>
>>>>
>>>> and it works fine (with rfkill-input loaded, indeed)
>>> I don't seem to have rfkill-input anymore, but there is something
>>> still
>>> reacting to the rfkill...  That's another change I've been wondering
>>> about: 
>>>
>>> bjorn@nemi:~$ ls -l /lib/modules/2.6.31-1-amd64/kernel/net/rfkill/
>>> total 44
>>> -rw-r--r-- 1 root root 43997 2009-10-24 20:13 rfkill.ko
>>>
>>> It's there in 2.6.30-2-amd64:
>>>
>>> bjorn@nemi:~$ ls -l
>>> /lib/modules/2.6.30-2-amd64/kernel/net/rfkill/rfkill-input.ko 
>>> -rw-r--r-- 1 root root 14001 2009-09-26 00:23
>>> /lib/modules/2.6.30-2-amd64/kernel/net/rfkill/rfkill-input.ko
>>>
>>> Are you still using an older kernel, or is my installation missing
>>> something? 
>> No, you're right, I don't have any rfkill-input, but I guess rfkill does
>> the job. Not exactly sure
>>
> 
> Ok, now after some hal-related problem I had to reboot, and now:
> 
> - bluetooth is on by default (I already reported that, since quite some
> time, but it seems the resolution is stalled :/ )
> - Fn+F5 doesn't do anything anymore. I still have the correct fdi file
> in hal folders, but when running lshal -m it seems to send a Button
> pressed = wlan while I asked it to send bluetooth.
> 

Ok, after looking at
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=555050 it seems that
now you have to do the remapping in udev instead of hal.

Which means:
- do the job again;
- no more xml, yeah!;
- can't put stuff in /etc to override /lib, you have to do that in /lib,
which sucks

Basically, I edited /lib/udev/keymaps/module-lenovo, replaced 0x04 wlan
by 0x04 bluetooth, added 0x05 wlan and saved. Then you have to modprobe
-r thinkpad-acpi and modprobe thinkpad-acpi and it seems to work fine here.

Cheers,
-- 
Yves-Alexis