Crackling/popping sounds with pipewire

Hello everyone, I have recently switched from pulseaudio to pipewire on a 2009 15 inch MacBook Pro.

However, out of the box experience was terrible, sound would sometimes stutter and music/sounds in games were constantly crackling. I have done every single fix that is listed here. I have: disabled suspend, changed alsa headroom/period size, increased minimum playback buffer speed in pipewire-pulse.conf and I have enabled sample rate switching and increased system-wide latency in pipewire.conf (I have changed all of this into values that are shown in the post).

It has fixed the issue in games, but I still get horrible crackling sound when opening a program (Dolphin, Nomacs) and when I switch from one Virtual Desktop to the next. At this point, I am considering just going back to pulseaudio, I didn’t have these issues when I was using it. However, Audacious has a very annoying delay when I change a song or change voulme when using pulseaudio, which is gone now with pipewire.

Higher latency values in pipewire haven’t helped, I have tried running Audacious with both 2048 and 3072 quant and the occasional crackling still happens, 4096 just causes constant stutters in audio playback in it.

   ~  inxi -Aazy                                                                                                                                                       ✔ 
  Device-1: NVIDIA MCP79 High Definition Audio driver: snd_hda_intel v: kernel
    bus-ID: 00:08.0 chip-ID: 10de:0ac0 class-ID: 0403
  API: ALSA v: k6.6.26-1-MANJARO status: kernel-api with: aoss
    type: oss-emulator tools: alsactl,alsamixer,amixer
  Server-1: JACK v: 1.9.22 status: off tools: N/A
  Server-2: PipeWire v: 1.0.3 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    tools: pactl,pw-cat,pw-cli,wpctl

Is there anything else that I can try?

Take a look here:

1 Like

Try playing a bit more with the alsa headroom and period sizes. Sometimes you need just the right combination for things to get better, sometimes you need to increase, sometimes you need to decrease. try smaller period size and bigger headroom, or smaller headroom and bigger period size. Also try looking up issues for sound for your specific laptop model just in case someone else has figured something out.

You could also try this:

    api.alsa.use-acp = true
    api.alsa.use-ucm = false

This is from wireplumber’s config, but it is supposed to be placed next to the alsa headroom and period size settings. It’s a bit of a long shot though.

Remember to use pw-top to investigate what the QUANT is actually being set to for applications just to make sure your settings were applied.

But yeah, linux audio can be ass sometimes(that’s why i wrote that guide, i knew i’d have to deal with this again probably everytime i buy a new PC becaues that’s just how my luck wroks, so i figured writing it down instead of relying on memory would be the right call. It was, i’ve already gone back to it to refresh my memory a dozen times)… If it works with pulse though, it should work with pipewire.

It’s also worth looking into if maybe some driver settings would help you (set under /etc/modprobe.d/ files)

If the issue was fixed in games by setting the latency, that pretty much confirms that increasing the buffer size could help you. Worst case you can try setting the minimum quantum in pipewire.conf higher, just never set it higher than 1024. Try 256 or 512 to begin with if you’re gonna touch it.

1 Like

Sure, I will try with alsa period and headroom sizes and report back if it worked.