Launchpad has imported 3 comments from the remote bug at https://bugs.freedesktop.org/show_bug.cgi?id=33759.
If you reply to an imported comment from within Launchpad, your comment will be sent to the remote bug automatically. Read more about Launchpad's inter-bugtracker facilities at https://help.launchpad.net/InterBugTracking. ------------------------------------------------------------------------ On 2011-01-31T06:12:10+00:00 Martin Pitt wrote: (Original bug at https://launchpad.net/bugs/698331) The 49bluetooth hook disables /proc/acpi/ibm/bluetooth but this isn't synchronous, i. e. it doesn't wait until the module usage count actually drops to 0. Due to that, it's impossible to add btusb to SUSPEND_MODULES (on some models/older kernels you need to do that to fix suspend problems), as at that point the module is still in use. To demonstrate that, I added some logging to the hook: ==== before: ===== --- /proc/acpi/ibm/bluetooth ---- status: enabled commands: enable, disable --- rfkill list --- 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 writing /proc/acpi/ibm/bluetooth ==== --- /proc/acpi/ibm/bluetooth ---- status: disabled commands: enable, disable --- rfkill list --- 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 As we can see, /proc/acpi/ibm/bluetooth got updated, but both rfkill as well as the module usage count are still active. === after sleep 0.5 ==== --- /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 Now it disappeared from rfkill and the module usage count dropped to 0. I'll write a better hook which waits for the module to get unused. Reply at: https://bugs.launchpad.net/ubuntu/+source/pm- utils/+bug/698331/comments/4 ------------------------------------------------------------------------ On 2011-01-31T06:33:16+00:00 Martin Pitt wrote: Created attachment 42750 patch against git head What do you think about this? Reply at: https://bugs.launchpad.net/ubuntu/+source/pm- utils/+bug/698331/comments/5 ------------------------------------------------------------------------ On 2018-06-29T19:57:20+00:00 Ajax-a wrote: pm-utils hasn't been touched in eight years, none of this is likely to get addressed. Closing bugs and disabling the bz product. Reply at: https://bugs.launchpad.net/ubuntu/+source/pm- utils/+bug/698331/comments/22 ** Changed in: pm-utils Status: Confirmed => Won't Fix -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to pm-utils in Ubuntu. https://bugs.launchpad.net/bugs/698331 Title: thinkpad T410: Bluetooth not getting disabled on suspend Status in pm-utils: Won't Fix Status in pm-utils package in Ubuntu: Fix Released Status in pm-utils source package in Lucid: Fix Released Status in pm-utils source package in Natty: Fix Released Bug description: Binary package hint: pm-utils I discovered this in Lucid, and verified the behavior still exists in natty. /usr/lib/pm-utils/sleep.d/49bluetooth attempts to disable bluetooth using echo disable > /proc/acpi/ibm/bluetooth. Under normal operating conditions, this command seems to work, when run by hand: # rfkill list 1: phy0: Wireless LAN Soft blocked: no Hard blocked: no 2: tpacpi_bluetooth_sw: Bluetooth Soft blocked: no Hard blocked: no 4: hci0: Bluetooth Soft blocked: no Hard blocked: no # lsmod | grep ^btusb btusb 18600 2 # echo disable > /proc/acpi/ibm/bluetooth # rfkill list 1: phy0: Wireless LAN Soft blocked: no Hard blocked: no 2: tpacpi_bluetooth_sw: Bluetooth Soft blocked: yes Hard blocked: no # lsmod | grep ^btusb btusb 18600 0 Note that after disabling bluetooth in this manner, rfkill no longer even lists hci0, and the btusb usage count dropped from 2 to 0. However, when this is called from /usr/lib/pm- utils/sleep.d/49bluetooth, during a suspend, this does not appear to be working. I patched 49bluetooth to look like this: rfkill list lsmod | grep ^btusb echo "Disabling Bluetooth" echo disable > /proc/acpi/ibm/bluetooth rfkill list lsmod | grep ^btusb After suspending with this code in place, I get the following output in pm-suspend.log: Running hook /usr/lib/pm-utils/sleep.d/49bluetooth suspend suspend: 1: phy0: Wireless LAN Soft blocked: no Hard blocked: no 2: tpacpi_bluetooth_sw: Bluetooth Soft blocked: no Hard blocked: no 6: hci0: Bluetooth Soft blocked: no Hard blocked: no btusb 18600 2 Disabling Bluetooth 1: phy0: Wireless LAN Soft blocked: no Hard blocked: no 2: tpacpi_bluetooth_sw: Bluetooth Soft blocked: yes Hard blocked: no 6: hci0: Bluetooth Soft blocked: no Hard blocked: no btusb 18600 2 Note that, while tpacpi_bluetooth_sw: Bluetooth is soft blocked, hci0 still exists and is not blocked. In addition, btusb still has a usage count of 2. For some reason, using /proc/acpi/ibm/bluetooth to disable bluetooth during suspend isn't working, and the module is still in use. I would like to try unloading btusb during suspend, using SUSPEND_MODULES, as I believe it may be causing suspend problems, but due to this inability to disable bluetooth during suspend, the module remains in use, and cannot be unloaded. To manage notifications about this bug go to: https://bugs.launchpad.net/pm-utils/+bug/698331/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp