Bug 46976

Summary: Xserver 1.11+ reports absolute valuator.values for relative devices
Product: xorg Reporter: Loris Z. <the-lz-himself>
Component: Lib/XiAssignee: Peter Hutterer <peter.hutterer>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: anssi, arthur.huillet, chase.douglas, freedesktop, leif.walsh, peter.hutterer, rockorequin, sa, the-lz-himself
Version: 7.6 (2010.12)   
Hardware: All   
OS: Linux (All)   
See Also: https://launchpad.net/bugs/948938
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 40982    
Attachments:
Description Flags
Wine trace for Mass Effect (Steam version)
none
Wine trace for Crysis 2
none
trace for borderlands
none
program illustrating the issue none

Description Loris Z. 2012-03-05 08:40:41 UTC
According to this ( http://bugs.winehq.org/show_bug.cgi?id=30057 ) bug report, any application needing mouse warp or window clipping is broken with Wine 1.4 and any xserver from 1.11 to 1.12 and later.
Many 3D apps controlled by mouse are affected, and as a result are unusable.

According to Wine developper Alexandre Julliard : "The devices claim to report relative motion but they send absolute coordinates. I don't think there's anything we can do about that, you'll have to report it to xorg."
Comment 1 Loris Z. 2012-03-06 03:53:41 UTC
Created attachment 58055 [details]
Wine trace for Mass Effect (Steam version)

I do not know if this is useful in any way, but here is a wine trace for Mass Effect (Steam version).
I runs perfectly with wine 1.4rc6 and xserver 1.10, but mouse input is broken with xserver 1.11 and 1.12.
Whatever direction I try to turn the pointer, it first goes to the right for half a second, then either continues to turn in the wrong direction, or goes in right direction.
It seems it depends on pointer movement speed or touch pressure (I use a touchpad), I 'm not sure.

That makes the game unplayable.

This behaviour is even worse with Crysis, Bioshock and other apps, with the sensitivity being much to high, and the view going in every direction and ending pointing to the floor with a minor mouse movement.
Comment 2 Loris Z. 2012-03-06 03:59:46 UTC
Created attachment 58056 [details]
Wine trace for Crysis 2
Comment 3 Leif 2012-03-14 16:39:49 UTC
Created attachment 58461 [details]
trace for borderlands

generated by setting WINEDEBUG=+cursor and running borderlands, playing enough to expose the bug, and quitting, then filtering out any lines without ':cursor:'
Comment 4 rockorequin 2012-03-15 19:35:41 UTC
Created attachment 58533 [details]
program illustrating the issue

The attached program illustrates the regression. It prints out the raw_values and (transformed) valuator.values reported for XI_RawMotion mouse movement events.

On xserver 1.10, the raw_values and valuator.values are the same (on my system, at least), ie both are relative, which makes sense because my mouse is a relative device.

On xserver 1.11, the raw_values are relative but the valuator.values are absolute.
Comment 5 Peter Hutterer 2012-03-20 21:08:07 UTC
http://patchwork.freedesktop.org/patch/9595/
Comment 6 Sven Arvidsson 2012-03-21 07:25:33 UTC
(In reply to comment #5)
> http://patchwork.freedesktop.org/patch/9595/

Thank you! Wine is working fine with the patch applied.
Comment 7 Loris Z. 2012-03-22 06:53:37 UTC
It works ! Thanks.
Comment 8 Jeremy Huddleston Sequoia 2012-03-30 20:13:14 UTC
Fixed in 1.12 branch and master

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.