Bluetooth devices fail to re-connect after sleep.

Bug #1246981 reported by Peter Nunn on 2013-11-01
300
This bug affects 61 people
Affects Status Importance Assigned to Milestone
bluez (Ubuntu)
Medium
Unassigned
linux (Ubuntu)
Undecided
Unassigned

Bug Description

This exact harware was working faultlessly in 13.04. Since re-installing at 13.10 the mouse consistently failes to reconnect after the device either hybernates or ever goes to screen saver sleep.

I have to remove the dive and re-add it each time (which works well).

There are other issues with the bluetooth stack as well in that I have not found any way to use bluetooth tethering to my mobile which again worked well and was easy to configure in 13.04

Peter.

ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: bluetooth 4.101-0ubuntu8b1
ProcVersionSignature: Ubuntu 3.11.0-12.19-generic 3.11.3
Uname: Linux 3.11.0-12-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.12.5-0ubuntu2.1
Architecture: amd64
Date: Fri Nov 1 16:44:37 2013
InstallationDate: Installed on 2013-10-19 (13 days ago)
InstallationMedia: Kubuntu 13.10 "Saucy Salamander" - Release amd64 (20131016.1)
InterestingModules: bnep rfcomm btusb bluetooth
MachineType: Dell Inc. Latitude E6530
MarkForUpload: True
PackageArchitecture: all
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.11.0-12-generic root=UUID=8283de78-9264-42bf-a8b4-25643fa1475f ro quiet splash
SourcePackage: bluez
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 12/13/2012
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A09
dmi.board.name: 07Y85M
dmi.board.vendor: Dell Inc.
dmi.board.version: A01
dmi.chassis.type: 9
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvrA09:bd12/13/2012:svnDellInc.:pnLatitudeE6530:pvr01:rvnDellInc.:rn07Y85M:rvrA01:cvnDellInc.:ct9:cvr:
dmi.product.name: Latitude E6530
dmi.product.version: 01
dmi.sys.vendor: Dell Inc.
hciconfig:
 hci0: Type: BR/EDR Bus: USB
  BD Address: 20:16:D8:9C:38:E5 ACL MTU: 1021:8 SCO MTU: 64:1
  UP RUNNING PSCAN ISCAN
  RX bytes:1817731 acl:117432 sco:0 events:5271 errors:0
  TX bytes:37955 acl:131 sco:0 commands:5096 errors:0
syslog:
 Nov 1 14:50:19 pnunn-Latitude-E6530 bluetoothd[1015]: Discovery session 0x7f6489f7b450 with :1.582 activated
 Nov 1 14:50:25 pnunn-Latitude-E6530 bluetoothd[1015]: Unknown command complete for opcode 37
 Nov 1 14:50:28 pnunn-Latitude-E6530 bluetoothd[1015]: Stopping discovery
 Nov 1 14:50:36 pnunn-Latitude-E6530 kernel: [60934.211132] input: Microsoft Bluetooth Notebook Mouse 5000 as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.0/bluetooth/hci0/hci0:11/input29
 Nov 1 14:50:36 pnunn-Latitude-E6530 kernel: [60934.211646] hid-generic 0005:045E:0700.000C: input,hidraw3: BLUETOOTH HID v1.00 Mouse [Microsoft Bluetooth Notebook Mouse 5000] on 20:16:d8:9c:38:e5

Peter Nunn (pnunn) wrote :
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in bluez (Ubuntu):
status: New → Confirmed
Terry Zhou (zhouxc) wrote :

Thankyou Terry, the workaround mentioned at http://ubuntuforums.org/showthread.php?t=1387211 worked perfectly for me.

Changed in bluez (Ubuntu):
importance: Undecided → High
Սահակ (petrosyan) wrote :

this bug is still present in Ubuntu 14.04 (Samsung Series 9 NP900X3C laptop)

JPT (j-p-t) wrote :

I have this problem too with Kubuntu 14.04
Bluez-4.101-ubuntu13

I want to connect to a BT-serial adapter. Always get the error "Unknown command complete for opcode 37" immediately after connection was reported successful by GUI.

