Last active
November 25, 2017 12:45
-
-
Save ivan/c35e798d4f32e37c1714ec5beec30d16 to your computer and use it in GitHub Desktop.
Acceptable touchpad settings for Linux / xorg that make precise movement easier
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
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
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