Intermittent garbled audio linux (RS3)
I have noticed an intermittent issue where the audio is garbled and crackles. It is difficult to describe, but it sounds like some layers of the audio are very slightly offset from each other. This usually happens when launching the RS3 client and the music on the login screen is garbled. However, it happened midway through a play session for the first time today. Most of the time, quitting the RS client and Bolt resolves this, however sometimes I must restart my computer to resolve this.
I cannot manually replicate this, but I have noticed it on Ubuntu 22.04, 24.04, Fedora 40, and Fedora 41, GNOME and KDE Plasma. I am currently using the Bolt v0.10.0 (via Flatpak), Linux kernel 6.11, Wayland.
I have seen what appears to be a similar issue on the USA-RedDragon GitHub repo, however the fix didn't solve it for me link here.
PULSE_LATENCY_MSEC is the usual fix, not sure what else to suggest. I suppose if you're using pulseaudio you could try changing to wireplumber? It's usually much better.
Thanks Adam. I'll play around with the pulseaudio settings a bit more. Would your recommendation be to run the application with e.g. flatpak --env='PULSE_LATENCY_MSEC=200' run com.adamcake.Bolt or use system-wide parameters? I'm swaying towards the first because I do not have this issue with any other application.
Sorry didn't respond sooner, I would suggest setting this env var only for RS3 instead of system-wide if you don't have the issue anywhere else, because setting it anywhere else would just increase your audio latency for no reason. Bolt v0.15 has custom launch commands so you could easily set the RS3 launch command to:
/usr/bin/env PULSE_LATENCY_MSEC=200 %command%
And then not have to mess around with anything on your system.
Can confirm 200ms of delay fixes the garbled audio
Could we also add pipewire support directly?
No worries. 200 ms of delay works 99% of the time for me. There are odd occurrences where it fails, but that's certainly the exception.
Pipewire with wireplumber is what I use, works fine for me. I'd always suggest it over pulseaudio because it's much better.
What is the process of switching to pipewire, because the default is pulseaudio for bolt right?
Sorry didn't respond sooner, I would suggest setting this env var only for RS3 instead of system-wide if you don't have the issue anywhere else, because setting it anywhere else would just increase your audio latency for no reason. Bolt v0.15 has custom launch commands so you could easily set the RS3 launch command to:
/usr/bin/env PULSE_LATENCY_MSEC=200 %command%And then not have to mess around with anything on your system.
I've done this, to no effect. I use Pipewire, not Pulse, and still have the crackling issues.
Sorry didn't respond sooner, I would suggest setting this env var only for RS3 instead of system-wide if you don't have the issue anywhere else, because setting it anywhere else would just increase your audio latency for no reason. Bolt v0.15 has custom launch commands so you could easily set the RS3 launch command to:
/usr/bin/env PULSE_LATENCY_MSEC=200 %command%And then not have to mess around with anything on your system.I've done this, to no effect. I use Pipewire, not Pulse, and still have the crackling issues.
It worked for me when I set it to 100 instead of 200 for some reason
What is the process of switching to pipewire, because the default is pulseaudio for bolt right?
The "default" depends on what game you're playing and how it's programmed, but I believe all of them will just use whatever's available.
For the process of switching to pipewire, check the docs for your distro or package manager. It's probably just a case of installing and configuring pipewire and something like wireplumber.
If you don't want to / can't switch to pipewire (like in my case), restarting pulseaudio with a line like
systemctl --user restart pulseaudio
will fix it (you'll likely have to restart various things, but other things like firefox will just fix themselves).
It also seems to be related to pulseaudio or something getting swapped, so either changing your swappiness (I think lower means the system swaps only if it must, but you'd have to check) or finding some way to prevent pulseaudio from being swapped should help a bit!