I tried three different host BT hardware and two different PCs. always the same.

I believe it won't help if I add any more detail? There are already a lot of logs. If you need more info, please ask.

Ubuntu 14.04
bluez: 4.101-0ubuntu13

After suspend resume things one by one hang, and I have no other option than a hard poweroff. Ctrl-Alt-Fn to switch consoles does not work immediately after resume, so debugging is tricky (haven't tried ssh-ing into the box yet).

The workaround above solved it for me.

Oops, forgot the most important, this all started when I attache a BT mouse, without the BT mouse there are no problems.

Pedro Casagrande (pccampos) wrote :

This problem was not happening on 14.04, but now is happening again on 14.10.

CRAFT (craft37) wrote :

Affects me in 14.10 :(

Սահակ (petrosyan) on 2014-12-17
summary: - Bluetooth mouse failes to re-connect after sleep.
+ Bluetooth mouse fails to re-connect after sleep.

My bluetooth mouse fails to reconnect when ubuntu restarts...

Just returned to ubuntu from a year or more of Windows, so just finding my feet again. I have a microsft mouse an bluetooth dongle, It is showing as paired. However when I restart Ubuntu 14.04 it fails to auto connect and I have to push a small button on the mouse and switch it on in the bluetooth dropdown at the same time

Changed in bluez (Ubuntu):
status: Confirmed → Invalid
Francisco Cribari (cribari) wrote :

I am having this problem with Ubuntu 15.04. Hardware is a DELL XPS 13 (model 9343, bios A03) notebook. I manage to reconnect the DELL bluetooth mouse after a suspend and resume, but it becomes very laggy and erratic.

Francisco Cribari (cribari) wrote :

I am having this problem with Ubuntu 15.04. Hardware is a DELL XPS 13 (model 9343, bios A03) notebook. I manage to reconnect the DELL bluetooth mouse after a suspend and resume, but it becomes very laggy and erratic.

Termo (termopeten) wrote :

Also having the issue on 15.04 on a Lenovo X250 latest bios (Broadwell issue??)

Mike Neish (neishm) on 2015-06-18
Changed in bluez (Ubuntu):
status: Invalid → Confirmed

Fresh install of 14.04 and another Bluetooth mouse, still the same issue, only now no workarounds seem to work. I have to reconnect the mouse after every suspend/resume.

Daniel Harvey (daniel.harvey) wrote :

I've had similar problems in 15.04 and submitted bug https://bugs.launchpad.net/ubuntu/+source/bluez/+bug/1481136

I've submitted the new bug as my behaviour is similar but not the same as this bug. In particular the workarounds presented above do not work for me and the workaround I'm using was not suggested.

erty (ertymail) wrote :

Kubuntu 15.10, updated. Problem is still Here.
Hello, people! Two years and 4 releases mouses doesnt work with laptops! Is it ok?

Ubuntu Gnome 16.04 has the same problem.

$ lspci
00:00.0 Host bridge: Intel Corporation Sky Lake Host Bridge/DRAM Registers (rev 07)
00:01.0 PCI bridge: Intel Corporation Sky Lake PCIe Controller (x16) (rev 07)
00:01.1 PCI bridge: Intel Corporation Sky Lake PCIe Controller (x8) (rev 07)
00:02.0 VGA compatible controller: Intel Corporation Skylake Integrated Graphics (rev 06)
00:04.0 Signal processing controller: Intel Corporation Skylake Processor Thermal Subsystem (rev 07)
00:14.0 USB controller: Intel Corporation Sunrise Point-H USB 3.0 xHCI Controller (rev 31)
00:14.2 Signal processing controller: Intel Corporation Sunrise Point-H Thermal subsystem (rev 31)
00:15.0 Signal processing controller: Intel Corporation Sunrise Point-H LPSS I2C Controller #0 (rev 31)
00:16.0 Communication controller: Intel Corporation Sunrise Point-H CSME HECI #1 (rev 31)
00:17.0 SATA controller: Intel Corporation Sunrise Point-H SATA Controller [AHCI mode] (rev 31)
00:1c.0 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #1 (rev f1)
00:1c.4 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #5 (rev f1)
00:1c.5 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #6 (rev f1)
00:1c.6 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #7 (rev f1)
00:1f.0 ISA bridge: Intel Corporation Sunrise Point-H LPC Controller (rev 31)
00:1f.2 Memory controller: Intel Corporation Sunrise Point-H PMC (rev 31)
00:1f.3 Audio device: Intel Corporation Sunrise Point-H HD Audio (rev 31)
00:1f.4 SMBus: Intel Corporation Sunrise Point-H SMBus (rev 31)
02:00.0 3D controller: NVIDIA Corporation GM107M [GeForce GTX 960M] (rev a2)
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 10)
05:00.0 Network controller: Intel Corporation Wireless 3165 (rev 79)
06:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS522A PCI Express Card Reader (rev 01)

Follow-up to #19:

$ bluetoothctl
[NEW] Controller 00:DB:DF:F9:6A:81 newcastle [default]
[NEW] Device 78:CA:39:EB:AF:83 Laptop Magic Mouse
[NEW] Device 48:59:29:54:70:2D Nexus 5
[NEW] Device F8:16:54:9D:4C:3D TIAA-7321BJWL12
[NEW] Device 3B:B6:0A:CE:DB:FE SPBT3

$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 03eb:8a96 Atmel Corp.
Bus 001 Device 003: ID 8087:0a2a Intel Corp.
Bus 001 Device 002: ID 1bcf:28b0 Sunplus Innovation Technology Inc.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Possibly related: the Atmel touchscreen also does not always reconnect after sleep. "sudo rmmod hid_multitouch ; sudo modprobe hid-multitouch" restores that, but reloading hid_magicmouse does not restore the mouse.

MattJ (railmeat) wrote :

I am seeing the same thing on a Lenovo ThinkPad W530 running Ubuntu 16.04.1. I can work around by powering Bluetooth off and back on from the command line. I cannot do this from the menu bar, it never turns on.

Սահակ (petrosyan) wrote :

I can reproduce this bug in Ubuntu 16.10

Jason Hunter (jhunterwu) wrote :

what does it mean that "This bug report was converted into a question: question #260266"

does it mean it's no longer a bug?

why does it say unassigned? isn't it supposed to be assigned to the bluetooth group?

Սահակ (petrosyan) wrote :

not being able to use a bluetooth mouse is a critical bug that is preventing many people from using Ubuntu

Սահակ (petrosyan) wrote :

this bug is still present in Ubuntu 17.04

I am also having this issue. Won't start working unless I shut computer off and on. So frustrating. My version is 5.37-0ubuntu5.1. I'm using 16.04 on a new Dell XPS13.

I'm having this same problem in ubuntu 17.10 with an apple keyboard.
Disabling and enabling the device in the settings GUI manually fixes the problem until the machine sleeps again

TJ (tj) wrote :

I began experiencing this recently on 16.04 where it had been working previously: When resuming from suspend both the Bluetooth mouse and keyboard would not reconnect when I began using them.

I eventually traced it to a change I'd made in the GUI - I'd changed the Visibility (Discoverable) setting from "Always" to "Temporarily - 3 minutes".

In this case "systemctl restart bluetooth" service didn't help, but sometimes using "bluetoothctl" and then "power on" and "discoverable yes" would (eventually) kick it into life. Sometimes I'd also need to force a connection to one of the devices from the PC ("devices" then "connect <MAC-ADDRESS>" [ tab-completion works for MAC]) - good job the laptop has a built-in PS/2 keyboard.

This happens my Mint too. Bluetooth keyboard is working after resume from suspend but mouse (Logitech M720 Triatlon) is not. bluetoothctl says Connected: yes .. no .. yes .. no
But bluetoothctl: agent off/on helps (no need to use power and pair commands).

tags: added: artful trusty
Raj Amal (raj-amalw) wrote :

I am facing similar issue in Kubuntu 18.04. I recently upgraded from 17.10. It was working fine in 17.10. My Bluetooth headset does not connect after suspend.

I reported in KDE, they asked to raise against Bluez.

https://bugs.kde.org/show_bug.cgi?id=393631

My temporary fix is restarting the bluetooth service,

sudo service bluetooth restart

Daniel van Vugt (vanvugt) wrote :

Raj,

You want bug 1759628, not this one.

Erika (crazyquasar) wrote :

I am having this issue with Ubuntu 18.04 fresh install on Gigabyte Aero 15X v8.
Mouse is bluetooth Digio2 Trackball. After sleep, on/off switch is broken. Must remove and re-add from bluetooth settings.

Changed in bluez (Ubuntu):
importance: High → Medium
ivavis (ivano.visco) wrote :
Download full text (3.6 KiB)

Same issue in Ubuntu 18.04, fresh install on Lenovo e540 notebook, with two different bluetooth mouse
 - Logitech M557
 - Tecknet BM307

The problem occurs in the following cases:
 - Mouse Switch off then on
 - Mouse inactivity (leaving the notebook for 5/10 minutes)
 - Notebook sleep
 - Notebook reboot

The bluetooth mouse can't reconnect. I have to reboot or "systemctl restart bluetooth" and run the pair again.

syslog relevant messages during notebook idle:
May 7 15:34:42 alastor /usr/lib/gdm3/gdm-x-session[1748]: (II) config/udev: removing device BM30X mouse
May 7 15:34:42 alastor /usr/lib/gdm3/gdm-x-session[1748]: (**) Option "fd" "113"
May 7 15:34:42 alastor /usr/lib/gdm3/gdm-x-session[1748]: (II) event16 - BM30X mouse: device removed
May 7 15:34:42 alastor /usr/lib/gdm3/gdm-x-session[1748]: (II) UnloadModule: "libinput"
May 7 15:34:42 alastor /usr/lib/gdm3/gdm-x-session[1748]: (II) systemd-logind: releasing fd for 13:80
May 7 15:34:42 alastor upowerd[1118]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.0/bluetooth/hci0/hci0:256/0005:0A5C:4503.0005

syslog relevant messages activating the notebook:
May 7 15:42:36 alastor bluetoothd[13044]: Can't get HIDP connection info
May 7 15:42:41 alastor kernel: [14272.937283] Bluetooth: hci0: last event is not cmd complete (0x0f)
May 7 15:42:41 alastor bluetoothd[13044]: connect error: Host is down (112)

lspci
00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor DRAM Controller (rev 06)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller (rev 06)
00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
00:03.0 Audio device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller (rev 06)
00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 04)
00:16.0 Communication controller: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 (rev 04)
00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #1 (rev d4)
00:1c.2 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #3 (rev d4)
00:1c.3 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #4 (rev d4)
00:1c.4 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #5 (rev d4)
00:1f.0 ISA bridge: Intel Corporation HM87 Express LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] (rev 04)
00:1f.3 SMBus: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller (rev 04)
01:00.0 3D controller: NVIDIA Corporation GK208M [GeForce GT 740M] (rev a1)
03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5227 PCI Express Card Reader (rev 01)
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethe...

