Crackling Audio in Steam Games

I’m running into an issue where I have crackling noise in Steam. There is a launch command that does help but I have to put this in for every game that I play. I was wondering if there was a more permanent fix for this.

Steam Launch command that works

PULSE_LATENCY_MSEC=50 %command%

System Info

System:
  Kernel: 6.12.8-2-cachyos arch: x86_64 bits: 64 compiler: clang v: 18.1.8
  Desktop: KDE Plasma v: 6.2.5 Distro: CachyOS base: Arch Linux
Machine:
  Type: Laptop System: Micro-Star product: Stealth 16 AI Studio A1VHG
    v: REV:1.0 serial: <superuser required>
  Mobo: Micro-Star model: MS-15F3 v: REV:1.0 serial: <superuser required>
    UEFI: American Megatrends LLC. v: E15F3IMS.10C date: 10/14/2024
Battery:
  ID-1: BAT1 charge: 93.1 Wh (97.7%) condition: 95.3/95.0 Wh (100.3%)
    volts: 17.1 min: 15.2 model: MSI BIF0_9 status: not charging
  Device-1: hidpp_battery_8 model: Logitech MX Master 3S charge: 95%
    status: discharging
CPU:
  Info: 16-core (6-mt/10-st) model: Intel Core Ultra 9 185H bits: 64
    type: MST AMCP arch: Meteor Lake rev: 4 cache: L1: 1.6 MiB L2: 18 MiB
    L3: 24 MiB
  Speed (MHz): avg: 400 min/max: 400/4800:5100:3800:2500 cores: 1: 400
    2: 400 3: 400 4: 400 5: 400 6: 400 7: 400 8: 400 9: 400 10: 400 11: 400
    12: 400 13: 400 14: 400 15: 400 16: 400 17: 400 18: 400 19: 400 20: 400
    21: 400 22: 400 bogomips: 135168
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
  Device-1: Intel Meteor Lake-P [Intel Arc Graphics] vendor: Micro-Star MSI
    driver: i915 v: kernel arch: Gen-13 bus-ID: 0000:00:02.0
  Device-2: NVIDIA AD104M [GeForce RTX 4080 Max-Q / Mobile]
    vendor: Micro-Star MSI driver: nvidia v: 565.77 arch: Lovelace
    bus-ID: 0000:01:00.0
  Device-3: Bison FHD Camera driver: uvcvideo type: USB bus-ID: 3-9:4
  Display: wayland server: X.org v: 1.21.1.15 with: Xwayland v: 24.1.4
    compositor: kwin_wayland driver: N/A resolution: 1707x1067
  API: EGL v: 1.5 drivers: iris,nvidia platforms:
    active: gbm,wayland,x11,surfaceless,device inactive: N/A
  API: OpenGL v: 4.6.0 compat-v: 4.6 vendor: intel mesa v: 24.3.3-cachyos1.2
    glx-v: 1.4 direct-render: yes renderer: Mesa Intel Arc Graphics (MTL)
  API: Vulkan v: 1.4.303 drivers: N/A surfaces: xcb,xlib,wayland devices: 2
Audio:
  Device-1: Intel Meteor Lake-P HD Audio vendor: Micro-Star MSI
    driver: sof-audio-pci-intel-mtl bus-ID: 0000:00:1f.3
  Device-2: NVIDIA AD104 High Definition Audio vendor: Micro-Star MSI
    driver: snd_hda_intel v: kernel bus-ID: 0000:01:00.1
  Device-3: Razer USA BlackShark V2 Pro
    driver: hid-generic,snd-usb-audio,usbhid type: USB bus-ID: 3-5:12
  API: ALSA v: k6.12.8-2-cachyos status: kernel-api
  Server-1: JACK v: 1.9.22 status: off
  Server-2: PipeWire v: 1.2.7 status: active
