I have this issue where I hear a static noise coming from my speakers that goes away when I start playing any audio and comes back after a few seconds when I am not playing any audio.
Following these instructions, I ran pulseaudio in verbose mode:
$ systemctl --user stop pulseaudio.socket $ systemctl --user stop pulseaudio.service $ pulseaudio -v
And I found the following output each time the static noise started:
I: [pulseaudio] module-suspend-on-idle.c: Source alsa_input.usb-Logitech_Logitech_Wireless_Headset_88C626977831-00.multichannel-input idle for too long, suspending ... I: [alsa-source-USB Audio] alsa-source.c: Device suspended... I: [pulseaudio] module-suspend-on-idle.c: Sink alsa_output.pci-0000_07_00.6.analog-stereo idle for too long, suspending ... I: [alsa-sink-ALC887-VD Analog] alsa-sink.c: Device suspended... I: [pulseaudio] module-suspend-on-idle.c: Sink alsa_output.pci-0000_07_00.1.hdmi-stereo idle for too long, suspending ... I: [alsa-sink-HDMI 0] alsa-sink.c: Device suspended... I: [pulseaudio] module-suspend-on-idle.c: Sink alsa_output.usb-Logitech_Logitech_Wireless_Headset_88C626977831-00.analog-stereo idle for too long, suspending ... I: [alsa-sink-USB Audio] alsa-sink.c: Device suspended...
Then, I commented out this line from
### load-module module-suspend-on-idle
Finally, I reboot my computer and the static noise was gone :)
The issue is caused by the audio going into power-save mode. There are two ways that I know of to work around the issue:
- Disable audio power-save for pulseaudio by editing the file
/etc/pulse/default.pa, and comment out the line
You can comment a line by prepending a '
#' to the beginning of the line.
This seems to be the most popular solution, as I found it in many places including Fabian's answer.
- Disable power save for the audio device system-wide by running the command
echo 0 | sudo tee /sys/module/snd_hda_intel/parameters/power_save
This solution I found at https://www.makeuseof.com/fix-static-noise-from-speakers-linux/.
At the end of the day, I don't think it matters how you workaround the issue. Personally, I prefer the second option because it is more general as it does not depend on pulseaudio.