Home » [SOLVED] Audio Crackling, Popping & Stuttering with PipeWire & Gamescope on Linux
Gaming Tech

[SOLVED] Audio Crackling, Popping & Stuttering with PipeWire & Gamescope on Linux

When gaming on Linux (Steam Deck, Bazzite, Fedora, Arch) through Gamescope or Proton, players often notice metallic clicking, static pops, or sound cutting out (audio crackling). This annoyance is rooted in xruns (buffer underruns), where PipeWire fails to deliver rendered audio buffers within the tight deadline demanded by the sound card.

Quick Diagnostics

Cause
Audio buffer quantum is configured too aggressively, inducing buffer underruns (xruns)
Solution
Enforce a stable 1024 quantum buffer size in PipeWire user settings
Cause
Sampling rate mismatch between the PipeWire graph (48kHz) and the game process
Solution
Standardize clock rate and disable aggressive ALSA resampling in pipewire.conf.d

Step-by-Step Solution

  1. 1

    Step 1: Detect Audio Buffer Underruns (xruns) Live

    Run the interactive PipeWire performance profiler while your game is active:

    BASH
    pw-top
    

    Observe the ERR column. If counter values increment in tandem with audible pops, your system is dropping audio frames due to buffer starvation.

  2. 2

    Step 2: Configure a Resilient Audio Quantum Latency Profile

    Create a dedicated configuration drop-in file to enforce stable buffer sizes:

    BASH
    mkdir -p ~/.config/pipewire/pipewire.conf.d/
    nano ~/.config/pipewire/pipewire.conf.d/99-quantum-latency.conf
    

    Add the following blocks:

    PLAINTEXT
    context.properties = {
        default.clock.rate = 48000
        default.clock.quantum = 1024
        default.clock.min-quantum = 512
        default.clock.max-quantum = 2048
    }
    
  3. 3

    Step 3: Tune ALSA and Proton Wine Audio Emulation

    Games running under Proton interface through ALSA or PulseAudio bridges. Prevent resampling distortions:

    BASH
    mkdir -p ~/.config/pipewire/client.conf.d/
    nano ~/.config/pipewire/client.conf.d/alsa-resample.conf
    

    Paste:

    PLAINTEXT
    alsa.properties = {
        alsa.deny = false
        alsa.format = "S16LE"
        alsa.rate = 48000
    }
    

    Apply the adjustments by restarting user audio daemons:

    BASH
    systemctl --user restart pipewire pipewire-pulse wireplumber
    

Frequently Asked Questions

Does a 1024 quantum introduce noticeable input lag?

At 48 kHz, a 1024 sample window equals approximately 21 milliseconds of total audio latency—completely unnoticeable during gameplay while eliminating pops.

How do I revert custom PipeWire overrides?

Delete the custom files in ~/.config/pipewire/ and reload with systemctl --user restart pipewire.

Prevention Advice

Recommended security practices:

  • Avoid forcing ultralow latency buffers (64 or 128) during intensive 3D gaming.
  • Ensure rtkit is running to grant PipeWire real-time scheduling priority under load.
Author • Web Designer & App Creator

Rodolfo Castro

Web designer, app developer, and founder of SoporteCero. Specializing in UI/UX architecture, digital products, and modern web environments (Pixel Digital Dz). Every tutorial and guide on SoporteCero is thoroughly tested and verified in our technical lab to ensure reliable, up-to-date solutions.