Ubuntu 20.04 no sound out of Bluetooth headphones
This is on a machine I upgraded from 18.04 to 20.04 a few days ago. No issues at all getting sound to play out of headphones on 18.04. The headphones are paired with Bluetooth. I unpaired and repaired them just to be sure. The settings panel for sound has them as an output option and I can select it without issue. However, no sound ever comes out of the headphones. I’ve even adjusted the volume both in the settings panel, in alsamixer and in pavucontrol. Nothing changes. I see no errors in the bluetooth service log. Output of:
@K7AAY: there is a huge amount of information in the output, far more than I can put in here. I put it in a pastebin: pastebin.com/VJ5EQcFb
@Raffa: already done, along with uninstalling and reinstalling Alsa and such (option #2). I try to do my homework before ever asking questions.
@Raffa, option 3 worked for me on Ubuntu 20.04LTS : I could connect to my bluetooth speaker but even though I chose it as sound output, the sound would still come out of my HDMI screen. Now it works : thank you !
7 Answers 7
This is a bug (pulseaudio #832, launchpad #1866194) with new version of pulseaudio in Ubuntu 20.04 where old config values have not been cleared and it is not routing to the correct device. The solution is to delete the old config and restart pulseaudio:
Open a terminal ( Ctrl+Alt+T ) and run the following commands:
mv ~/.config/pulse/ ~/.config/pulse.old systemctl --user restart pulseaudio
A pulseaudio fix #298 is currently in progress.
nice, worked for me also, and if want to remove the old pulse config once you succeed restarting it, just: rm -rf ~/.config/pulse.old
This worked for me, but wondering if the fix was merged in for pulseaudio control, will it get updated for 20.04 at some point during system updates?
It’s not a fix, only a workaround; I installed pulse audio volume control utility:
sudo apt-get install pavucontrol
The problem seems that Ubuntu doesn’t change all the audio sources to the Bluetooth device, in the volume control utility you will see this more clearly, the Bluetooth device is connected but not used as audio playback device. (see pulse audio volume control utility).
Find your audio source; mine was firefox since I was playing some videos from YouTube, and select the Bluetooth playback device (mine was a Xiaomi speaker) (XMFHZ02) and change it. Your device should start outputting audio.
thanks! It was clear as you mentioned after opening the pulseaudo volume control what the problem is. Worked for QuietComfort 35 II Headphone. It is even switching back to headphone as output after turn the headphone off and on again.
Does not work for me (Tzumi earbuds). Pavucontrol only shows plugged in audio. The a2dp driver does not load. I have to connect/reconnect. Not a big deal.
I reinstalled, and it worked, without having to reboot:
sudo apt install --reinstall pulseaudio pulseaudio-module-bluetooth
Then re-connect the Bluetooth headset
I know this is somehow not completely relevant BUT it saved me from a problem that I had for quite long time. So. I couldn’t change audio profiles (in order to use the headsets microphone) and I could only use A2DP Sink (only for listening)
I had a similar problem, this worked for me.
Install Pulse Audio with Bluetooth module:
$ sudo apt install pulseaudio pulseaudio-module-bluetooth
Open it and select the desired output channel in Playback tab.
The tool allows tweaking also other sound settings.
Option #3 as described here worked for me.
- I upgraded from 19.10 to 20.04
- When adjusting the volume via the volume up/down hotkeys the feedback sound would play through the headphones. They were also detected in the settings. The audio stream from other applications would still play through the laptop speakers.
- The packages @Mirek mentioned, pulseaudio and pulseaudio-module-bluetooth were already installed
If you are using Ubuntu 20.04, I would recommend to replace Pulseaudio with Pipewire . It will work with all your apps, because it aims to replace both PulseAudio and JACK, by providing a PulseAudio-compatible server implementation and ABI-compatible libraries for JACK clients..
I run Ubuntu 20.04.3 and Pipewire runs very stable so far. My bluetooth headset works with Microsoft Teams now. In my case I run Bitwig, Spotify, Youtube etc. at the same time and it just works with every output device (Bluetooth Headset, RME Audio Interface, internal speakers).
I post the link for the installation steps, which worked for me: Replacing Pulseaudio with Pipewire in Ubuntu 20.04
After a few reboots, it seems to be working. I’m not sure specifically which thing worked, but here are the things I tried.
- Everything in this answer: Ubuntu 18.04: Audio doesn’t work unless I switch between outputs
- Un-pairing and re-pairing my BlueTooth headphones. I am using blueman-applet.
- Muting and unmuting the sound in AlsaMixer across all devices.
- Selecting, deselecting and reselecting the headphones output in the configuration panel for sound.
Same here — installed from scratch 20.04 and no sound. Actually, Bluetooth «tester» in Settings works well. But none of the applications can emit sound.
Bluetooth device paired and connected (no sound)
I’ve got a Bluetooth headset which works great in both Windows 8 and Android 4.2 however on Ubuntu (13.10) it just doesn’t seem to work. I installed Blueman, it paired and connected successfully when I tried Audio sink but it still doesn’t show up in my Sound Settings nor PulseAudio which I installed and tried. All there is in my Sound Settings is «Analog Output». I tried several fix like changing and adding things in /etc/bluetooth/audio.conf without any success. I’ve restarted the bluetooth service several times in the process as well. Let me know if you need more information from me and my system. Kind regards, Michael.
8 Answers 8
I’m on Ubuntu gnome 16.04. Solution is to enable auto-detection, pair the headset again and select it in the list of output audio devices.
- Change #AutoEnable=false to AutoEnable=true in the /etc/bluetooth/main.conf (notice new line is un-commented)
- Unpair the headset
- Restart the bluetooth service sudo /etc/init.d/bluetooth restart
- Pair your headset again and connect it
- Go to sound settings. From the output device tab you should now see the headset listed along with other output device like internal speakers
- Choose it as the sound output device.
when I did that I couldn’t pair the device at all anymore. «failed to add device» + some ubuntu internal error
I’m with the same problem, after pair the headset, I’m using the pulseaudio -k command, then the device shows up in the Sound Settings and it works.
It’s not a good solution, but it was what I got until now.
I see I’m not the only one with that specific issue. I’ll give you the answer for leading me towards the right path and I’ll stay up to date in your question instead. Thanks
LOL don’t say it’s not good. It just kills pulseaudio which starts itself up again. that’s a very nice and easy solution 😀
Info: -k | —kill Kill an already running PulseAudio daemon of the calling user (Equivalent to sending a SIGTERM).
The following worked for me.
There’s an option in /etc/bluetooth/audio.conf called AutoConnect=true . Make sure this is not commented (i.e. no hashes) (change #AutoConnect=true to AutoConnect=true )
This will make pulseaudio recognize the device.
Note: For Ubuntu 14 and up, the file is called /etc/bluetooth/main.conf .
This worked for me, thanks! After changing this option I had to remove the device from the Bluetooth menu and re-pair it, after it appeared!
I’m on Ubuntu 15.10 Gnome and for me AutoEnable=true in /etc/bluetooth/main.conf did the trick. Thanks.
I’m on Ubuntu GNOME 16.04 and I’ve found a solution that works perfectly here:
On ubuntu user is gdm and not Debian-gdm, here are the exact instructions:
In order to prevent GDM from capturing the A2DP sink on session start, edit /var/lib/gdm3/.config/pulse/client.conf (or create it, if it doesn’t exist):
autospawn = no daemon-binary = /bin/true
After that you have to grant access to this file to gdm user:
$ chown gdm:gdm /var/lib/gdm3/.config/pulse/client.conf
In order to auto-connect a2dp for some devices, add this to /etc/pulse/default.pa:
load-module module-switch-on-connect
Reboot.
Now the sound device (bluetooth headset) should be accessible through pavucontrol and standard audio device manager.
Bluetooth speaker connected but not listed in sound output
I can successfully connect a Mi BlueTooth speaker to Ubuntu, but I cannot play sound through it, because it is not listed in my sound output list.
Failure: Module initialization failed.
10 Answers 10
One way to solve the problem is to:
- unpair the device
- run the following command on terminal: sudo pkill pulseaudio
- and then pair again the speaker via bluetooth.
The speaker is now displayed on the output audio list, which needs to selected for obtaining output sound.
Remember to, under Sound Settings, change Mode to High Fidelity Playback (A2DP Sink) .
I did not even have to disconnect the device, let alone unpair. Just killed pulseaudio and reconnected with bluetoothctl. It worked. Weird.
+ 1 My speaker was only visible and working for one logged in user (yes I concurrently log under different users on my computer). Unpairing and killing pulseaudio helped pair it back to the user I needed to output the sound with ATM.
This is what is working for me for Bose QuietComfort 35 on Ubuntu 16.04. pauvcontrol didn’t do it for me, and neither did the numerous settings changes and module loadings recommended elsewhere. So give this a try:
$ sudo pkill pulseaudio $ sudo /etc/init.d/bluetooth restart
This ‘kind of’ works for me, my QC35 appears in the sound output again. But it connects in HSP/HFP mode (mono). I cannot switch it to A2DP stereo mode.
and.. after getting frustruted and pkilling pulseaudio 1000 times in a bash loop, somehow it started working in A2DP mode again. Bluetooth is an absolute nightmare on ubuntu :/
I had to use Lou Gro’s blueman solution every time I rebooted. This fixed it for me:
Follow the instructions under «Gnome with GDM» (use gdm3 in the paths instead of gdm for Gnome 3)
For me the easiest and right solution to that was:
sudo apt install pulseaudio-module-bluetooth
then i removed the device from the bluetooth known devices, reboot and all worked. I can now see the headphones as sound output in sound settings. Hope it helps!
This is old, but I had the same problem on 18.04 and none of the solutions offered worked for me.
What worked for me, at least for Audacious, was to start PulseAudio Volume Control, and after I started Audacious — I selected Mi Bluetooth Computer Speaker from the dropdown.
I had a lot of trouble getting my No Bounds speaker to connect. Clicking the Bluetooth icon in the taskbar showed 3 devices called ‘No Bounds’. The first one would connect, then disconnect in 10 secs. So I decided to delete the device. Then when I turned on the No Bounds, it connected! Now works perfectly (LM19.1)
I followed the Debian documentation troubleshooting help for A2DP («Advanced Audio Distribution Profile») that works for me:
In order to prevent GDM from capturing the A2DP sink on session start, edit /var/lib/gdm3/.config/pulse/client.conf (or create it, if it doesn’t exist):
autospawn = no daemon-binary = /bin/true
After that you have to grant access to this file to Debian-gdm user:
chown Debian-gdm:Debian-gdm /var/lib/gdm3/.config/pulse/client.conf
You will also need to disable pulseaudio startup:
rm /var/lib/gdm3/.config/systemd/user/sockets.target.wants/pulseaudio.socket
In order to auto-connect a2dp for some devices, add this to /etc/pulse/default.pa:
load-module module-switch-on-connect
Reboot.
Now the sound device (bluetooth headset) should be accessible through pavucontrol > and standard audio device manager.