# How to Enable Loudness Equalization in Linux with PipeWire

> AI Release · @ai_releaseorg · https://ai-release.org/guides/kak-vklyuchit-vyravnivanie-gromkosti-loudness-equalizat_en.html

## TL;DR

- **Time to complete:** 20–30 minutes
- **Difficulty:** Intermediate
- **You need:** Linux with PipeWire + WirePlumber as the active sound server; `pactl` and `parecord` (package `pulseaudio-utils`), `wpctl` and `pw-top` (packages `wireplumber` / `pipewire`), EasyEffects from your distribution repository, `ffmpeg`, `alsa-utils`. Exact package versions are not pinned here — use whatever your distribution ships.
- **The key fact most guides skip:** PipeWire has **no built-in loudness equalizer**. The Windows-style "Loudness Equalization" checkbox does not exist. You get the same result by inserting a **virtual sink** with a gain-riding plugin (EasyEffects *Autogain*) or a loudness-matching plugin (EasyEffects *Loudness*), then making that virtual sink the default.
- **Where this does NOT work:** WSL (audio is routed to the Windows host, not to PipeWire), Android/Termux ([no PipeWire session there](https://ai-release.org/guides/kak-zapustit-linux-na-android-bez-root-termux-proot-i-i.html?utm_source=tg&utm_medium=channel&utm_campaign=guide_inline&utm_content=guide_to_guide)), and any machine where `pactl info` still reports a plain PulseAudio server.

## What you get

- A virtual sink that every application selects automatically, with quiet sources lifted and loud sources pulled down.
- A saved EasyEffects preset named `loudness-eq` containing Autogain (or Loudness) plus a Limiter as a clipping guard.
- A reproducible before/after measurement in LUFS so you can prove the effect works instead of guessing.

## Quick start

```bash
sudo apt install easyeffects ffmpeg alsa-utils pulseaudio-utils
systemctl --user enable --now pipewire pipewire-pulse wireplumber
easyeffects &
pactl list short sinks | grep -i effect
```

Details and checks are in the steps below.

## Requirements and setup
![Illustration: Requirements and setup](https://ai-release.org/guides/img/kak-vklyuchit-vyravnivanie-gromkosti-loudness-equalizat-en-1.jpg?v=1795682461)


- PipeWire as the session sound server, with WirePlumber as session manager. Verify: `pactl info | grep 'Server Name'` must print `Server Name: PulseAudio (on PipeWire <version>)`. If it prints `Server Name: pulseaudio` without the `on PipeWire` part, stop — this guide does not apply until you migrate.
- `easyeffects` package installed (Debian/Ubuntu: `sudo apt install easyeffects`; Fedora: `sudo dnf install easyeffects`; Arch: `sudo pacman -S easyeffects`).
- `ffmpeg` for the measurement in Step 3, `alsa-utils` for `speaker-test`, `pulseaudio-utils` for `parecord`.
- A user session with working D-Bus and an X11/Wayland display — EasyEffects is a GUI application and creates its sink only while it runs.
- ~50 MB free disk space for the WAV captures in Step 3.

## Step 1. Inventory the audio graph and take a backup

**What to do:** List the current sinks, find the monitor source of your hardware sink, and copy existing PipeWire and EasyEffects config aside.

```bash
pactl info | grep -E 'Default Sink|Server Name'
pactl list short sinks
pactl list short sources | grep monitor
mkdir -p ~/audio-backup && cp -a ~/.config/pipewire ~/audio-backup/pipewire-$(date +%F)
```

**Example:** `pactl list short sinks` on a laptop with one analog output prints a line in this shape:

```
52  alsa_output.pci-0000_00_1f.3.analog-stereo  PipeWire  s32le 2ch 48000Hz  SUSPENDED
```

The first column (`52`) is the node ID you will need later; the second is the node name; the state flips to `RUNNING` while audio plays.

**Why:** Every later command addresses nodes by name or ID. Backing up `~/.config/pipewire` costs nothing and lets you roll back a broken drop-in file with `cp -a ~/audio-backup/pipewire-<date>/. ~/.config/pipewire/`. EasyEffects keeps presets under `~/.local/share/easyeffects/` in current builds and `~/.config/easyeffects/` in older ones — confirm with `ls ~/.local/share/easyeffects ~/.config/easyeffects 2>/dev/null` before copying.

**How to check:** `pactl list short sources | grep monitor` must return at least one line ending in `.monitor`. That monitor is what you will record in Step 3; if it is missing, your sink is not a PipeWire node and nothing below will work.

## Step 2. Build the loudness-equalization chain
![Illustration: Step 2. Build the loudness-equalization chain](https://ai-release.org/guides/img/kak-vklyuchit-vyravnivanie-gromkosti-loudness-equalizat-en-2.jpg?v=1795682471)


**What to do:** Create an EasyEffects preset, add the gain-riding effect, add a limiter, then point the system default at the EasyEffects sink.

1. Start EasyEffects (`easyeffects &`) and open the **Presets** tab. Press **+**, name the preset `loudness-eq`, press Enter.
2. Open the **Effects** tab, press **Add Effect**, choose **Autogain** (continuous gain riding) or **Loudness** (target-level matching). Order matters: the effect must be first in the list.
3. In Autogain, set **Target** to your reference level. Example: `-23` (the EBU R128 broadcast reference in LUFS). Autogain cannot push a track above full scale on its own for long, but transient peaks still need protection — continue to step 4.
4. Press **Add Effect** again and add **Limiter** *after* Autogain. Example setting: **Limit** `-1` dB, so nothing above −1 dBFS reaches the hardware.
5. Find the sink EasyEffects just created and make it the default:

```bash
pactl list short sinks | grep -i effect
wpctl set-default <ID-from-the-first-column>
```

6. Persist it: in EasyEffects open **Preferences → General** and enable **Start Service at Login**, then verify with `systemctl --user list-unit-files | grep -i easyeffects`. If your package ships a unit, `systemctl --user enable --now easyeffects.service` does the same job without a GUI session.

| Route | What it actually does | Pick it when |
|---|---|---|
| Autogain | Continuously raises and lowers gain so quiet passages come up and loud ones come down | Mixed sources: browser tabs, YouTube, podcasts, films |
| Loudness | Matches program loudness to a fixed target (EBU R128-style measurement) | Music libraries where you want a stable reference level |
| Hand-written `libpipewire-module-filter-chain` | Static biquad EQ built from `bq_lowpass`, `bq_highshelf` and similar built-in filters; no gain riding | You only need tonal correction (night mode), not level matching |

**Why:** PipeWire routes audio between *nodes*. EasyEffects inserts itself as a node between applications and hardware, so anything playing through the default sink passes the chain. `wpctl set-default` writes that choice into WirePlumber's state, which is why it survives a reboot — `pactl set-default-sink` writes to the PulseAudio-compatible layer and is a useful fallback, but WirePlumber owns the routings you see in `wpctl status`.

**How to check:**

```bash
pactl get-default-sink
pw-top -b -n 1 | head -n 5
```

`pactl get-default-sink` must print the EasyEffects sink name (for example `easyeffects_sink` — the exact name depends on your build, always read it from `pactl list short sinks`). In `pw-top`, the effect node must appear with a non-zero rate and `ERR` column at `0`.

## Step 3. Verify with a measurement, not by ear
![Illustration: Step 3. Verify with a measurement, not by ear](https://ai-release.org/guides/img/kak-vklyuchit-vyravnivanie-gromkosti-loudness-equalizat-en-3.jpg?v=1795682479)


**What to do:** Capture the sink monitor twice — once with a quiet track, once with a loud one — and compare integrated loudness.

```bash
pactl list short sources | grep monitor
parecord --device=alsa_output.pci-0000_00_1f.3.analog-stereo.monitor --file-format=wav /tmp/quiet-after.wav
parecord --device=alsa_output.pci-0000_00_1f.3.analog-stereo.monitor --file-format=wav /tmp/loud-after.wav
ffmpeg -hide_banner -i /tmp/quiet-after.wav -af ebur128=peak=true -f null - 2>&1 | tail -n 12
```

**Example:** `ffmpeg` ends with a summary block containing a line in the form `I:         -18.4 LUFS` plus `Peak: -1.0 dBFS`. Run the same command on `/tmp/loud-after.wav` and compare the two `I:` values.

**Why:** `parecord` records the sink *after* the filter chain, so the LUFS figure reflects what your ears get. `ebur128` is the standard loudness meter, and comparing the same pair of tracks with equalization off and on gives you a number instead of an impression. Disable the preset (`Effects → Autogain → bypass`), repeat both captures as `-before.wav`, and diff the results.

**How to check:** With the chain enabled the gap between the quiet and loud `I:` values must be clearly smaller than in the baseline run, and the `Peak:` line must stay at or below your limiter setting. Then run a live sanity check:

```bash
speaker-test -c 2 -t sine -f 440 -l 1
```

You should hear one second of a 440 Hz tone per channel with no crackle. Success looks like: `pactl get-default-sink` → the EasyEffects sink, `pw-top` shows the effect node running, and both LUFS values land close together.

## Troubleshooting

**Problem. `pactl` cannot reach the sound server at all**
- Ошибка: `Connection failure: Connection refused`
- Причина: the PipeWire-Pulse socket is not running — either PipeWire was never started in this user session, or PulseAudio still owns the socket.
- Решение: `systemctl --user enable --now pipewire.socket pipewire-pulse.socket wireplumber`, then re-run `pactl info`. If PulseAudio is installed, mask it: `systemctl --user mask pulseaudio.service pulseaudio.socket`.

**Problem. Switching the default sink fails after creating the preset**
- Ошибка: `Failure: No such entity`
- Причина: the sink name you passed does not exist. Sink names differ between EasyEffects builds, and the sink disappears entirely when EasyEffects is closed.
- Решение: `pactl list short sinks | grep -i effect` to read the real name, then `wpctl status` to find its numeric ID and `wpctl set-default <ID>`. Never hard-code a name into a script without this lookup.

**Problem. Crackling or dropouts after enabling the chain**
- Ошибка: in `pw-top` the `ERR` column for the effect node increments while audio stutters (audible symptom: clicks on loud transients).
- Причина: Autogain/Loudness pushing peaks above 0 dBFS, or the added node exceeding the default buffer at a small quantum.
- Решение: put the Limiter after the gain effect with **Limit** `-1` dB; if the clicks remain, raise the buffer in `~/.config/pipewire/pipewire.conf.d/99-buffer.conf`:

```
context.properties = {
    default.clock.quantum = 1024
}
```

then `systemctl --user restart pipewire wireplumber`.

## Summary and next steps

You now have a `loudness-eq` preset and a virtual sink that every application picks up automatically, verified by two LUFS measurements. Next, add a second preset without the gain effect for critical listening, and keep this chain out of live monitoring paths — the extra node adds latency that matters for recording. If you also run Linux on Windows, note that this approach stops at the WSL boundary: [WSL 3.0 audio goes to the Windows host](https://ai-release.org/guides/wsl-3-0-windows.html?utm_source=tg&utm_medium=channel&utm_campaign=guide_inline&utm_content=guide_to_guide), so the effect must be applied on the Windows side.

## FAQ

**Does PipeWire have a built-in loudness equalizer like Windows?**
No. Windows implements it as an audio driver effect; PipeWire exposes routing and filter modules, so the equivalent is a virtual sink with EasyEffects, as built in Step 2.

**Will it work with Bluetooth headphones?**
Yes, because Bluetooth headsets also appear as PipeWire sinks. Watch the profile: in HSP/HFP (headset microphone) mode the link switches to a low-bandwidth codec and quality drops sharply — check the active profile in `wpctl status` and prefer A2DP for playback.

**Does the chain affect recordings or OBS?**
Only audio routed through the default sink. Capture from a source node or an application-specific stream instead of the default sink if you need unprocessed audio, and check `pactl list short sources` before recording.

**How do I turn it off quickly?**
Bypass the effect in EasyEffects, or switch the default back with `wpctl set-default <hardware-sink-ID>` from the list produced by `wpctl status` — the preset and its settings stay saved either way.
