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

13,610

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.

Share:
13,610

Related videos on Youtube

PaSTE
Author by

PaSTE

Updated on September 18, 2022

Comments

  • PaSTE
    PaSTE over 1 year

    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.

    • chronos00
      chronos00 about 9 years
      Dear PaSTE, were you able to advance anymore on this matter? I have started this thread refering to our problem here, about bluetooth not working. I intend to set a bounty during the next week, so that it gets more attention. Please try to direct people over there so that the question gets noticed and someone posts the solution. Thank you!
    • leifcr
      leifcr almost 8 years
      I'm seeing the same on Dell xps 15 9530 with Intel 7260. Powertop reports about 15w of power usage for Bluetooth. there is no bios option to disable xhci on xps 15, and blocking the device doesn't help. I'm running Ubuntu 16.04. Seems to be an issue with xhci/intel 7260 combination.
  • PaSTE
    PaSTE over 10 years
    I attempted this, but as I describe in my edits, the device vanishes when bluetooth is unblocked. Forcing the device on while rfkill has it blocked doesn't seem to do anything, and as soon as I unblock it, /sys/class/bluetooth/hci0 goes away, so the command cannot be run.
  • PaSTE
    PaSTE over 10 years
    The problem is not the mouse, nor any specific bluetooth device that is connecting to the 7260. I have a small USB bluetooth dongle that I use on the same machine that the 7260 is installed, and that dongle has no problems connecting to the mouse. The problem is that the bluetooth component of the 7260 physically disconnects as soon as it is unblocked: it never has a chance to try to connect to anything, so the problem cannot be a bad PIN code on the mouse. I also am not having any problems with the WiFi component of the 7260: I can connect to any 802.11[bgn] AP without problems.
  • PaSTE
    PaSTE over 10 years
    The iwlwifi firmware is already installed on my machine. When attempting to install the listed package, dpkg complains with "trying to overwrite '/lib/firmware/iwlwifi-7260-7.ucode', which is also in package linux-firmware 1.116.1". However, inspired by your comment, I installed a newer firmware and backported driver, which I now comment about in my original post.