Bluetooth Compatibility
How Bluetooth works on Linux, how to pair devices, and how to fix the things that inevitably go wrong.
Current State of Bluetooth on Linux
Bluetooth on Linux is handled by BlueZ, the official Linux Bluetooth stack. It supports the vast majority of Bluetooth devices -- keyboards, mice, speakers, headphones, game controllers, and file transfers. Most built-in Bluetooth adapters (Intel, Qualcomm, Realtek) work out of the box.
That said, Bluetooth on Linux can be finicky. Pairing sometimes takes multiple attempts, audio devices occasionally connect but produce no sound, and some devices pair fine but reconnection after sleep is unreliable. The experience has improved significantly with PipeWire and recent BlueZ versions, but it is not yet as seamless as macOS or Windows.
Checking If Bluetooth Is Working
# Check if the Bluetooth service is running
systemctl status bluetooth
# If it's not running, start and enable it
sudo systemctl enable --now bluetooth
# Check if your adapter is detected
bluetoothctl
# Inside bluetoothctl:
show
# This should display your adapter's info (Name, Address, Powered, etc.)
# Alternative: check with rfkill
rfkill list bluetooth
# Make sure it shows "Soft blocked: no" and "Hard blocked: no"
# If soft blocked:
rfkill unblock bluetooth
rfkill shows "Hard blocked: yes," check your laptop's function keys (often Fn+F5 or similar) or BIOS settings.
Pairing Devices
Using your desktop's GUI
The easiest way to pair devices is through your desktop environment's Bluetooth settings:
- GNOME -- Settings > Bluetooth. Toggle on, put device in pairing mode, click to pair.
- KDE Plasma -- System Settings > Bluetooth. Or use the Bluetooth icon in the system tray.
- Cinnamon -- System Settings > Bluetooth. Similar to GNOME.
- XFCE -- Install
bluemanfor a Bluetooth manager with system tray icon.
Using bluetoothctl (CLI)
When the GUI does not cooperate, bluetoothctl gives you full control:
# Launch bluetoothctl
bluetoothctl
# Power on the adapter
power on
# Enable the agent for pairing
agent on
default-agent
# Start scanning for devices
scan on
# Wait for your device to appear, note its MAC address
# Example: [NEW] Device AA:BB:CC:DD:EE:FF My Headphones
# Pair with the device
pair AA:BB:CC:DD:EE:FF
# Trust the device (so it reconnects automatically)
trust AA:BB:CC:DD:EE:FF
# Connect to the device
connect AA:BB:CC:DD:EE:FF
# Stop scanning
scan off
# Exit
exit
remove AA:BB:CC:DD:EE:FF in bluetoothctl, then put the device back into pairing mode and try again.
Common Issues and Fixes
Earbuds connect but no audio plays
This is one of the most common Bluetooth issues on Linux. The device connects as a "headset" (HFP/HSP profile) instead of a media player (A2DP profile). Fixes:
- Open your sound settings (or
pavucontrol/pwvucontrol) and check the output device. Switch to the "High Fidelity Playback (A2DP Sink)" profile. - If A2DP is not available, the audio codec may not be installed. See the codecs section below.
- Try disconnecting and reconnecting the earbuds.
- Make sure PipeWire (or PulseAudio) Bluetooth modules are installed:
# For PipeWire (modern distros)
sudo apt install libspa-0.2-bluetooth # Ubuntu/Debian
sudo dnf install pipewire-codec-aptx # Fedora
sudo pacman -S pipewire-pulse # Arch (pulls in bluetooth support)
# Restart PipeWire
systemctl --user restart pipewire pipewire-pulse wireplumber
Xbox controller pairing
Xbox Wireless Controllers (the ones with Bluetooth, not the older RF-only models) work on Linux via Bluetooth, but pairing can be tricky:
- Make sure you have a recent kernel (5.16+ for best support) and BlueZ 5.66+
- Put the controller in pairing mode: hold the Xbox button until it flashes, then hold the small pairing button on top until it flashes rapidly
- Pair using bluetoothctl or your desktop's Bluetooth settings
- Install
xpadneofor enhanced support (rumble, battery level, better d-pad):
# Install xpadneo (improved Xbox controller driver)
sudo apt install dkms git
git clone https://github.com/atar-axis/xpadneo.git
cd xpadneo
sudo ./install.sh
# If pairing fails, try disabling Enhanced Re-Transmission Mode:
echo 1 | sudo tee /sys/module/bluetooth/parameters/disable_ertm
xone driver instead of Bluetooth.
Bluetooth keyboard pairing
Bluetooth keyboards usually pair without issues, but there are some gotchas:
- PIN entry -- Some keyboards require you to type a PIN on the keyboard and press Enter. If bluetoothctl shows a PIN, type it on the Bluetooth keyboard (not your regular keyboard).
- Login screen -- Bluetooth may not be active at the login screen / display manager. You will need a wired keyboard or USB keyboard to type your password, then Bluetooth connects after login.
- Multiple OS pairing -- If you pair a keyboard with both Linux and Windows (dual boot), each OS generates a different pairing key. The keyboard can only remember one. Re-pair each time you switch OS, or look into syncing pairing keys manually.
Device connects but disconnects immediately
This often indicates a pairing key mismatch or a power management issue:
# Remove the device and re-pair
bluetoothctl remove AA:BB:CC:DD:EE:FF
# Then pair again from scratch
# If the issue is USB autosuspend disabling the Bluetooth adapter:
# Disable autosuspend for Bluetooth
echo 'ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="8087", ATTR{idProduct}=="0029", ATTR{power/autosuspend}="-1"' | \
sudo tee /etc/udev/rules.d/50-bluetooth-no-autosuspend.rules
sudo udevadm control --reload-rules
# Check Bluetooth logs for specific errors
journalctl -u bluetooth -f
Per-Distro Setup
Ubuntu / Linux Mint
# Bluetooth is usually set up by default
# If not, install the necessary packages:
sudo apt install bluez bluez-tools pulseaudio-module-bluetooth
# Or for PipeWire (Ubuntu 24.04+):
sudo apt install bluez bluez-tools libspa-0.2-bluetooth
# Enable the service
sudo systemctl enable --now bluetooth
# Install Blueman for a GUI manager (useful on XFCE/i3)
sudo apt install blueman
Fedora
# Fedora includes Bluetooth support by default
# If needed:
sudo dnf install bluez bluez-tools
# For high-quality audio codecs (aptX, LDAC)
sudo dnf install pipewire-codec-aptx
# Enable the service
sudo systemctl enable --now bluetooth
Arch Linux
# Install Bluetooth packages
sudo pacman -S bluez bluez-utils
# Enable the service
sudo systemctl enable --now bluetooth
# For PipeWire Bluetooth audio
sudo pacman -S pipewire-pulse
# For a GUI manager
sudo pacman -S blueman # GTK-based
# or
sudo pacman -S bluedevil # KDE
Debian
# Install Bluetooth stack
sudo apt install bluez bluetooth
# For PulseAudio Bluetooth
sudo apt install pulseaudio-module-bluetooth
# For PipeWire Bluetooth (Debian 12+)
sudo apt install libspa-0.2-bluetooth
sudo systemctl enable --now bluetooth
openSUSE
# Install Bluetooth packages
sudo zypper install bluez bluez-tools
# Enable the service
sudo systemctl enable --now bluetooth
# For PipeWire Bluetooth audio
sudo zypper install pipewire-module-bluetooth
Bluetooth Audio Codecs
Bluetooth audio quality depends on the codec used. By default, Linux uses SBC, which is serviceable but not great. With PipeWire (the modern audio stack replacing PulseAudio), you can enable higher-quality codecs:
| Codec | Quality | Support | Notes |
|---|---|---|---|
| SBC | Basic | Universal -- every Bluetooth audio device | Default fallback. Acceptable quality but audibly worse than wired. |
| SBC-XQ | Good | Most devices (compatible with standard SBC) | Higher bitrate SBC. PipeWire enables this automatically when possible. No special setup needed. |
| AAC | Good | Most devices, especially Apple products | Requires libfdk-aac. Quality is good but the open source encoder is not as optimized as Apple's. |
| aptX / aptX HD | Very good | Many Android-oriented headphones | Qualcomm proprietary. Requires libldac and PipeWire. Low latency variant good for gaming. |
| LDAC | Excellent | Sony headphones and many premium earbuds | Sony's high-resolution codec. Up to 990 kbps. Works well with PipeWire. |
| LC3 / LC3plus | Excellent | Bluetooth LE Audio (5.2+ devices) | The future standard. PipeWire is adding support. Very new, limited device availability. |
Enabling high-quality codecs with PipeWire
PipeWire supports aptX, aptX HD, LDAC, and AAC out of the box on most distros, but you may need to install codec libraries:
# Ubuntu / Debian
sudo apt install libspa-0.2-bluetooth libldac2-dev libfdk-aac-dev
# Fedora
sudo dnf install pipewire-codec-aptx
# Arch
sudo pacman -S pipewire-pulse
# aptX and LDAC support is built into pipewire-pulse on Arch
# Restart PipeWire
systemctl --user restart pipewire pipewire-pulse wireplumber
To check which codec is active for a connected device:
# Using pw-dump (PipeWire)
pw-dump | grep -A5 "bluetooth" | grep codec
# Or check in pavucontrol / pwvucontrol
# The codec will be shown in the device profile name
To prefer a specific codec, create or edit ~/.config/wireplumber/bluetooth.lua.d/51-bluez-config.lua:
bluez_monitor.properties = {
["bluez5.codecs"] = "[sbc sbc_xq aac ldac aptx aptx_hd aptx_ll aptx_ll_duplex]",
}