[jammy] Bluetooth headphones unable to connect after suspend in BlueZ 5.63

Bug #1962542 reported by Heather Ellsworth
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bluez Utilities
Fix Released
Unknown
bluez (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Bose quietcomfort 35 is a common headset that can no longer connect to a jammy system after just one suspend. This started at the end of January but just now really debugging the issue.

Side note that my bluetooth mouse works fine without problem after any amount of suspends.

The headset is only trying to connect to the jammy system (no other bluetooth devices it's paired with has active bluetooth, to isolate only the jammy <-> headset issue). This is jammy running on a T590, up to date, not proposed.

heather@fenrir:~$ dpkg -l | grep bluetooth
ii gir1.2-gnomebluetooth-1.0:amd64 3.34.5-4 amd64 Introspection data for GnomeBluetooth
ii gnome-bluetooth 3.34.5-4 amd64 GNOME Bluetooth tools
ii libbluetooth-dev:amd64 5.63-0ubuntu1 amd64 Development files for using the BlueZ Linux Bluetooth library
ii libbluetooth3:amd64 5.63-0ubuntu1 amd64 Library to use the BlueZ Linux Bluetooth stack
ii libgnome-bluetooth13:amd64 3.34.5-4 amd64 GNOME Bluetooth tools - support library
ii pulseaudio-module-bluetooth 1:15.99.1+dfsg1-1ubuntu1 amd64 Bluetooth module for PulseAudio sound server

On a fresh boot (not suspended yet), I can connect the headset successfully. Here are the logs of that:

Mar 01 09:44:02 fenrir kernel: input: Bose QuietComfort 35 (AVRCP) as /devices/virtual/input/input30
Mar 01 09:44:02 fenrir systemd-logind[1570]: Watching system buttons on /dev/input/event22 (Bose QuietComfort 35 (AVRCP))
Mar 01 09:44:03 fenrir NetworkManager[1536]: <warn> [1646124243.8660] platform-linux: do-add-ip6-address[3: fe80::c1bc:a705:9e66:e0d0]: failure 13 (Permission denied)
Mar 01 09:44:04 fenrir bluetoothd[1532]: /org/bluez/hci0/dev_60_AB_D2_07_DB_9F/fd0: fd(32) ready
Mar 01 09:44:04 fenrir rtkit-daemon[2349]: Supervising 6 threads of 3 processes of 1 users.
Mar 01 09:44:04 fenrir rtkit-daemon[2349]: Successfully made thread 5660 of process 2708 owned by '1000' RT at priority 5.
Mar 01 09:44:04 fenrir rtkit-daemon[2349]: Supervising 7 threads of 3 processes of 1 users.
Mar 01 09:44:04 fenrir pulseaudio[2708]: org.freedesktop.DBus.Properties.Get /org/bluez/hci0/dev_60_AB_D2_07_DB_9F/fd0 Volume failed: org.freedesktop.DBus.Error.InvalidArgs: No such property 'Volume'
Mar 01 09:44:04 fenrir pulseaudio[2708]: Battery Level: 70%
Mar 01 09:44:04 fenrir pulseaudio[2708]: Dock Status: undocked

But then if I close the laptop lid and reopen, login, and try to connect the headset the device is found invalid with the following logs:

Mar 01 00:47:08 fenrir kernel: input: Bose QuietComfort 35 (AVRCP) as /devices/virtual/input/input152
Mar 01 00:47:08 fenrir pulseaudio[253956]: Information about device /org/bluez/hci0/dev_60_AB_D2_07_DB_9F is invalid
Mar 01 00:47:08 fenrir bluetoothd[40741]: profiles/audio/media.c:endpoint_reply() Endpoint replied with an error: org.bluez.Error.InvalidArguments
Mar 01 00:47:08 fenrir pulseaudio[253956]: Information about device /org/bluez/hci0/dev_60_AB_D2_07_DB_9F is invalid
Mar 01 00:47:08 fenrir bluetoothd[40741]: profiles/audio/media.c:endpoint_reply() Endpoint replied with an error: org.bluez.Error.InvalidArguments
Mar 01 00:47:08 fenrir systemd-logind[1545]: Watching system buttons on /dev/input/event19 (Bose QuietComfort 35 (AVRCP))
Mar 01 00:47:09 fenrir pulseaudio[253956]: Information about device /org/bluez/hci0/dev_60_AB_D2_07_DB_9F is invalid
Mar 01 00:47:09 fenrir bluetoothd[40741]: profiles/audio/media.c:endpoint_reply() Endpoint replied with an error: org.bluez.Error.InvalidArguments
Mar 01 00:47:09 fenrir pulseaudio[253956]: Information about device /org/bluez/hci0/dev_60_AB_D2_07_DB_9F is invalid
Mar 01 00:47:09 fenrir bluetoothd[40741]: profiles/audio/media.c:endpoint_reply() Endpoint replied with an error: org.bluez.Error.InvalidArguments
Mar 01 00:47:09 fenrir pulseaudio[253956]: Device doesn't exist for /org/bluez/hci0/dev_60_AB_D2_07_DB_9F
Mar 01 00:47:09 fenrir bluetoothd[40741]: src/profile.c:new_conn_reply() Hands-Free Voice gateway replied with an error: org.bluez.Error.InvalidArguments, Unable to handle new connection
Mar 01 00:47:09 fenrir pulseaudio[253956]: Device doesn't exist for /org/bluez/hci0/dev_60_AB_D2_07_DB_9F
Mar 01 00:47:09 fenrir bluetoothd[40741]: src/profile.c:new_conn_reply() Hands-Free Voice gateway replied with an error: org.bluez.Error.InvalidArguments, Unable to handle new connection
Mar 01 00:47:09 fenrir pulseaudio[253956]: Device doesn't exist for /org/bluez/hci0/dev_60_AB_D2_07_DB_9F
Mar 01 00:47:09 fenrir bluetoothd[40741]: src/profile.c:new_conn_reply() Hands-Free Voice gateway replied with an error: org.bluez.Error.InvalidArguments, Unable to handle new connection
Mar 01 00:47:10 fenrir acpid[1503]: input device has been disconnected, fd 19

And then the headset will not connect until the next boot. This is 100% reproducible for me too.
---
ProblemType: Bug
ApportVersion: 2.20.11-0ubuntu78
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: ubuntu:GNOME
DistroRelease: Ubuntu 22.04
InstallationDate: Installed on 2020-06-29 (609 days ago)
InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Release amd64 (20200423)
InterestingModules: rfcomm bnep btusb bluetooth
MachineType: LENOVO 20N4001LUS
Package: linux
PackageArchitecture: amd64
ProcEnviron:
 TERM=screen
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.15.0-18-generic root=UUID=80953ccb-1ccd-4c08-862c-22b80a0ea056 ro quiet splash vt.handoff=7
ProcVersionSignature: Ubuntu 5.15.0-18.18-generic 5.15.12
Tags: jammy wayland-session
Uname: Linux 5.15.0-18-generic x86_64
UpgradeStatus: Upgraded to jammy on 2022-01-04 (55 days ago)
UserGroups: adm cdrom dip kvm libvirt lpadmin lxd plugdev sambashare sudo
_MarkForUpload: True
dmi.bios.date: 05/16/2019
dmi.bios.release: 1.39
dmi.bios.vendor: LENOVO
dmi.bios.version: N2IET61W (1.39 )
dmi.board.asset.tag: Not Available
dmi.board.name: 20N4001LUS
dmi.board.vendor: LENOVO
dmi.board.version: SDK0J40697 WIN
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: None
dmi.ec.firmware.release: 1.9
dmi.modalias: dmi:bvnLENOVO:bvrN2IET61W(1.39):bd05/16/2019:br1.39:efr1.9:svnLENOVO:pn20N4001LUS:pvrThinkPadT590:rvnLENOVO:rn20N4001LUS:rvrSDK0J40697WIN:cvnLENOVO:ct10:cvrNone:skuLENOVO_MT_20N4_BU_Think_FM_ThinkPadT590:
dmi.product.family: ThinkPad T590
dmi.product.name: 20N4001LUS
dmi.product.sku: LENOVO_MT_20N4_BU_Think_FM_ThinkPad T590
dmi.product.version: ThinkPad T590
dmi.sys.vendor: LENOVO
hciconfig:
 hci0: Type: Primary Bus: USB
  BD Address: 3C:F0:11:76:46:BA ACL MTU: 1021:4 SCO MTU: 96:6
  UP RUNNING PSCAN
  RX bytes:59807 acl:2423 sco:0 events:3065 errors:0
  TX bytes:693869 acl:203 sco:0 commands:2826 errors:0

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Firstly good news that it partially works now. It didn't before according to bug 1620636.

What is the Bluetooth chip in the laptop (lspci / lsusb)? We probably need to check to see if it is chip-specific (a kernel bug) or a BlueZ bug.

Please also check the PID of bluetoothd to see if it's the same or different/missing after resume-from-suspend.

tags: added: a2dp jammy resume suspend-resume
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Also does the 'rfkill' command show any difference in the radio status after resume?

description: updated
description: updated
Revision history for this message
Heather Ellsworth (hellsworth) wrote : CurrentDmesg.txt

apport information

tags: added: apport-collected wayland-session
description: updated
Revision history for this message
Heather Ellsworth (hellsworth) wrote : Dependencies.txt

apport information

Revision history for this message
Heather Ellsworth (hellsworth) wrote : Lspci.txt

apport information

Revision history for this message
Heather Ellsworth (hellsworth) wrote : Lspci-vt.txt

apport information

Revision history for this message
Heather Ellsworth (hellsworth) wrote : Lsusb.txt

apport information

Revision history for this message
Heather Ellsworth (hellsworth) wrote : Lsusb-t.txt

apport information

Revision history for this message
Heather Ellsworth (hellsworth) wrote : Lsusb-v.txt

apport information

Revision history for this message
Heather Ellsworth (hellsworth) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Heather Ellsworth (hellsworth) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
Heather Ellsworth (hellsworth) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Heather Ellsworth (hellsworth) wrote : ProcModules.txt

apport information

Revision history for this message
Heather Ellsworth (hellsworth) wrote : UdevDb.txt

apport information

Revision history for this message
Heather Ellsworth (hellsworth) wrote : acpidump.txt

apport information

Revision history for this message
Heather Ellsworth (hellsworth) wrote : getfacl.txt

apport information

Revision history for this message
Heather Ellsworth (hellsworth) wrote : rfkill.txt

apport information

Revision history for this message
Heather Ellsworth (hellsworth) wrote : syslog.txt

apport information

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Heather Ellsworth (hellsworth) wrote : Re: bose quietcomfort 35 unable to connect after suspend

There is no difference in 'rfkill' before/after suspend. In both cases, the bluetooth line looks like this:

heather@fenrir:~$ rfkill
ID TYPE DEVICE SOFT HARD
 0 bluetooth tpacpi_bluetooth_sw unblocked unblocked

And the PID of bluetoothd is the same before/after suspend, and not missing. I've also added some apport info.

Revision history for this message
Daniel van Vugt (vanvugt) wrote (last edit ):

^^^
That's missing two of your radio devices (the Intel Wifi and Bluetooth), if you compare to comment #17. So it looks like the kernel devices have vanished after resuming from suspend the first time.

Changed in bluez (Ubuntu):
status: New → Invalid
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Reassigned to the kernel/firmware packages.

We next need to review what the kernel has logged during suspend/resume. Comment #18 doesn't look like enough info so can you attach the full log? (journalctl -b0)

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Actually it sounds like https://github.com/bluez/bluez/issues/272 but yours isn't crashing(?)

There's mention of QC35 in https://github.com/bluez/bluez/issues/220 too, and that it works after downgrading to BlueZ 5.61.

Both seem to be fixed in upstream master (which will be BlueZ 5.64).

Changed in bluez (Ubuntu):
status: Invalid → New
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

If you can find evidence of 'bluetoothd' crashing then it is https://github.com/bluez/bluez/issues/272 (fixed in BlueZ 5.64).

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

See also bug 1962563.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

OK the crash is a separate issue.

This is https://github.com/bluez/bluez/issues/284 which is also fixed in BlueZ 5.64.

Changed in bluez (Ubuntu):
status: New → Fix Committed
Changed in linux (Ubuntu):
status: Confirmed → Invalid
no longer affects: linux (Ubuntu)
no longer affects: linux-firmware (Ubuntu)
tags: added: fixed-in-5.64 fixed-upstream
Changed in bluez:
status: Unknown → Fix Released
summary: - bose quietcomfort 35 unable to connect after suspend
+ Bluetooth headphones unable to connect after suspend
summary: - Bluetooth headphones unable to connect after suspend
+ [jammy] Bluetooth headphones unable to connect after suspend in BlueZ
+ 5.63
Revision history for this message
Heather Ellsworth (hellsworth) wrote (last edit ):

Regarding comment #17 and missing devices from rfkill, there was just a miscommunication. I meant that the bluetooth line has not changed, and only pasted that one. But in both cases (before/after suspend), I do see all three lines as mentioned in #17. Sorry for the unnecessary confusion.

I'm also attaching a full journalctl -b0 log.

Then regarding https://github.com/bluez/bluez/issues/272 and https://github.com/bluez/bluez/issues/220, I do not have a systemd coredump so doesn't look like 272 directly. I could try to downgrade to bluez 5.61 and see if that fixes the issue (I expect it does since it was working fine till recently), but sounds like it's fixed in 5.64 so I'll test this older version if really necessary :)

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I expect this is https://github.com/bluez/bluez/issues/284 which Jeremy is going to propose the patch for.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package bluez - 5.63-0ubuntu2

---------------
bluez (5.63-0ubuntu2) jammy; urgency=medium

  * Cherry-pick 3 patches to fix some crash & reconnect issues
    (LP: #1962542)

 -- Jeremy Bicha <email address hidden> Wed, 02 Mar 2022 10:26:23 +0100

Changed in bluez (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Heather Ellsworth (hellsworth) wrote :

I just tested this version on jammy and my headset now will reconnect after a suspend without problems. Thanks so much for cherry-picking those patches!

Revision history for this message
Luis Alberto Pabón (copong) wrote :

Thank you, I was plagued by this issue on my Bose NC700 cans. In my case bluetoothd isn't crashing btw.

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

Other bug subscribers

Remote bug watches

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