[pulseaudio-discuss] pulseaudio bluetooth problems

Michal Suchanek hramrach at gmail.com
Sun Nov 15 12:43:35 PST 2015


I have been avoiding pulseaudio like the plague so far. Back when I
found my onboard sound card is not going to work with ALSA I tried
various sound systems including pulse as workaround only to find that
they all kind of suck.

Now I am looking into bluetooth sound and it turns out that the only
way to get bluetooth sound without porting a driver is a pulseaudio

So I rolled up mu sleeves, got an USB sound card that works with
everything (except oss), exorcised OSS4, installed ALSA, bluez and
pulse ... and after fiddling with some configuration files I got my
bluetooth headphones to connect. The fiddling was probably required
because I had some obsolete configuration around from back when I
tried bluetooth for connecting my phone.

So now I have presumably everything running 'within given parameters'.

First thing is that even after the headphones are paired and trusted
they do not automatically connect when powered on. This does not seem
to work 100% on my Chinese tablet either so it's possibly a limitation
of Bluetooth and not something pulseaudio itself is responsible for.

When I have the headphones connected I get multitude of problems.

First off, the bluetooth card has priority 0 which means that so long
as there is *any* other sound card the bluetooth one is *not* going to
get used. I tried grepping for card  priority a bit but did not find
how it is set. Fortunately, there is default sink setting which sticks
for a while so if  you go with the headphones to another room and come
back quickly they might even reconnect automagically and keep working.

When you have playback working there are multiple problems still.

A cosmetic issue is moderately loud pop in the speakers when playback
starts or is unpaused. I heard this also when I connected my
headphones to the Chinese tablet so assumed this might be power
management artifact with the speakers being disconnected when not
used. Then I heard this with the USB sound card when I gave up on
getting the bluetooth sound working anytime soon. So this does not
seem really caused by pulseaudio. Interestingly, leaving the
pavucontrol open avoids this problem as the sound card is never

One real problem (probably also worked around by running pavucontrol
at all times) is that the card gets released and disconnected every
time playback in media application gets paused. For the bluetooth
speakers this means that pausing playback a few times is going to get
your speakers disconnected and you will have to go through BT
reconnection dances to get sound again.
 I am not really sure what happens here. During the first test I took
bluetooth headphones, set them as default sink, started playback, and
got sound. Turned off BT headphones, paused and restarted playback,
and got sound on wired card. Turned on BT headphones, paused and
restarted playback, got sound on BT. But later I had BT headphones on
and pausing and restarting playback would lose sound in them
permanently after a few times. Even had to replug my USB sound card as
it would play only mono with no sound on the right channel after
trying to get BT connected many times.

The other real problem are BT reconnection dances. I went through
multiple versions of pulse (5.0/7.0/7.1) and bluez(5.23/5.33/5.36) in
an attempt to get this working properly but it's only getting worse.
Initially if the BT device was off or out of range for an extended
period of time you would have to open blueman-manager, select the
device, and select audio sink feature. The device would then reconnect
and everything would work. When connected the device would have red
marks on the feature selections indicating it is already connected.
Later I would run into the problem that the device would have these
red marks but the audio would not work - usually after pausing
playback a few times. This would be solved disconnecting and
reconnecting the device. I powered off the device to trigger a
reconnect. Even more problematic state appeared with the latest
version of bluez and pulse - after pause sound would not work but
applications trying to use pulse would not fail - they would lock up
instead. Selecting the a2dp sink feature would fail in the
blueman-manager menu saying something about error with initializing
that feature in the blueman status bar. The headset feature can still
be selected but since it's not supported connecting it has no effect.
Restarting the bluetooth and pulse services is required to fix this.
Since the a2dp sink is implemented by bluez and pulse together I have
no idea on which side the issue would be.

I am using Debian.

If you have some idea how to make pulse work with bluetooth cards I
would like to hear that. Since it's becoming a 'Linux desktop
standard' it would better be a working one.



More information about the pulseaudio-discuss mailing list