How to Stop Ubuntu from Automatically Pausing Music

The WirePlumber Suspension

Modern Ubuntu installations (22.04 LTS and newer) have transitioned from PulseAudio to a much more advanced audio server called PipeWire, which is managed by a session manager named WirePlumber. To aggressively conserve battery life on laptops, WirePlumber is configured to automatically suspend any audio device (like your speakers or USB headset) if no audio has played for a few seconds. When you finally play a sound (like a notification ping or starting a YouTube video), the system wakes the audio hardware up. However, this wake-up process takes a fraction of a second, resulting in a noticeable “pop” sound or the first half-second of your music being automatically cut off and paused.

Disabling Audio Device Suspension

To eliminate the annoying popping noises and stop Ubuntu from automatically pausing or suspending your audio hardware during idle moments, you must modify the WirePlumber configuration.

You need to create a custom override file for WirePlumber via the terminal. Open a terminal (Ctrl+Alt+T). First, create the necessary local directory structure by typing: mkdir -p ~/.config/wireplumber/main.lua.d/ and pressing Enter. Next, use the Nano text editor to create a new configuration file: nano ~/.config/wireplumber/main.lua.d/51-disable-suspend.lua. In this blank file, you need to write the exact rule to disable the suspension timeout. Paste the following exact block of code:
table.insert (alsa_monitor.rules, {
matches = { { { "node.name", "matches", "alsa_output.*" } } },
apply_properties = { ["session.suspend-timeout-seconds"] = 0 }
})
Save the file (Ctrl+O, Enter) and exit (Ctrl+X). To apply the changes, restart the audio services by typing systemctl --user restart wireplumber pipewire pipewire-pulse. Your audio devices will now remain active continuously.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.