Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Normalize volume level with PulseAudio

Normalize volume level with PulseAudio

This should work conceptually on any Linux OS with PulseAudio but these particular instructions are for Ubuntu.

  1. Install LADSPA plugins containing the compressor and limiter we'll use:
sudo apt install swh-plugins
  1. Install PulseAudio Preferences paprefs:
sudo apt install paprefs
  1. Open PulseAudio Preferences:
  1. Go to the Simultaneous Output tab.
  2. Check Add virtual output ... all sound cards and Close.
  3. Copy from this gist to ~/.config/pulse/.
  4. Restart PulseAudio:
pulseaudio -k

The normalized output is selected by default. If you want to change this behaviour you can comment out or delete the set-default-sink ladspa_normalized line in the ~/.config/pulse/ file. You can also select any other output from the PulseAudio settings when you need unmodified output. This approach can be modified to instead normalize the volume of a particular sound device instead of normalizing the simultaneous virtual device.


.include /etc/pulse/
# Create compressed sink that outpus to the simultaneous output device
load-module module-ladspa-sink sink_name=ladspa_sink master=combined plugin=dyson_compress_1403 label=dysonCompress control=0,1,0.5,0.99
# Create normalized sink that outputs to the compressed sink
load-module module-ladspa-sink sink_name=ladspa_normalized master=ladspa_sink plugin=fast_lookahead_limiter_1913 label=fastLookaheadLimiter control=10,0,0.8
# Comment out the line below to disable setting the normalized output by default:
set-default-sink ladspa_normalized

This comment has been minimized.

Copy link

@dhalucario dhalucario commented Aug 18, 2020

This is alright but the problem is when you have multiple audio devices (like a HDMI monitor) it just plays it on all.


This comment has been minimized.

Copy link

@galaczi galaczi commented Jan 21, 2021

I was looking for normalization but this actually limited the overall volume to very low so I am not using it.


This comment has been minimized.

Copy link
Owner Author

@lightrush lightrush commented Jan 21, 2021

@galaczi make sure that you increase the volumes of all the chained sinks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment