20

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.

Bluetooth module for PulseAudio sound server

Is present on my system, however running sudo pactl load-module module-bluetooth-discover returns:

Failure: Module initialization failed. 

How can I solve this issue? `

Subhadip Roy
  • 1,313

10 Answers10

36

One way to solve the problem is to:

  1. unpair the device
  2. run the following command on terminal: sudo pkill pulseaudio
  3. 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).

Subhadip Roy
  • 1,313
16

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:

  1. Install blueman

    sudo apt install blueman
    
  2. Delete the paired device in the bluetooth settings.

  3. Run these commands in terminal:

    $ sudo pkill pulseaudio
    $ sudo /etc/init.d/bluetooth restart
    
  4. Turn off headphones.

  5. Turn on headphones, and press green/go until headphones notification voice says "Ready to pair."

  6. Launch blueman, and from the upper right menu, right-click the icon to bring up the blueman menu. Select Setup new device.

  7. Pair the device, and when you are given an option, not Headphones, not Handsfree. Use the Audio sink option.

  8. Then when you look into the audio settings panel, the device should be displayed.

Lou Gro
  • 161
1

I had to use Lou Gro's blueman solution every time I rebooted. This fixed it for me:

https://wiki.archlinux.org/index.php/Bluetooth_headset#Gnome_with_GDM

Follow the instructions under "Gnome with GDM" (use gdm3 in the paths instead of gdm for Gnome 3)

Roger
  • 11
1

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!

1

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.

PulseAudio Volume Control Playback tab

Jomu
  • 111
1

For me, on Ubuntu 20.04, I had two problems:

  • The UI is not enabled, so the confirm device GUI can't appear. Fixed by this answer

  • After I could confirm the device, it paired, but did not show in the audio device manager. This is because the device was not trusted.

    I installed blueman as mentioned above, sudo apt install blueman, and then my bt speaker was already listed. Instead of all of the process kill, restart and pair steps, I right-clicked the speaker in blueman and chose "Trust" - and now the speaker shows as an audio output in Sound settings.

jws
  • 241
0

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)

David
  • 11
  • 4
0

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.

Martin Dorey
  • 227
  • 2
  • 8
Genjo
  • 101
  • 2
0

I didn't have any luck with /var/lib/gdm3/.config/pulse/client.conf or /var/lib/gdm3/.config/systemd/user/sockets.target.wants/pulseaudio.socket or /var/lib/gdm3/.config/pulse/default.pa - I kept seeing Debian-gdm's pulseaudio process. What worked for me was the link from https://wiki.debian.org/BluetoothUser/a2dp#Refused_to_switch_profile_to_a2dp_sink:_Not_connected to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=845938 and the removal of execute permission from the Debian-gdm user to pulseaudio in the original submission there, which I refined as follows to avoid the reboot:

sudo setfacl -m u:Debian-gdm:r /usr/bin/pulseaudio
sudo killall pulseaudio

...

Well, that's remained working for me across upgrades and reboots - I only see a pulseaudio process in my username - but I still had problems today getting my Amazon Echo to connect as a sink rather than a source. What finally worked (today) was initiating the pairing as a sink from the blueman-manager program from the blueman package.

Martin Dorey
  • 227
  • 2
  • 8
0

Had this issue on 20.04. This worked for me:

pulseaudio -k && sudo alsa force-reload
lights
  • 111