Bug 198303 - Bluetooth dies after a while.
Summary: Bluetooth dies after a while.
Status: RESOLVED PATCH_ALREADY_AVAILABLE
Alias: None
Product: Drivers
Classification: Unclassified
Component: Bluetooth (show other bugs)
Hardware: Intel Linux
: P1 high
Assignee: linux-bluetooth@vger.kernel.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-28 15:37 UTC by Mika Norén
Modified: 2018-12-18 12:51 UTC (History)
2 users (show)

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


Attachments
journalctl -b -u bluetooth.service (2.54 KB, text/plain)
2017-12-28 15:37 UTC, Mika Norén
Details
journalctl -b -k (65.27 KB, text/plain)
2017-12-28 15:39 UTC, Mika Norén
Details
btmon.log (42.05 KB, application/octet-stream)
2018-12-16 06:34 UTC, Nick
Details
attachment-2422-0.html (809 bytes, text/html)
2018-12-18 12:51 UTC, Mika Norén
Details

Description Mika Norén 2017-12-28 15:37:32 UTC
Created attachment 273335 [details]
journalctl -b -u bluetooth.service

Description:
Bluetooth suddenly stops working after some (arbitrary?) time.
Restarting the systemd service does not help. If one reload the btusb kernel module, one can resume the bluetooth functionality.

This has to be repeated quite often during a session. Sometimes with only a few seconds between the failures. Other times it can go several hours without any failure.


Additional info:
Distribution: Arch Linux
Kernel: linux-4.14.9-1
Additional packages:
* systemd 236.0-2
* bluez 5.47-4


