Bug 9156 - Mouse acceleration doesn't work properly
Summary: Mouse acceleration doesn't work properly
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Input/Mouse (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Xorg Project Team
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 8583
  Show dependency treegraph
 
Reported: 2006-11-25 11:48 UTC by Simon Thum
Modified: 2008-07-01 07:12 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Simon Thum 2006-11-25 11:48:15 UTC
In current git, the polynomial acceleration obtained by e.g.
>xset n 0
is broken. Slow movements are often discarded, as if no movement took place.
I noted when doing bug#8583 so I can tell (most probably) it shows up if the
acceleration function does actually decelerate, as is the case on slow moves.
Comment 1 Simon Thum 2006-11-29 15:30:02 UTC
The behaviour was caused by wrong int/float conversions.
I'll fix in bug#8583.
Comment 2 Adam Jackson 2008-02-24 18:23:50 UTC
Mass reopen.  The "REMIND" resolution is lame, I'm deleting it.  Consider yourself reminded.
Comment 3 Peter Hutterer 2008-04-23 21:35:47 UTC
(In reply to comment #1)
> The behaviour was caused by wrong int/float conversions.
> I'll fix in bug#8583.

Simon:
do you have a patch that can be applied to current master to fix this? 8583 is a bit too excessive for now.
Comment 4 Daniel Stone 2008-05-16 09:52:31 UTC
dropping from 1.4.1 blocker, as #8353's fix is a bit too invasive.
Comment 5 Simon Thum 2008-05-17 09:44:16 UTC
The fix is just a one-word exchange in inputstr.h:

typedef struct _ValuatorClassRec {
...
    float                 dxremaind, dyremaind; /* for acceleration */
...
} ValuatorClassRec, *ValuatorClassPtr;

In my tests that was all it took and it should be ABI-compatible as long as no one actually reads those fields (except the server) plus the platform has identical alignment and size for int/float.

IMHO it's feasible, and it just restores the state it had before hotplug (I guess; dunno who actually changed it or why).
Comment 6 Avery Fay 2008-05-21 23:12:55 UTC
As a user, I'd like to see this fix (actually, 8583 looks even better, but I realize it's a more extensive change). "xset m n 0" definitely feels the best, but I can literally move my mouse across the whole mousepad (slowly) without moving at all on screen.
Comment 7 Peter Hutterer 2008-05-22 01:24:24 UTC
On Sat, May 17, 2008 at 09:44:16AM -0700, bugzilla-daemon@freedesktop.org wrote:
> --- Comment #5 from Simon Thum <simon.thum@gmx.de>  2008-05-17 09:44:16 PST ---
> The fix is just a one-word exchange in inputstr.h:
> 
> typedef struct _ValuatorClassRec {
> ...
>     float                 dxremaind, dyremaind; /* for acceleration */
> ...
> } ValuatorClassRec, *ValuatorClassPtr;
> 
> In my tests that was all it took and it should be ABI-compatible as long as no
> one actually reads those fields (except the server) plus the platform has
> identical alignment and size for int/float.

Unfortunately it isn't. Drivers have access to the valuator struct, so it must
be considered as an ABI change.
Comment 8 Simon Thum 2008-05-22 15:21:34 UTC
(In reply to comment #7)
> Unfortunately it isn't. Drivers have access to the valuator struct, so it must
> be considered as an ABI change.
Correct. But it may well be an ABI break without victims.

driver # grep dxremaind -R *
gave me no source matches (though many binary ones). I'd guess that other things cause more end-user breakage.
Comment 9 Peter Hutterer 2008-05-26 22:54:25 UTC
Pushed to git master as 0050165a67bb462e0bf644a11644ad9d587c62bb.
Comment 10 Adam Jackson 2008-07-01 07:12:24 UTC
Also cherrypicked to 1.5 branch.


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.