Ubuntu – Touchpad won’t honor natural scrolling, mouse will

16.04scrollingtouchpadxinput

$ xinput list-props 15

Device 'SynPS/2 Synaptics TouchPad':
Device Enabled (137):   1
Coordinate Transformation Matrix (139): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Tapping Enabled (275): 1
libinput Tapping Enabled Default (276): 0
libinput Tapping Drag Enabled (277):    1
libinput Tapping Drag Enabled Default (278):    1
libinput Tapping Drag Lock Enabled (279):   0
libinput Tapping Drag Lock Enabled Default (280):   0
libinput Accel Speed (281): 0.000000
libinput Accel Speed Default (282): 0.000000
libinput Natural Scrolling Enabled (283):   1
libinput Natural Scrolling Enabled Default (284):   0
libinput Send Events Modes Available (255): 1, 1
libinput Send Events Mode Enabled (256):    0, 0
libinput Send Events Mode Enabled Default (257):    0, 0
libinput Left Handed Enabled (285): 0
libinput Left Handed Enabled Default (286): 0
libinput Scroll Methods Available (287):    1, 1, 0
libinput Scroll Method Enabled (288):   1, 0, 0
libinput Scroll Method Enabled Default (289):   1, 0, 0
libinput Click Methods Available (290): 1, 1
libinput Click Method Enabled (291):    1, 0
libinput Click Method Enabled Default (292):    1, 0
libinput Disable While Typing Enabled (293):    1
libinput Disable While Typing Enabled Default (294):    1
Device Node (258):  "/dev/input/event6"
Device Product ID (259):    2, 7
libinput Drag Lock Buttons (295):   <no items>
libinput Horizonal Scroll Enabled (260):    1

Now, if I set the trackpad's Natural Scrolling to 1 or 0, it doesn't respect it. Unnatural scrolling regardless. If I set Natural scrolling to 1 for my mouse, it respects the setting, and reverses the scrolling each time I toggle 1 or 0.

I'd really like to find the simplest, most proper solution. Previously I was using xmodmap, but it only applies to some applications, so it was frustrating to sometimes be natural, sometimes reverse scrolling, depending on whether the app's GTK3/QT/GTK.

I'm a noob, so teaching me how to make the settings permanent or "sticky" after reboot would really help me, and every other noob with similar troubles.

Best Answer

It's probably this bug.

Here is more proper workaround than OP's, until the bug is fixed:

  1. Find out your device's name by running xinput

  2. Create a file named 90-fix-for-LP1132063.conf within /etc/X11/xorg.conf.d/ with this content (for enabling Natural Scrolling):

    Section "InputClass"
      Identifier "Enable Natural Scroll and Tap To Click"
      MatchDriver "libinput"
      MatchProduct "<(part of) device name>"
      Option "NaturalScrolling" "yes"
    EndSection
    

I suggest setting this option, too:

  Option "Tapping" "yes"

It will enable simulating the left click via tapping the touchpad.

More libinput options are documented here: https://www.mankier.com/4/libinput

You can subscribe to the bug and (re)move the file once the bug is fixed.

Further reading: https://wayland.freedesktop.org/libinput/doc/latest/faq.html