Bolt icon indicating copy to clipboard operation
Bolt copied to clipboard

Intermittent garbled audio linux (RS3)

Open PCBscanner opened this issue 1 year ago • 12 comments

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.

PCBscanner avatar Dec 15 '24 11:12 PCBscanner

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.

Adamcake avatar Dec 15 '24 14:12 Adamcake

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.

PCBscanner avatar Dec 15 '24 18:12 PCBscanner

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.

Adamcake avatar Apr 08 '25 19:04 Adamcake

Can confirm 200ms of delay fixes the garbled audio

zyoNoob avatar Apr 11 '25 09:04 zyoNoob

Could we also add pipewire support directly?

zyoNoob avatar Apr 11 '25 09:04 zyoNoob

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.

PCBscanner avatar Apr 11 '25 12:04 PCBscanner

Pipewire with wireplumber is what I use, works fine for me. I'd always suggest it over pulseaudio because it's much better.

Adamcake avatar Apr 11 '25 14:04 Adamcake

What is the process of switching to pipewire, because the default is pulseaudio for bolt right?

zyoNoob avatar Apr 12 '25 13:04 zyoNoob

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.

Chapien avatar Apr 29 '25 13:04 Chapien

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

Oni-Hazza avatar May 04 '25 22:05 Oni-Hazza

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.

Adamcake avatar Jun 27 '25 14:06 Adamcake

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!

thePalindrome avatar Sep 26 '25 12:09 thePalindrome