Network:
  Device-1: Intel Wi-Fi 7 AX1775 /AX1790 /BE20 /BE401/BE1750 2x2
    vendor: Rivet Networks driver: iwlwifi v: kernel bus-ID: 0000:2c:00.0
  IF: wlan0 state: up mac: <filter>
  Device-2: Realtek Killer E3000 2.5GbE vendor: Micro-Star MSI driver: r8169
    v: kernel port: 3000 bus-ID: 0000:2d:00.0
  IF: enp45s0 state: down mac: <filter>
Bluetooth:
  Device-1: Intel driver: btusb v: 0.8 type: USB bus-ID: 3-10:5
  Report: btmgmt ID: hci0 rfk-id: 0 state: up address: <filter> bt-v: 5.4
    lmp-v: 13
RAID:
  Hardware-1: Intel Volume Management Device NVMe RAID Controller Intel
    driver: vmd v: 0.6 bus-ID: 0000:00:0e.0
Drives:
  Local Storage: total: 2.75 TiB used: 484.33 GiB (17.2%)
  ID-1: /dev/nvme0n1 vendor: Samsung model: MZVL21T0HDLU-00BT7
    size: 953.87 GiB temp: 50.9 C
  ID-2: /dev/nvme1n1 vendor: Sabrent model: Rocket 4.0 2TB size: 1.82 TiB
    temp: 52.9 C
Partition:
  ID-1: / size: 1.82 TiB used: 483.83 GiB (26.0%) fs: btrfs dev: /dev/dm-0
    mapped: luks-b75d334b-20e4-4db4-be3a-e5317b37e812
  ID-2: /boot size: 2 GiB used: 515.8 MiB (25.2%) fs: vfat
    dev: /dev/nvme1n1p1
  ID-3: /home size: 1.82 TiB used: 483.83 GiB (26.0%) fs: btrfs
    dev: /dev/dm-0 mapped: luks-b75d334b-20e4-4db4-be3a-e5317b37e812
  ID-4: /var/log size: 1.82 TiB used: 483.83 GiB (26.0%) fs: btrfs
    dev: /dev/dm-0 mapped: luks-b75d334b-20e4-4db4-be3a-e5317b37e812
  ID-5: /var/tmp size: 1.82 TiB used: 483.83 GiB (26.0%) fs: btrfs
    dev: /dev/dm-0 mapped: luks-b75d334b-20e4-4db4-be3a-e5317b37e812
Swap:
  ID-1: swap-1 type: zram size: 62.28 GiB used: 1.82 GiB (2.9%)
    dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 54.5 C mobo: N/A
  Fan Speeds (rpm): N/A
Info:
  Memory: total: 64 GiB available: 62.28 GiB used: 9.21 GiB (14.8%)
  Processes: 464 Uptime: 3d 7h 18m Init: systemd
  Packages: 1404 Compilers: clang: 18.1.8 gcc: 14.2.1 Shell: Bash v: 5.2.37
    inxi: 3.3.36

Did you try real time privileges as mentioned in the wiki?

Strongly recommended for Pipewire. This mitigates a lot of the common issues such as audio glitching or cutting out in certain scenarios.

Install the following package: sudo pacman -S realtime-privileges
Run the following command: sudo gpasswd -a $USER realtime
Reboot your system.

Actually pipewire is being scheduled by the fair scheduling class so this is misleading.

I have. This was the first thing I did to try to remedy it.

I managed to resolve my own issue. Per this article

1. Create a new folder for the Pipewire config settings, move the config settings there, and set permissions
mkdir ~/.config/pipewire cp /usr/share/pipewire/*.conf ~/.config/pipewire chown $USER ~/.config/pipewire/pipewire-pulse.conf

2. Edit the pulse-properties.conf file
nano ~/.config/pipewire/pipewire-pulse.conf

3. Find the pulse properties section, uncomment the following keys, and set their values to either 512 or 1024
pulse.min.req = 1024/48000
pulse.min.frag = 1024/48000
pulse.min.quantum = 1024/48000

4. Reboot

1 Like