Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Acceptable touchpad settings for Linux / xorg that make precise movement easier
# Inspired by https://www.x.org/wiki/Development/Documentation/PointerAccelerationAsOf16/
# See http://who-t.blogspot.com/2016/09/synaptics-pointer-acceleration.html for synaptics insanity
Section "InputClass"
Identifier "touchpad"
# Use synaptics because libinput is broken: it fails to initiate cursor
# movement when touching starts at some edges and corners, and it makes
# assumptions about whether we need palm and thumb detection based
# on the size of our touchpad. I was unable to fix these issues by
# patching libinput to disable palm/thumb detection and the horizontal
# scrolling area.
Driver "synaptics"
MatchIsTouchpad "on"
# xorg already has mouse acceleration ("pointer feedback"), so don't
# let synaptics change speed.
Option "MinSpeed" "1.0"
Option "MaxSpeed" "1.0"
# Default is 200/((WIDTH**2+HEIGHT**2)**0.5) and it may be better not
# to mess with AccelFactor.
# Option "AccelFactor" "0.03"
# synaptics is too sensitive in general and MinSpeed=1.0 MaxSpeed=1.0
# makes it worse, so use ConstantDeceleration (this is just a divisor!)
# to slow it down to make precise movement possible.
#
# See also https://bugs.freedesktop.org/show_bug.cgi?id=38998
# ("Synaptics driver imposes minimum speed")
Option "ConstantDeceleration" "3"
# We've slowed down the cursor quite a bit, so we need more than the
# default acceleration of 2/1 to move it across the screen; add this
# to ~/.xinitrc:
#
# xset m 4/1 0
#
# If your screen is big (these parameters were tested on 13" 1600x900),
# you may need to increase the acceleration or decrease the
# ConstantDeceleration so that you can flick the cursor across the screen.
# Adjust based on whether you have physical touchpad buttons, etc.
Option "TapButton1" "1"
Option "TapButton2" "0"
Option "TapButton3" "0"
Option "VertTwoFingerScroll" "0"
Option "HorizTwoFingerScroll" "0"
Option "VertEdgeScroll" "1"
Option "CoastingSpeed" "20"
Option "CornerCoasting" "0"
Option "CircularScrolling" "0"
Option "EdgeMotionUseAlways" "0"
EndSection
Owner

ivan commented Nov 25, 2017

tl;dr this solves (or does it best to solve) three problems: 1) there are two layers of acceleration (synaptics and xorg) 2) synaptics is too fast and has a minimum speed 3) xorg acceleration is too slow

https://www.x.org/wiki/Development/Documentation/PointerAcceleration/

http://who-t.blogspot.com/2016/09/synaptics-pointer-acceleration.html

Owner

ivan commented Nov 25, 2017

You can check that the proper acceleration was applied with xinput:

xinput get-feedbacks "SynPS/2 Synaptics TouchPad"

(It may be overridden by a desktop environment e.g. xfce4, so you may need to rm ~/.config/xfce4/xfconf/xfce-perchannel-xml/pointers.xml or configure the acceleration in the desktop environment.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment