linux

Fix Crackling/Distortion Audio in Games (PipeWire)

Guide for fixing crackling, distortion or stuttering audio while gaming on Linux (PipeWire + Proton).

PREREQUISITES

Before making any changes, make sure it isn’t a hardware issue.

  • Check your headphones/speakers.
  • Check all audio cables.
  • Try another USB port (if applicable).
  • Test another output device if possible.

If the issue still persists, continue below.

Verify you’re using PipeWire

Run:

pw-metadata -n settings

If you receive output similar to:

Found "settings" metadata ...

you’re using PipeWire correctly.

If the command fails, this guide does not apply.


1. Test a runtime fix

Force PipeWire to use a stable sample rate and audio quantum:

pw-metadata -n settings 0 clock.force-rate 48000
pw-metadata -n settings 0 clock.force-quantum 500

Launch your game and test the audio.

If the crackling disappears, you’ve confirmed that PipeWire’s scheduling/buffer size is the cause.


2. Understand the limitation

The commands above are temporary.

They reset whenever PipeWire restarts or after a reboot.

To verify the current values:

pw-metadata -n settings

If you see:

clock.force-rate = 0
clock.force-quantum = 0

the runtime settings are no longer active.


3. Make the configuration permanent

Instead of replacing the default configuration files, create a PipeWire override:

mkdir -p ~/.config/pipewire/pipewire.conf.d
nano ~/.config/pipewire/pipewire.conf.d/99-gaming.conf

Paste:

context.properties = {
    default.clock.rate = 48000
    default.clock.quantum = 1024
    default.clock.min-quantum = 1024
    default.clock.max-quantum = 1024
}

Save the file.


4. Restart PipeWire

systemctl --user restart pipewire pipewire-pulse wireplumber

5. Verify the configuration

Run:

pw-metadata -n settings

You should see values similar to:

clock.rate = 48000
clock.quantum = 1024
clock.min-quantum = 1024
clock.max-quantum = 1024

Notes

  • This guide is intended for PipeWire users.
  • Tested on Arch Linux / CachyOS.
  • If you’re using PulseAudio directly, this guide will not help.
  • If you’re using EasyEffects, temporarily disable it while troubleshooting.

End of Article, feel free to reach out to me if you notice any errors or typos and I will gladly adjust. Retr0