Your pricey headphones sound like trash on Linux—here’s the real fix
I gave up trying to make my Sony WH-1000XM4s sound decent on Ubuntu. They were fighting me every step: boomy bass, hissing cymbals, and Zoom calls that sounded like I’d stuck my head in a washing machine.
Turns out I’d just never told Linux to use “the good codec.”
Most distros ship with only SBC—the equivalent of streaming music through a ham-radio. Sony’s blue **LDAC** driver (990 kbps) can move three times the data, but it’s hidden behind a three-minute config patch. I cribbed this from speaker-test-junkies on the Arch forums; works on Fedora, Debian, anything running PipeWire ≥0.3.65.
The five-minute blueprint
1 – Make sure PipeWire is actually driving your audio
Open a terminal and type:
pipewire --version
If you get a version number, move on. If you get “command not found,” install:
- Ubuntu/Debian:
sudo apt install pipewire pipewire-pulse wireplumber - Fedora:
sudo dnf install pipewire pipewire-pulseaudio wireplumber - Arch:
sudo pacman -S pipewire pipewire-pulse wireplumber
Reboot (do it—kills any leftover Pulse demons).
2 – Grab LDAC brains
# Ubuntu/Debian sudo apt install libldacbt-enc2 libldacbt-abr2 # Arch (AUR) yay -S libldac # Fedora sudo dnf install libldac
3 – Tell PipeWire LDAC comes first
mkdir -p ~/.config/pipewire/pipewire.conf.d/
nano ~/.config/pipewire/pipewire.conf.d/bluez-monitor.conf
Paste this baby:
monitor.bluez.rules = [
{
matches = [ { "device.name" = "~bluez_card.*" } ]
actions = {
update-props = {
bluez5.codecs = [ ldac aptx_hd aptx aac sbc ]
bluez5.ldac-quality = "hq"
bluez5.auto-connect = "[hfp_hf hsp_hs a2dp_sink]"
}
}
}
]
Quick translation:
- ldac-quality = hq – 990 kbps heaven
- sq = 660 kbps (balanced battery)
- mq = 330 kbps (meh, SBC-level)
Save, close.
4 – Restart the audio stack
systemctl --user restart pipewire pipewire-pulse wireplumber sudo systemctl restart bluetooth
Wait thirty quiet seconds.
5 – Pick LDAC in PulseAudio Volume Control
- Open pavucontrol.
- Click the Configuration tab.
- Select your headphones → pick the profile ending in **LDAC**.
First time I did this I played Debussy and literally said “Whoa” out loud.
Bonus hacks from one audiophile to another
- Latency king—add
bluez5.ldac-adaptive-bitrate = trueinside the config to auto-drop bitrate when Wi-Fi gets noisy. - Mic and music don’t mix—the moment a call starts PipeWire dumbs down the stream to HFP/HSP; that’s Bluetooth, not Linux.
- Battery worry—dropping from hq to sq bought my Sony’s roughly one extra Lou Reed album.
- Old dongle blues—had a 2014 laptop with a fossil adapter, upgraded to a $15 ASUS USB-BT500, LDAC showed up on the next reboot.
Out of curiosity I streamed the same FLAC file on my phone (LDAC forced) and the laptop on SBC—couldn’t even tell you which channel had the better bass until I turned on `bluez-monitor.conf`. Night-and-day doesn’t even cover it.
That’s it. Five minutes, two small files, goodbye to mushy mids. Your music—and your ears—can finally stop fighting Linux.
Still stuck? Quick fire-drill checks
pactl list | grep -A10 bluez_card | grep -E "(codec|ldac)"
Should spit out ldac. Nothing? You typoed the config.- For random dropouts: switch to
sqinbluez-monitor.conf. - For zero sound at all:
journalctl -u wireplumberwill scream what went wrong.
Reboot after changes and press play. You’re welcome.







