No sound on bluetooth headphone in Ubuntu 20.04
Yesterday, I updated my Ubuntu 19.10 to 20.04. As usual, I connect my Bluetooth headphone to my PC and they got connected successfully, but even if I select my headphone as output device, I got the sound through PC speakers.
But later, I notice that I'm able to hear warning sounds (like terminal beep sound) through my headphone but not all sounds.
I tried to switch audio output configuration between A2DP sink and HSP/HFP, but it still didn't work.
Later, I think that its application based that terminal is able to produce sound through Bluetooth device but other application doesn't, so it tries to play an mp3 file through terminal with ffplay and it worked, but still it's not working for other applications (Firefox, Chrome and vlc).
So, finally answering my own question.
problem seems that Ubuntu doesn't change all the audio sources to the bluetooth device you can install 'pavucontrol' to change output medium for all applications.
sudo apt-get install pavucontrol
for more details refer this answer.
This is related to incompatibilities between config files used in 18.04 and 20.04. The solution is as easy as:
mv ~/.config/pulse/ ~/.config/pulse.old
pulseaudio --k && pulseaudio --start
Original answer in: https://askubuntu.com/a/1243890/37739
Yes I had the same problem when I upgraded to 20.04. The bluetooth speaker would connect fine but then not convey the sound from a streaming movie or online radio. It had worked seamlessly before then. So based on this and other posts I read I installed pulse audio. It was still not obvious to me what to do b/c all the "output" devices were configured fine in pulse audio in system settings etc. Turns out I had to go to "Playback" on the top bar menu of pulse audio and then under Firefox (the browser I am using) I had to change the setting to the bluetooth speaker. Hope this helps someone!