11

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.

2 Answers2

13

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 /etc/pulse/default.pa:

### load-module module-suspend-on-idle

Finally, I reboot my computer and the static noise was gone :)

5

The issue is triggered when the audio goes into power-save mode. There are two ways that I know of to work around the issue:

  1. Disable audio power-save for pulseaudio by editing the file /etc/pulse/default.pa, and comment out the line
load-module module-suspend-on-idle

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.

  1. 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.

DBear
  • 271