Steps to reproduce:
1. Boot normally. Enable and pair a bluetooth device. Use it as intended.
2. After some time (seems arbitrary), the bluetooth suddenly stops working. No messages about disconnection or anything. It just silently stops working.
3. "systemctl restart bluetooth.service" does not help. Generates errors as seen in the log attachment below
4. "rmmod btusb && modprobe btusb && systemctl restart bluetooth.service" helps to recover the bluetooth functionality.
Comment 1 Mika Norén 2017-12-28 15:39:53 UTC
Created attachment 273337 [details]
journalctl -b -k
Comment 2 Mika Norén 2018-01-02 16:19:48 UTC
Every time bluetooth stops working silently, dmesg mentions:
[ 8834.765143] usb 2-7: reset full-speed USB device number 7 using xhci_hcd
Comment 3 Mika Norén 2018-01-02 16:23:30 UTC
Here's the log from one session where it started to misbehave quite often:
(The bluetooth mouse is not the only BT device that are affected. Anything connected over bluetooth have the same behaviour. I'm just using the BT mouse to be able to reproduce this as much as possible)

[ 8193.908860] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[ 8193.908864] Bluetooth: HIDP socket layer initialized
[ 8193.911493] hid-generic 0005:046D:B010.0003: unknown main item tag 0x0
[ 8193.911629] input: Bluetooth Mouse M557 as /devices/pci0000:00/0000:00:14.0/usb2/2-7/2-7:1.0/bluetooth/hci0/hci0:256/0005:046D:B010.0003/input/input21
[ 8193.911987] hid-generic 0005:046D:B010.0003: input,hidraw1: BLUETOOTH HID v10.01 Mouse [Bluetooth Mouse M557] on 58:91:cf:6b:5a:d9
[ 8425.635422] usb 2-7: reset full-speed USB device number 5 using xhci_hcd
[ 8425.777157] usb 2-7: USB disconnect, device number 5
[ 8426.191627] usb 2-7: new full-speed USB device number 7 using xhci_hcd
[ 8426.348403] Bluetooth: hci0: read Intel version: 370710018002030d56
[ 8426.348405] Bluetooth: hci0: Intel device is already patched. patch num: 56
[ 8436.015178] usb 2-7: reset full-speed USB device number 7 using xhci_hcd
[ 8446.768367] Bluetooth: hci0 command 0xfc3f tx timeout
[ 8454.661747] Bluetooth: hci0: turning off Intel device LED failed (-110)
[ 8465.679873] usbcore: deregistering interface driver btusb
[ 8465.922767] usbcore: registered new interface driver btusb
[ 8465.936440] Bluetooth: hci0: read Intel version: 370710018002030d56
[ 8465.936442] Bluetooth: hci0: Intel device is already patched. patch num: 56
[ 8486.146118] hid-generic 0005:046D:B010.0004: unknown main item tag 0x0
[ 8486.146369] input: Bluetooth Mouse M557 as /devices/pci0000:00/0000:00:14.0/usb2/2-7/2-7:1.0/bluetooth/hci0/hci0:256/0005:046D:B010.0004/input/input22
[ 8486.146843] hid-generic 0005:046D:B010.0004: input,hidraw1: BLUETOOTH HID v10.01 Mouse [Bluetooth Mouse M557] on 58:91:cf:6b:5a:d9
[ 8698.762006] usb 2-7: reset full-speed USB device number 7 using xhci_hcd
[ 8740.188765] usbcore: deregistering interface driver btusb
[ 8740.464937] usbcore: registered new interface driver btusb
[ 8740.479557] Bluetooth: hci0: read Intel version: 370710018002030d56
[ 8740.479560] Bluetooth: hci0: Intel device is already patched. patch num: 56
[ 8762.662738] hid-generic 0005:046D:B010.0005: unknown main item tag 0x0
[ 8762.663191] input: Bluetooth Mouse M557 as /devices/pci0000:00/0000:00:14.0/usb2/2-7/2-7:1.0/bluetooth/hci0/hci0:256/0005:046D:B010.0005/input/input23
[ 8762.668651] hid-generic 0005:046D:B010.0005: input,hidraw1: BLUETOOTH HID v10.01 Mouse [Bluetooth Mouse M557] on 58:91:cf:6b:5a:d9
[ 8834.765143] usb 2-7: reset full-speed USB device number 7 using xhci_hcd
[ 8953.112146] usbcore: deregistering interface driver btusb
[ 8953.380967] usbcore: registered new interface driver btusb
[ 8953.395641] Bluetooth: hci0: read Intel version: 370710018002030d56
[ 8953.395643] Bluetooth: hci0: Intel device is already patched. patch num: 56
[ 8974.107363] hid-generic 0005:046D:B010.0006: unknown main item tag 0x0
[ 8974.107738] input: Bluetooth Mouse M557 as /devices/pci0000:00/0000:00:14.0/usb2/2-7/2-7:1.0/bluetooth/hci0/hci0:256/0005:046D:B010.0006/input/input24
[ 8974.113310] hid-generic 0005:046D:B010.0006: input,hidraw1: BLUETOOTH HID v10.01 Mouse [Bluetooth Mouse M557] on 58:91:cf:6b:5a:d9
[ 9070.031936] usb 2-7: reset full-speed USB device number 7 using xhci_hcd
[ 9081.143680] usbcore: deregistering interface driver btusb
[ 9081.399862] usbcore: registered new interface driver btusb
[ 9081.413710] Bluetooth: hci0: read Intel version: 370710018002030d56
[ 9081.413712] Bluetooth: hci0: Intel device is already patched. patch num: 56
[ 9088.180383] hid-generic 0005:046D:B010.0007: unknown main item tag 0x0
[ 9088.180664] input: Bluetooth Mouse M557 as /devices/pci0000:00/0000:00:14.0/usb2/2-7/2-7:1.0/bluetooth/hci0/hci0:256/0005:046D:B010.0007/input/input25
[ 9088.184522] hid-generic 0005:046D:B010.0007: input,hidraw1: BLUETOOTH HID v10.01 Mouse [Bluetooth Mouse M557] on 58:91:cf:6b:5a:d9
Comment 4 Grzegorz 2018-01-02 16:29:23 UTC
It would be helpfull if you attach logs from btmon (example: sudo btmon -i 0 -w btmon.log) and from bluetoothd (sudo valgrind ./bluetoothd -n -d) - bluetoothd from bluez sources (you can checkout to 5.47-4 tag).

Regards,
Grzegorz
Comment 5 Nick 2018-12-16 06:34:33 UTC
Created attachment 280027 [details]
btmon.log

Experiencing the same issue as the original reporter. Attached is the result of the btmon.log command, where the error occurred ~1-3 seconds after the error occurred.
Comment 6 Nick 2018-12-16 06:38:06 UTC
Other details: the issue started after I updated to Ubuntu 18.10 (didn't seem to be present in 18.04).

There are complicating factors in my setup: I'm using an Intel 7260 PCIe WiFi/Bluetooth adapter which has pins 20 and 51 masked (the issue occurred with only pin 51 masked prior).
Comment 7 Mika Norén 2018-12-17 09:29:32 UTC
(In reply to Grzegorz from comment #4)
> It would be helpfull if you attach logs from btmon (example: sudo btmon -i 0
> -w btmon.log) and from bluetoothd (sudo valgrind ./bluetoothd -n -d) -
> bluetoothd from bluez sources (you can checkout to 5.47-4 tag).
> 
> Regards,
> Grzegorz

As this issue has been solved in later kernel versions, I see no reason to keep this open. Can be marked as solved. 

I'm not sure when it was solved though. Everything started to work as intended after an update some time ago.
Comment 8 Mika Norén 2018-12-17 09:33:19 UTC
If anyone hits this particular problem, please update your kernel to 4.18.20 or later.
Comment 9 Nick 2018-12-17 20:07:18 UTC
Just updated to 4.18.20, issue not resolved. Should I open a new issue?
Comment 10 Mika Norén 2018-12-18 12:51:07 UTC
Created attachment 280073 [details]
attachment-2422-0.html

Yes, please do. :-)

On Mon, 17 Dec 2018, 21:07 <bugzilla-daemon@bugzilla.kernel.org wrote:

> https://bugzilla.kernel.org/show_bug.cgi?id=198303
>
> --- Comment #9 from Nick (rishel.nick@gmail.com) ---
> Just updated to 4.18.20, issue not resolved. Should I open a new issue?
>
> --
> You are receiving this mail because:
> You reported the bug.

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