Update (06. 02. 2017): after some recent updates of libinput and Xorg debian package, none of the following is needed. In fact I've commented the whole 20-natural-scrolling.conf config file.
Recently I've bought a new laptop. And decided to install a fresh new Debian testing without configuration burden from the past. One thing which I've spent the most time was to convince the X.org to invert the scrolling while using touchpad and don't invert scrolling while using the mouse to act the same way.
Yes, there is a way to do that simply with Gnome or XFCE settings manager, but that does not work for all window types. For example gnome-terminal ignores these settings :( Another way is to use directly
xinput command to adjust the right property of the touchpad, but it won't survive the sleep/unsleep operation. However if someone needs that command, it is here:
xinput set-prop 12 281 1
the first number (12) can be obtained via simple
xinput command, and the next (281) via
xinput list-props 12 command. That is the property which description says something like
libinput Natural Scrolling Enabled (281): 0
But this is only a temporary quick-fix which won't last long and on the top of that, the xinput ID is changed every reboot.
So there are some guidelines how to do that permanently, like
here or
here or
here. It hasn't work for me because when I looked in
/var/log/Xorg.0.log I've realized that my touchpad is recognized as a regular mouse and so X.org applies the same rules on both. The final configuration is therefore little bit different and looks like this:
# cat /etc/X11/xorg.conf.d/20-natural-scrolling.conf
Section "InputClass"
Identifier "libinput pointer catchall"
MatchIsPointer "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
#Option "NaturalScrolling" "true"
EndSection
Section "InputClass"
Identifier "libinput touchpad catchall"
MatchProduct "ImPS/2 BYD TouchPad"
#MatchIsTouchpad "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
Option "NaturalScrolling" "true"
EndSection
Usefull links:
https://wiki.gentoo.org/wiki/Xorg.conf – description of xorg.conf options
https://wiki.archlinux.org/index.php/Touchpad_Synaptics – commonly used tweaks for touchpad