Read more...

seaofgrass (seaofgrass) wrote :

The same problem with Ubuntu 18.04, Teknet BM308, and Lenovo Ideapad 320-15IKB
And sometimes when the mouse is conected it's running very slowly

ivavis (ivano.visco) wrote :

I found a guide with a manual workaround using the bluetoothctl command

https://ubuntuforums.org/showthread.php?t=2390542

This procedure has to be executed for every bluetooth mouse to pair and trust the device.

Daniel van Vugt (vanvugt) wrote :

seaofgrass: if the mouse is running slowly then you likely:
  (a) Have a poor bluetooth signal (avoid cheap USB dongles); or
  (b) Have interference from a 2.4GHz wifi network; or
  (c) The system is scanning for new Bluetooth devices in the background.

But you're not alone. We've all seen the laggy Bluetooth mouse problem at some stage.

To fix (b), maybe look at https://bugs.launchpad.net/ubuntu/+bugs?field.tag=a2dp-skip

To fix (c), try running 'bluetoothctl' and then type 'scan off'.

seaofgrass (seaofgrass) wrote :

Thanks!!!

tags: added: bionic
Svetlozar Argirov (zaro) wrote :

I have Bluettooth Logitec M535 mouse and have the same problem.
It will pair and I can use the mouse. But as soon as I suspend the laptop, or power it off it won't work anymore.
I need to go delete the mouse from the list of paired devices, turn off bluetooth, turn it on again and pair again so or it won't connect at all.

What solved the problem was this suggestions https://ubuntuforums.org/showthread.php?t=2390542 from ivavis. Following the instructions to add the mouse from the bluez console solved the problem.

tags: added: resume suspend-resume
Sebastien Bacher (seb128) wrote :

Some issues have been fixed on Disco so it would be worth trying there. I've backported the upstream_trusted/pair pointer devices changes in a bionic SRU and used bug #1779289 for the update (the bug here seems like it's not only about that though)

tags: removed: artful saucy

Issue also exists on Debian Buster with 5.4 backports kernel and bluez 5.50-1

azeam (dennishagg) wrote :

Some regression with mainline kernel 5.9 (during all 5.9 release candidates I've tested as well) - my mouse has to be removed from the previous connections list and re-paired after each time the mouse goes to sleep (waiting a couple of minutes). Working fine with 5.8.x kernels. Ubuntu 20.04, HP travel mouse, Intel AX200 controller (8087:0029) in a Lenovo 14ARE05.

Daniel van Vugt (vanvugt) wrote :

azeam, please open a new bug by running:

 ubuntu-bug linux

summary: - Bluetooth mouse fails to re-connect after sleep.
+ Bluetooth devices fail to re-connect after sleep.
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in linux (Ubuntu):
status: New → Confirmed
tags: added: focal groovy
Tessa (unit3) wrote :

i just had a bug for 20.10 merged into this one. note that in my case, this just started happening since upgrading to 20.10, and it happens with multiple different brands of bluetooth adaptor. as well, if use my keyboard to open the bluetooth settings panel in gnome, then everything immediately reconnects as soon as the settings load, so it doesn't appear to be anything to do with hardware, but instead a bug in terms of what gnome services do when the system resumes.

Kai-Heng Feng (kaihengfeng) wrote :

That means the bluetooth controller really wakes up after started a scanning.

Recent BT 4.0 controllers from Intel or Qualcomm shouldn't have this bug.

Tessa (unit3) wrote :

Well, that's sort of irrelevant for those of us having this problem. I just checked, and mine is a Broadcom BCM20702A0, so not exactly a niche vendor. I'm especially concerned since it seems like it's just not correctly re-scanning for bluetooth devices after waking from sleep due to some sort of software screw up since the 20.10 update, and there's nothing wrong with the controller. For those of us who depend on bluetooth, this is a major regression.

Kai-Heng Feng (kaihengfeng) wrote :

If it's a kernel regression, please bisect the kernel:
https://wiki.ubuntu.com/Kernel/KernelBisection

Tessa (unit3) wrote :

Like I mentioned, the kernel drivers seem fine. It appears to be a userspace software regression, either in bluez or in the gnome components that call bluez. the adaptor seems dead after resuming from sleep, until the gnome bluetooth settings panel is opened. this must call some sort of refresh function, and then everything works fine again. whatever this function is, it must've been called after resume previously in 20.04, and isn't being called now in 20.10, hence the regression.

i don't know anything about bluez or the gnome internals, but i'm happy to provide whatever logs would be helpful in identifying the root cause and getting it fixed, since it's making my current desktop usage a nightmare.

Alexander List (alexlist) wrote :

I notice similar behaviour on 20.10, Dell XPS 13 7390 2-in-1, Logitech M590
When I open Settings->Bluetooth, which takes a sec or two, something seems to get triggered and the mouse starts working again.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.