Public bug reported: [Impact]
* With WirePlumber 0.5.17 (stonking, tenacious), a Bluetooth headset mic delivers about half a second of audio and then nothing, from the second use onwards. It happens when something played on the headset during the previous call (a notification, a dictation cue, a call ringtone). Apps see a running stream that never gets data. * WirePlumber 0.5.17 removes nodes asynchronously. The old HFP speaker node still exists when the SCO transport is released, and media-sink marks that release as a transport error. The error stays on the transport. On the next switch to headset mode, the second acquire of the transport re-sends the stale error and the new mic and speaker nodes go to error for good. * Upstream fix: b7246d0d "bluez5: deal with asynchronous device and node removal", released in PipeWire 1.6.11 as 5412be368. Removed nodes now stop and drop their transport before removal. https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/b7246d0d5ddc79cbab06e7e55f6dda37c446118d https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/5412be3685d632afad7cb338cfd393f04e97a7f8 * Resolute is not affected (WirePlumber 0.5.13). [Test Plan] * Needs a Bluetooth headset with an HFP mic, connected and on an A2DP profile, with the default WirePlumber setting bluetooth.autoswitch-to-headset-profile=true. * Replace the MAC below with the headset's, then run: MAC=00:18:09:37:27:97; M=${MAC//:/_} sox -n -r 48000 -c 2 /tmp/silence.wav trim 0 3 for i in 1 2 3 4 5 6; do timeout -s INT 4 pw-record --target bluez_input.$MAC --rate 16000 \ --channels 1 --format s16 /tmp/tp-$i.wav & sleep 0.1 timeout 4 pw-play --target bluez_output.$M.1 /tmp/silence.wav & wait echo "run $i: $(( ($(stat -c %s /tmp/tp-$i.wav) - 44) / 32000 )) s" sleep 6 done * Broken: run 1 records about 3 s, runs 2 to 6 record 0 s (under 1 s), and journalctl --user -u wireplumber shows "bluez_input.<mac>.0-<id>) running -> error (Received error event)". * Fixed: every run records about 3 s and no such line appears. * Also check: A2DP playback and an HFP call work as before, and headset connect, disconnect and reconnect work. * Reproduced on stonking (1.6.8-1ubuntu4, WirePlumber 0.5.17-1ubuntu1) with a Sony WH-CH500: 5 of 6 runs fail. With the patch on the same tree built from source: 0 of 8 fail. [Where problems could occur] * The patch changes how bluez5 nodes and devices are torn down. On a node removal, media-sink and media-source now stop, release and drop their transport early. bluez5-device clears its device pointer on destroy, with new NULL checks. * A mistake would show up as Bluetooth audio stopping or not coming back after a profile switch, codec switch, disconnect or adapter removal, or as a WirePlumber crash in libspa-bluez5 during those transitions. * Only the Bluetooth plugin (libspa-0.2-bluetooth) changes. [Other Info] * Upstream reports of the symptom: https://gitlab.freedesktop.org/pipewire/wireplumber/-/issues/1035 * Found through https://github.com/canonical/myna/issues/98, where Myna's dictation cues trigger it on every other press. * The tenacious upload (1.6.8-1ubuntu5) carries the same patch, so stonking does not get ahead of the development series. ** Affects: pipewire (Ubuntu) Importance: Undecided Status: New ** Affects: pipewire (Ubuntu Stonking) Importance: Undecided Status: New ** Affects: pipewire (Ubuntu Tenacious) Importance: Undecided Status: New ** Tags: stonking tenacious ** Also affects: pipewire (Ubuntu Stonking) Importance: Undecided Status: New ** Also affects: pipewire (Ubuntu Tenacious) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2173777 Title: Bluetooth headset mic stops after a headset profile switch with WirePlumber 0.5.17 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/pipewire/+bug/2173777/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
