protonscr

Crackling sound in all games

protonclosed
ValveSoftware/Proton#1395 · opened 2018-09-11 by PureTryOut · updated 2024-04-14 · 10 comments · github
PPureTryOut 2018-09-11 github

Compatibility Report

  • Name of the game with compatibility issues: all games, but some worse than others, using COD:WAW for this
  • Steam AppID of the game: 10090

System Information

I confirm:

  • [x] that I haven't found an existing compatibility report for this game.
  • [x] that I have checked whether there are updates for my system available.

Symptoms

Sound crackling in every game. It doesn't always happen, and for some games it happens more than others (for example in Call of Duty: World at War it happens about 90% of the time, where with GTA5 it happens about 20% of the time and only after playing for a bit).

I've uploaded a sound fragment from a game of COD:WAW where you can hear it clearly (a .wav in a .zip).
cod-crackling-sound.zip

Reproduction

  1. Launch COD:WAW
  2. Open the server browser, you'll hear explosions in the background which should crackle
  3. If the sound doesn't crackle, you've caught the lucky 10%, and you have to restart the game
Kkisak-valve maintainer 2018-09-11 github

Hello @PureTryOut, we're using one issue report per unofficially supported game title, so I've gone ahead and transferred this issue report to https://github.com/ValveSoftware/Proton/issues/360#issuecomment-420313891.

Vvanyasem 2018-09-11 github

(From Telegram PM)

Ivan Semkin, [11.09.18 18:24]
try to modify /etc/pulse/default.pa, and add tsched_buffer_size=0 to load-module module-udev-detect

Ivan Semkin, [11.09.18 18:24]
also you might want to add PULSE_LATENCY_MSEC=30 %command% to launch options of the game

Ivan Semkin, [11.09.18 18:25]
play with the value a bit (try 5, 30, 90)

PPureTryOut 2018-09-11 github

@kisak-valve well I just used COD:WAW as an example, it happens for basically every game. I don't think this belongs under the COD:WAW issue particularly.

Vvanyasem 2018-09-11 github

@PureTryOut then it's a duplicate of #120

PPureTryOut 2018-09-11 github

Not entirely sure. For him it only happens "under certain circumstances" while for me it happens basically always, even on a fresh boot or after using the PC for several hours. Also, the proposed workarounds there didn't help whatsoever. These facts combined make me thing they're different, unrelated, problems.

Ssoppelmann 2018-09-14 github

Its a pulseaudio problem, same problem existed for wine. This issue should NOT be moved to the call of duty report, it should rather be in the FAQ.
Either use ALSA or do this
Go to /etc/pulseaudio/daemon.cfg and set the fragment-size from the default 25 milliseconds to say, 5 milliseconds, make sure to uncomment it too.
Then restart the daemon, or the whole computer, whatever works best for you.

PPureTryOut 2018-09-14 github

I already fixed it by using the workaround in #120. I do agree though that it doesn't fit in the COD:WAW report, as that's just an example I used.

Ssoppelmann 2018-09-18 github

It is not a very good solution and creates problems on many systems including mine but ymmv.

For future reference then there is more than 1 solution available and testing for what fits your system best is suggested.

KKorinFlakes 2018-09-23 github

The above solutions didn't actually solve my problem. What I ended up doing was just creating a script to allow me to disable autospawn for pulse, then disabled it and restart so Ubuntu uses ALSA instead. Unfortunately I don't know how to switch everything manually hence the reboot. Removing pulse entirely would do the trick as well, but I'd rather keep it just in case.

Ppbek 2024-04-14 github

I just tried Baldurs Gate 3 on my ROG Ally, running NixOS with Steam (I guess Proton 8). I had crackling. Then I tried the experimental Proton 9 and there was no crackling anymore! 🥳🎉

Launch lines

Upstream links