https://bugs.winehq.org/show_bug.cgi?id=50449
Bug ID: 50449 Summary: Program freezes if both keyboard and mouse is used at the same time Product: Wine Version: 6.0-rc5 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-dinput Assignee: wine-bugs@winehq.org Reporter: g0re@null.net Distribution: ---
Created attachment 69063 --> https://bugs.winehq.org/attachment.cgi?id=69063 console output from version 5.22
Zdaemon 1.10.15 - a DOOM source port http://downloads.zdaemon.org/zdaemon11015_win32_bin.7z
If only keyboard is used, works ok
If only mouse is used, works ok
Program freezes if both keyboard and mouse is used at the same time.
Issue both in windowed and fullscreen mode.
Until version 5.14, works fine.
Occurs from wine version 5.15 to version 6.0-rc5 (tested every version between)
Can do a simple test with (need an IWAD):
$ wine zdaemon.exe -iwad DOOM2.WAD -skill 4 +map map01
https://bugs.winehq.org/show_bug.cgi?id=50449
g0re g0re@null.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression URL| |https://www.zdaemon.org
https://bugs.winehq.org/show_bug.cgi?id=50449
g0re g0re@null.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Program freezes if both |zdaemon - Program freezes |keyboard and mouse is used |if both keyboard and mouse |at the same time |is used at the same time
https://bugs.winehq.org/show_bug.cgi?id=50449
g0re g0re@null.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|zdaemon - Program freezes |zdaemon - Program freezes |if both keyboard and mouse |if both keyboard and mouse |is used at the same time |are used at the same time
https://bugs.winehq.org/show_bug.cgi?id=50449
Rémi Bernon rbernon@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |rbernon@codeweavers.com
--- Comment #1 from Rémi Bernon rbernon@codeweavers.com --- I've tried reproducing this but to no avail. Could you provide more detail, like: 1) Does it happen as soon as you press a key and move your mouse, or if it happens after a while? 2) Is it a MinGW build? 3) Does it require some specific hardware (gaming mouse with high polling rate)?
Also as you seem to be able to reproduce the bug with various wine versions, maybe run git bisect to track down the exact regressing commit? See https://wiki.winehq.org/Regression_Testing
https://bugs.winehq.org/show_bug.cgi?id=50449
--- Comment #2 from g0re g0re@null.net --- (In reply to Rémi Bernon from comment #1)
I've tried reproducing this but to no avail. Could you provide more detail, like:
- Does it happen as soon as you press a key and move your mouse, or if it
happens after a while? 2) Is it a MinGW build? 3) Does it require some specific hardware (gaming mouse with high polling rate)?
Also as you seem to be able to reproduce the bug with various wine versions, maybe run git bisect to track down the exact regressing commit? See https://wiki.winehq.org/Regression_Testing
1- it happens soon the keyboard and mouse are used at the same time.
2- no idea what build system Zdaemon's devs uses ( it is closed source )
3- tested with 2 mouses, see bellow
-----------------------------------------------------------------
I think that I've discovered the real culprit.
I renamed ~/.wine to create a new one and the problem goes away.
So, I compared via winecfg what the difference.
Discovered that I have d3d9.dll and d3dcompiler_47.dll set to native/builtin.
These 2 files are used by ReShade ( https://reshade.me ) but I don't use it anymore.
Some change on wine 5.15 behavior affects the ReShade's d3d9.dll and affects user input behavior.
Before that, I tested 2 USB mouses. A 800dpi and a 1000dpi with no solution.
However, I will try to find via git bisect which commit is the problem.
For curiosit, you can look at https://old.reddit.com/r/linux_gaming/comments/b2hi3g/reshade_working_in_win... how ReShade is used
OBS: changes on wine 5.15 affects GShade ( https://gposers.com/gshade/ )
https://bugs.winehq.org/show_bug.cgi?id=50449
--- Comment #3 from g0re g0re@null.net ---
Also as you seem to be able to reproduce the bug with various wine versions, maybe run git bisect to track down the exact regressing commit? See https://wiki.winehq.org/Regression_Testing
git bisect good Bisecting: 2 revisions left to test after this (roughly 1 step) [447bce4117a58910690a0d2610ebcbdd49ae9127] dinput8: Stop using LL hooks for mouse devices.
git bisect bad Bisecting: 0 revisions left to test after this (roughly 0 steps) [81d1c79dcda0eea8fd35b2dcc6dfa3c3a17e2393] dinput8: Use rawinput interface for mouse device
git bisect bad 81d1c79dcda0eea8fd35b2dcc6dfa3c3a17e2393 is the first bad commit commit 81d1c79dcda0eea8fd35b2dcc6dfa3c3a17e2393 Author: Rémi Bernon rbernon@codeweavers.com Date: Mon Aug 10 11:04:16 2020 +0200
dinput8: Use rawinput interface for mouse device.
Signed-off-by: Rémi Bernon rbernon@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
:040000 040000 14fb08d1460573c613cf2ce3ea0eac2b31267f80 aa12b6a1cda0e465e98ab2d31cd320efd5c2d82a M dlls
Funny hours testing... I didn't know about git bisect... very handy
https://bugs.winehq.org/show_bug.cgi?id=50449
--- Comment #4 from Rémi Bernon rbernon@codeweavers.com --- Thanks this is really helpful. I suspected the problem could be related to these changes but sadly I am still unable to reproduce the issue, with or without ReShade but maybe it's only with some specific ReShade version? I tried with the current latest: 4.9.0.
2- no idea what build system Zdaemon's devs uses ( it is closed source )
I meant Wine build, it's possible to build with or without MinGW (--with-mingw configure option). But I've tried a build without MinGW and didn't see any difference.
https://bugs.winehq.org/show_bug.cgi?id=50449
--- Comment #5 from g0re g0re@null.net --- (In reply to Rémi Bernon from comment #4)
Thanks this is really helpful. I suspected the problem could be related to these changes but sadly I am still unable to reproduce the issue, with or without ReShade but maybe it's only with some specific ReShade version? I tried with the current latest: 4.9.0.
Tested with version 4.7.0 (I have this version when the issue begin and discovered), 4.8.0 and 4.9.0 here. About Gshade: 3.0.0 (I have this version when the issue begin) and tested now with 3.1.2
I meant Wine build, it's possible to build with or without MinGW (--with-mingw configure option). But I've tried a build without MinGW and didn't see any difference.
I already compile without MinGW.
configure: MinGW compiler not found, cross-compiling PE files won't be supported. configure: OpenCL development files not found, OpenCL won't be supported. configure: libhal development files not found, no legacy dynamic device support. configure: libsane development files not found, scanners won't be supported. configure: libgphoto2 development files not found, digital cameras won't be supported. configure: libgphoto2_port development files not found, digital cameras won't be auto-detected. configure: OSS sound system found but too old (OSSv4 needed), OSS won't be supported. configure: libFAudio development files not found, XAudio2 won't be supported. configure: libcapi20 development files not found, ISDN won't be supported. configure: vkd3d development files not found (or too old), Direct3D 12 won't be supported.
---------------------------------------------------
I observed more carefully the console output and see a lot "0024:fixme:rawinput:RegisterRawInputDevices Unhandled flags 0x230 for device 0." when I press ESC to call the game menu when using with the commit 81d1c79dcda0eea8fd35b2dcc6dfa3c3a17e2393 with and without ReShade.
https://bugs.winehq.org/show_bug.cgi?id=50449
--- Comment #6 from g0re g0re@null.net --- I fully reproduce on voidlinux's wine-6.0-rc5 (x86 distro, not x64) on anoter machine.
I packed everything and put on http://0x0000.space:33399/ZDaemon-20210105.tar.xz
Just extract on /opt/doom/ or PATHs inside *.ini will need to be modified.
I Put adtional info inside README.txt
https://bugs.winehq.org/show_bug.cgi?id=50449
--- Comment #7 from Rémi Bernon rbernon@codeweavers.com --- Thanks!
I'm not sure if that's what you were describing, but the only issue I could reproduce is that when both keyboard and mouse are used at the same time, some key release events are sometimes missed, and player movement continues like if the key is kept pressed forever until it's pressed and released again. I wouldn't describe that as a freeze though.
It only happens for me with wined3d, not when using dxvk. In the former, the threads are much more busy and that could cause some timing issues, ultimately missing events, although I'm mostly speculating here.
Could you confirm that it's the same problem you are seeing? (Or maybe it behaves differently for you, but it may still be the same root cause)
https://bugs.winehq.org/show_bug.cgi?id=50449
--- Comment #8 from Rémi Bernon rbernon@codeweavers.com --- I could also see cases where a keyboard key press isn't doing anything if the mouse is moved at the same time. If the key is kept pressed while moving the mouse it's only taking effect after a bit and usually then continues moving even after key is released.
When not using ReShade, all mouse and keyboard movements are very delayed, and wined3d thread are very busy.
ReShade is probably adding more window message processing that is not usually done and from time to time it hands it over to the normal application message processing loop, that suffers from the sluggishness.
Note that I can also reproduce all of this with Wine 5.11, so it may not be the same issue.
https://bugs.winehq.org/show_bug.cgi?id=50449
--- Comment #9 from g0re g0re@null.net ---
I'm not sure if that's what you were describing, but the only issue I could >reproduce is that when both keyboard and mouse are used at the same time, some >key release events are sometimes missed, and player movement continues like if >the key is kept pressed forever until it's pressed and released again. I >wouldn't describe that as a freeze though.
I could also see cases where a keyboard key press isn't doing anything if the mouse is moved at the same time. If the key is kept pressed while moving the mouse it's only taking effect after a bit and usually then continues moving even after key is released.
It happens too but is rare event for me and quick press ESC key 2x to call zdaemon's menu cancel this behavior. I think that happened to me only 3x on last year.
Note that I can also reproduce all of this with Wine 5.11, so it may not be the same issue.
I tested 5.12, 5.3(main use) 5.0.3(I think that most distros ships 5.0.x version) and from 5.14 to 6.0-rc5
Could you confirm that it's the same problem you are seeing? (Or maybe it >behaves differently for you, but it may still be the same root cause)
No, it is not the same issue
Made 2 short videos about what is going on(60sec ~10Mb): http://0x0000.space:33399/zdaemon-reshade-4.7.0.mp4 http://0x0000.space:33399/zdaemon-reshade-4.9.0.mp4
zdaemon-reshade-4.7.0.mp4 00:15: mouse+keyboard at the same time freezes for couple seconds (note that fps counter drops every time when it occurs, upper right corner)
00:35: keyboard only until 00:38 and freeze when I use mouse
00:55: pressing ESC make console output "0024:fixme:rawinput:RegisterRawInputDevices Unhandled flags 0x230 for device 0."
zdaemon-reshade-4.9.0.mp4 Sometimes it freezes completely and the only way is killing all wine's process, like near end of this video
https://bugs.winehq.org/show_bug.cgi?id=50449
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1| |81d1c79dcda0eea8fd35b2dcc6d | |fa3c3a17e2393
https://bugs.winehq.org/show_bug.cgi?id=50449
joaopa jeremielapuree@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree@yahoo.fr
--- Comment #10 from joaopa jeremielapuree@yahoo.fr --- Does the bug still occur with wine-6.23?
https://bugs.winehq.org/show_bug.cgi?id=50449
TL HereInPlainSight+wine@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |HereInPlainSight+wine@gmail | |.com
--- Comment #11 from TL HereInPlainSight+wine@gmail.com --- This bug seems to be affecting multiple games. Coming here from looking into a bug reported on the Proton tracker ( https://github.com/ValveSoftware/Proton/issues/2908#issuecomment-1003268034 , comments prior to are about a different bug ) about compatibility with ReShade and GShade for various games. I'm experiencing the issue in Skyrim (which I don't believe I can run in wine alone), but it's being reported in other games as well, including Stalker: Anomaly (available at https://www.moddb.com/downloads/stalker-anomaly-151 ). Unaware of THIS report, I ran a bisect, testing with Anomaly, and came up with the exact same commit. Of note, the issue is clearly visible even on the menu of the game, loading in isn't even required.
From what I can tell, this issue doesn't seem to happen to everyone. There's
certainly some comments I've seen about some users installing one of the shaders in Skyrim and not seeming to have any problems. I'm not sure what the shared link is, here, exactly, on why some users experience the issue and some seem not to. One user in the Proton thread tried messing with their polling rates ( https://github.com/ValveSoftware/Proton/issues/2908#issuecomment-1086734482 ) but said it didn't help.
Note that by all description, users in the Proton thread are seeing exactly what g0re described. Immediate and complete freezing of the game. I've gotten them as short as six seconds if I stop moving the mouse / pressing any keys immediately, but some in the thread mentioned freezes of up to a minute.
And, yes, the issue still occurs all the way up to wine 7.5. Is there anything we can provide that might help narrow this down?
https://bugs.winehq.org/show_bug.cgi?id=50449
nulldisk@protonmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |nulldisk@protonmail.com
--- Comment #12 from nulldisk@protonmail.com --- Coming from the Proton thread linked above. I'm also experiencing the exact same behavior described here with any build of Wine after 5.14.
I am currently testing different input devices looking for clues. I've determined that pretty much any input device causes this issue. I've tried 2 different mouses, Huion screen tablet and a Wacom tablet – in all cases the behavior is the same.
Connecting two mouses and moving them together at the same time does not cause any freeze.
I've run simple scripts sending keyboard and mouse input events via xdotool at the same time and the behavior is exactly the same, so I guess this is nothing related to hardware input devices.
https://bugs.winehq.org/show_bug.cgi?id=50449
Jarrard Lo overlord.jarrard@protonmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |overlord.jarrard@protonmail | |.com
--- Comment #13 from Jarrard Lo overlord.jarrard@protonmail.com --- I can confirm this happens with Reshade DXGI.DLL uses. (tested with 4.9.1 and other versions of reshade)
Been happening for a good while too but no traction in getting it resolved.
I mostly use Kenshi for testing which does the ~10s freeze when using keyboard+mouse but not separately.
Can take a bit of mouse and keyboard panning around to trigger it, then you must wait about 10seconds before it unfreezes!
https://bugs.winehq.org/show_bug.cgi?id=50449
Jarrard jarrard@proton.me changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jarrard@proton.me
--- Comment #14 from Jarrard jarrard@proton.me --- Stalker Anomaly is free and exhibits this issue with reshade.