I recently upgraded from 17.10 to 18.04 and the horizontal scrolling is inverted. Natural scrolling does not affect it in any way, suggestions on how to change it back? (swipe rigth to go left)
I also encountered this issue upon upgrading to 18.04, this was my solution:
Use xinput list to find the device id of your touchpad.
Use xinput list-props yourdeviceid. This will produce a long list of all the properties you can edit for that device. We're interested in a property to do with scrolling distance, on my system this is Synaptics Scrolling Distance (283). It should have two values, on my system (with natural scrolling enabled) these were -115, 115 (vertical distance, horizontal distance). Note the value in the parentheses, in my case 283, it's how we'll identify the property to change it.
Use xinput set-prop yourdeviceid 283 -115, -115, replacing 283 and the scrolling distance values with whatever is appropriate. (The change is to make both values negative, which gives the desired result of "natural" scrolling.)
Notes:
This setting will not persist across system restarts, which is an issue all on its own. I use a .xsessionrc file in my home directory to execute the xinput command on startup.
This will probably not work in 17.10, since Wayland does strange things to xinput.
I had this problem for a long time. I recently updated to Ubuntu 19.10 and it was still there, so I poked around again for solutions. It appears that this is due to having the (apparently obsolete) "synaptics" input driver installed either instead of or in addition to the "libinput" driver. To correct this, run these two commands:
After that, restart X11 by logging out and back in or restarting the system. I'm not quite sure if it started working for me immediately or if I had to toggle the Natural Scrolling setting on and off in the Mouse & Touchpad screen in Gnome settings -- I know that I had to adjust the Touchpad Speed since that was waaay off.
fwiw, I wrote a script based on these answers that will figure out all the input IDs and whatnot for you. Bonus: you can choose "NATURAL" or "REVERSE" scrolling by passing either as a positional arg to the script
In case this is still an issue, you can also change your setting in: Setting | Devices | Mouse and Touchpad. There the option "natural scrolling" will enable changes in the scrolling behavior.
I also encountered this issue upon upgrading to 18.04, this was my solution:
Use
xinput list
to find the device id of your touchpad.Use
xinput list-props yourdeviceid
. This will produce a long list of all the properties you can edit for that device. We're interested in a property to do with scrolling distance, on my system this isSynaptics Scrolling Distance (283)
. It should have two values, on my system (with natural scrolling enabled) these were-115, 115
(vertical distance, horizontal distance). Note the value in the parentheses, in my case 283, it's how we'll identify the property to change it.Use
xinput set-prop yourdeviceid 283 -115, -115
, replacing 283 and the scrolling distance values with whatever is appropriate. (The change is to make both values negative, which gives the desired result of "natural" scrolling.)Notes:
This setting will not persist across system restarts, which is an issue all on its own. I use a
.xsessionrc
file in my home directory to execute the xinput command on startup.This will probably not work in 17.10, since Wayland does strange things to xinput.
See this:
https://help.ubuntu.com/community/SynapticsTouchpad
Use the following commands to set the amount and direction of natural scrolling (plus or minus values change direction):
You can put this command in your autostart script to run it when you log in.
Here's a little script that does it for you
I had this problem for a long time. I recently updated to Ubuntu 19.10 and it was still there, so I poked around again for solutions. It appears that this is due to having the (apparently obsolete) "synaptics" input driver installed either instead of or in addition to the "libinput" driver. To correct this, run these two commands:
After that, restart X11 by logging out and back in or restarting the system. I'm not quite sure if it started working for me immediately or if I had to toggle the Natural Scrolling setting on and off in the Mouse & Touchpad screen in Gnome settings -- I know that I had to adjust the Touchpad Speed since that was waaay off.
Solution here from Gnome's GitLab issues: https://gitlab.gnome.org/GNOME/gnome-shell/issues/1808#note_629824
Delete the xserver-xorg-input-libinput by
sudo apt remove xserver-xorg-input-libinput
.Then create the file
/usr/share/X11/xorg.conf.d/20-natural-scrolling-mouses.conf
with the following content:After rebooting, the scrolling issue was solved for me.
fwiw, I wrote a script based on these answers that will figure out all the input IDs and whatnot for you. Bonus: you can choose "NATURAL" or "REVERSE" scrolling by passing either as a positional arg to the script
In case this is still an issue, you can also change your setting in: Setting | Devices | Mouse and Touchpad. There the option "natural scrolling" will enable changes in the scrolling behavior.