Ubuntu – Crackling/static in Discord with default audio output port (PulseAudio)

headphonespulseaudiosound

I installed Ubuntu 18.04 less than a week ago and 99% of what I need to work has been no problem. When I first installed Discord, from the instructions on their website, everything was fine. The Snap package had problems starting and refused to go past the update sequence, as if it had no internet connection. However, the first time I join a voice chat after a reboot, I get loud crackling anytime someone speaks. It fixes itself if I change the output of my headphones from Line Out to Headphones or vice versa (headphones setting sounds better to me).

I initially thought it was the Line Out setting being the issue, so I changed it using this as a guide. That did not fix it and no matter which one I set as default, the crackling returns equally as bad in Discord until I change it. After that, either port sounds just fine. I'm trying to figure out how I can have it sound good without having to flip the setting in PulseAudio, but I'm clueless.

All other audio seems fine. Even in games like CSGO there isn't this problem with voice chat, and I'm able to play other games, watch video, and listen to spotify just fine. It only seems to be affecting discord.

If it matters, the exact settings are "Line Out (plugged in)" and "Headphones (unplugged)" although despite the forum in the link above, I was able to set the Headphones as default anyway and it recognizes that port. I'm using the PulseAudio Volume Control (pavucontrol) app from Ubuntu Software to change these settings, and the terminal to set the default port.

My only connected audio devices are my headphones for output, plugged into the motherboard port; my mixer and headphones are listed in input (headphone mic muted), both also plugged into the motherboard. Mixer is a USB interface. My webcam was listed at one point, but I'm not sure where it has gone and if that can affect things somehow.

If anyone knows of a fix, please let me know! Thank you

Best Answer

I fixed it by modify /etc/pulse/default.pa. Find and replace:

load-module module-udev-detect

by

load-module module-udev-detect tsched=0

Then restart PulseAudio using this command:

pulseaudio -k && sudo alsa force-reload

Related Question