https://bugs.winehq.org/show_bug.cgi?id=42856
Bug ID: 42856 Summary: osu! - high sound latency with winepulse compared to winealsa Product: Wine Version: 2.6 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-dsound Assignee: wine-bugs@winehq.org Reporter: yalterz@gmail.com Distribution: ---
I'm trying to set up PulseAudio to achieve the same low audio latency as I'm getting with just ALSA. Looks like I managed to achieve this, but not as I would expect.
Currently my setup is: PulseAudio with default configuration, along with pulseaudio-alsa integration which basically forwards all ALSA-using programs straight to Pulse. I am using patched winealsa.drv for reduced latency (changing three constants at the top of mmdevdrv.c — DefaultPeriod, MinimumPeriod, EXTRA_SAFE_RT — to lower values, the ones that work for me: 20000, 20000, 11000 respectively). I applied a very similar patch to winepulse.drv.
When running osu! through ALSA (sound=alsa), which effectively runs it through ALSA->PulseAudio->ALSA device, the audio latency is almost non-existant — similar if not the same as what I was getting with just ALSA.
When running osu! through PulseAudio (sound=pulse), effectively PulseAudio->ALSA device, the audio latency is noticeably higher (at least 20ms higher), even though it practically removes one extra step from the audio "chain".
https://bugs.winehq.org/show_bug.cgi?id=42856
Ivan Molodetskikh yalterz@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Distribution|--- |ArchLinux
https://bugs.winehq.org/show_bug.cgi?id=42856
Ivan Molodetskikh yalterz@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|directx-dsound |-unknown
https://bugs.winehq.org/show_bug.cgi?id=42856
--- Comment #1 from Ivan Molodetskikh yalterz@gmail.com --- Created attachment 57961 --> https://bugs.winehq.org/attachment.cgi?id=57961 Starting the game with sound=alsa
https://bugs.winehq.org/show_bug.cgi?id=42856
--- Comment #2 from Ivan Molodetskikh yalterz@gmail.com --- Created attachment 57962 --> https://bugs.winehq.org/attachment.cgi?id=57962 Starting the game with sound=pulse
https://bugs.winehq.org/show_bug.cgi?id=42856
Matteo Bruni matteo.mystral@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |aeikum@codeweavers.com
https://bugs.winehq.org/show_bug.cgi?id=42856
--- Comment #3 from Ivan Molodetskikh yalterz@gmail.com --- This seems to be happening with other applications as well. Just tried Half-Life with a clean install of Steam in another 64-bit wine prefix. Same issue: winealsa gives lower sound latency than winepulse.
https://bugs.winehq.org/show_bug.cgi?id=42856
--- Comment #4 from Ivan Molodetskikh yalterz@gmail.com --- Same behaviour in wine 2.7.
https://bugs.winehq.org/show_bug.cgi?id=42856
Franc[e]sco lolisamurai@tfwno.gf changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |lolisamurai@tfwno.gf
--- Comment #5 from Franc[e]sco lolisamurai@tfwno.gf --- Can confirm this bug, also still happens in wine 2.8
let me know if you need any logging/testing other than what OP has already provided
https://bugs.winehq.org/show_bug.cgi?id=42856
--- Comment #6 from Ivan Molodetskikh yalterz@gmail.com --- Same behaviour in wine 2.9.
https://bugs.winehq.org/show_bug.cgi?id=42856
--- Comment #7 from Ivan Molodetskikh yalterz@gmail.com --- Same behaviour in wine 2.20.
https://bugs.winehq.org/show_bug.cgi?id=42856
--- Comment #8 from Ivan Molodetskikh yalterz@gmail.com --- Same behaviour in wine 3.0-rc5.
https://bugs.winehq.org/show_bug.cgi?id=42856
Hugo "ThePooN" Denizart thepoon@cartooncraft.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |thepoon@cartooncraft.fr
--- Comment #9 from Hugo "ThePooN" Denizart thepoon@cartooncraft.fr --- Can confirm on Wine 3.0-rc5.
https://bugs.winehq.org/show_bug.cgi?id=42856
tokktokk fdsfgs@krutt.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fdsfgs@krutt.org
https://bugs.winehq.org/show_bug.cgi?id=42856
--- Comment #10 from Hugo "ThePooN" Denizart thepoon@cartooncraft.fr --- In this blog post, I detailed how I was able to reduce the osu! audio latency while using PulseAudio and winepulse.drv with a patch. I haven't tested it with osu! and it is in no way up to anyone's standards, but I'll still leave it here.
https://blog.thepoon.fr/osuLinuxAudioLatency/
https://bugs.winehq.org/show_bug.cgi?id=42856
--- Comment #11 from Hugo "ThePooN" Denizart thepoon@cartooncraft.fr --- with anything else than osu!*
https://bugs.winehq.org/show_bug.cgi?id=42856
joaopa jeremielapuree@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree@yahoo.fr
--- Comment #12 from joaopa jeremielapuree@yahoo.fr --- Does the bug still occur with wine-6.4?
https://bugs.winehq.org/show_bug.cgi?id=42856
--- Comment #13 from Ivan Molodetskikh yalterz@gmail.com --- This isn't a "clean" test as I'm now running pipewire instead of PulseAudio on F34 with wine 6.3, but according to my tests winealsa still has a bit lower latency than I can get with winepulse, even when tuning pipewire's PULSE_LATENCY_MSEC to the lowest value that doesn't produce sound glitches. Note that on this setup winealsa goes through pipewire-alsa, and winepulse through pipewire-pulse.
https://bugs.winehq.org/show_bug.cgi?id=42856
--- Comment #14 from Hugo "ThePooN" Denizart thepoon@cartooncraft.fr --- I am running a fairly tuned Wine install (as described in my blog post, although it has changed a bit) and have not tried vanilla Wine in recent times.
@Ivan With pipewire, you should use PIPEWIRE_LATENCY. Beware that it conflicts with PULSE_LATENCY_MSEC and these two should not be used together.
https://bugs.winehq.org/show_bug.cgi?id=42856
Neko-san nekoNexus@protonmail.ch changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |nekoNexus@protonmail.ch