https://bugs.winehq.org/show_bug.cgi?id=39814
Bug ID: 39814 Summary: choppy pulseaudio after ->Remove legacy pulseaudio/alsa latency workaround (closes: #807403). Product: Wine Version: 1.8-rc4 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: nexxxxen@gmail.com Distribution: ---
After 1.8-rc4 on debian testing my REAPER DAW sound is choppy and noisy.
I use it for long time (years), and had no problems until this workaround (#807403) they removed.
Thanks, and sorry for my bad english. :(
https://bugs.winehq.org/show_bug.cgi?id=39814
--- Comment #1 from Rosanne DiMesio dimesio@earthlink.net --- Does the problem also exist with the WineHQ packages? https://forum.winehq.org/viewtopic.php?f=8&t=25767
https://bugs.winehq.org/show_bug.cgi?id=39814
--- Comment #2 from nexxxxen nexxxxen@gmail.com --- (In reply to Rosanne DiMesio from comment #1)
Does the problem also exist with the WineHQ packages? https://forum.winehq.org/viewtopic.php?f=8&t=25767
Not tested.Probably a Debian package problem...
I'm using at the moment PULSE_LATENCY_MSEC=40 wine e:/REAPER/reaper.exe with good results. pulseaudio does not eats CPU anymore.
Thanks, and sorry for not to be more helping on debug.
https://bugs.winehq.org/show_bug.cgi?id=39814
--- Comment #3 from Rosanne DiMesio dimesio@earthlink.net --- Please test the WineHQ package.
https://bugs.winehq.org/show_bug.cgi?id=39814
--- Comment #4 from nexxxxen nexxxxen@gmail.com --- (In reply to Rosanne DiMesio from comment #3)
Please test the WineHQ package.
Tested and problems persists...
I have purged all wine debian packages, and instaled official winehq-devel folowing instructions from you (https://forum.winehq.org/viewtopic.php?f=8&t=25767)
Exact same problems:
General audio is choppy for about 3min and after this, sound improves, but still it sounds slightly bad.
Trying mentioned workaround (PULSE_LATENCY_MSEC=40 wine e:/REAPER/reaper.exe) it fixes all problems, even what it was once high pulseaudio CPU use i It is significantly reduced
¿Can I help you trying some test?
I am almost illiterate in linux but I can try it with your help
Tanks again
::: nexxxxen :::
https://bugs.winehq.org/show_bug.cgi?id=39814
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sebastian@fds-team.de
--- Comment #5 from Sebastian Lackner sebastian@fds-team.de --- Could you please attach terminal output with the WINEDEBUG environment variable set to "+dsound,+pulse,+alsa"? For example:
WINEDEBUG=+dsound,+pulse,+alsa wine app.exe
Also, which audio backend is visible in the audio tab of winecfg? If its winealsa.drv, you probably added a registry key to override the audio driver in the past. It is recommended to remove such registry keys, and use the new winepulse.drv audio driver, which has better compatibility with PulseAudio.
https://bugs.winehq.org/show_bug.cgi?id=39814
--- Comment #6 from nexxxxen nexxxxen@gmail.com --- Created attachment 53155 --> https://bugs.winehq.org/attachment.cgi?id=53155 WINEDEBUG=+dsound,+pulse,+alsa wine e:\REAPER\reaper.exe &>wine.log
https://bugs.winehq.org/show_bug.cgi?id=39814
--- Comment #7 from nexxxxen nexxxxen@gmail.com --- (In reply to Sebastian Lackner from comment #5)
Could you please attach terminal output with the WINEDEBUG environment variable set to "+dsound,+pulse,+alsa"? For example:
WINEDEBUG=+dsound,+pulse,+alsa wine app.exe
Also, which audio backend is visible in the audio tab of winecfg? If its winealsa.drv, you probably added a registry key to override the audio driver in the past. It is recommended to remove such registry keys, and use the new winepulse.drv audio driver, which has better compatibility with PulseAudio.
Audio backend is pulseaudio. In audio tab of winecfg all values are "Predeterminado del sistema" (system default) I tried set to pulse with same results...
Installation of winehq-devel is fresh and clean, after having purged wine-debian packages. No registry keys manually added.
The debug-log are infinite. Attached file are for run DAW and close it almos immediately, sorry.
Any sugerences?
https://bugs.winehq.org/show_bug.cgi?id=39814
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |aeikum@codeweavers.com Component|-unknown |winepulse.drv Summary|choppy pulseaudio after |Choppy audio with |->Remove legacy |pulseaudio after |pulseaudio/alsa latency |PULSE_LATENCY_MSEC |workaround (closes: |workaround was removed in |#807403). |Debian packages
https://bugs.winehq.org/show_bug.cgi?id=39814
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.winehq.org/sho | |w_bug.cgi?id=39744
--- Comment #8 from Sebastian Lackner sebastian@fds-team.de --- (In reply to nexxxxen from comment #6)
Created attachment 53155 [details] WINEDEBUG=+dsound,+pulse,+alsa wine e:\REAPER\reaper.exe &>wine.log
Thanks for the log. Theoretically 1.8-rc4 and greater should contain a warning message when the PulseAudio buffer is too small, but there is no such message in your attachment. Could you please double check that "wine --version" gives the expected result?
https://bugs.winehq.org/show_bug.cgi?id=39814
--- Comment #9 from nexxxxen nexxxxen@gmail.com --- (In reply to Sebastian Lackner from comment #8)
(In reply to nexxxxen from comment #6)
Created attachment 53155 [details] WINEDEBUG=+dsound,+pulse,+alsa wine e:\REAPER\reaper.exe &>wine.log
Thanks for the log. Theoretically 1.8-rc4 and greater should contain a warning message when the PulseAudio buffer is too small, but there is no such message in your attachment. Could you please double check that "wine --version" gives the expected result?
nex@nexus:~$ wine --version wine-1.8
installed yesterday
https://bugs.winehq.org/show_bug.cgi?id=39814
--- Comment #10 from nexxxxen nexxxxen@gmail.com --- (In reply to nexxxxen from comment #9)
(In reply to Sebastian Lackner from comment #8)
(In reply to nexxxxen from comment #6)
Created attachment 53155 [details] WINEDEBUG=+dsound,+pulse,+alsa wine e:\REAPER\reaper.exe &>wine.log
Thanks for the log. Theoretically 1.8-rc4 and greater should contain a warning message when the PulseAudio buffer is too small, but there is no such message in your attachment. Could you please double check that "wine --version" gives the expected result?
nex@nexus:~$ wine --version wine-1.8
installed yesterday
apparently, buffer negotiation never arrives a good result, and restart in a loop
https://bugs.winehq.org/show_bug.cgi?id=39814
jre.winesim@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jre.winesim@gmail.com
--- Comment #11 from jre.winesim@gmail.com --- (In reply to Sebastian Lackner from comment #8)
Could you please double check that "wine --version" gives the expected result?
This will give the same output for debian.org and winehq deb packages (wine-1.8).
To double check that indeed all other packages were purged I'd use: dpkg -l "*wine*" Lines beginning with "ii" indicate an installed package, lines beginning with "un" a not installed package.
Note that this command might not show all not-installed packages (e.g. in tests here I only saw the wine-devel packages in its output if they were installed).
https://bugs.winehq.org/show_bug.cgi?id=39814
--- Comment #12 from Andrew Eikum aeikum@codeweavers.com --- Thanks for the nice bug report!
This actually looks like a bug in Reaper that the large buffer size was covering up.
Reaper asks for a buffer of length 0x1a0ab REFERENCE_TIMEs, which is 0.0106667 seconds. I'm not sure how this number is derived, but it at least uses the result of GetDevicePeriod.
0034:trace:pulse:AudioClient_Initialize (0x17d450)->(0, 40000, 1a0ab, 0, 0x192a0fc, (null))
And PA honors this, giving us a buffer of the same size (expressed here in bytes at 8bps and 48 kHz):
0034:trace:pulse:dump_attr tlength: 4104
Then Reaper grabs the buffer size and fills the whole buffer:
0034:trace:pulse:AudioClient_GetBufferSize (0x17d450)->(0xc83e910) 0034:trace:pulse:AudioRenderClient_GetBuffer (0x17d450)->(512, 0xc83e8c4)
But, next time it tries to write:
0034:trace:pulse:AudioClient_GetCurrentPadding 0x17d450 Pad: 11 ms (512) 0034:trace:pulse:AudioRenderClient_GetBuffer (0x17d450)->(512, 0xc83e8c4) 0034:warn:pulse:AudioRenderClient_GetBuffer Wanted to write 512, but only 1 available
winepulse is telling the application "512 samples of our 512 sample buffer are occupied," but then Repear tries to write 512 samples into the full buffer! That can't work. They're mistakenly using the size of the data in the buffer as the amount of free space in the buffer.
You see the same bug with each GetBuffer call after that until the buffer is less than half full, at which point the request succeeds. But that's just ~0.005 seconds of data in the buffer, so we hear underruns.
I tested Reaper out with PULSE_LATENCY_MSEC=60 and saw the same broken behavior. The reason it sounds better is because the period size is larger, so the requested buffer size is much larger, which means the half-full buffer doesn't underrun.
So, this is an application bug exposed by our support for very low buffer sizes. I suspect in practice Windows devices don't claim the low latency that winepulse does, or somehow otherwise mask this bug.
https://bugs.winehq.org/show_bug.cgi?id=39814
--- Comment #13 from Andrew Eikum aeikum@codeweavers.com --- Actually, this might not be an application bug. Reaper tries to write in period sizes. This can sometimes fail due to clock skew, which is what I was seeing in the 60 ms case.
In the failing case, our claimed minimum period size is unrealistically low, just one frame (1 / 48000 seconds). Reaper understandably can't handle that. Setting PULSE_LATENCY_MSEC causes winepulse to return a more realistic period size (1.6 ms) which Reaper is able to handle.
I wonder if we should clamp this value to something more realistic.
https://bugs.winehq.org/show_bug.cgi?id=39814
--- Comment #14 from Andrew Eikum aeikum@codeweavers.com --- I made some improvements in this area in current wine-git. Can someone retest with this or the next release?
https://bugs.winehq.org/show_bug.cgi?id=39814
Andrew Eikum aeikum@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |engys@lumalab.net
--- Comment #15 from Andrew Eikum aeikum@codeweavers.com --- *** Bug 40203 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=39814
--- Comment #16 from Engys engys@lumalab.net --- Awesome! I build Wine from Git master and yes you fixed it! Thank you!
https://bugs.winehq.org/show_bug.cgi?id=39814
--- Comment #17 from Engys engys@lumalab.net --- But after all I need to say that audio quality is still better (less crackling) if I disable winepulse.drv and using Alsa instead.
https://bugs.winehq.org/show_bug.cgi?id=39814
Robert Munteanu robert.munteanu@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |robert.munteanu@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=39814
Johan Gardhage johan.gardhage@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |johan.gardhage@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=39814
winetest@luukku.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |winetest@luukku.com
--- Comment #18 from winetest@luukku.com --- (In reply to Engys from comment #17)
But after all I need to say that audio quality is still better (less crackling) if I disable winepulse.drv and using Alsa instead.
Could you retest newer wine?
https://bugs.winehq.org/show_bug.cgi?id=39814
turtle@bazon.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |turtle@bazon.ru
--- Comment #19 from turtle@bazon.ru --- wine-staging 3.16, game League of Legends. In client on buttons and champion select there are lag at sounds. In-game sounds all ok.
https://bugs.winehq.org/show_bug.cgi?id=39814
Andrey andrey.aleksandrovich@googlemail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |andrey.aleksandrovich@googl | |email.com
--- Comment #20 from Andrey andrey.aleksandrovich@googlemail.com --- I have the similar issue, but I don't sure it is the same. I start Civilization II Multiplayer Gold Edition, and the sounds of player's units (during playing) has frequent clicks and pops, occasional dropouts. While the music (Audio CD tracks) is ok.
I made two video records of civ2 running on Wine https://fs12n3.sendspace.com/dl/87245e41b08f8a2f61129297466a0e9e/5c4cb58034b...
and on Windows XP (normal playing). https://fs13n1.sendspace.com/dl/feda2a50d26520036aebdb27ef958d46/5c4cb42163f...
Looks like the new sounds are started when the previous ones are not finished yet.
https://bugs.winehq.org/show_bug.cgi?id=39814
--- Comment #21 from Andrey andrey.aleksandrovich@googlemail.com --- Gentoo Linux, Wine-4.0