Bluetooth headset

This article headsets within Gentoo Linux.]]

Prerequisites
The configurations for Bluetooth and ALSA must have been previously completed.

PulseAudio
Following instructions from PulseAudio and BlueZ 5 should be sufficient to make Bluetooth headsets work (through pavucontrol for instance).

ALSA + Bluez 5
If you do not want to use PulseAudio, you can use bluez-alsa to provide integration between Bluez and ALSA.


 * Install bluez-alsa:
 * In your ALSA configuration, (system-wide) or  (user-level), specify the parameters of the Bluetooth connection (replace the MAC address with the MAC address of your device)

A static ALSA configuration is also possible, make sure to change the device name in the below examples for aplay.


 * Make sure the bluetooth and bluealsa services are started. You probably want to add them to your default runlevel via rc-config.
 * Make sure the device is paired and connected to your computer. See Bluetooth for details.
 * Test with e.g. aplay, passing the PCM device 'bluealsa'


 * For other applications, the precise option to set the output device may differ.


 * Hardware volume control:

Testing

 * Play a sound file.

If it works, please add your device to the table of working devices.

Can't open input device
Compile and load the uinput kernel module, when things don't work, and the logs show this error:

No audio service is available
After updating to -5.xx it might happen, that a Bluetooth headset is connected, but ALSA / PulseAudio fails to pick up the connected device.

An error message like this might be shown in the output of PulseAudio:

To fix this, the following needs to be done:
 * 1) Enable the audio socket of bluetoothd


 * 1) Restart bluetoothd by doing one of the following things:
 * 2) * Turn the software wireless kill switch off and on again


 * 1) * Turn the hardware wireless kill switch off and on again
 * 2) * Reboot the computer
 * 3) Reconnect the Bluetooth headset

Audio device not visible when using GDM
If you are using GDM, but not logging into Gnome (e.g. i3 instead), GDM might block your headset, which will it not being available for Pulseaudio. This will result in your headset being connected, but the applications won't see it.

As a workaround, you can switch to a different display manager (e.g. lxdm), or disable pulseaudio for GDM:

If you have created the file, make sure that GDM can read it:

Source: https://wiki.debian.org/BluetoothUser/a2dp#Workaround_1:_disable_pulseaudio_in_gdm

External resources

 * Gentoo Forums - Use headsets with Bluez 5 mini HowTo