Page 1 of 1

PulseAudio not allowing A2DP for Bluetooth headset

Posted: Tue Aug 25, 2015 10:58 pm
by goldwing
Searched forums, etc, and found a lot of issues with audio, but didn't find an exact
match to current problem:

Setup: Fresh install of Mint-XFCE 17.2 onto Thinkpad W520 laptop.
All available updates also applied.

I am trying to use a Bose AE2w headset (bluetooth) for audio output.
I can pair with the device with no difficulty. However:
  • By default, the volume control program ("pavucontrol") doesn't
    recognize the presence of the headset at all.

    Following a suggestion found in other postings, I found that
    the following command solves this problem, though only for the
    current session:

    pactl load-module module-bluetooth-discover

    So first question is: how do I fix the system such that this module
    is properly loaded at system boot time? [via "/etc/pulse/system,pa"
  • The bigger problem, and main reason for this posting, is that even
    after issuing this command, the volume control panel (pavucontrol)
    still does not allow me to set the profile for the headset to the high
    fidelity profile (A2DP). [Yes, the headset supports A2DP]

    It provides no other options other than the telephony profile (HSP/HFP).
    So I can play sound through the headset, but it is only very low quality monaural.

    Any ideas how to fix this?

Re: PulseAudio not allowing A2DP for Bluetooth headset

Posted: Tue Sep 15, 2015 8:21 am
by Naeblis
I'm having similar issues, but slightly different. I just installed the latest stable cinnamon build. When I first pair my Bose AE2W headphones I can change the setting to A2DP and the sound sounds great. However, as soon as I disconnect and reconnect I can still technically select A2DP, but it doesn't actually change to A2DP. Then if I unpair and repair, I can now listen with A2DP again :?:

Re: PulseAudio not allowing A2DP for Bluetooth headset

Posted: Tue Sep 15, 2015 2:01 pm
by robert-e
@goldwing...are you sure the problem is with pulseaudio? You might want to check the bluetooth configuration file /etc/bluetooth/audio.conf...near the bottom there are some extra options that you could enable. I think there is also a way to make A2DP the preferred connection type (as opposed to headset/mic type). I recall experimenting with these settings about a while ago when I was having the same problems as you with bluetooth in Mint 17.2 Mate. What really bothered me is that bluetooth work flawlessly in Mint 13 Mate. No one seems to know or wants to say what exactly broke it in 17.2. There was obviously a problem as Clem made the point that bluetooth did not come with the distribution, but rather needed to be installed.
Oh yes, I run a script in startups to make pulseaudio do the right thing on boot. I placed it in /usr/bin, and made it executable. Add the command to Preferences=> Startup Applications.

sleep 20
pactl load-module module-bluetooth-discover


Re: PulseAudio not allowing A2DP for Bluetooth headset

Posted: Tue Sep 15, 2015 4:41 pm
by JeremyB
You should only have to run the load-module module-bluetooth-discover once unless you are using the blueman bluetooth manager. It might be worth checking the blueman website to see if a newer version is available there or using the Synaptic Package Manager

Edit: go to get Blueman that works without having to run the load-module command every reboot, just be sure to choose a download site from amd64 for 64 bit installs and i386 for 32 bit installs

Re: PulseAudio not allowing A2DP for Bluetooth headset

Posted: Wed Sep 16, 2015 8:31 pm
by robert-e
I did install the utopic change...I still needed the script to make it work.


Re: PulseAudio not allowing A2DP for Bluetooth headset

Posted: Fri Sep 25, 2015 1:14 pm
by goldwing
are you sure the problem is with pulseaudio?
I don't know that the problem lies totally with pulseaudio.
However, the need to do a pactl load-module module-bluetooth-discover,
even though the module is already specified to be loaded in
/etc/pulse/, suggests at least part of the problem
lies with PA. Beyond that, I don't know the underlying mechanisms
well enough to diagnose it well (I never even heard of PulseAudio
until I started researching this problem!).

I just reinstalled Mint 17.2, because I decided to convert my disk
from traditional partitions to LVM. I only now have gotten back to
examining the audio issue. What I am seeing now seems to be
slightly different behavior than what I observed before, though
I am not 100% certain of that.

What I find now:
  • I can pair with the headset just fine.
  • The volume control (pavucontrol) does not know about the device.
  • Issue the aforementioned pactl load-module command. Volume control still does not notice the device.
  • Reconnect the bluetooth device. pavucontrol now becomes
    aware of the device. I suspect that if I had done the load-module
    before pairing the headset, it would have been noticed the first time
    around (I am guessing that there is some sort of interprocess notification
    mechanism that is not happening unless the module is loaded, and that
    loading the module does not retroactively broadcast notifications about already connected devices).
  • Though pavucontrol is aware of the device -- it shows up under
    the Configuration tab -- it still is not shown under the
    Output Devices tab.
  • To fix the above problem, I must go to the Configuration
    pane and explicitly turn off all other devices. Then enable the headset.
    pavucontrol does let me select high fidelity (A2DP) mode for
    the headset at this time. Now the audio comes through the headset, and in
  • If I re-enable other devices under the config tab, pavucontrol
    will show all of them in the Output Devices pane. However it is not
    possible to select which one is active, much less do something more
    sophisticated such as enabling simultaneous output on multiple devices.
    It just seems to choose one device more or less at random, and it cannot be
    changed without manually disabling all other devices than the desired one.
What really bothered me is that bluetooth work flawlessly
in Mint 13 Mate
Agreed. It worked flawlessly for me too in the past (I was using
Ubuntu 10.04 then). The sound icon in the notification area of the
desktop also allowed for instant and easy selection of any available
output device without needing to start up another application like
pavucontrol. This is a serious regression.
I run a script in startups to make pulseaudio do the right
thing on boot...
Yah, I thought of doing the same. I'm curious about the "sleep 20"
you put in your script. Why was that needed?

Re: PulseAudio not allowing A2DP for Bluetooth headset

Posted: Fri Sep 25, 2015 3:01 pm
by goldwing
Grr. It just gets better and better ... An addendum to last update ...

During a period of inactivity my headset went into idle mode. When the inactivity ended, the headset came back up. But bluetooth and pavucontrol are both acting utterly wacky.

Bluetooth doesn't want to connect audio sink (A2DP). Sometimes I get messages like "Stream setup failed". Sometimes, after a fitful series of unpairing and re-pairing, I can get it to reconnect with audio sink and headset service both recognized. Sometimes, the bluetooth applet will have a menu entry [a submenu under the Device menu] called "Audio Profile" where I can select between telephony and high fidelity. It will fail if i try the hi fidelity option (even though both services are connected). Most of the time, this submenu is missing altogether, regardless of what services are connected.

Meanwhile, pavucontrol is also totally flaked out. Sometimes it won't show the headset at all in the config pane. Sometimes it shows multiple copies of it. If shown, I can enable "High Fidelity Playback" (the option itself is present and enabled), but the device will not show up in the Output Devices pane. Instead a "Dummy Output" device will show up there. No actual audio output at all, no matter what I try.

So now, I have no ability to use my headphones at all. Sigh. The bluetooth support in this version of Mint is a disaster. >:-(

From what I see with google searches, a lot of folks are hitting these issues (seems to be inherited from ubuntu or debian). I have not been able to find anything that has an actual viable solution, not even a stopgap workaround.

Re: PulseAudio not allowing A2DP for Bluetooth headset

Posted: Fri Sep 25, 2015 4:54 pm
by JeremyB
Is there another option for a bluetooth manager other than Blueman?

Re: PulseAudio not allowing A2DP for Bluetooth headset

Posted: Sun Sep 27, 2015 8:43 pm
by robert-e
Re the "sleep 20"; originally I tried the script without was flacky, perhaps due to a race condition. From my readings, apparently blueman calls pa, and pa sets up. Then blueman turns off (rfkill?) and pa unsets it. Thus the call in the script. I saw the same script (can't remember where) with the sleep command. It works, but like you found, the whole bluetooth/pulseaudio services are flacky; with the disconnets/unpairing happening at unpredictable times.

Still awaiting some comment on this issue from Clem; he has been remarkably silent. Perhaps he does not read the forums?

Best regards,

Edit...I remember now; when setting up a "boot-up" command in a DD-WRT router, it needed a sleep 20 command to give the (Linux) OS time to start in Wireless Repeater mode. (Needed to set the SSID to null.)