How to invert touchpad scrolling on Ubuntu 16.04 [duplicate]

I'm running Ubuntu 16.04 and would like to invert my touchpad scrolling so that moving my two fingers towards the monitor causes the screen to scroll up. Previously, there used to be an option in mouse and touchpad settings that allowed for this. Similarly, gsettings indicates that touchpad configurations are deprecated. Thoughts?

Edit: the xinput command gives this output:

Virtual core pointer                        id=2    [master pointer  (3)]  
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]  
⎜   ↳ ImPS/2 Generic Wheel Mouse                id=14   [slave  pointer  (2)]  
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]  
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]  
    ↳ Power Button                              id=6    [slave  keyboard (3)]  
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]  
    ↳ Power Button                              id=8    [slave  keyboard (3)]  
    ↳ Sleep Button                              id=9    [slave  keyboard (3)]  
    ↳ Integrated_Webcam_HD                      id=10   [slave  keyboard (3)]  
    ↳ AT Translated Set 2 keyboard              id=13   [slave  keyboard (3)]  
    ↳ DELL Wireless hotkeys                     id=15   [slave  keyboard (3)]  
    ↳ Dell WMI hotkeys                          id=16   [slave  keyboard (3)]  

For some reason, I don't see a trackpad listed. I'm on a Dell Latitude E5570 laptop that definitely has a trackpad. Additionally, no mouse and trackpad options appear to support the trackpad.

Also, looking at the directory /usr/share/X11/xorg.conf.d/, I only see these configuration files:

10-amdgpu.conf  
10-evdev.conf  
10-quirks.conf  
11-evdev-quirks.conf      
11-evdev-trackpoint.conf  
50-synaptics.conf  
50-vmmouse.conf               
50-wacom.conf  
51-synaptics-quirks.conf

The option to invert scrolling directions is called Natural Scrolling and is still present in 16.04's System Settings → Mouse & Touchpad configuration.

enter image description here


If you are using libinput, the GUI options are not available.

In this case you can enable "Natural Scrolling" by adding

Option  "NaturalScrolling" "True"

to the touchpad section of /usr/share/X11/xorg.conf.d/90-libinput.conf file.


If you use libinput, then add a config file to /etc/X11/xorg.conf.d/ such as 20-touchpad.conf with this content:

Section "InputClass"
    Identifier "libinput touchpad catchall"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"

        Option "NaturalScrolling" "on"
EndSection

There are other useful features such as:

        Option "MiddleEmulation" "on"
        Option "Tapping" "on"
        Option "DisableWhileTyping" "on"

If you like, this can also be enabled for any mice with the following content in 30-pointer.conf

Section "InputClass"
        Identifier "libinput pointer catchall"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"

        Option "NaturalScrolling" "on"
EndSection

More info man libinput.


If you install the touchpad-indicator using Synaptic, it has a natural scrolling option.

Start Synaptic from the dashboard, click the RELOAD icon, then type touchpad into the search box. Then mark the touchpad-indicator for install, then click the APPLY icon.

Let us know how you do. Cheers, Al