How to Stop Ubuntu from Automatically Suspending Audio Devices

The Audio Delay

If you use Ubuntu connected to external speakers via HDMI, a USB DAC, or even Bluetooth, you may notice a frustrating audio quirk. When you start playing a video or an audio file after a period of silence, the first one or two seconds of audio are completely cut off. You might also hear a faint “pop” or “click” from your speakers. This occurs because the underlying Linux audio server (PulseAudio or PipeWire) is configured to automatically suspend audio sinks (devices) when they are idle for a few seconds to save power. When audio plays again, it takes a moment for the device to wake up, causing the truncated sound.

Keeping the Audio Stream Alive

To eliminate the audio popping and clipping, and to stop Ubuntu from automatically suspending your audio hardware during moments of silence, you must comment out the suspend module in the audio server configuration.

If your system utilizes PulseAudio (standard on older Ubuntu releases), open your terminal (Ctrl+Alt+T) and edit the default configuration file: sudo nano /etc/pulse/default.pa. Scroll down until you find the line that reads: load-module module-suspend-on-idle. Place a hashtag (`#`) at the very beginning of that line to comment it out (it should look like #load-module module-suspend-on-idle). Press Ctrl+O, Enter, then Ctrl+X to save and exit. Finally, restart the audio server by typing pulseaudio -k. (Note: If you are using a modern Ubuntu release with PipeWire, you must instead copy /usr/share/wireplumber/main.lua.d/50-alsa-config.lua to ~/.config/wireplumber/main.lua.d/ and change ["session.suspend-timeout-seconds"] = 5 to 0, then run systemctl --user restart wireplumber).

Get the best tech tips delivered straight to your inbox.

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