70

I was able to listen with my BT headset, but suddenly, one day, it disappeared from sound settings forever!

I've even re-paired my headset (and its connected already) but it doesn't have any options in sound settings in order to listen from it.

When I try this command:

hcitool scan

It doesn't find any devices! Even this command:

pactl list cards short

Only lists my default sound card only! What should I do?

Tim
  • 33,500

7 Answers7

32

Extending upon Mark's answer, which basically did the trick for me.

The problem is that the bluetooth service tries to load the pulseaudio bluetooth module at startup, which fails because they require X11 to be running. You need to change the configuration so that the pulseaudio bluetooth module is loaded after X11.

  1. Tell the bluetooth service to not load the module. To do this, edit /etc/pulse/default.pa and comment out these lines by putting # characters in front of them:

    .ifexists module-bluetooth-discover.so
    load-module module-bluetooth-discover
    .endif
    
  2. Configure the module to be loaded after X11. To do this, edit /usr/bin/start-pulseaudio-x11 and add two lines:

    if [ x"$DISPLAY" != x ] ; then
        # ...
    
        # Add these lines:
        /usr/bin/pactl load-module module-bluetooth-discover
        /usr/bin/pactl load-module module-switch-on-connect
    fi
    
  3. Restart pulseaudio and bluetooh. Either reboot your machine or use the following commands:

    pulseaudio -k
    start-pulseaudio-x11
    sudo service bluetooth restart
    

This way, the pulseaudio bluetooth module should be working and Volume Control (pavucontrol) should detect the bluetooth device and list it under input and output devices.

danijar
  • 656
30

Try this command:

sudo -H pactl load-module module-bluetooth-discover

I run this whenever I have paired, and successfully connected, but still can't see them in sound settings. It essentially tells pulseaudio to load reload it's list of bluetooth devices.

Tim
  • 33,500
27

I had the same problem on Ubuntu 20.04 with my Pixus Bluetooth headphones. The ubuntu Bluetooth manager saw the headphones and correctly connected them, but ALSA didn't see them.

You can check the list of Bluetooth devices by command

bluetoothctl devices

and you can check what outputs ALSA has by command

pactl list sinks short

The solution that I found is to set option ControllerMode to bredr in file /etc/bluetooth/main.conf

# Restricts all controllers to the specified transport. Default value
# is "dual", i.e. both BR/EDR and LE enabled (when supported by the HW).
# Possible values: "dual", "bredr", "le"
#ControllerMode = dual
ControllerMode = bredr

When you changed the option restart Bluetooth service

sudo gedit /etc/bluetooth/main.conf
sudo systemctl restart bluetooth

Then connect headphones again and check that ALSA sees it. If so then it must be shown as the available output in ubuntu sound settings

pactl list sinks short
Joundill
  • 225
Alexey M.
  • 1,096
14

The headset is properly paired and shows under Bluetooth Devices but it does not show as an available INPUT / OUTPUT source for audio. The problem is that the pulseaudio bluetooth module is loaded before X11, changing a couple of config files do the trick:

PulseAudio can not load bluetooth module 15.10/16.04

nano /etc/pulse/default.pa

Comment out the following lines:

#.ifexists module-bluetooth-discover.so
#load-module module-bluetooth-discover
#.endif

nano /usr/bin/start-pulseaudio-x11

Find the following lines and add after them:

if [ x”$SESSION_MANAGER” != x ] ; then
/usr/bin/pactl load-module module-x11-xsmp “display=$DISPLAY session_manager=$SESSION_MANAGER” > /dev/null
fi

Add the following lines:

/usr/bin/pactl load-module module-bluetooth-discover
/usr/bin/pactl load-module module-switch-on-connect

This way the Pulse audio’s Bluetooth modules will not be downloaded at boot time but after x11 is started.

Mark
  • 1,531
8

I am not able to comment on the top response, but I thought I'd add that on my Ubuntu MATE 12.04 LTS Laptop, I had to do:

sudo apt-get install pulseaudio-module-bluetooth

only then did this work

sudo -i pactl load-module module-bluetooth-discover

Then I had to go into bluetooth manager app, pair the device, then set to 'Audio Sink' mode, then I could see the device within the Ubuntu Sound options and manipulate inputs/outputs!

adowdy
  • 239
6

The permanent solution would be to add the blueman PPA and update your package to the latest version which has the bug fixed: https://launchpad.net/~blueman/+archive/ubuntu/ppa

sudo add-apt-repository ppa:blueman/ppa
sudo apt-get update
sudo apt-get upgrade

That way, you should no longer have to run the

sudo -i pactl load-module module-bluetooth-discover

command every time but only once. Works for me on 14.04 LTS (Trusty)

Source

Tim
  • 33,500
1

In Ubuntu 23.10 disabling wireplumper did it: $ systemctl --user disable --now wireplumber

dr0i
  • 249
  • 1
  • 8