After updating to 16.04, bluetooth audio A2DP mode stopped working

What works for me is to connect the bluetooth device, switch to HSP/HFP mode, disconnect, reconnect and then switch to A2DP mode.

There are several bugs opened about this, check for example this one (started in 15.05) and this other one, quite older; the causes in general are not well understood.

Before starting modifying system files, you can also check Bluetooth speaker no sound in Ubuntu 16.04 (seems a different bug) and A2DP bluetooth doesn't work on 16.04 (solved in comments by a kernel upgrade).

The fix that worked for me is the following --- thanks to user RobertFM in launchpad and SimFox3 in Arch forums. All the following instructions must be executed from a root shell (sudo -i). Take care and triple check.

  1. First of all, make a backup of these files (you never know):

    cp /etc/bluetooth/audio.conf /etc/bluetooth/audio.conf.bak
    cp /etc/pulse/ /etc/pulse/
    cp /usr/bin/start-pulseaudio-x11 /usr/bin/start-pulseaudio-x11.bak
  2. Edit /etc/bluetooth/audio.conf and make it similar to this one:

    # Configuration file for the audio service
    # This section contains options which are not specific to any
    # particular interface
    # Switch to master role for incoming connections (defaults to true)
    # If we want to disable support for specific services
    # Defaults to supporting all implemented services
    # SCO routing. Either PCM or HCI (in which case audio is routed to/from ALSA)
    # Defaults to 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.
    # Headset interface specific options (i.e. options which affect how the audio
    # service interacts with remote headset devices)
    # Set to true to support HFP, false means only HSP is supported
    # Defaults to true
    # Maximum number of connected HSP/HFP devices per adapter. Defaults to 1
    # 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.
    # Just an example of potential config options for the other interfaces
  3. Edit /etc/pulse/ and comment out the line

    #load-module module-bluetooth-discover

    (you really only need to add the # at the start)

  4. Edit /usr/bin/start-pulseaudio-x11 and add the line /usr/bin/pactl load-module module-bluetooth-discover after the loading of the module module-x11-xsmp; in practice you should edit the file near the end to have a stanza like

    if [ x"$SESSION_MANAGER" != x ] ; then
        /usr/bin/pactl load-module module-x11-xsmp "display=$DISPLAY session_manager=$SESSION_MANAGER" > /dev/null
        # add this line here:
        /usr/bin/pactl load-module module-bluetooth-discover
  5. Reboot.

    Now you should be able to set your device to A2DP and enjoy high quality music:

    Sound settings

    Notice that sometime you need to Disconnect and Reconnect your device to re-enable A2DP:

    Bluetooth devices

    ...yes, it's a can of bugs. But when it works it works beautifully.

  6. Troubles after reboot

    After all of this, sometime the trick seems to work just only after the next reboot. In such a case, try to follow rmfought's answer:

    What works for me is to connect the bluetooth device, switch to HSP/HFP mode, disconnect, reconnect and then switch to A2DP mode. for me too (again, sometime). I had to even un-pair a re-pair the dongle once.

  7. If it still doesn't work...

    If this also isn't working for you, you can try with this script --- its author is keeping it up-to-date.

This is not necessarily a solution for those who need the mic, but this worked in Ubuntu 16.04 for me:

sudo nano /etc/bluetooth/audio.conf

And then add Disable=Headset under [General].


And restart the bluetooth service

sudo service bluetooth restart

And all the creds to this guy: