[SOLVED] Pipewire audio crackling slightly during playback (realtek/arch)

Has anyone else with the realtek chipset tried pipewire on arch? I’ve been experiencing slight crackling during playback of audio that persists regardless of any settings changes I’ve tried (mostly suggested changes from [HowTo] Troubleshoot crackling in PipeWire - Tutorials - Manjaro Linux Forum).

I have no issues with pulseaudio. The crackling also disappears if I keep the gnome sound settings panel open during audio playback. This is probably a better question for the pipewire devs but I’m interested to see if it’s isolated to my personal config/machine or if anyone has any ideas to debug further.

You arent alone. I experience the same issue. I’m not sure which audio chipset I have, but this issue has persisted on all versions of linux with pipewire using Arch Linux. I haven’t tested other audio servers, but It definitely affects pipewire.
Framework December Batch i5-1135G7
2x8 3200Mhz Ram (Affects multiple ram configurations)
BIOS Version 03.06
Arch Linux 5.16.12
Pipewire 1:0.3.48-1
Pipewire-pulse 1:0.3.48-1
Wireplumber 0.4.8-1

From reading other threads, I have found that being connected to power reduces the frequency of the popping/crackling, but it does not remove the overall annoying noise.
The crackling remains while everything is maxed out, set to full power, powersave disabled, and all suggested fixes tried.

Had the same problem. The first time it just disappeared magically, but after a reinstall I can’t remove it

While I don’t have the realtek chip (I have the Tempo codec instead), I have managed to fix similar crackling by changing the output format to S16LE rather than the default S32LE.

Try adding this to a file named 51-fix-crackle.lua in /usr/share/wireplumber/main.lua.d` then reboot:

rule = {
  matches = {
      { "node.name", "equals", "alsa_output.pci-0000_00_1f.3.analog-stereo" },
  apply_properties = {
    [ "audio.format" ] = "S16LE" ,
1 Like

I’ve had a similar issue (don’t have realtek) and I found that it was caused by aggressive power saving (e.g all tunables set to good in powertop). I disabled most of the changes I made but it was still there sometimes. After some investigation I found that the “Austosuspend for USB device HDMI Expansion Card [Framework]” was to blame so I set it to bad and haven’t had issues since. So I recommend trying that. Battery life hasn’t taken much of a hit.

Power saving “can” lead to issues, however somethings to try:

Pipewire audio:

sudo sed -i 's/--\["session.suspend-timeout-seconds"\] = 5/\["session.suspend-timeout-seconds"\] = 0/' /usr/share/wireplumber/main.lua.d/50-alsa-config.lua

systemctl restart --user pipewire.service

Didn’t work, revert back:

sudo sed -i 's/\["session.suspend-timeout-seconds"\] = 0/--\["session.suspend-timeout-seconds"\] = 5/' /usr/share/wireplumber/main.lua.d/50-alsa-config.lua

systemctl restart --user pipewire.service


sudo sed -i 's/load-module module-suspend-on-idle/#load-module module-suspend-on-idle/' /etc/pulse/default.pa

pulseaudio -k

Didn’t work, change it back:

sudo sed -i 's/#load-module module-suspend-on-idle/load-module module-suspend-on-idle/' /etc/pulse/default.pa

pulseaudio -k

With all of these, if you don’t see an immediate change, it’s worth also rebooting after making changes if restarting the service/killing/restarting the service fails to take hold.

My own issues disappeared one day without any intervention on my part. Thanks for all the potential fixes everyone! I’ll be sure to try some of these if the issue reappears.

Marking solved (for Op).