Bluetooth playback stutters, drops in and out, and is unusable
If you are filing this issue with a regular release please try master as it might already be fixed. Also test with PulseAudio because if it doesn't work there it's not going to here either.
Bluetooth Radio, Bluetooth Headset, Desktop Environment, Distribution, Version (Bluez, Kernel, and PipeWire):
$ bluetoothctl devices
Device 00:0D:FD:37:80:C3 Motorola S305
Device 00:07:A4:D5:4B:A7 Motorola DC800
Distro: Fedora 34, KDE spin
Kernel:
$ uname -a
Linux <host-obscured> 5.13.13-200.fc34.x86_64 #1 SMP Thu Aug 26 17:06:39 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Bluetooth (bluez):
$ bluetoothctl --version
bluetoothctl: 5.61
Pulse audio:
$ pactl --version
pactl 14.2-rebootstrapped
Compiled with libpulse 14.2.0
Linked with libpulse 14.2.0
$ pactl info
Server String: /run/user/1000/pulse/native
Library Protocol Version: 34
Server Protocol Version: 35
Is Local: yes
Client Index: 77
Tile Size: 65472
User Name: zoin
Host Name: turezmit.zoidian.net
Server Name: PulseAudio (on PipeWire 0.3.34)
Server Version: 15.0.0
Default Sample Specification: float32le 2ch 44100Hz
Default Channel Map: front-left,front-right
Default Sink: bluez_output.00_07_A4_D5_4B_A7.a2dp-sink
Default Source: alsa_input.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp__source
Cookie: 1f06:83d0
Bluetooth hardware controller
$ lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 30c9:000e Luxvisions Innotech Limited HP Wide Vision HD Camera
Bus 003 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 003 Device 004: ID 8087:0026 Intel Corp. AX201 Bluetooth
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
$ lsusb -t
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 10000M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/12p, 480M
|__ Port 2: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 2: Dev 2, If 1, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 2: Dev 2, If 2, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 3: Dev 3, If 0, Class=Video, Driver=uvcvideo, 480M
|__ Port 3: Dev 3, If 1, Class=Video, Driver=uvcvideo, 480M
|__ Port 10: Dev 4, If 0, Class=Wireless, Driver=btusb, 12M
|__ Port 10: Dev 4, If 1, Class=Wireless, Driver=btusb, 12M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 10000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 480M
Description of Problem: Bluetooth audio devices stutter and rack-up errors (seen on pw-top) for a2dp-sink.
How Reproducible: Always happens, has never worked with this fresh fedora 34 install.
Steps to Reproduce:
- Connect to bluetooth audio device
- play audio using any app using pulseaudio, or pipewire api
- Notice pausing, hiccuping, tempo instability and unusability of audio experience
Debugging steps: As per https://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/Troubleshooting#bluetooth
- stopped pipewire w/systemctl
- started pipewire from console with "PIPEWIRE_DEBUG=4 pipewire 2>&1 | grep --line-buffered -Ei '[[EW]]|[\sbluez5|[\sa2dp|[\sbackend|[\ssco|quirk' > pipewire-bluez.log"
- examined resultant pipewire-bluez.log
- found numerous timeout and unavailable messages during play, like:
17274:[D][07667.808481][ a2dp-sink.c: 467 send_buffer()] a2dp-sink 0x56041d7c06d8: Resource temporarily unavailable
17275:[D][07667.813971][ a2dp-sink.c: 706 a2dp_on_timeout()] a2dp-sink 0x56041d7c06d8: timeout 7667950053794 5804988
17276:[D][07667.819877][ a2dp-sink.c: 706 a2dp_on_timeout()] a2dp-sink 0x56041d7c06d8: timeout 7667955858782 5804988
Actual Results: Stuttering audio playback
Expected Results: Excellent audio experience
Additional Info Eg. Additional Kernel Patches, pw-dump -N > file
(As Attachment Please):
Attached pipewire-bluez.log as prepared per: https://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/Troubleshooting#bluetooth
[pipewire-bluez.log]
(/uploads/74b6ba1dea5cf17ab0069b4591aa3de9/pipewire-bluez.log)