4

After updating to Ubuntu 21.10 that includes pulseaudio 15, my bluetooth headphone could not be set to A2DP anymore. When on this setting, no sound comes out. It is still working with HFP and HSP, but with low quality of course. It was working with A2DP before.

I followed the instruction from the post below that were for 16.04, but when I did that the headphone could not connect with bluetooth anymore: After updating to 16.04, bluetooth audio A2DP mode stopped working

I also followed these instruction but without improvement: Bluetooth Headphones refuse to use A2DP High Quality

Additionally, when the Bluetooth headset receive sound, my Bluetooth mouse is sluggish (has reaction delay). I describe the problem here: Buetooth mouse sluggish when bluetooth headset on

This happens both on Wayland and Xorg sessions.

4 Answers 4

19

For reference, if @PABlanche's solution does not works for you, you might want to try the following (which did work in my case, on a rather dirty Kubuntu install) :

  1. Purge everything related to bluetooth : sudo apt purge pulseaudio-module-bluetooth bluetooth "bluez-*" bluez

  2. Delete /var/lib/blueman and /var/lib/bluetooth

  3. Reinstall : sudo apt install blueman bluez pulseaudio-module-bluetooth --install-suggests

  4. Re-pair your devices

Et voilà ! You should be able to switch to A2DP in pavucontrol or in your DE's sound settings if it does not automatically selects it.

Source : https://www.reddit.com/r/pop_os/comments/rf4i6h/fix_for_a2dp_bluetooth_audio_on_2110/

Basically, a previous version of bluez created /var/lib/bluetooth/ incorrectly. The bluez version shipped in 21.10 is 5.60 and should create the directory properly. However, if you already have the directory (ie. from a previous pairing), then you will need to delete it first: sudo rm -fr /var/lib/bluetooth/ After removing this directory, I was able to pair with my headphones and use the A2DP Sink (which is so much better than HFP).

Hope it did help !

5
  • This works on Kubuntu, but you have to replace blueman with bluemoon, and make sure to reinstall bluez-cups. Also, for some reason I'm having to do this every few days/weeks... it's like some updates undo the workaround.
    – Gus
    Commented Jun 9, 2022 at 10:05
  • Worked, super helpful!
    – fixxxer
    Commented Nov 21, 2022 at 10:38
  • It worked fine for me on Xubuntu. Commented Feb 20, 2023 at 13:51
  • Wow, was struggling with the issue on ubuntu 23.04 for few days, your answer the only one that helped, thanks Commented May 9, 2023 at 12:50
  • When running the uninstall this removed gnome-bluetooth and bluez-cups which was not reinstalled automatically so you may need to add sudo apt install gnome-bluetooth bluez-cups
    – Simon
    Commented Oct 11, 2023 at 8:03
2

Solution: Open sound setting and put the headset on A2DP. Then open pavucontrol and mute/unmute the headset.

And voila it works as it should. I don't know why it was automatically muted in pavucontrol though, and only for A2DP.

1
  • For some this solution works. Voila!
    – Rahul
    Commented Jul 29, 2023 at 10:42
2

As @HerrCrazi said, the faulty cached configuration of the audio device needs to be reset. This can be done surgically, without wiping out the entire list of paired Bluetooth devices:

  1. Un-pair the audio device (SettingsBluetooth → the audio device → Remove Device)
  2. Turn Bluetooth off.
  3. In a terminal, find the faulty config cache file, e.g. for my PXC 550 headphones:
    sudo find /var/lib/bluetooth -path '*/cache/*' -type f | sudo xargs grep 'PXC'
    
    This will show a filename (take everything before :Name=...):
    /var/lib/bluetooth/14:75:5B:DB:D1:79/cache/00:1B:66:06:03:E8:Name=PXC 550-II
    
  4. Remove the file listed:
    sudo rm /var/lib/bluetooth/14:75:5B:DB:D1:79/cache/00:1B:66:06:03:E8
    
  5. Turn Bluetooth back on and pair your headphones again.
1
  • i just delete the cache dir and its working fine now
    – Akhil
    Commented May 9 at 19:03
0

After trying numerous solutions without success, I finally found an unconventional fix that worked for me.

My Sony XB-910N headphones on Ubuntu 20.04 would only produce muffled sound on headset mode and no sound on A2DP sink, but I managed to resolve it as follows:

First, I disconnected the headphones (without unpairing) from my computer.

Then, I connected them to my phone via Bluetooth, played some audio, and they worked flawlessly.

After disconnecting from my phone, I reconnected the headphones to my PC, and miraculously, the A2DP functionality started working again.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .