I tried all the suggestions here to get my a2dp-mode with my bluetooth headphones to work in Ubuntu 13.10. After installation of Ubuntu 13.10 with kernel 3.12.rc4, the headphones were shown in sound-settings after pairing them and applying the command pulseaudio -k, which kills the pulseaudio-service. However, I still could not choose them and the sound kept playing over the internal speakers of the laptop.
This worked for me:
1) open configuration file
gksudo gedit /etc/bluetooth/audio.conf
and add under [General]:
Disable=Socket
I also uncommented the line (removing the #) that reads:
AutoConnect=true
2) reinstall pulseaudio and bluez, do NOT omit to install pulseaudio-module-bluetooth
sudo apt-get install --reinstall pulseaudio pulseaudio-utils pulseaudio-module-bluetooth
sudo apt-get install --reinstall bluez bluez-alsa bluez-audio bluez-gstreamer bluez-hcidump bluez-tools bluez-utils
Once I had done so, I restarted and connected by headphones using the bluetooth-settings, which worked fine. Still I did not see the headphones listed in sound-settings* in Unity. However, once I opened **pulseaudio-volume-control and selected the configuration-tab, I saw the headphones, but the associated profile was set to off. I changed that to A2DP and the headphones were listed in sound-settings. Since I done that, the headphones are shown in sound-settings immediately after connecting.
NOTE: I had the bazaar fork installed as described above, but removing it once the headphones connected did work.
Try this:
sudo apt-get purge bluez # remove old versions
sudo add-apt-repository ppa:vidplace7/bluez5
sudo apt-get update
sudo apt-get install bluez
This adds the PPA for Bluez 5 and installs BlueZ.
Best Answer
I needed to install the bluez-5.43 to get around bugs in the default bluez-5.37 when using bluetoothctl from scripts.
You could probably install the binary version from Zesty, but my experience is that you often run into other dependencies.
I just install the deb-src package from Zesty. You probably need to install other dependencies too, here is what I had to do.
For an explanation of what is happening here, please consult
https://askubuntu.com/a/771272/655086