Bug 13808 - mouse sensitivity setting (for acceleration disabled)
Summary: mouse sensitivity setting (for acceleration disabled)
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/Input/Core (show other bugs)
Version: unspecified
Hardware: Other All
: highest trivial
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
: 14205 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-12-24 10:23 UTC by Javeed Shaikh
Modified: 2008-06-28 03:43 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Patch to fix mouse acceleration (561 bytes, patch)
2008-01-19 18:32 UTC, Javeed Shaikh
no flags Details | Splinter Review

Description Javeed Shaikh 2007-12-24 10:23:18 UTC
Older versions of the X server would (implicitly) allow one to do, for example
xset m 1/8 1
to disable mouse acceleration. The '1/8' could be tweaked to change the
mouse sensitivity under these non-accelerated conditions.

In the latest versions of the X server, the code has been (significantly?)
cleaned up. Unfortunately, the above no longer works properly. Try it; the mouse
pointer will not move unless the mouse is moved very rapidly.

It would be nice if there was a (driver-independent?) way to set the mouse
sensitivity.

The old way was consistent, in the sense that
(1) xset m 2 1
doubles the mouse speed but still disables acceleration, and that
(2) xset m 1/8 1
decreases the mouse speed by some amount.

I have no idea how to re-implement the old model. The current code appears to
be correct; it multiplies the mouse delta by 1/8, and for small movements, the
mouse delta can be (1, 1); (1/8)*(1, 1) = (0, 0), and so this results in no
pointer motion.

Can this be "fixed" so that even without acceleration, one can use fractional
values like '1/8' to modify the mouse sensitivity?
Comment 1 Javeed Shaikh 2007-12-24 10:24:43 UTC
I forgot to mention that (1) still works in the new model. Thus
xset m 2 1
will currently "double" the pointer speed, as expected.
Comment 2 Javeed Shaikh 2007-12-24 11:10:39 UTC
I believe I have found the source of the issue.
include/inputstr.h:    int                   dxremaind, dyremaind; /* for acceleration */

Those should be floats.
I'm going to recompile and test that, of course...
Comment 3 Javeed Shaikh 2007-12-24 11:40:08 UTC
Indeed, changing
include/inputstr.h:    int                   dxremaind, dyremaind; /* for
acceleration */
to
include/inputstr.h:    float                   dxremaind, dyremaind; /* for
acceleration */

fixes the issue.
Comment 4 Javeed Shaikh 2008-01-18 15:16:19 UTC
This seems to be fixed in newer versions.
Comment 5 Javeed Shaikh 2008-01-19 18:29:54 UTC
False alarm. It's still broken.

I'm not sure what caused me to think that it was fixed.
I swear I saw inputstr.h no longer exist, with the code fixed
in another file or something...

I'll attach a patch in a minute.
Comment 6 Javeed Shaikh 2008-01-19 18:32:07 UTC
Created attachment 13806 [details] [review]
Patch to fix mouse acceleration
Comment 7 Peter Hutterer 2008-01-22 15:56:43 UTC
*** Bug 14205 has been marked as a duplicate of this bug. ***
Comment 8 Peter Hutterer 2008-01-22 16:03:57 UTC
(In reply to comment #6)
> Created an attachment (id=13806) [details]
> Patch to fix mouse acceleration
> 

this patch breaks the ABI, so we can't put it in before 1.5.
Comment 9 Peter Hutterer 2008-06-28 03:43:34 UTC
Was commited to git master as 0050165a67bb462e0bf644a11644ad9d587c62bb.


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.