Pulseaudio not detecting bluetooth headset automatically

The Pavucontrol on my Xubuntu 13.10 detects my bluetooth headset, but only after I type the commands :

pulseaudio -k
sudo alsa force-reload

After a few seconds the headset appears in the configuration tab.

I have also tried inserting the line

load-module module-switch-on-connect

in the /etc/pulse/default.pa but it doesn't help. I have tried purging and autoremoving and reinstalling everything right from alsa to pulseaudio and pulseaudio-module-bluetooth. Nothing works.

Is there a workaround to load the headset without using the command force-reload ? To make the pulseaudio daemon recognize the device automatically ?

I tried adding :

 pcm.bluetooth { type bluetooth device "XX:XX:XX:XX:XX:XX" profile "auto" }

to a file .asoundrc in my home directory but it doesn't make a difference

After killing the pulseaudio daemon, my even volume hotkeys stop working. I have to assign

amixer set Master 4%- -q unmute
amixer set Master 4%+ -q unmute

to some other key combination to manage the volume from keyboard. Assigning the commands to the hotkeys doesn't work. How are the volume keys bound to the daemon ? Is there any other way of binding the keys to the new daemon (after restarting) ?

UPDATE

Found the problem. Using the command

pactl list | grep -i module-bluetooth-discover

I found out that the bluetooth discover module was not loaded.

But my default.pa file in /etc/pulse contains the lines

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

So why does the module not load on pulseaudio startup ?

After issuing the command

sudo pactl load-module module-bluetooth-discover

The bluetooth headset works properly and is detected automatically, without killing and restarting alsa.

6

9 Answers

I found a fix for this on another answer, 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/16.10

vim /etc/pulse/default.pa

Comment out (with an # at the beginning of the line) the following line:

#load-module module-bluetooth-policy
#load-module module-bluetooth-discover

Now edit the file /usr/bin/start-pulseaudio-x11 find the following lines:

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

and change them to this:

 if [ x"$SESSION_MANAGER" != x ] ; then /usr/bin/pactl load-module module-x11-xsmp "display=$DISPLAY session_manager=$SESSION_MANAGER" > /dev/null # # Added per StackExchange # /usr/bin/pactl load-module module-bluetooth-policy /usr/bin/pactl load-module module-bluetooth-discover fi

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

This fix goes against the current suggestion at:

4

This:

sudo apt-get install pulseaudio-module-bluetooth
sudo pactl load-module module-bluetooth-discover

worked for me on Ubuntu 14.10 (Lenovo x240) to have at least my bluetooth device listed in pulseaudio.

2

It seems there is an issue with some (legacy?) code in Blueman which deliberately unloads module-bluetooth-discover on startup (i.e. after it's been loaded from /etc/pulse/default.pa. For more details see here: .

I know this is a bit of an old post. But as I recently had the same problem I came across a rather simple solution: just install pulseaudio-module-bluetooth

sudo apt-get install pulseaudio-module-bluetooth

good luck with that :)

sudo apt-get install pulseaudio-module-bluetooth

Worked for me too, but it was not persistent after a reboot, and I also had to manually set the default audio device in volume control each time.

Adding it to .profile also didn't work - unless it was preceded with an 8 second sleep delay.

Found a solution that worked persistently with just a few clicks:

Right-click the blueman icon -> Plugins

And disable the PulseAudio plugin.

2

After analize tons of post my conclusion is that blue man is unloading deliberately the module module-bluetooth-discover, so in my case the solution was uninstall blueman from my system. After that, everything works ok.

1

Running Xubuntu 13.10 64bit I had the same problem. Loading module-bluetooth-discover manually fixes the problem. I it also fixes it permanently. I rebooted and the headset worked without loading module-bluetooth-discover. Seems it has to be successfully connected once and then it's working fine.

I wonder why default.pa contains module-bluetooth-discover and the module is present on disk but it is not listed in pactl list?

Also look at configuration tab in pavuvontrol and set the profile of the headset. I have the choice between off/a2dp/hfp, default was off, so no pulseaudio input or output appeared even though the headset was connected.

2

I also have this problem on ubuntu 14.04. The simpliest solution is just add official blueman devs ppa:
It works for me after update.

2

[UPDATE]

On KXStudio there is an special setup with Cadence, the right files to edit are located at /usr/share/cadence/pulse2jack/, there are 2 files play.pa and play+rec.pa. Add this to both:

load-module module-bluetooth-policy
load-module module-bluetooth-discover

[Original - good for debugging]

On Ubuntu+KDE and KXStudio I'm using an autostart script like this:

#!/usr/bin/env sh
sleep 10
/usr/bin/pactl load-module module-bluetooth-policy
/usr/bin/pactl load-module module-bluetooth-discover

ALSO, make sure you did this as well:

sudo apt install pulseaudio-module-bluetooth pavucontrol

It is very important to have pavucontrol in order to switch among profiles (high fidelity A2DP or headset HSP/HFP)

AND, if you are unlucky, then it might be due to your antenna settings, so try this:

sudo rfkill unblock 0
sudo hciconfig hci0 up

Now enjoy your wireless headset!

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like