36

I just upgraded to 18.04, and I noticed that the sound from my headphones, whether plugged into front or back port, was very crackling and slow/delayed. This issue didn't exist on 17.04/10. It also doesn't affect audio coming from HDMI via Radeon 560 GPU, just the headphone/onboard audio. The relevant device is:

00:1f.3 Audio device: Intel Corporation Sunrise Point-H HD Audio (rev 31)  

I tried a bunch of fixes for pulseaudio I found googling, including this one and this one. Neither of which helped.

I have found something that at least makes it listenable - changing "default-fragment-size-msec" from 25 to 5 in /etc/pulse/daemon.conf. It makes it much much better, but still a little crackly from time to time.

I've googled for 30 min or more now, and not finding anything else that seems recent and relevant, so wondering if I should maybe open a bug, or if there's something I'm overlooking here.

6 Answers 6

50

I had the same problem. It seems related to speech-dispatcher (some text-to-speech utility).
try :

killall speech-dispatcher

If the sound comes back to normal you can remove it completely (if you don't need it) with :

sudo apt-get remove speech-dispatcher
9
  • 3
    This solved the issue for me on Debian Buster. In my case it was only needed as dependency of orca which I don't use. Jun 20, 2019 at 17:30
  • 1
    Same as lifeofguenter Jul 18, 2019 at 23:19
  • 2
    this fixed it for me, ubuntu 20.04/pop!os 20.04 Aug 23, 2020 at 6:16
  • 1
    this solved my problem on ubuntu 20.04
    – csenga
    Sep 28, 2020 at 14:58
  • 1
    Yup, that was it. The bug would present when my audio output was switching.
    – ppetraki
    Jan 29, 2021 at 17:13
30

I had the same issue and killing pulseaudio fixed it for me. I'm not sure why it would get into a bad state, but restarting pulseaudio might be something to try.

Try

killall pulseaudio
2
  • This is some dark magic. Any idea on what's actually going on? (this works though, I think may be connected to suspend-awake process)
    – jave.web
    Jan 7, 2021 at 16:55
  • After upgrade to 22.04, I had the sound cracking randomly. This answer help me fix the issue.
    – r0ng
    Apr 28 at 4:53
26

Press Ctrl+Alt+T to go to a terminal and use your favourite editor to edit the file

nano /etc/pulse/default.pa

then find a line containing:

load-module module-udev-detect

modify this to become:

load-module module-udev-detect tsched=0

save and exit. Restart your computer or run:

pulseaudio -k

and you're all set!

8
  • 4
    you need to restart your laptop or run: pulseaudio -k after you change the configuration.
    – stason
    Nov 16, 2018 at 3:05
  • all it does is makes the sound completely distorted Nov 16, 2018 at 13:12
  • 2
    This is the solution and it should be the accepted answer -- although it would be good to edit it and add the pulseaudio -k command
    – Merc
    Feb 15, 2019 at 8:59
  • 5
    An explanation about what exactly this does would be helpful. It can be found at this Ask Ubuntu question Jun 4, 2019 at 19:09
  • actually, on a newer ubuntu version this actually works. Nov 1, 2019 at 11:33
3

I ran into the same issue (crackling sound) today on Ubuntu 18.10 on my Intel NUC Canyon Hades.

killall pulseaudio

only fixed it temporarily for some reason. After a few minutes the problem was back again.

What ultimately did the trick was the answer posted by Fabby in combination with the comment by statson to enter

pulseaudio -k
1
  • I think when you kill PulseAudio, the OS falls back to ALSA. Most likely your PulseAudio has some configuration issues.
    – user31389
    Dec 15, 2019 at 14:17
0

No matter what I did, I didn't get it to work with Pulseaudio (I'm using a Focusrite Scarlett USB Audio Interface)

I followed the steps from this link and use PipeWire - instantly everything works like a charm!

https://linuxconfig.org/how-to-install-pipewire-on-ubuntu-linux

-3

If you have Firefox or Chrome open when the sound starts distorting. Shut them browsers down and test the sound again. If it has stopped, then you need to use a different web browser. I installed Vivaldi yesterday and I haven't had a problem since. There are many browsers to choose from.

1
  • Or... Go to about:config in Firefox and search for "media.webspeech.synth.enabled" and set it to "false" (double clicking on the entry should do it) then close Firefox. Open it again and see if that makes audio better. For me it did.
    – mevdschee
    Jun 21, 2021 at 1:40

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