---
title: "Enable LDAC and aptX Bluetooth on Ubuntu (22.04 and 24.04)"
description: "LDAC and aptX just work on Ubuntu 24.04 and newer with PipeWire, and on 22.04 with one package. How to pick the codec and check which one is used."
url: https://devicetests.com/enable-ldac-aptx-bluetooth-ubuntu
language: en
---

# How To Enable LDAC / aptX for Bluetooth on Ubuntu 22.04 and Newer

By Eric Buchanan · Updated November 4, 2026 · First published July 20, 2023

Short answer

On Ubuntu 24.04 LTS and newer, LDAC and aptX already work. The sound system, PipeWire, picks the best codec both sides support. To choose one yourself, use the **Configuration** tab of **PulseAudio Volume Control** (pavucontrol). On Ubuntu 22.04, install `gstreamer1.0-plugins-bad` first.

## What LDAC and aptX are

A codec decides how sound is compressed on its way over Bluetooth. Every Bluetooth headphone supports the basic one, **SBC**.

### LDAC

From Sony

The highest bit rate. Found on many Sony and other high-end headphones. It adapts its quality to the connection.

### aptX and aptX HD

From Qualcomm

Common on many earbuds and speakers.

### SBC

Every headphone

The basic codec. Ubuntu falls back to it when nothing better is shared.

Your headphones must support the codec: Ubuntu can’t add LDAC to headphones that don’t have it.

## Ubuntu 24.04 and newer: choose the codec

The Bluetooth sound support (`libspa-0.2-bluetooth`) includes the LDAC and aptX encoders and is installed by default.

1. Connect your headphones in **Settings** **Bluetooth**.
2. Install the volume control tool: `sudo apt install pavucontrol`
3. Open **PulseAudio Volume Control** and click the **Configuration** tab.
4. Next to your headphones, open the **Profile** list. Choose **High Fidelity Playback (A2DP Sink, codec LDAC)** or the aptX one. Only codecs your headphones support are listed.

**Check which codec is in use:** choose the headphones under **Output Device** in **Settings** **Sound**, then run `wpctl inspect @DEFAULT_AUDIO_SINK@ | grep codec`. You should see a line like `api.bluez5.codec = "ldac"`.

> LDAC missing from the list?
>
> Some headphones only offer LDAC once you allow it in the maker’s phone app. Look for a sound quality or connection setting there, then reconnect.

**Sound cuts out?** LDAC at its highest quality needs a strong signal. Keep the computer close. aptX or SBC is more stable at a distance.

## Ubuntu 22.04

Ubuntu 22.04 uses PulseAudio. Its Bluetooth module can use LDAC and aptX, but the encoders come from a GStreamer package that isn’t always installed.

1. Run `sudo apt install gstreamer1.0-plugins-bad`
2. Run `pulseaudio -k` to restart PulseAudio (it starts again by itself).
3. Turn the headphones off and on, or reconnect them in **Settings** **Bluetooth**.
4. PulseAudio now picks the best codec both sides support.

To check it, run `pactl list sinks | grep -i codec`. Still SBC? Check that your headphones support LDAC or aptX. Upgrading to Ubuntu 24.04 LTS or newer gives you PipeWire and the codec choice above.

## Problems with Bluetooth headphones?

Test it now

Headphone test

It plays sound in the left and right ear, one at a time. If you hear each on its own side, left and right play correctly. The command above shows the codec.

[Open the headphone test](https://devicetests.com/headphone-test)

Not connecting, cutting out or stuck in poor quality? See [fixing Bluetooth in Ubuntu](https://devicetests.com/fixing-bluetooth-connection-issues-ubuntu).

## Sources

- [Ubuntu packages: libspa-0.2-bluetooth (24.04), with the LDAC and aptX libraries](https://packages.ubuntu.com/noble/libspa-0.2-bluetooth)
- [Ubuntu 24.04 desktop manifest (installed by default)](https://releases.ubuntu.com/noble/ubuntu-24.04.5.1-desktop-amd64.manifest)
- [PipeWire source: profile names and codec order](https://github.com/PipeWire/pipewire/blob/1.0.5/spa/plugins/bluez5/codec-loader.c)
- [Ubuntu packages: pavucontrol (24.04)](https://packages.ubuntu.com/noble/pavucontrol)
- [Ubuntu packages: gstreamer1.0-plugins-bad (22.04)](https://packages.ubuntu.com/jammy/gstreamer1.0-plugins-bad)
- [Ubuntu packages: pulseaudio-module-bluetooth (22.04)](https://packages.ubuntu.com/jammy/pulseaudio-module-bluetooth)

## Test it yourself

Check your own device with a free test. It runs in your web browser.

- [Sound test](https://devicetests.com/sound-test): Check your speakers, left and right, and stereo.
- [Headphone test](https://devicetests.com/headphone-test): Check left and right, polarity, bass rattle and earbud fit.
- [Surround sound test](https://devicetests.com/surround-sound-test): Check every 5.1 and 7.1 speaker, one at a time, and the subwoofer.
