[ltp] Bluetooth hotkey problem with T41

Mlundgre linux-thinkpad@linux-thinkpad.org
Sat, 11 Aug 2007 01:40:29 +0300 (EEST)


Marius Gedminas wrote:
>
> This is on Ubuntu systems, if you have a different distro, your mileage
> may vary.
>
> 1. Create a file /etc/acpi/events/ibmbluetooth with the following
> content:
>
>     # /etc/acpi/events/ibmbluetooth
>     # This is called when the user presses Fn-F6 button and calls
>     # /etc/acpi/bluetooth.sh for further processing.
>
>     event=ibm/hotkey HKEY 00000080 00001006
>     action=/etc/acpi/bluetooth.sh
>
> 2. Create a file /etc/acpi/bluetooth.sh with the following content, and
> make it
> executable with chmod +x:
>
>     #!/bin/bash
>     # Enable/disable builtin Bluetooth on IBM Thinkpads
>
>     if grep -q enabled /proc/acpi/ibm/bluetooth; then
>         echo disable > /proc/acpi/ibm/bluetooth
>     else
>         echo enable > /proc/acpi/ibm/bluetooth
>     fi
>
> 3. Make sure ibm-acpi does not mask Fn-F6 presses by editing
> /etc/modprobe.d/ibm_acpi.modprobe and changing the hotkey mask so it
> looks like this:
>
>     options ibm_acpi hotkey=enable,0xffbf experimental=1
>
> Ubuntu Gutsy has /etc/modprobe.d/thinkpad_acpi.modprobe instead.  Also,
> Gutsy doesn't load it by default; I had to add 'thinkpad_acpi' to
> /etc/modules.
>
> 4. Reboot.  Now Fn-F6 should toggle Bluetooth.
>
> I just tested this on my new T61, and it works, with one caveat: the
> Bluetooth LED stays off for some reason.
>

Thanks for the extensive instructions. I'll try these instructions after
weekend with my T41 + Ubuntu 7.04.

>
> The log to check is /var/log/acpid.  You should see something like this:
>
> [Sat Aug 11 00:05:00 2007] received event "ibm/hotkey HKEY 00000080
> 00001006"
> [Sat Aug 11 00:05:00 2007] notifying client 6605[0:0]
> [Sat Aug 11 00:05:00 2007] executing action "/etc/acpi/bluetooth.sh"
> [Sat Aug 11 00:05:00 2007] BEGIN HANDLER MESSAGES
> [Sat Aug 11 00:05:00 2007] END HANDLER MESSAGES
> [Sat Aug 11 00:05:00 2007] action exited with status 0
> [Sat Aug 11 00:05:00 2007] completed event "ibm/hotkey HKEY 00000080
> 00001006"
>

Following listing appears to the /var/log/acpid log after pressing Fn+F5
hotkey. Can anyone say is there any anomalies in the log events?

[Sat Aug 11 01:36:30 2007] received event "ibm/hotkey HKEY 00000080 00001005"
[Sat Aug 11 01:36:30 2007] notifying client 4503[107:114]
[Sat Aug 11 01:36:30 2007] notifying client 4671[0:0]
[Sat Aug 11 01:36:30 2007] executing action "/etc/acpi/ibm-wireless.sh"
[Sat Aug 11 01:36:30 2007] BEGIN HANDLER MESSAGES
[Sat Aug 11 01:36:30 2007] END HANDLER MESSAGES
[Sat Aug 11 01:36:30 2007] action exited with status 0
[Sat Aug 11 01:36:30 2007] completed event "ibm/hotkey HKEY 00000080
00001005"

BR,
Mika-Petteri Lundgren