The Audio Ducking
Ubuntu Linux utilizes the PulseAudio (or PipeWire in newer versions) sound server to manage system audio. By default, Ubuntu employs a feature called “audio ducking” for system notifications. When you are listening to music on Spotify or watching a YouTube video, and an application throws a notification (like an incoming chat message or an email alert), the system automatically pauses or drastically lowers the volume of your music, plays a sharp “ding” sound, and then ramps the music back up. While this ensures you never miss a notification, it completely ruins the listening experience if you receive a rapid barrage of messages, turning your music into a stuttering mess.
Disabling Notification Interruptions
To maintain a smooth, uninterrupted audio stream and stop Ubuntu from automatically pausing or ducking your music during notifications, you must adjust the system sound configuration file.
There is no graphical toggle for this specific behavior; you must use the terminal. Open your terminal by pressing Ctrl+Alt+T. You need to edit the PulseAudio daemon configuration file with root privileges. Type: sudo nano /etc/pulse/default.pa and press Enter (provide your password). Carefully scroll through this text file using your arrow keys until you find a line that reads exactly: load-module module-role-cork. This specific module is responsible for ducking audio streams based on their “role” (e.g., prioritizing event sounds over music). To disable it, simply add a hash symbol (#) to the very beginning of the line to comment it out, making it look like this: #load-module module-role-cork. Press Ctrl+O then Enter to save, and Ctrl+X to exit nano. Finally, restart the sound server by typing pulseaudio -k. Your music will now play continuously, ignoring any system alerts.