While I can't replicate the actual suspend problem on my X201 running
current Natty, I confirm that the pm-utils hook doesn't immediately
release the module, as writing to the file in /proc is not synchronous.
Adding some debugging output to the hook reveals:

=== before ===-
--- /proc/acpi/ibm/bluetooth ----
status:         enabled
commands:       enable, disable
--- rfkill ---
0: tpacpi_bluetooth_sw: Bluetooth
        Soft blocked: no
        Hard blocked: no
1: tpacpi_wwan_sw: Wireless WAN
        Soft blocked: no
        Hard blocked: no
2: phy0: Wireless LAN
        Soft blocked: no
        Hard blocked: no
10: hci0: Bluetooth
        Soft blocked: no
        Hard blocked: no
--- lsmod ---
btusb                  18600  2 

=== after ===-
--- /proc/acpi/ibm/bluetooth ----
status:         disabled
commands:       enable, disable
--- rfkill ---
0: tpacpi_bluetooth_sw: Bluetooth
        Soft blocked: yes
        Hard blocked: no
1: tpacpi_wwan_sw: Wireless WAN
        Soft blocked: no
        Hard blocked: no
2: phy0: Wireless LAN
        Soft blocked: no
        Hard blocked: no
10: hci0: Bluetooth
        Soft blocked: no
        Hard blocked: no
--- lsmod ---
btusb                  18600  2 

=== after 0.5 s ===-
--- /proc/acpi/ibm/bluetooth ----
status:         disabled
commands:       enable, disable
--- rfkill ---
0: tpacpi_bluetooth_sw: Bluetooth
        Soft blocked: yes
        Hard blocked: no
1: tpacpi_wwan_sw: Wireless WAN
        Soft blocked: no
        Hard blocked: no
2: phy0: Wireless LAN
        Soft blocked: no
        Hard blocked: no
--- lsmod ---
btusb                  18600  0 

I. e. merely sleeping for 0.5 seconds after writing the proc file helps.
I'll write a better hook which waits for the module to get unused.

** Bug watch added: freedesktop.org Bugzilla #33759
   http://bugs.freedesktop.org/show_bug.cgi?id=33759

** Also affects: pm-utils via
   http://bugs.freedesktop.org/show_bug.cgi?id=33759
   Importance: Unknown
       Status: Unknown

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/698331

Title:
  thinkpad T410: Bluetooth not getting disabled on suspend

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to