Enable natural scrolling on ubuntu 17.04 with gnome-shell

I'm running Ubuntu Gnome 17.04 on a Dell XPS 15 9530, and here's what worked for me:

The solution was to leave xserver-xorg-input-libinput installed, and instead remove xserver-xorg-input-synaptics, then reboot. It seems as if the upgrade installed both and was choosing synaptic by default, which doesn't seem to have a natural scrolling option.


had the same problem. solved:

sudo apt install xserver-xorg-input-libinput
sudo apt purge xserver-xorg-input-synaptics

then reboot


Perhaps your mouse requires a different property to be set. Please try the following:

Find your mouse ID (mine is 10 below):

$ xinput list
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Logitech USB-PS/2 Optical Mouse           id=10   [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)]
    ↳ Power Button                              id=7    [slave  keyboard (3)]
    ↳   USB Keyboard                            id=8    [slave  keyboard (3)]
    ↳   USB Keyboard                            id=9    [slave  keyboard (3)]

List available properties of the mouse (replace 10 with ID of your mouse):

$ xinput list-props 10
Device 'Logitech USB-PS/2 Optical Mouse':
    Device Enabled (136):   1
    Coordinate Transformation Matrix (138): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    libinput Accel Speed (273): 0.000000
    libinput Accel Speed Default (274): 0.000000
    libinput Accel Profiles Available (275):    1, 1
    libinput Accel Profile Enabled (276):   1, 0
    libinput Accel Profile Enabled Default (277):   1, 0
    libinput Natural Scrolling Enabled (278):   1
    libinput Natural Scrolling Enabled Default (279):   0
    libinput Send Events Modes Available (258): 1, 0
    libinput Send Events Mode Enabled (259):    0, 0
    libinput Send Events Mode Enabled Default (260):    0, 0
    libinput Left Handed Enabled (280): 0
    libinput Left Handed Enabled Default (281): 0
    libinput Scroll Methods Available (282):    0, 0, 1
    libinput Scroll Method Enabled (283):   0, 0, 0
    libinput Scroll Method Enabled Default (284):   0, 0, 0
    libinput Button Scrolling Button (285): 2
    libinput Button Scrolling Button Default (286): 2
    libinput Middle Emulation Enabled (287):    0
    libinput Middle Emulation Enabled Default (288):    0
    Device Node (261):  "/dev/input/event2"
    Device Product ID (262):    1133, 49215
    libinput Drag Lock Buttons (289):   <no items>
    libinput Horizontal Scroll Enabled (290):   1

As you can see, there is a property named "libinput Natural Scrolling Enabled" for my mouse that has number 278 in my case.

Set it to 1 and natural scrolling should be enabled (replace 10 with ID of your mouse and 278 with what actually your property number is):

$ xinput set-prop 10 278 1

If you are using the synaptics driver xserver-xorg-input-synaptics you can set negative values for VertScrollDelta and HorizScrollDelta in the config file 70-synaptics.conf:

cp /usr/share/X11/xorg.conf.d/70-synaptics.conf /etc/X11/xorg.conf.d/70-synaptics.conf 
sudoedit /etc/X11/xorg.conf.d/70-synaptics.conf

Then reboot and enjoy smooth natural scrolling for your trackpad. For a detailed explanation, see this page on the Arch wiki.