The Audio Normalization Issue
Ubuntu utilizes an advanced audio server (historically PulseAudio, now PipeWire in newer releases) to manage sound across different applications. To prevent users from accidentally damaging their speakers or hearing, the audio server often employs dynamic range compression or “flat volumes.” This means that if you have your master system volume set to 50%, but you open a YouTube video where the uploader recorded the audio extremely quietly, Ubuntu might automatically boost the volume of your web browser to compensate. Conversely, if an app requests maximum volume, the system might automatically drag your master volume slider up to 100%. This automatic changing of volume levels is jarring and removes your manual control over your speakers.
Disabling Flat Volumes in PulseAudio
To ensure your volume slider stays exactly where you put it and stop Ubuntu from automatically changing the volume based on application requests, you must disable the “flat volumes” feature.
You must edit the audio server’s configuration file via the terminal. Open a terminal (Ctrl+Alt+T). If you are using a standard Ubuntu installation (or any derivative still relying on PulseAudio configurations), type sudo nano /etc/pulse/daemon.conf and press Enter (provide your password). This opens a massive text file. Use the arrow keys to scroll down and look for a line that says ; flat-volumes = yes (the semicolon means it is a comment and using the default setting). You need to change this. Use your keyboard to delete the semicolon, and change the “yes” to “no” so the line looks exactly like this:
flat-volumes = no
Press Ctrl+O then Enter to save, and Ctrl+X to exit Nano. To apply the new rule, you must restart the audio server by typing pulseaudio -k (the daemon will instantly restart itself). Your master volume will now remain static.