What is causing my Intel 7260 bluetooth device to disconnect when I unblock it with rfkill?

SOLUTION: The problem appears to be that the Bluetooth module does not work well with xHCI in Linux. There is a BIOS setting labeled "XHCI PRE-BOOT MODE", which must be set to "Disabled". If it is not, then Linux will treat the Bluetooth module as if it is connected to an xHCI bus instead of an EHCI bus, causing communication errors. HOWEVER, THIS FIX WILL DISABLE USB 3.0 ON YOUR SYSTEM. I do not have a better solution at this moment, but at least this works.

I have a new ASUS UX301LA laptop, and I am running Ubuntu Gnome 13.10 (Saucy). The kernel appears to know about the laptop's bluetooth device at boot, but it disappears whenever I use rfkill to unblock bluetooth. For example:

$ sudo rfkill block bluetooth
$ dmesg | tail -5
[ 2024.876537] usb 2-4: new full-speed USB device number 8 using xhci_hcd
[ 2024.894043] usb 2-4: New USB device found, idVendor=8087, idProduct=07dc
[ 2024.894053] usb 2-4: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 2024.908190] Bluetooth: hci0: read Intel version: 370710018002030d00
[ 2024.908271] Bluetooth: hci0: Intel Bluetooth firmware file: intel/ibt-hw-37.7.10-fw-1.80.2.3.d.bseq
[ 2025.057051] Bluetooth: hci0: Intel Bluetooth firmware patch completed and activated

$ sudo rfkill list
0: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
1: asus-wlan: Wireless LAN
    Soft blocked: no
    Hard blocked: no
2: asus-bluetooth: Bluetooth
    Soft blocked: yes
    Hard blocked: no
3: hci0: Bluetooth
    Soft blocked: yes
    Hard blocked: no

$ sudo hciconfig -a
hci0:   Type: BR/EDR  Bus: USB
    BD Address: XX:XX:XX:XX:XX:XX  ACL MTU: 1021:5  SCO MTU: 96:5
    DOWN 
    RX bytes:568 acl:0 sco:0 events:29 errors:0
    TX bytes:390 acl:0 sco:0 commands:29 errors:0
    Features: 0xff 0xfe 0x0f 0xfe 0xdb 0xff 0x7b 0x87
    Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
    Link policy: RSWITCH HOLD SNIFF 
    Link mode: SLAVE ACCEPT 

$ sudo rfkill unblock bluetooth
$ dmesg | tail -1
[ 2391.749122] usb 2-4: USB disconnect, device number 8

$ sudo rfkill list
0: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
1: asus-wlan: Wireless LAN
    Soft blocked: no
    Hard blocked: no
2: asus-bluetooth: Bluetooth
    Soft blocked: no
    Hard blocked: no

$ sudo hciconfig -a
[no output]

EDIT: The bluetooth device shows up as an Intel 7260 Wireless USB device, ID 8087:07dc. The only information I have found that might be relevant is a bug for which a fix has been issued, mentioned on Launchpad here: Support for Intel 7260 bluetooth [8087:07dc]

EDIT: I updated the firmware to the new 22.1.7.0 version from Intel's website (Saucy ships with 22.0.7.0), and the same issue occurs.

EDIT: Further digging around in the logs shows that the bluetooth USB device is completely disconnected when I run the unblock command:

$ lsusb -d 8087:07dc
Bus 001 Device 007: ID 8087:07dc Intel Corp. 
$ rfkill unblock bluetooth
$ lsusb -d 8087:07dc
[no output]
$ dmesg | tail -1
[  438.284647] usb 1-4: USB disconnect, device number 7

EDIT: Updating the iwlwifi driver to a (newer) backport from the 3.13 kernel does not help. The current version of the driver:

