Bug 199873 - Bluetooth 3.0 mouses are automatically disconnected after connected
Summary: Bluetooth 3.0 mouses are automatically disconnected after connected
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: Bluetooth (show other bugs)
Hardware: Intel Linux
: P1 normal
Assignee: linux-bluetooth@vger.kernel.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-29 08:05 UTC by Leon Liao
Modified: 2019-04-06 09:41 UTC (History)
7 users (show)

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


Attachments

Description Leon Liao 2018-05-29 08:05:07 UTC
The BT 3.0 mouse is disconnected automatically after connected with the notebook.
The fail rate is around 9/10.

1. The bug only occurs on the machine with intel 8265 module.
 I got three Dell XPS 13 (one is with Killer 1435, two are with intel 8265).
 This bug can not be reproduced on the machine with Killer 1435.

2. This bug can be reproduced since bluez 5.46.
 I verified the bluez 5.49, this bug still can be reproduced.
 This bug can not be reproduced in bluez 5.45.

Notebook: Dell XPS 13
Wi-Fi/BT module: intel 8265, 8087:0a2b
bluez: 5.48
BT mouse: logitech M337
Comment 1 Leon Liao 2018-05-29 08:12:50 UTC
In bluez git, since "6b34bdd96 ("shared/gatt-client: Fix not removing services that had disappeared", 2017-05-24)", this bug can be reproduced with low fail rate (around 1/10 or lower).
This commit is between 5.45 and 5.46.
Before this commit, I don't reproduce this bug (maybe the reproduce rate is very low.).
Comment 2 Philippe Troin 2018-07-10 16:03:30 UTC
I can also reproduce the bug.

Notebook: HP Spectre x360 Convertible W2Q33AV
Wi-Fi/BT module: 8087:0a2a Intel
BlueZ: 5.50 (bluez-5.50-1.fc28.x86_64)
BT Mouse: Logitech M535

Log:
[bluetooth]# scan on
Discovery started
[CHG] Controller C8:21:58:16:95:58 Discovering: yes
[NEW] Device 34:88:5D:89:64:81 Bluetooth Mouse M336/M337/M535
[bluetooth]# trust 34:88:5D:89:64:81 
[CHG] Device 34:88:5D:89:64:81 Trusted: yes
Changing 34:88:5D:89:64:81 trust succeeded
[bluetooth]# connect 34:88:5D:89:64:81 
Attempting to connect to 34:88:5D:89:64:81
[CHG] Device 34:88:5D:89:64:81 Connected: yes
[CHG] Device 34:88:5D:89:64:81 Modalias: usb:v046DpB016d1203
[CHG] Device 34:88:5D:89:64:81 UUIDs: 00001000-0000-1000-8000-00805f9b34fb
[CHG] Device 34:88:5D:89:64:81 UUIDs: 00001124-0000-1000-8000-00805f9b34fb
[CHG] Device 34:88:5D:89:64:81 UUIDs: 00001200-0000-1000-8000-00805f9b34fb
[CHG] Device 34:88:5D:89:64:81 ServicesResolved: yes
[CHG] Device 34:88:5D:89:64:81 Paired: yes
Connection successful

# Mouse is powered off and then back on

[CHG] Device 34:88:5D:89:64:81 ServicesResolved: no
[CHG] Device 34:88:5D:89:64:81 Paired: no
[CHG] Device 34:88:5D:89:64:81 Connected: no
[CHG] Device 34:88:5D:89:64:81 Class: 0x00000580
[CHG] Device 34:88:5D:89:64:81 Icon: input-mouse
[CHG] Device 34:88:5D:89:64:81 Connected: yes
[CHG] Device 34:88:5D:89:64:81 Connected: no
[CHG] Device 34:88:5D:89:64:81 Connected: yes
[CHG] Device 34:88:5D:89:64:81 Connected: no
[CHG] Device 34:88:5D:89:64:81 Connected: yes
[CHG] Device 34:88:5D:89:64:81 Connected: no
[CHG] Device 34:88:5D:89:64:81 Connected: yes
[CHG] Device 34:88:5D:89:64:81 Connected: no
[CHG] Device 34:88:5D:89:64:81 Connected: yes
[CHG] Device 34:88:5D:89:64:81 Connected: no
Comment 3 Andrew Xu 2018-12-11 23:24:31 UTC
I can also reproduce this bug.

Notebook: Dell XPS 13 (9370)
Wi-Fi/BT module: not sure...
bluez: 5.50
BT mouse: logitech M336 (M337)

