Mouse acceleration

From ArchWiki
Revision as of 20:33, 21 April 2010 by Gav616 (Talk | contribs) (Disabling mouse acceleration)

Jump to: navigation, search

Mouse acceleration settings typically can be configured using tools provided by your desktop environment. Alternatively, Xorg supplies similar methods more directly, using the xset command. Along with sensitivity, your mouse speed is controlled by acceleration and threshold levels. The command synopsis is xset m acceleration threshold.

For example:

xset m 4 1

Acceleration defines how many times faster the cursor will move than the default speed, when the cursor moves more than threshold pixels in a short time. Acceleration can be a fraction, so if you want to slow down the mouse you can use 1/2, and if 3 is slightly too fast, but 2 is too slow, you can use 5/2. You effectively disable the threshold by setting it to 1, that way the cursor will always move the same speed. To get the default settings back, type xset m default.

Disabling mouse acceleration

Mouse acceleration has changed dramatically in recent X server's, using 'xset' to disable acceleration doesn't work as it used to, and now is not recommend to use.

Recent changes on 'PointerAcceleration' can be read here


The current way of completely disabling any sort of accele/decele(ration) in xorg.conf are using two options;

Option "AccelerationProfile" "-1" 

disables 'velocity-dependent pointer acceleration or deceleration' (which ignores 'xset m' commands.)

Option "AccelerationScheme" "none"

disables all acceleration/deceleration (ignores 'ConstantDeceleration' option)

Option "Sensitivity" ".5".

optional setting to slow the pointer speed to desired level.


example xorg.conf with mouse options;

Section "ServerLayout"
Identifier "l0"
Screen 0 "s0" 0 0
Option "AIGLX" "0"
EndSection

Section "ServerFlags"
Option "AutoAddDevices" "0"
Option "NoPM" "1"
EndSection

Section "InputDevice"
Identifier "i0"
Driver "mouse"
Option "Device" "/dev/input/mice"
Option "Sensitivity" ".5"
Option "AccelerationProfile" "-1"
Option "AccelerationScheme" "none"
Option "ExpectedRate" "1000"
Option "VelocityScale" "1
Option "AdaptiveDeceleration" "1"
Option "ConstantDeceleration" "1"
Option "Emulate3Buttons" "0"
EndSection

Section "Device"
Identifier "v0"
Driver "nvidia"
Option "ConnectedMonitor" "DFP"
Option "DynamicTwinView" "0"
EndSection

Section "Screen"
Identifier "s0"
Device "v0"
EndSection

Section "Extensions"
Option "DAMAGE" "0"
Option "XINERAMA" "0"
Option "MIT-SCREEN-SAVER" "0"
Option "Composite" "0"
EndSection

Query currently used settings

The current acceleration/threshold settings can be checked using:

xset q | grep -A 1 Pointer

Making changes permanent

You can add the xset command to your ~/.xinitrc to get the desired mouse speed every time X starts.

For more info see man xset.