ValveSoftware / Proton

Compatibility tool for Steam Play based on Wine and additional components
Other
24.43k stars 1.07k forks source link

Game's audio causes craclking when using recent pipewire. Easily reproducible on Helldivers 2 (553850), but also happens on Returnal (1649240) #7568

Open braiam opened 8 months ago

braiam commented 8 months ago

This issue is independent of Proton version, since pipewire since version 0.3.67 has implemented tighter latency timings. There are multiple reports of Wine/Proton apps having issues (1, 2, 3). I've found that on a default installation, Helldivers 2 seems to reliably produce these results without having to do any other steps.

Using a workaround that changes pipewire-pulse timings to the previous default mitigates this issue, but doesn't totally resolves it:

pulse.properties = {
    pulse.min.req          = 256/48000
    pulse.min.frag         = 256/48000
    pulse.min.quantum      = 256/48000
}

While we can claim that the issue is pipewire, native apps/games don't seem to have issues with these configurations. I'm not sure what component or at what level of the chain it should be coordinated, but when pipewire 0.3.67 starts hitting stable channels among distributions, these issues would become more prevalent and commonplace.

UbuntuGaming commented 7 months ago

Replying to https://github.com/ValveSoftware/Proton/issues/7568#issue-2177211417

Hello, I was looking around for a helldivers 2 issue i'm having (unrelated to this post) & i came across your post. I don't know if this is a similar issue but currently attempting to use EasyEffects on pipewire with some of the more demanding effects (libebur128) causes strange timing/latency originated audio phenomenons, on some applications it also does it with EasyEffects disabled. Adjusting PULSE_LATENCY_MSEC environment variable solves the issue. Have you tried using PULSE_LATENCY_MSEC=60 %command%? if this doesn't work with this issue sorry for the noise.