http://bugs.winehq.org/show_bug.cgi?id=32913
Bug #: 32913 Summary: Planetside 2: Mouse Jittering Product: Wine Version: unspecified Platform: x86-64 OS/Version: Linux Status: UNCONFIRMED Severity: major Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: geriain@gmx.de Classification: Unclassified
Created attachment 43472 --> http://bugs.winehq.org/attachment.cgi?id=43472 Logfile Wine-Output
Hey folks,
We'v encountered a weird bug in Planetside 2, it's like the mouse is jumping or not responding at all when aiming in the free world.
If you go on foot, or sits behind a turret you can turn your mouse but it looks and feels like the mouse is one step behind and starts to jitter around, which makes aiming almost impossible. The curious part is that it doesn't happen in the menus, or if you'r in a vehicle. Can't describe it better.
What we have done so far:
- Using a native imm32.dll to enable ingame menus - d3dx9_43 (via Winetricks) - d3dcompiler_43 (via Winetricks)
tested myself with native dinput.dll and dinput8.dll and turning off mouse-acceleration.
Using wine-1.5.23 non-patched on Ubuntu 12.10 64bit
Game Homepage: planetside2.com
Hope I have mentioned everything, log is attached - sry it's the first time I post a bugreport myself
http://bugs.winehq.org/show_bug.cgi?id=32913
Felix Hellmann privat@cirk2.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |privat@cirk2.de
--- Comment #1 from Felix Hellmann privat@cirk2.de 2013-02-06 17:06:14 CST --- *** Bug 32914 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=32913
geriain@gmx.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Severity|major |normal
http://bugs.winehq.org/show_bug.cgi?id=32913
--- Comment #2 from geriain@gmx.de 2013-02-07 07:53:04 CST --- Created attachment 43479 --> http://bugs.winehq.org/attachment.cgi?id=43479 WINEDEBUG=-all | mrTransitTasks.cpp
Adding a new log from some extended play and WINEDEBUG=-all to avoid all those d3d-fixmes, showing up hopefully the bad behaviour source
http://bugs.winehq.org/show_bug.cgi?id=32913
Michael Cronenworth mike@cchtml.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mike@cchtml.com
http://bugs.winehq.org/show_bug.cgi?id=32913
John Marszalek jmarszalek@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jmarszalek@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=32913
--- Comment #3 from John Marszalek jmarszalek@gmail.com 2013-03-11 13:00:52 CDT --- I can also confirm this is happening. Ubuntu 12.04 64-bit running Crossover.
http://bugs.winehq.org/show_bug.cgi?id=32913
Chase Adams chase@curvedinfinity.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |chase@curvedinfinity.com
--- Comment #4 from Chase Adams chase@curvedinfinity.com 2013-03-19 10:05:26 CDT --- I would really like to see this fixed and would like to offer a bounty for fixing it. When this bug gets fixed and PS2 reaches Gold status on Ubuntu, I'll donate $100 to the wine development fund.
If any other PS2 players would like to contribute to this bounty, please speak up. Offer just $1 on the bounty and you'll help get this bug fixed faster.
http://bugs.winehq.org/show_bug.cgi?id=32913
--- Comment #5 from geriain@gmx.de 2013-03-19 15:08:29 CDT --- 20$ here for the greater goal
http://bugs.winehq.org/show_bug.cgi?id=32913
nospam5@local.se changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |nospam5@local.se
--- Comment #6 from nospam5@local.se 2013-03-28 12:21:19 CDT --- Confirming this bug. Running Gentoo (Linux 3.8.0) and wine-1.5.24, but I've tried at least 5 different wine versions with the same result.
Only bug making the game playable is this mouse jitter bug, really hope it can get fixed asap.
http://bugs.winehq.org/show_bug.cgi?id=32913
--- Comment #7 from nospam5@local.se 2013-03-28 15:02:28 CDT --- Correction from my last post, I meant to say the only bug making the game unplayable* is this bug.
http://bugs.winehq.org/show_bug.cgi?id=32913
Mike mozilla_bugs@mail.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mozilla_bugs@mail.ru
Linards linards.liepins@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |linards.liepins@gmail.com
--- Comment #8 from Linards linards.liepins@gmail.com 2013-05-15 12:33:54 CDT --- Confirming on 1.5.25 @ fedora 18 x64
http://bugs.winehq.org/show_bug.cgi?id=32913
--- Comment #9 from Felix Hellmann privat@cirk2.de 2013-07-30 02:54:47 CDT --- The bug still exists with wine 1.6 and the current game version, the beta workarounds (windowed in emulated desktop) still haven't returned to work.
http://bugs.winehq.org/show_bug.cgi?id=32913
Captain Crutches captaincrutches@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |captaincrutches@gmail.com
--- Comment #10 from Captain Crutches captaincrutches@gmail.com 2013-10-26 19:10:06 CDT --- Confirming that this bug is still present in Wine 1.7 (I'm running 1.7.3 on Funtoo Linux 3.11.6).
http://bugs.winehq.org/show_bug.cgi?id=32913
subraizada3@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |subraizada3@gmail.com
--- Comment #11 from subraizada3@gmail.com --- Confirming that this bug is still mostly present in Wine 1.7.18 on Arch 64-bit, with a 32-bit wineprefix. By mostly present I mean that the mouse is not "one step behind", there is no lag.
However, it does still stutter. It seems like the game buffers all mouse input and applies it once every 50-100 ms when playing as a human or a tank driver. Mouse works perfectly in menus, tank gunner seats, and aerial vehicles. MAX suits not tested. If it weren't for this bug, the game would be almost perfectly playable.
https://bugs.winehq.org/show_bug.cgi?id=32913
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download Status|UNCONFIRMED |NEW URL| |https://www.planetside2.com | |/ CC| |focht@gmx.net Version|unspecified |1.5.23 Ever confirmed|0 |1
--- Comment #12 from Anastasius Focht focht@gmx.net --- Hello folks,
confirming on behalf of last commenters.
Regards
http://bugs.winehq.org/show_bug.cgi?id=32913
Patrick Rudolph patrick1804@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |patrick1804@web.de
--- Comment #13 from Patrick Rudolph patrick1804@web.de --- I've investigated into this issue. On Windows every relative mouse movement is compared against the mouse threshold, more information here: http://msdn.microsoft.com/en-us/library/ee500883.aspx http://msdn.microsoft.com/en-us/library/aa227574%28v=vs.60%29.aspx
It looks like windows sends two / four mouse movements events, as soon as the threshold limits are exceeded. On wine there's only one event, with much larger values, resulting in the jumping. I'm trying to patch user32 asap and provide a patch.
http://bugs.winehq.org/show_bug.cgi?id=32913
--- Comment #14 from nospam5@local.se --- (In reply to Patrick Rudolph from comment #13)
I've investigated into this issue. On Windows every relative mouse movement is compared against the mouse threshold, more information here: http://msdn.microsoft.com/en-us/library/ee500883.aspx http://msdn.microsoft.com/en-us/library/aa227574%28v=vs.60%29.aspx
It looks like windows sends two / four mouse movements events, as soon as the threshold limits are exceeded. On wine there's only one event, with much larger values, resulting in the jumping. I'm trying to patch user32 asap and provide a patch.
Oh, great to see someone working on fixing this. Really looking forwards to a patch if you figure it out!
Keep up the good work!
http://bugs.winehq.org/show_bug.cgi?id=32913
--- Comment #15 from Patrick Rudolph patrick1804@web.de --- There're two input-modes in PS2, the default method is WM_MOUSEMOVE and DirectInput and the second method, that can be activated by "Use Raw Mouse Input" ,is WM_INPUT and GetRawInputData.
However on WINE it makes no difference, as both methods have exactly the same data source. dinput.dll on WINE uses a mouse hook to emulated relative mouse movement. It should use WM_INPUT as Windows does, more information here: http://msdn.microsoft.com/en-us/library/windows/desktop/ee418864%28v=vs.85%2...
WM_INPUT and WM_MOUSEMOVE is generated by the wineserver from winex11.drv XEvents. The relative mouse-movement for WM_INPUT is emulated, too. This is why windows dinput.dll might not fix this problem.
In fact WM_INPUT should deliver "raw" HID data that has nothing to do with cursor coordinates, as it's just for relative movment.
I've split the WM_INPUT messages into lots of smaller ones, but that doesn't seem to fix the problem.
https://bugs.winehq.org/show_bug.cgi?id=32913
--- Comment #16 from Patrick Rudolph patrick1804@web.de --- Created attachment 49978 --> https://bugs.winehq.org/attachment.cgi?id=49978 hack to use Xinput2 data only for relative mouse movement
This patch fixes the mouse jittering in Planetside 2. However you have to use Xinput2 ! XInput2 is disabled in virtual desktop mode! It is enabled whenever a fullscreen window requests exclusive mouse access. Click once to enable mouse movements, This patch might break other apps !
Brief problem description: * XInput2 is only enable under special circumstandes. * XInput isn't very accurate (It notices sub-pixel mouse movement, but reports only pixel coordinates) * Even with XInput2 enabled it might drop events because they are from a different "serial" * XInput and XInput2 events are both sent to the same low level message function which expects pixel coordinates but XInput2 reports relative sub pixel movement
* Planetside2 expectes "unproccessed" sub pixel coordinates like the ones reported from XInput2
https://bugs.winehq.org/show_bug.cgi?id=32913
--- Comment #17 from Michael Cronenworth mike@cchtml.com --- Thanks for the patch. I can confirm it works. I've never played the game without jitter - it is quite amazing how well the game works without it.
Testing notes: System: Fedora 20 x86_64 Core i7 4790k GeForce 750 Ti Wine 1.7.30 (w/ your patch)
Planetside works well when I'm on Esamir. Most settings are on High, textures on Ultra. No input lag. Very smooth inputs. Very good graphics performance. Vehicles also work smoothly. I'm also using the 64-bit game client.
When I switch to Hossin and spawn I am immediately greeted with input lag. Sounds and overlay icons move in sync with my mouse movement, but polygon objects lag behind about 1-2 seconds. Input is smooth and graphic performance seems high. I can get the lag to go away for about 5 seconds if I hit escape to bring up the menu and escape back to the game. Unsure if this is your patch or a wine bug. The game's raw input / reduce input lag options do nothing in either on or off.
I have also tested Starcraft II and mouse input works with it. Regular 2D Windows applications also continue to work with input.
https://bugs.winehq.org/show_bug.cgi?id=32913
Patrick Rudolph patrick1804@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #49978|0 |1 is obsolete| |
--- Comment #18 from Patrick Rudolph patrick1804@web.de --- Created attachment 50096 --> https://bugs.winehq.org/attachment.cgi?id=50096 fix mouse jitter in Planetside 2 and other games that uses WM_INPUT
This patch fixes the mouse jitter in Planetside 2 and other games that uses WM_INPUT and GetRawInputData for relative mouse movement. This patch is less intrusive as the first one and should not break any apps. It drops XINPUT MotionNotify events as long as XINPUT2 RawMotion events are generated. It also doesn't drop RawMotion events after the cursor has been warped to another position. This prevents race conditions, where all of the RawMotion events are dropped between SetCursor calls. Rawmotion events are generated whenever a fullscreen application grabs the mouse. Running games in Virtual Desktop mode results in XINPUT2 *NOT* beeing used at all, as a result there still will be mouse jitter!
https://bugs.winehq.org/show_bug.cgi?id=32913
--- Comment #19 from Michael Cronenworth mike@cchtml.com --- (In reply to Patrick Rudolph from comment #18)
Created attachment 50096 [details] fix mouse jitter in Planetside 2 and other games that uses WM_INPUT
Would you be willing to submit your patch to wine-staging?
https://github.com/wine-compholio/wine-staging/issues
https://bugs.winehq.org/show_bug.cgi?id=32913
--- Comment #20 from Patrick Rudolph patrick1804@web.de --- Created attachment 50258 --> https://bugs.winehq.org/attachment.cgi?id=50258 cursor debug channel from PS2 mouse movement
WINEDEBUG=+cursor This log shows that RawMotion events are not affected from XWarpPointer, but MotionNotify events are. XWarpPointer inserts a MotionNotify event, but no RawMotion event. XWarpPointer returns the serial to the next valid MotionNotify event, but all already queued RawMotion events are still valid. This log was generated by Planetside2 ingame, while moving the mouse fast.
https://bugs.winehq.org/show_bug.cgi?id=32913
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sebastian@fds-team.de
https://bugs.winehq.org/show_bug.cgi?id=32913
--- Comment #21 from Michael Cronenworth mike@cchtml.com --- @Patrick Rudolph,
They don't take patches attached to bugs. Patches should be sent to wine-patches@winehq.org, they aren't picked up from bugzilla.
See http://wiki.winehq.org/SubmittingPatches for more info.
Or you can send it to wine-staging if it is not ready for mainline.
https://bugs.winehq.org/show_bug.cgi?id=32913
--- Comment #22 from Patrick Rudolph patrick1804@web.de --- I've send patches to wine-patches, but AJ rejected them. I wanted to remove the code that causes jitter, but this code is there to fix broken XINPUT2 behavior on some Xservers. Removing the code would fix the problem for some of us, and cause jitter for all users with broken XINPUT2. I've no idea how to detect broken/correct XINPUT2 behaviour.
https://bugs.winehq.org/show_bug.cgi?id=32913
--- Comment #23 from Sebastian Lackner sebastian@fds-team.de --- Thanks Patrick for tracking down this issue!
I've just added a similar fix to Wine-Staging: https://github.com/wine-compholio/wine-staging/tree/master/patches/winex11-R...
https://bugs.winehq.org/show_bug.cgi?id=32913
Jonas Jelten jonas.jelten@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jonas.jelten@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=32913
--- Comment #24 from Patrick Rudolph patrick1804@web.de --- tested with wine-1.7.36 (Staging) Works fine for me, no more mouse lags in Planetside 2. Sebastian are you willing to send it upstream ?
https://bugs.winehq.org/show_bug.cgi?id=32913
--- Comment #25 from Sebastian Lackner sebastian@fds-team.de --- (In reply to Patrick Rudolph from comment #24)
tested with wine-1.7.36 (Staging) Works fine for me, no more mouse lags in Planetside 2. Sebastian are you willing to send it upstream ?
Thanks for testing. Patch was submitted to the mailing list and waiting for review: http://source.winehq.org/patches/data/109333
Nevertheless, I hope you are aware that there is still no guarantee that it will be accepted. We have lot of patches sitting in our Staging tree (almost 600) waiting for acceptance in vanilla Wine. For those users wanting to use experimental or pending features right now, the best way is to install Wine Staging or compiling Wine manually with patches applied. ;)
https://bugs.winehq.org/show_bug.cgi?id=32913
--- Comment #26 from Sebastian Lackner sebastian@fds-team.de --- Should be fixed with http://source.winehq.org/git/wine.git/commit/7714efe2134f141a3e9f228f99c0218....
https://bugs.winehq.org/show_bug.cgi?id=32913
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |7714efe2134f141a3e9f228f99c | |02185da5ef107 Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #27 from Sebastian Lackner sebastian@fds-team.de --- Since Patrick confirmed that the patch works, marking as fixed.
If you still encounter the issue, make sure that you have an XOrg server version >= 1.10.4, which is required for rawinput to work properly.
https://bugs.winehq.org/show_bug.cgi?id=32913
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #28 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.38.
https://bugs.winehq.org/show_bug.cgi?id=32913
wentam42@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |wentam42@gmail.com
--- Comment #29 from wentam42@gmail.com --- This bug (or a similar bug) still occurs for me with one mouse I have, but other mice work fine (wine 1.7.39 staging). This is with no virtual desktop+fullscreen.
The mouse in question is a deathadder 2013. It jitters a bit more inconsistently than this bug normally did. It's completely smooth in linux native games.
Upon rare occasion when I switch away and give the window focus again, the mouse will be completely smooth but the mouse buttons won't work in game. This situation is very rare however.
When I use a virtual desktop, the mouse will get the same consistent jitter this bug always had.
I also personally wouldn't consider this bug fully fixed, as it's not fixed in all situations, just in the situation of fullscreen+no virtual desktop (which can really suck for those with multiple monitors).
https://bugs.winehq.org/show_bug.cgi?id=32913
--- Comment #30 from wentam42@gmail.com ---
Upon rare occasion when I switch away and give the window focus again, the mouse will be completely smooth but the mouse buttons won't work in game. This situation is very rare however.
Turns out this situation is when my mouse cursor is outside of the fullscreen window, with the fullscreen window still the window in focus.