Natural Scrolling for Ubuntu 16.04 LTS

The touchpad can be automatically set up via Settings > Touchpad > Natural Scrolling.

However, plugging in a USB mouse is more difficult.

Enable system-wide inverse/reverse/natural scrolling on Ubuntu


In case it disappears:

1. Get your mouse device id by running the following in a terminal, you have to choose the right one:

Take that number you got (just the number after “id=”) and replace “{device id}” with that number in the following command:

In my case:

This will output something like below, remember that “Scrolling Distance” is case-sensitive. If nothing is outputted, you’ve chosen a wrong device id, go back to step 1 and choose another one:

So 270 is your property number, 1, 1, 1 is your scrolling distance, remember this to use later.

It is case sensitive unless you use -i in the grep command. Write down the numbers you find in the output from that command (in my case it was the number 1, shown three times and separated by commas). You will use the negative values of the numbers you get in your output. Also, make sure to write down the property number (it will be in parentheses in the output; in my case, it was (270) in Ubuntu and (273) in Fedora).

Note: If you get no output containing the property “Scrolling Distance” this method will not work for you and you will need to stop here and skip to an alternate way.

2. Create a natural scrolling config file by running the following command in your open terminal:

3. Now, config the natural scrolling profile by running the following command (you can use your favorite text editor instead of nano but I use nano):

In the file you have opened in your preferred text editor, paste the following (but be sure to change the numbers to the same comma-separated numbers you got from step 3; in my case, the number was 1 so in order to make the scroll inverse, I will change 1 to -1):

Save the file (Ctrl+O) and exit (Ctrl+X) the text editor. No need for a reboot. Just issue the following command (substituting the property number and the negatives of the numbers you got in the third step, and the device id you got from the second step):

In my case:

Leave a Reply

Your email address will not be published. Required fields are marked *