After installing Ubuntu 20.04 on my desktop computer (Realtek onboard sound card, codec ALC887), I am experiencing a very annoying click (popping sound) every time I open any content with audio.


It was happening because Ubuntu turned on the sound card power-saving capabilities. Turning it off can be the only way to get rid of the annoying sound:

  1. Verify how is your sound card's power_save parameter:

    cat /sys/module/snd_hda_intel/parameters/power_save
  2. If it returns 1, do the following to change it temporally:

    echo "0" | sudo tee /sys/module/snd_hda_intel/parameters/power_save
  3. If the previous step worked for you, persist that configuration (otherwise the problem will continue after reboot):

    echo "options snd_hda_intel power_save=0" | sudo tee -a /etc/modprobe.d/audio_disable_powersave.conf
  4. (Optional) You can also do the same for power_save_controller parameter following the steps 1, 2 and 3 replacing power_save by power_save_controller also changing 0 to N.

    Note: using the first step will probably return Y for this parameter, instead of 1.

  • 3
    Power saving is a Linux kernel feature and it is good to have. It is just some unknown reason why you get this annoying noise as soon as the audio card wakes up from powersaving. The above is a workaround. The proper solution is probably to get PulseAudio to deal with this gracefully. – user4124 Apr 25 '20 at 12:44
  • 6
    @user4124 Indeed this is unfortunately a workaround, but it may be better than this disruptance. I surely will also upvote any answer that comes with a fundamental solution to the issue. – vanadium Apr 25 '20 at 14:02
  • 1
    @user4124 it's cheap hardware. Speaker amplifiers put a transient on the output when you apply power to them, unless someone who actually knows what they're doing does the integration properly. – hobbs Apr 26 '20 at 2:13
  • 4
    @user4124 How do you propose PulseAudio should "deal with this gracefully"? – marcelm Apr 26 '20 at 9:24
  • 2
    @hobbs, indeed it's a cheap hardware. This is the reason that I thought it could be useful to mention it and I had to manage something to make it a little better. Proprietary driver seems to solve it somehow on Windows 10, but on Ubuntu, I believe it won't be enough to use PulseAudio to solve it... I would be glad if some one could show it working... – Rodrigo Viana Rocha Apr 26 '20 at 15:58

You can suspend power saving via PulseAudio instead of via the sound card and comment out the following line in /etc/pulse/default.pa to look like this:

### Automatically suspend sinks/sources that become idle for too long
#load-module module-suspend-on-idle

Then restart PulseAudio:

systemctl restart --user pulseaudio

If that doesn't work then just kill it and it will restart:

pulseaudio --kill

I've tried solutions above however they did not seem to help me. Or at least did not seem to help me alone. The extra step that I did was to enable auto mute in alsamixer.

Steps to do that:

  1. Type alsamixer to the terminal.

  2. Scroll all the way to the right by pressing RIGHT arrow key until you hit Auto-Mute Mode.

  3. Enable it by pressing UP arrow key then hit ESC.

Note that I have to do it again after restart. However I am sure there is a way how to preserve these alsamixer settings such that they survive rebooting.

Not the answer you're looking for? Browse other questions tagged or ask your own question.