Closed reitermiller closed 1 year ago
I suspect this is an issue with the Bluez cache. I've seen similar issues when I changed the codec(s) used by bluealsa
after I've already paired the headphones. This may be fixed in very recent bluez
code (see for example https://github.com/bluez/bluez/issues/313).
In the meantime, you could try manually deleting the cache; however this is not an officially supported procedure for Bluez!. I fixed my similar issue this way. Suppose your host BT adapter is AA:AA:AA:AA:AA:AA, and your remote headphone device is DD:DD:DD:DD:DD:DD. You need to unpair your headphones first:
bluetoothctl remove DD:DD:DD:DD:DD:DD
This is is how I cleared its cache:
# start a root shell
sudo -s
# stop bluealsa
systemctl stop bluealsa
# make absolutely sure bluetoothd is not running:
systemctl mask bluetooth
systemctl stop bluetooth
# navigate to the bluetooth cache
cd /var/lib/bluetooth/AA:AA:AA:AA:AA:AA/cache
# remove the cache file for your headphones
rm DD:DD:DD:DD:DD:DD
# restart bluetoothd
systemctl unmask bluetooth
systemctl start bluetooth
# restart bluealsa
systemctl start bluealsa
# close the root shell
exit
Now re-pair the headphones and hopefully they will now attempt to connect the correct codec.
I believe Bluez has now fixed this bug in bluez release 5.65
I've been setting up a new device with BlueALSA, and got the symptoms reported here, but now clearing the Bluez cache did not help. It turns out that it is now necessary for both devices to trust each other for A2DP connections to succeed. So I fixed it using bluetoothctl telling Bluez to trust the remote device. Now connecting creates transports for both A2DP and HFP.
Seems that the symptoms reported here are all actually faults in Bluez. PopOS! 20.04 uses bluez 5.53 which is known to have problems with pairing and connecting when using the NoInputNoOutput capabililty, and also has the cache management bug. The NoInputNoOutput issue appears to have been fixed in Bluez 5.61 (it is certainly OK in Bluez 5.64) and the cache problem is fixed in Bluez 5.65.
As this issue is believed to be caused by Bluez, not BlueALSA, and there have been no further comments to suggest otherwise for nearly a year, I am closing now.
Hi, I'm experiencing problems outputting to Airpods Pro(s) over bluez-alsa v. v3.1.0-106-g177e163. I am able to output over SCO
aplay -D ass2 example.wav
, but A2DP output,aplay -D ass example.wav
returns the following:(working) output of sco playback
Hardware config:
XPS 15 7590 Pop_OS! 20.04 Focal Airpods Pro
bluetoothctl info 74:65:0C:8E:5B:9D
cat ~/.asoundrc
sudo bluealsa -p a2dp-sink -p a2dp-source