[pulseaudio-discuss] bluetooth headset found but not showing in pavucontrol

Peter Hurley phurley at charter.net
Wed Sep 23 07:22:44 PDT 2009


Brian J. Murrell wrote:
> Hi all.
>
> I have a bluetooth dongle on a machine with PA 0.9.18 (Ubuntu Karmic) on
> it and a headset paired successfully.  From the PA debug (-vvvv) output,
> it appears that PA sees the headset but then removes the bluetooth
> module, for whatever reason:
>
>   
The reason PA unloads the BT device module is here:

I: module-bluetooth-device.c: FD error: POLLERR 
D: module-bluetooth-device.c: IO thread failed

This is happening because there is some problem setting up a SCO 
connection (bluetooth transport protocol specified by headset 
profile/hands-free profile) to the headset.

Your options moving forward:

1)  Troubleshoot bluez for why the SCO connection is failing.  Start 
with the very newest bluez (there have been a few audio-related bug 
fixes in recent weeks).  Debug logging of the user-level daemon (where 
much of the audio-related BT support resides) is enabled with:
    sudo kill -USR2 [process_id of /usr/sbin/bluetoothd]
and logged to /var/log/daemon.log on Ubuntu.  Also running,
    sudo hcidump -t -X -V
can be helpful in the diagnostic process (look for the result code in 
the "Synchronous Connect Complete" packet and what happens after).

If the above seems like a hassle, that's because it is.  Unfortunately, 
there is no way via configuration in pulseaudio to have A2DP be the 
preferred profile for discovered bluetooth devices (presumably because 
HSP/HFP is more common).

2)  If you only want A2DP and don't want pulseaudio connecting via 
HSP/HFP, you can only do it per-device and must sacrifice BT device 
discovery.  Comment out the load of module-bluetooth-discover in 
/etc/pulse/default.pa and add the following line to the same file 
(replace xx:xx:xx:xx:xx:xx below with your headset's BT_ADDR):
    load-module module-bluetooth-device address=xx:xx:xx:xx:xx:xx 
profile=a2dp
You can do this via the command line as well:
    pactl list      <-- to find module # of module-bluetooth-discover
    pactl unload-module [module# of module-bluetooth-discover]
    pactl load-module module-bluetooth-device address=xx:xx:xx:xx:xx:xx 
profile=a2dp

3)  Modify & build a custom version of pulseaudio that prefers A2DP 
rather than HSP/HFP.  Hint:  Look at add_card() in 
pulseaudio/src/modules/bluetooth/module-bluetooth-device.c.  You can 
change the profile priority values...

Cavaets:
1)  The headset has to already be on when module-bluetooth-device loads 
or it selects the off profile.
2)  Selecting a different profile can be done with pavucontrol via the 
"Configuration" tab or within the quasi-shell pacmd via the 
set-card-profile command.
3)  pavucontrol 0.9.8 terminates with pulseaudio 0.9.17+.  It's looking 
for a headset icon that doesn't exist.  (you can fake it by stuffing a 
audio-bluetooth-headset.svg file in $HOME/.icons).
4)  The terminate bug above has reportedly been fixed for a while but 
only just released in pavucontrol 0.9.9.  pavucontrol 0.9.9 is not yet 
packaged for Ubuntu.  Good luck if you want to get that working on your 
own...

Regards,
Peter Hurley



More information about the pulseaudio-discuss mailing list