Log:
[bluetooth]# paired-devices 
Device 34:88:5D:92:FC:0C Bluetooth Mouse M336/M337/M535
// try to connect the mouse
[bluetooth]# connect 34:88:5D:92:FC:0C
Attempting to connect to 34:88:5D:92:FC:0C
Failed to connect: org.bluez.Error.Failed
// try to connect in discovery mode
[bluetooth]# connect 34:88:5D:92:FC:0C
Attempting to connect to 34:88:5D:92:FC:0C
[CHG] Device 34:88:5D:92:FC:0C Connected: yes
[CHG] Device 34:88:5D:92:FC:0C ServicesResolved: yes
Failed to connect: org.bluez.Error.NotAvailable
[CHG] Device 34:88:5D:92:FC:0C ServicesResolved: no
[CHG] Device 34:88:5D:92:FC:0C Connected: no
// moving around the mouse
[CHG] Device 34:88:5D:92:FC:0C Connected: yes
[CHG] Device 34:88:5D:92:FC:0C Connected: no
[CHG] Device 34:88:5D:92:FC:0C Connected: yes
[CHG] Device 34:88:5D:92:FC:0C Connected: no
[CHG] Device 34:88:5D:92:FC:0C Connected: yes
[CHG] Device 34:88:5D:92:FC:0C Connected: no
Comment 4 antK 2019-02-17 22:20:22 UTC
I too have had the same issue...


Notebook: Dell XPS 13 9360
bios: tested with 2.9.1 and 2.10.0
OS: Debian stretch 9.8 
Kernel: 4.9.0-8 debian 4.9.144-3
Wi-Fi/BT module: Intel Dual Band wirelss AC 8265, rev=0x230
Firmware: iwlwifi-8265-22.ucode
BlueZ: 5.43-2+deb9u1
BT Mouse: Logitech MX anywhere 2s

------

When attempting to pair one of 4 things will happen:

1. the bluetooth module locks up and stops responding - time out messages are seen in dmesg

2. The wifi will reset but will return to a normal state with a failed bluetooth as above

3. wifi and bluetooth will disappear and stop responding but wifi is recoverable by invoking rfkill via the wifi hot key ( fn f12 )

4. The entire device stops responding and shortly after the machine will freeze - there may be a panic but i can't see it due to lock up ( nothing written to logs )

The pairing process will not complete as the device stops responding before then.

Resetting the pci device via the /sys interface results in an instant hang

Other two xps devices i have contain ath10k cards and dont seem affected, mouse can also be paired to an android device without issue.

tried bios upgrade to no avail. attempted using firmware direct from linux-firmware repsitory instead of firmware-iwlwifi package ( 20161130-4 ) no  change

only fix i've found for this was to add the bt_coex_active=0 option when loading the module ( modprobe: options iwlwifi bt_coex_active=0 )

this allows a connection to occur and for the device to pair however the mouse movement on screen seems to be quite jittery at times.
Comment 5 Kai-Heng Feng 2019-03-18 07:00:12 UTC
Do you folks use gnome-control-center to pair?
Comment 6 Kai-Heng Feng 2019-03-18 07:23:52 UTC
Take a look at [1] if gnome-control-center is used:

[1] https://bugs.launchpad.net/ubuntu/+source/bluez/+bug/1773897/comments/43
Comment 7 Philippe Troin 2019-03-18 16:08:21 UTC
(In reply to Kai-Heng Feng from comment #5)
> Do you folks use gnome-control-center to pair?

I certainly did use gnome-control-center.
I've just tried again with Fedora 29 (gnome-control-center-3.30.3-1.fc29.x86_64 + bluez-5.50-3.fc29.x86_64) and out of five remove, add, force reconnect) I only received a single failure.
/usr/share/gnome-bluetooth/pin-code-database.xml does not seem to have any tweak applying to this mouse.
Comment 8 antK 2019-03-18 21:41:05 UTC
I tried the pairing via the gnome control center, command line ( bluetoothctl ) and via blueman. These were done while in a gnome session however

All three attempts failed as above.
Comment 9 Kai-Heng Feng 2019-03-19 03:34:44 UTC
My intention is to ask you to try adding this entry to pin-code-database.xml:
<device vendor="logitech far east" type="mouse" pin="0000"/>
Comment 10 Bastien Nocera 2019-03-25 08:42:52 UTC
(In reply to Kai-Heng Feng from comment #9)
> My intention is to ask you to try adding this entry to pin-code-database.xml:
> <device vendor="logitech far east" type="mouse" pin="0000"/>

See https://gitlab.gnome.org/GNOME/gnome-bluetooth/merge_requests/14
Comment 11 Andrew Xu 2019-04-06 09:41:25 UTC
It seems like the bug has been fixed in bluez 5.50-6. My Logitech M336 works now.

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