0

I have an FSL Zero Bluetooth headset which was working fine with Ubuntu until a recent update. I'm on Ubuntu 15.04. The headset is recognised as a Bluetooth device and gets connected but doesn't appear in Sound Settings. When I execute the following command, it appears in the Sound Settings but then cannot be switched to A2DP (even though the option is presented), making it unusable:

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

I have tested the headset with other devices to ensure that the headset is not at fault.

How should I get the headset to appear automatically in Sound Settings, as it did before recent updates? How can I get the headset to be used with A2DP?

d3pd
  • 3,661

4 Answers4

1

I had the same problem and for several months I have tried all possible solutions I could find to no avail,... until today!

I found the solution in post #17 in the following https://bbs.archlinux.org/viewtopic.php?pid=1526534#p1526534 (tnx SimFox3)

What I did:

First copy the files I edited

sudo cp /etc/bluetooth/audio.conf /etc/bluetooth/audio.conf_tmp
sudo cp /etc/pulse/default.pa /etc/pulse/default.pa_tmp
sudo cp /usr/bin/start-pulseaudio-x11 /usr/bin/start-pulseaudio-x11_tmp

Edit /etc/bluetooth/audio.conf

sudo nano /etc/bluetooth/audio.conf

This is in my audio.conf

# Configuration file for the audio service
# This section contains options which are not specific to any
# particular interface
[General]
Enable=Gateway,Source

# Switch to master role for incoming connections (defaults to true)
Master=true

# If we want to disable support for specific services
# Defaults to supporting all implemented services
#Disable=Gateway,Source,Socket
Disable=Socket

# SCO routing. Either PCM or HCI (in which case audio is routed to/from ALSA)
# Defaults to HCI
#SCORouting=HCI

# Automatically connect both A2DP and HFP/HSP profiles for incoming
# connections. Some headsets that support both profiles will only connect the
# other one automatically so the default setting of true is usually a good
# idea.
AutoConnect=true

# Headset interface specific options (i.e. options which affect how the audio
# service interacts with remote headset devices)
[Headset]

# Set to true to support HFP, false means only HSP is supported
# Defaults to true
HFP=true

# Maximum number of connected HSP/HFP devices per adapter. Defaults to 1
MaxConnected=2

# Set to true to enable use of fast connectable mode (faster page scanning)
# for HFP when incoming call starts. Default settings are restored after
# call is answered or rejected. Page scan interval is much shorter and page
# scan type changed to interlaced. Such allows faster connection initiated
# by a headset.
FastConnectable=true

# Just an example of potential config options for the other interfaces
#[A2DP]
#SBCSources=1
#MPEG12Sources=0

Edit /etc/pulse/default.pa

sudo nano /etc/pulse/default.pa

comment out (with an # at the beginning of the line) the following line #load-module module-bluetooth-discover

now edit /usr/bin/start-pulseaudio-x11

sudo nano /usr/bin/start-pulseaudio-x11

and after the lines

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

/usr/bin/pactl load-module module-bluetooth-discover

Restarted and I was finally able tot switch to A2DP

Hope it works for you too.

  • Hi @RobertFM. Thank you very much for your detailed suggestions. I went through all of your instructions, but without success unfortunately; the headset just won't switch to A2DP like it used to.

    Quick question: In order to get the device even to show up in sound settings, I have to now run the command sudo -i pactl load-module module-bluetooth-discover. Do you have to do this or was there something you did that made you not have to do this?

    – d3pd Jul 21 '15 at 21:39
  • 1
    I did remove and re-paired my bluetooth headset. You can try to use pavucontrol to switch to A2DP. Also open a terminal and run "tail -f /var/log/syslog" (whithout "") and see what happens when you connect your headset and try to switch to A2DP. – RobertFM Jul 23 '15 at 07:49
  • 1
    Also , on my desktop I have to have my bluetooth dongle plugged in to a USB2.0 hub to get my bluetooth headset to work correctly and without skipping. Somehow my belkin dongle does not work correctly in a USB3.0 port. – RobertFM Jul 23 '15 at 07:56
  • 1
    Also, I just noticed that the last bit of the answer was not formatted correctly. Make sure you edit /usr/bin/start-pulseaudio-x11 and add "/usr/bin/pactl load-module module-bluetooth-discover" before the last "fi". – RobertFM Jul 23 '15 at 08:04
  • Thanks for the syslog suggestion and for your modified instructions. When I look at syslog, I see the message bluetoothd[457]: Unable to get service record: Host is down (112) when I attempt to connect to the device. When I run sudo -i pactl load-module module-bluetooth-discover, I then see the messages ...Endpoint registered: sender=:1.94 path=/MediaEndpoint/HFPAG, ...=/MediaEndpoint/HFPHS, ...=/MediaEndpoint/A2DPSource, ...=/MediaEndpoint/A2DPSink. However, I still don't see the device listed in the sound settings. – d3pd Jul 24 '15 at 19:30
  • 1
    Did you use pavucontrol to change to A2DP? You could also try to install blueman and run blueman-manager and try to switch from there. – RobertFM Jul 27 '15 at 13:43
  • Hey. Thanks again for your suggestions. :) I've tried to change to A2DP in both pauvcontrol and blueman-manager and, while both can turn the headset off and can set it to duplex, neither can set it to A2DP. It's very confusing because I know the headset works fine with other devices. – d3pd Jul 27 '15 at 16:13
  • Is it a problem of the headset of the the bluetooth adapter? If it's the BT adapter, which chipsets have the problem? And which don't? – Alex Jun 05 '16 at 13:35
0

I had a similar issue with my Bluetooth headset where LDAC was working before and suddenly it was stuck in Handsfree mode with every other protocol being marked as "Unavailable" by pavucontrol.

Deleting the /var/lib/bluetooth folder and restarting the Bluetooth systemd service did the trick for me. Please bear in mind that doing this will also delete all other Bluetooth connections and settings you might have set up.

Busti
  • 101
0

On newer version of Ubuntu most issues with bluetooth audio devices not being automatically connected are caused by the fact that bluetoothd is started as a systemd service and pulseaudio is started as an XDG AutoStart service by the desktop manager (usually gdm). This means that bluetoothd tries to connect to the audio device before pulseaudio is running. This will always fail.

A quick way to fix this is as follows.

  1. Make a one line shell script to restart bluetoothd. I usually call this kick-bluetooth.
#!/usr/bin/env bash
sudo systemctl restart bluetooth
  1. Stick this somewhere on your $PATH. For example in your personal ~/bin directory.

  2. Create a kick-bluetooth.desktop file into ~/.local/autostart

[Desktop Entry]
Version=1.0
Name=Kick bluetooth
Exec=kick-bluetooth
Terminal=false
Type=Application

This will restart the bluetooth daemon when you log in. In my experience, provided you have done the things that are usually mentioned to configure pulseaudio to connect to bluetooth devices, this will ensure your headset/speakers are connected.

This may not always work without modification on non Gnome desktops. The detail on this can be found here [https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Startup/]. A way round this may be to put a file with the same name as the pulseaudio desktop file in /etc/xdg/autostart in the .local/autostart directory, this desktop file must have the Hidden= property set to true. The contents of the Exec= property from the original file should then be converted into a shell command that is prepended to the kick-bluetooth script. I have not tried this!

-1

Sorry for the delay but I hope my post will helped someone.

Obviously, for my part, on ubuntu-mate 14.04 the problem was an old version of blueman (the gui bluetooth manager)

I have just install the ppa of blueman and install the latest version for my version of ubuntu.

Voilà