Bluetooth cannot be disabled on Thinkpad T41p with Fn-F5 (w/Fix)

Bug #26181 reported by Martin Emrich
22
Affects Status Importance Assigned to Milestone
acpi-support (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Hello!

When pressing Fn-F5, the Bluetooth modules gets enabled, but pressing it again
does not disable it in previous versions. Replacing the status query line in
/etc/acpi/ibm-wireless.sh with

state=`perl -e 'open BT,"/proc/acpi/ibm/bluetooth";foreach (<BT>) { if ($_ =~
/enabled/) { print "0"; } } close BT;'`

restores the toggle functionality. (Sorry that its no diff, I did not keep the
original version with the /sys/... query. Maybe some sh/awk/sed pro can rewrite
it w/o using perl).

Ciao

Martin

Revision history for this message
Loic Pefferkorn (loic) wrote :
Revision history for this message
Paul Sladen (sladen) wrote :

This is currently broken because:

  /etc/acpi/wireless.sh

looks for:

  /sys/class/net/eth1/wireless

which doesn't exist with the 'ipw2200' driver. (Does it exist for any other wifi drivers?---If not, checking for it is even more broken.)

Revision history for this message
Loic Pefferkorn (loic) wrote :

I've tested with 2 others pcmcia nics: (on my T43)

-Atheros based (module ath_pci)
Doesn't have /sys/class/net/ath0/wireless

-Ralink 2500 based (module rt2500)
Has /sys/class/net/ra0/wireless, but kernel warns this is deprecated
"ra0 (WE) Driver using old /proc/net/wireless support, please fix driver !"

It looks like a kernel driver level problem ?

Revision history for this message
Paul Sladen (sladen) wrote : ipw2200 power/state

Patching '/etc/acpi/wireless.sh':

--- /etc/acpi/wireless.sh~ 2005-09-02 20:12:42.000000000 +0300
+++ /etc/acpi/wireless.sh 2006-01-16 01:22:18.000000000 +0200
@@ -5 +5,2 @@
- if [ -d $DEVICE/wireless ]; then
+ if [ -d $DEVICE/wireless ] ||
+ grep -qa "^ *$(basename $DEVICE): " /proc/net/wireless; then

fixes that for the moment. But the following command that attempts to put the wireless card to sleep hangs (for the ipw2200):

echo -n 3 > $DEVICE/device/power/state

doing:

modprobe -r ipw2200

works.

Revision history for this message
Paul Sladen (sladen) wrote : check /proc/net/wireless and make ipw2200 use rf_kill=1

Following patch should fix both issues and makes the wifi and bluetooth toggle work as expected on my Thinkpad R52:

  http://www.paul.sladen.org/ubuntu/bugs/acpi-support_0.50-0ubuntu1.debdiff

Revision history for this message
Florian Boucault (fboucault) wrote :

Are you sure that the hack for ipw2200 is still necessary ? It seems to work here.

Revision history for this message
Paul Sladen (sladen) wrote :

I think the power-management code in the kernel has been fixed, so this is a no-op again.

Changed in acpi-support:
status: Unconfirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.