Ubuntu – Crackling Audio Through Headphones

alsaheadphonespulseaudiosound

I've recently bought a the Asus Zenbook 3 and installed Ubuntu on it. Since I'm still pretty new to Ubuntu I'm not quite sure how to debug issues like these.

To describe my problem in more detail. I hear a decent amount of audio crackling when playing audio through Google Chrome. This includes Youtube aswell as Netflix and Twitch.

This problem also occurs, but only in lesser quantities on the Spotify desktop application and playing local video's.

I've tried a few diffrent things already, these include:

  • Messing with Alsamixer
  • Installed Pulseaudio
  • This with Alsamixer
  • I've tried diffrent headphones aswell as a USB Headset, still same problem.
  • I've tried muting my mic channels.
  • I've played around with my Alsamixer settings.
  • Also tried multiple solutions here

Any help would be greatly appriciated!

Best Answer

I had encountered the same problem when I installed Ubuntu. The steps in the following comment helped me solve the issue: https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1648183/comments/17

  1. Install alsa-tools if not installed:

    sudo apt install alsa-tools
    
  2. Create and save a script in /usr/local/bin:

    #!/bin/bash
    hda-verb /dev/snd/hwC0D0 0x20 SET_COEF_INDEX 0x67
    hda-verb /dev/snd/hwC0D0 0x20 SET_PROC_COEF 0x3000
    
  3. Run the script as root in a terminal to immediately fix the problem.

  4. To run the script on startup, use cron with the @reboot command:

    sudo crontab -e
    

    and then add line in crontab:

    @reboot [full path to script]
    
  5. To run script on resume from suspend, copy the script to /lib/systemd/system-sleep

Related Question