Public bug reported:

[Impact]
On noble (bluez 5.72), some Bluetooth headsets intermittently connect with only 
the HSP/HFP profiles. A2DP never comes up until the headset is power-cycled or 
bluetoothd is restarted. On the affected system, 135 of 382 headset connections 
failed this way between July and September 2026 (about 35 %).

Cause: when the headset opens the AVDTP signalling channel, bluetoothd
arms a fixed 1-second disconnect_timeout (DISCONNECT_TIMEOUT) and starts
its own stream setup when it fires, even if the remote side is still
discovering endpoints. With PipeWire registering about 19 local
endpoints, a slow headset (here about 0.8 s before its first command,
then one GET_ALL_CAPABILITIES per endpoint) is still discovering when
the timer fires. Both sides then configure and open the same stream, the
OPEN commands collide and the stream is left stuck. Typical log:

  profiles/audio/avdtp.c:session_cb() No pending request, ignoring message
  src/service.c:btd_service_connect() a2dp-sink profile connect failed for 
XX:XX:XX:XX:XX:XX: Device or resource busy
  profiles/audio/avdtp.c:avdtp_parse_rej() SET_CONFIGURATION request rejected: 
Bad State (49)
  profiles/audio/a2dp.c:invalidate_remote_cache() Invalidating Remote SEP from 
cache

This was confirmed with a btmon capture and bluetoothd debug logs.

Upstream fixed this in commit c1d01a378f23549e57c6d439cfa740c8b32ecc17,
"avdtp: Fix triggering disconnect_timeout while discovering
capabilities" (BlueZ 5.79, upstream issue
https://github.com/bluez/bluez/issues/981). It restarts the timer
whenever a command is received. Plucky and later releases already
include it; noble (5.72-0ubuntu5.8) does not.

[Test Plan]
1. On noble with PipeWire, pair a headset that is slow to negotiate A2DP 
(reproduced with a Logitech PRO X 2 LIGHTSPEED, Airoha chipset).
2. Power the headset off and on 20 times or more, letting it reconnect by 
itself.
3. Each time, check "pactl list cards" for the a2dp-sink profiles, and 
"journalctl -u bluetooth" for the messages above.
Expected: without the patch, about 1 connection in 3 ends with HSP/HFP only; 
with the patch, A2DP is available in the vast majority of connections.

[Where problems could occur]
The change only restarts an already armed timer when an AVDTP command is 
received. A peer that keeps sending commands without ever configuring a stream 
would delay bluetoothd's own stream setup for as long as it keeps doing so. The 
same code has been upstream since BlueZ 5.79 (October 2024).

[Other Info]
The 8-line patch, applied as an extra quilt patch on top of 5.72-0ubuntu5.5 and 
then 5.72-0ubuntu5.8, has been in daily use on the affected system since 
2026-09-26: about 255 connections, with 1 confirmed and 4 probable failures, 
against about 35 % before. The remaining failures appear to come from a 
separate weakness in AVDTP OPEN collision handling, which this commit does not 
address.

Environment: KDE neon User Edition, which is based on Ubuntu 24.04
(noble); the bluez package is Ubuntu's own, unmodified, from noble-
updates/noble-security (5.72-0ubuntu5.5 at the time of the diagnosis,
now 5.72-0ubuntu5.8). PipeWire 1.2.6 / WirePlumber 0.4.17 at the time of
the diagnosis, PipeWire 1.6.0 / WirePlumber 0.5.10 now. Intel AX201
Bluetooth adapter.

** Affects: bluez (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: noble

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2175590

Title:
  [SRU] Noble: A2DP fails on headset-initiated connections (only HSP/HFP
  available) - please backport upstream commit c1d01a378

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bluez/+bug/2175590/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to