Bug 120161 - Bluetooth: hci0 link tx timeout with Intel Corporation Wireless 7260
Summary: Bluetooth: hci0 link tx timeout with Intel Corporation Wireless 7260
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Bluetooth (show other bugs)
Hardware: x86-64 Linux
: P1 normal
Assignee: linux-bluetooth@vger.kernel.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-13 19:31 UTC by Tobias H.
Modified: 2016-07-07 19:36 UTC (History)
1 user (show)

See Also:
Kernel Version: 4.4.0
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Tobias H. 2016-06-13 19:31:15 UTC
From: https://bugs.launchpad.net/ubuntu/+source/linux-firmware/+bug/1591167

Starting with Ubuntu 16.04 (no problem in 15.10) the bluetoth stack crashes several times a day:

May 20 11:54:59 thinktank kernel: [ 6274.939039] Bluetooth: hci0 link tx timeout
May 20 11:54:59 thinktank kernel: [ 6274.939046] Bluetooth: hci0 killing stalled connection 7c:6d:62:f1:ef:b1
May 20 11:55:01 thinktank kernel: [ 6276.942116] Bluetooth: hci0 command 0x041f tx timeout
May 20 11:55:03 thinktank kernel: [ 6278.946094] Bluetooth: hci0 command 0x0406 tx timeout

I have an Apple Keyboard and Apple Magicmouse connected and the entire stack is down after seeing the above crash. These are the devices:

input: Apple Wireless Keyboard as /devices/pci0000:00/0000:00:14.0/usb2/2-11/2-11:1.0/bluetooth/hci0/hci0:512/0005:05AC:023A.0002/input/input18
apple 0005:05AC:023A.0002: input,hidraw1: BLUETOOTH HID v0.50 Keyboard [Apple Wireless Keyboard] on 5c:c5:d4:5d:94:7b

input: ... mouse as /devices/pci0000:00/0000:00:14.0/usb2/2-11/2-11:
1.0/bluetooth/hci0/hci0:256/0005:05AC:030D.0001/input/input17
magicmouse 0005:05AC:030D.0001: input,hidraw0: BLUETOOTH HID v0.84 Mouse [... mouse] on 5c:c5:d4:5d:94:7b

No input or re-pairing is possible after those timeout messages. Reloading the kernel firmware modules doesn't help either:

modprobe -r btusb
modprobe btusb

The only way to bring the bluetooth stack up again is to toggle to standby (S3) and wake up the system again. In this case there firmware is reloaded and everything back to life:

May 20 10:10:35 thinktank kernel: [ 10.017143] Bluetooth: hci0: read Intel version: 370710018002030d00
May 20 10:10:35 thinktank kernel: [ 10.019069] Bluetooth: hci0: Intel Bluetooth firmware file: intel/ibt-hw-37.7.10-fw-1.80.2.3.d.bseq
May 20 10:10:35 thinktank kernel: [ 10.160231] Bluetooth: hci0: Intel Bluetooth firmware patch completed and activated
May 20 10:10:35 thinktank systemd[1]: Starting Bluetooth service...
May 20 10:10:36 thinktank bluetoothd[1147]: Bluetooth daemon 5.37
May 20 10:10:36 thinktank systemd[1]: Reached target Bluetooth.

May 20 10:10:36 thinktank kernel: [ 11.412940] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
May 20 10:10:36 thinktank kernel: [ 11.412943] Bluetooth: BNEP filters: protocol multicast
May 20 10:10:36 thinktank kernel: [ 11.412948] Bluetooth: BNEP socket layer initialized
May 20 10:10:36 thinktank bluetoothd[1147]: Bluetooth management interface 1.10 initialized

Since the problem did not occur with Ubuntu 15.10 I traced the issue down to the changed firmware files:
/lib/firmware/intel/ibt-hw-37.7.10-fw-1.80.2.3.d.bseq
of package linux-firmware

Bad:
$ sha1sum ibt-hw-37.7.10-fw-1.80.2.3.d.bseq.ubuntu
b697de26b72804af9d9385d13e989a72fd364d75 ibt-hw-37.7.10-fw-1.80.2.3.d.bseq
Filesize : 25631

origin:
2016-02-03	linux-firmware: Update firmware patch for Intel Bluetooth 7260 (B3/B4)
http://git.kernel.org/cgit/linux/kernel/git/iwlwifi/linux-firmware.git/commit/intel/ibt-hw-37.7.10-fw-1.80.2.3.d.bseq?id=7b1a5cb6a2cd379f470058580be2a41f5d5c4867

Good (included in Ubuntu 15.10):

$ sha1sum ibt-hw-37.7.10-fw-1.80.2.3.d.bseq
19f01d6469f30a9b1d7c214615ea39ac5e9d875c ibt-hw-37.7.10-fw-1.80.2.3.d.bseq
Filesize : 25117

origin:
2015-09-24	linux-firmware: Update firmware patch for Intel Bluetooth 7260 (B3/B4)
http://git.kernel.org/cgit/linux/kernel/git/iwlwifi/linux-firmware.git/commit/intel/ibt-hw-37.7.10-fw-1.80.2.3.d.bseq?id=01f57c63a0d2fd822462b5eedb09ff3a92fbcb29

The numbers in the file name do not correspond to version numbers: Therefore sha1sum and filesize given to distinguish.

According to
http://linuxwireless.org/en/users/Drivers/iwlwifi/#Bugzilla
I may file a bug upstream.

kernel: 4.4.0-22-generic

Bluetooth Device:
$ lsusb -d 8087:07dc
Bus 002 Device 004: ID 8087:07dc Intel Corp.

$ lspci -v
03:00.0 Network controller: Intel Corporation Wireless 7260 (rev 83)
        Subsystem: Intel Corporation Dual Band Wireless-AC 7260

Switching off USB Autosuspend for Bluettooth devices also didn't help:

BTUSB_DEV="8087:07dc"
BTUSB_BINDING="$(lsusb -d "$BTUSB_DEV" |
    cut -f 1 -d : |
    sed -e 's,Bus ,,' -e 's, Device ,/,' |
    xargs -I {} udevadm info -q path -n /dev/bus/usb/{} |
    xargs basename)"

echo "Disabling autosuspend for Bluetooth USB Mouse: $BTUSB_BINDING (old value: $(cat /sys/bus/usb/devices/$BTUSB_BINDING/power/autosuspend_delay_ms))"
echo -1 | sudo tee "/sys/bus/usb/devices/$BTUSB_BINDING/power/autosuspend_delay_ms"
Comment 1 Emmanuel Grumbach 2016-06-13 19:45:07 UTC
removing ilw which is really support WiFi only, and not BT.
Comment 2 Tedd An 2016-06-15 18:10:22 UTC
Hi,

Can you try with new BT firmware that had been submitted?

http://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/commit/?id=e45d3860987a68a4c317e7b6e62bb81ffde8a93b
Comment 3 Tobias H. 2016-06-15 22:43:06 UTC
Thanks Tedd, just installed. Give me a couple of days for testing.
Comment 4 Tobias H. 2016-06-18 08:28:47 UTC
Looks good with above mentioned latest firmware (Patch Version: 86,
Release Version: 19.01). I am on vacation, will test again beginning of July a couple of more days and close this issue.
Comment 5 Tobias H. 2016-07-07 19:36:11 UTC
Fixed by BT firmware comment #2

Note You need to log in before you can comment on or make changes to this bug.