Reading Time: 3 minutes
Here is how to configure a JBL Go Bluetooth (Wireless) speaker and presumably other Bluetooth external speakers to Debian GNU / Linux Wheezy 7 and Ubuntu 14.04 . 1. Install following bunch of deb packages
debian:~# apt-get install pulseaudio pulseaudio-module-bluetooth pavucontrol bluez-firmware
Here it is notable to mention pavucontrol if you have previously played more extensively on GNU / Linux you should have already used if not it is really cozy volume control tool with a lot of tuning options regarding pulseaudio stream server. Considering that like me you're using a GNOME as a desktop environment you will also need gnome-bluetooth package, e.g.:
debian:~# apt-get install gnome-bluetooth
As Pulseaudio is used as a sound streaming server in GNU / Linux (assuming your Debian version is using it you'll also need to have installed pulseaudio-module-bluetooth)
debian:~# apt-get install pulseaudio-module
For Ubuntu 14.04 GNU / Linux users the list of necessery bluetooth packages is a bit longer, if you're on this OS go and install:
debian:~# apt-get install bluez bluez-alsa bluez-audio bluez-btsco bluez-compat bluez-cups bluez-dbg bluez-gstreamer bluez-hcidump bluez-pcmcia-support bluez-tools bluez-utils python-bluez bluewho indicator-bluetooth libbluetooth-dev libgnome-bluetooth11 libbluetooth3 python-gobject python-dbus
Moreover you will need pulseaudio-module-bluetooth deb package installed in order to be able to select the desired sound output.
Next it is time to restart Bluetooth service
debian:~# service bluetooth restart
[ ok ] Stopping bluetooth: rfcomm /usr/sbin/bluetoothd.
[ ok ] Starting bluetooth: bluetoothd rfcomm.
It is also a good idea to restart pulseaudio snd streaming server in order to load the newly installed pulseaudio bluetooth module settings, to do so issue:
debian:~# killall pulseaudio
And try to establish connection from Gnome-Bluetooth to the JBL Go (press the JBL Go bluetooth button) and search from the Linux bluetooth interface, once founded connect it.
Before JBL Go appears to list listable blootooth devices you will also need to run following command:
debian:~# pactl load-module module-bluetooth-discover
This command is to connect bluetooth discovered JBL Go device to the audio sink interface.
It is generally idea to add this line also to /etc/rc.local to make the setting permanently executed on every Linux boot.
Now you can launch pavucontrol and hopefully the JBL GO bluetooth speaker should be visible as an option, check out my below screenshot:
In case you further experience issues connecting the Bluetooth Speaker I would recommend to check out this Debian a2dp page at the end of the page are troubleshooting suggestions.
Refused to switch profile to a2dp_sink: Not connected
Bluetooth headset is connected, but ALSA/PulseAudio fails to pick up the connected device or there's no device to pick. This happens because GDM captures A2DP sink on session start, as GDM needs pulseaudio in the gdm session for accessibility. For example, the screen reader requires it. See 805414 for some discussion.
Workaround 1: disable pulseaudio in gdm
In order to prevent GDM from capturing the A2DP sink on session start, edit /var/lib/gdm3/.config/pulse/client.conf (or create it, if it doesn't exist):
autospawn = no daemon-binary = /bin/true
After that you have to grant access to this file to Debian-gdm user:
chown Debian-gdm:Debian-gdm /var/lib/gdm3/.config/pulse/client.conf
You will also need to disable pulseaudio startup:
In order to auto-connect a2dp for some devices, add this to /etc/pulse/default.pa:
Logout your Desktop environment and restart gdm3 /etc/init.d/gdm3 restart or Reboot the PC and then it should be fine.
Now the sound device (bluetooth headset) should be accessible through pavucontrol and standard audio device manager.
Workaround 2: disable pulseaudio's bluetooth in gdm
The actual solution package maintainers are looking into next is to simply disable the bluetooth sink in the gdm pulseaudio daemon so that it doesn't take over the device. Add this to /var/lib/gdm3/.config/pulse/default.pa:
#!/usr/bin/pulseaudio -nF # # load system wide configuration .include /etc/pulse/default.pa ### unload driver modules for Bluetooth hardware .ifexists module-bluetooth-policy.so unload-module module-bluetooth-policy .endif .ifexists module-bluetooth-discover.so unload-module module-bluetooth-discover .endif
Though this article explains how to connect a bluetooth speaker connecting Bluetooth Speaker to GNU / Linux is done in analogous way