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
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.
(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)
@PureTryOut then it's a duplicate of #120
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.
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.
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.
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.
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.
Most helpful comment
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.