Bug 92766 - xorg.conf ignores ConstantDeceleration <1
Summary: xorg.conf ignores ConstantDeceleration <1
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/Input/Core (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-01 16:39 UTC by nikolaos.bezirgiannis
Modified: 2016-09-02 19:04 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
proposed patch (1.87 KB, patch)
2016-06-09 03:31 UTC, ebiggers3
no flags Details | Splinter Review

Description nikolaos.bezirgiannis 2015-11-01 16:39:41 UTC
I use this in my xorg.conf:

Section "InputClass"
	Identifier "All Mice"
	MatchIsPointer "yes"
	Option "AccelerationProfile" "-1"
	Option "ConstantDeceleration" "0.5"  # This is smaller <1
EndSection

If I set ConstantDeceleration as a float < 1 , on next start, X sets it to 1 instead:

> xinput --list-props 14
...
Device Accel Constant Deceleration (265):	1.000000

If I do instead this:

> xinput --set-prop 14 'Device Accel Constant Deceleration' 0.5
> xinput --list-props 14
...
Device Accel Constant Deceleration (265):	0.500000

This works just fine. Also any value >1 will work with xorg.conf
Comment 1 nikolaos.bezirgiannis 2015-11-01 16:40:25 UTC
These has been tried with multiple mice, so I think it is not related to a driver or device.
Comment 2 Alan Coopersmith 2015-11-01 16:53:10 UTC
git grep shows ConstantDeceleration is handled in the core xserver input
code, not any of the drivers under Input/*, so moving to that component.
Comment 3 ebiggers3 2016-06-09 03:18:57 UTC
I encountered this bug as well.  It occurs if the "ConstantDeceleration" option is specified in xorg.conf.  It does not occur if the "Device Accel Constant Deceleration" is set using xinput.  The source of the bug is in ProcessVelocityConfiguration() in xf86Xinput.c, where the value of "ConstantDeceleration" is only used if it is > 1.0.  I verified that the value is recognized correctly after changing the conditional to != 1.0.

Based on the code, "AdaptiveDeceleration" is also subject to the same bug.

Note that xorg.conf(5) explicitly says that a value of ConstantDeceleration between 0 and 1 is allowed and will "speed up the pointer".  This is the expected behavior, in my opinion.
Comment 4 ebiggers3 2016-06-09 03:31:09 UTC
Created attachment 124409 [details] [review]
proposed patch

Attached a proposed patch. I also sent it to the mailing list.
Comment 5 ebiggers3 2016-06-18 20:22:52 UTC
A slightly modified version of my patch was committed (da9fec4eddd554b4b709ba58b4436aef5a76cd51).  This solves the problem.  Closing this bug.
Comment 6 Vasili Pupkin 2016-09-02 19:04:25 UTC
What is the point in discussing bugs and making patches if bugfixes aren't included in 1.18? The bugfix will finally land in popular distributives like Ubuntu not earlier than the beginning of 2018.


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.