GNOME Bluetooth Audio Codec Selection: LDAC and aptX
This article explains how the GNOME desktop environment handles Bluetooth audio codecs like LDAC, aptX, and AAC. It covers the underlying audio subsystem—primarily PipeWire and WirePlumber—that enables high-fidelity wireless streaming, the software components required for codec support, and the exact steps to configure and switch codecs directly from the GNOME graphical user interface and the command line.
The Audio Architecture: PipeWire and WirePlumber
Modern versions of GNOME (starting predominantly with GNOME 40 and standardized in GNOME 42 and later) rely on PipeWire alongside the WirePlumber session manager rather than legacy PulseAudio.
PipeWire includes native support for high-resolution Bluetooth audio
through its spa-bluez5 (Simple Plugin API) module. When a
Bluetooth headset or speaker connects, PipeWire handles the A2DP
(Advanced Audio Distribution Profile) negotiation and exposes all
compatible audio profiles to the desktop session. GNOME does not process
the audio compression itself; instead, the GNOME Control Center
(Settings) acts as a front-end management layer that interfaces with
PipeWire via PulseAudio-compatible APIs or native D-Bus interfaces.
Codec Availability and Dependencies
For GNOME to offer proprietary or high-bitrate codecs like LDAC, aptX, aptX HD, and AAC, the appropriate user-space libraries must be installed on the Linux distribution:
- LDAC: Encoded using the open-source
libldaclibrary. Most distributions package this out of the box with PipeWire. - aptX and aptX HD: Typically provided via
libfreeaptxorffmpeg. - AAC: Powered by the Fraunhofer
fdk-aaclibrary. - SBC and SBC-XQ: SBC is mandatory for all Bluetooth devices, while SBC-XQ (an unofficial, higher-bitrate implementation) is built into PipeWire to provide quality comparable to aptX without proprietary codecs.
Once these libraries are installed on the system, PipeWire's Bluetooth plugin automatically registers them, making them selectable inside GNOME.
Changing Bluetooth Codecs in GNOME Settings
Once your Bluetooth audio device is paired and connected, you can switch codecs directly within the graphical interface:
- Open Settings from the GNOME application grid or system menu.
- Navigate to the Sound section in the left sidebar.
- Locate the Output section and ensure your Bluetooth headphones or speaker are selected as the active output device.
- Locate the Configuration or Profile dropdown menu next to or below the selected device.
- Click the dropdown to view the list of available profiles. You will
see profiles such as:
- High Fidelity Playback (A2DP Sink, codec LDAC)
- High Fidelity Playback (A2DP Sink, codec aptX HD)
- High Fidelity Playback (A2DP Sink, codec AAC)
- High Fidelity Playback (A2DP Sink, codec SBC-XQ)
- Handsfree Headset (HFP/HSP) (used for voice calls with microphone input)
- Select your preferred codec. The audio stream will briefly pause and resume using the chosen profile.
Codec Negotiation and Priority
By default, PipeWire negotiates the highest-quality mutually supported codec automatically when a device connects. The standard priority order generally places LDAC and aptX HD at the top, followed by aptX, AAC, SBC-XQ, and basic SBC.
If a device supports dual configurations—such as high-fidelity playback (A2DP) and headset mode (HFP/HSP)—GNOME will often stay on the high-quality A2DP codec until an application requests access to the microphone, at which point WirePlumber may automatically downgrade the profile to HFP/HSP to enable bidirectional communication.
Changing Codecs via the Command Line
If you are using GNOME without the full Settings application or prefer automation, codecs can be inspected and switched using command-line tools:
Using wpctl (WirePlumber CLI):
- Run
wpctl statusto find the ID of your Bluetooth sink. - Run
wpctl inspect <ID>to see available routes and profiles. - Switch profiles by targeting the card:
wpctl set-profile <Card-ID> <Profile-Index>.
Using pactl (PulseAudio compatibility layer):
Run
pactl list cardsto find the Bluetooth device card name (e.g.,bluez_card.XX_XX_XX_XX_XX_XX).View supported profiles listed under the card details.
Set the profile manually:
pactl set-card-profile bluez_card.XX_XX_XX_XX_XX_XX a2dp-sink-ldac
GNOME instantly reflects any codec change made via the command line within its Sound settings panel.