LLI Wiki — My Digital Knowledge Base

Bluetooth on Arch Linux and the hands-free profile

Installing BlueZ, enabling the service, unblocking rfkill and switching a headset to the HFP profile with PulseAudio or PipeWire.

This guide summarises how to set up Bluetooth on Arch Linux, then how to route audio to a headset using the hands-free profile (HFP) with PulseAudio or PipeWire.

Install and enable BlueZ

sudo pacman -S bluez bluez-utils
sudo systemctl enable --now bluetooth.service

Check that the controller's kernel module is loaded (often btusb for a USB adapter) and that rfkill is not blocking Bluetooth:

sudo lsmod | grep btusb
rfkill list
sudo rfkill unblock all

Use bluetoothctl to pair devices and inspect the controller and devices with info. The daemon configuration file is /etc/bluetooth/main.conf.

Bluetooth audio

Install the Bluetooth module of the audio server:

sudo pacman -S pulseaudio-bluetooth

Depending on the active audio server, check its state:

systemctl --user status pipewire{,-pulse} pulseaudio wireplumber
pactl list cards
pactl list sinks

Switch a headset to the hands-free profile (HFP)

The A2DP profile (high quality, playback only) does not provide a microphone. To use the headset microphone, switch the Bluetooth card to the HFP profile. Replace bluez_card.AA_BB_CC_DD_EE_FF with the card name shown by pactl list cards:

pactl set-card-profile bluez_card.AA_BB_CC_DD_EE_FF handsfree_head_unit

To list the profiles of a device with PipeWire (replace My Headset with the device alias):

pw-dump | jq '.[] | select(.info.props."device.alias" == "My Headset") | .info.params.EnumProfile[] | {index,name,description}'

Notes

Mastodon LLIMastodon SocialFosstodon