$ modinfo iwlwifi
filename:       /lib/modules/3.11.0-15-generic/updates/drivers/net/wireless/iwlwifi/iwlwifi.ko
version:        backported from Linux (v3.13-rc8-0-g7e22e91) using backports v3.13-rc8-1-0-gae71bd3
license:        GPL
author:         Copyright(c) 2003-2013 Intel Corporation <[email protected]>
version:        in-tree:d
description:    Intel(R) Wireless WiFi driver for Linux
firmware:       iwlwifi-100-5.ucode
firmware:       iwlwifi-1000-5.ucode
firmware:       iwlwifi-135-6.ucode
firmware:       iwlwifi-105-6.ucode
firmware:       iwlwifi-2030-6.ucode
firmware:       iwlwifi-2000-6.ucode
firmware:       iwlwifi-5150-2.ucode
firmware:       iwlwifi-5000-5.ucode
firmware:       iwlwifi-6000g2b-6.ucode
firmware:       iwlwifi-6000g2a-5.ucode
firmware:       iwlwifi-6050-5.ucode
firmware:       iwlwifi-6000-4.ucode
firmware:       iwlwifi-3160-7.ucode
firmware:       iwlwifi-7260-7.ucode
srcversion:     F6C7F0E202757B474065F3B
alias:          pci:v00008086d0000095Asv*sd00005490bc*sc*i*
[... trimmed several "alias" lines ...]
alias:          pci:v00008086d00004232sv*sd00001201bc*sc*i*
depends:        compat,cfg80211
vermagic:       3.11.0-15-generic SMP mod_unload modversions 
parm:           debug:debug output mask (uint)
parm:           swcrypto:using crypto in software (default 0 [hardware]) (int)
parm:           11n_disable:disable 11n functionality, bitmap: 1: full, 2: agg TX, 4: agg RX (uint)
parm:           amsdu_size_8K:enable 8K amsdu size (default 0) (int)
parm:           fw_restart:restart firmware in case of error (default true) (bool)
parm:           antenna_coupling:specify antenna coupling in dB (defualt: 0 dB) (int)
parm:           wd_disable:Disable stuck queue watchdog timer 0=system default, 1=disable, 2=enable (default: 0) (int)
parm:           nvm_file:NVM file name (charp)
parm:           bt_coex_active:enable wifi/bt co-exist (default: enable) (bool)
parm:           led_mode:0=system default, 1=On(RF On)/Off(RF Off), 2=blinking, 3=Off (default: 0) (int)
parm:           power_save:enable WiFi power management (default: disable) (bool)
parm:           power_level:default power save level (range from 1 - 5, default: 1) (int)

EDIT: As Bernhard suggested in the responses, I tried to force the adaptor on using the command echo "on" > /sys/class/bluetooth/hci0/device/../power/control. While bluetooth was blocked via rfkill, this appeared to have no effect, and hciconfig hci0 up responded that the device was still blocked. When bluetooth was unblocked using rfkill, /sys/class/bluetooth/hci0 does not exist, so the attempt to manually turn it on fails. I attempted to add this to /etc/rc.local as well, and there was no apparent difference compared to simply running the commands as root on the console.

EDIT: I emailed the Intel wifi developers, and they issued this incredibly helpful response:

Hello,

I am afraid you are asking the wrong people. We are WiFi people and not Bluetooth.

Thanks,
(name removed)

I will attempt to hack the Bluetooth drivers myself to see if I can coax any more debugging information out of them.

Does anybody have any suggestions to help me out? Has anybody experienced this before? Are there any Ubuntu users who have an ASUS UX301LA who might have any tips?

Let me know what other information might be useful, and I'll post it. I just didn't want to overload this first post with useless data.


I also have UX301LA and I'm now running 14.10. I suffered from the same problem, but discovered a workaround that is not ideal, but works for now.

Basically, it seems that the asus-nb-wmi module is not fully compatible with that hardware. Although, the actual problem seems to exist much deeper, blocking that module prevents creation of new rfkill entries corresponding to WiFi and Bluetooth and then the default state after boot is with both WiFi and Bluetooth working (even using USB 3.0). The F2 switch still when ON makes the Bluetooth disappear, but when OFF (default after boot), it does not disable WiFi, while Bluetooth device appears. The downside is that the Fx keys stop working when the module is blocked as they are also supported by this module. To achieve that effect, just add blacklist asus-nb-wmi to /etc/modprobe.d/blacklist.conf

A better solution would be to report the bug upstream or for now change the source of the module to disable handling wifi/bluetooth while still handle other Fx keys.