I had recently upgraded to Ubuntu 18.04 and installed Unity back. After installing, I found that Reverse Scrolling/Natural Scrolling option was missing from Settings in Unity, while it was available in GNOME settings. This was pretty much a deal breaker for me, so I had to find a way to enable reverse scrolling via some GUI or even a CLI.

ENTER libinput

libinput is a library which is used to handle input devices in Ubuntu’s Display Server X.org. With further investigation, I found out that Unity, GNOME and XFCE and a host of Desktop environments support it. My hopes were high after discovering this. To enable Reverse Scrolling via libinput, follow the steps below.

FIND WHICH IS YOUR TOUCHPAD

You need to find which one among the input devices is your touchpad since libinput is used to handle input devices. This can be easily known by executing the command xinput --list

Now obviously my touchpad cannot be a keyboard, so it has to be one among the Virtual Core Pointer. Elan Touchpad definitely sounded familiar to me, as I had installed its driver in Windows 10.

CHECK IF REVERSE SCROLLING CAN BE ENABLED OR NOT

The next step is to check whether your touchpad supports Reverse Scrolling or not. While I had an option to enable Reverse Scrolling from Settings when in Unity in Ubuntu 16.04, the option was gone in 18.04, but it was still available in GNOME. So I thought it should be available in libinput as well. To check if I can enable Reverse Scrolling in Unity in Ubuntu 18.04, I tried the command

(PS. Make sure that Elan Touchpad is inside the quotation marks if the name of your touchpad has spaces in between, and I shouldn’t be telling you to substitute Elan Touchpad with the name of your touchpad)

You should look for an option that has Reverse Scrolling, or Natural Scrolling in it. Luckily I did have an option called libinput Natural Scrolling Enabled (288): 0. So I was sure that I can enable it in Ubuntu 18.04. Now it was only a matter of another command, after which I can use Reverse Scrolling without hassles.

PS. If you do not see an option like Reverse Scrolling anywhere inside that output, I’m afraid my friend, I cannot help you.

ENABLE NATURAL SCROLLING

One Command  xinput --set-prop "Elan Touchpad" "libinput Natural Scrolling Enabled" 1

This was enough to enable Reverse Scrolling. Plus it happened in an instant, I never had to log out or restart at all.

PS. If the command with the list-props flag output shows something like ‘Synaptics’ at the beginning of each prop instead of ‘libinput’, please check the update below.

AFTER EXPERIENCES

Using libinput I could bring back one feature I loved the most. But the behavior I get with the touchpad in Unity in Ubuntu 16.04 and 18.04 is completely different. There are three pain points with the new experience in Ubuntu 18.04:

  • I could select text by tapping on the touchpad, and not clicking it.
  • You could keep selecting the text and scroll up or down with the touchpad
  • I could tap using two fingers to emulate right click

Sadly I can’t do either of these things with Ubuntu 18.04. While I can still do point no. 1 and 3 using GNOME, I can’t do point 2 with that either. So I still have hopes of getting points 1 and 3 back on track with libinput again, but I’ll pray that one day I’m able to get back point 2 as well.

UPDATE

With libinput, I ran the following command xinput --set-prop "Elan Touchpad" "libinput Tapping Enabled" 1, and I was able to get point 1 and 3 working fine. Point 2 was still not working.

I asked my friends who had a similar laptop model, to run the command and then they got synaptics props instead of libinput. I realized that Ubuntu 18.04 did not come with synaptics, rather it came with libinput. Now I installed synaptics using  sudo apt install xserver-xorg-input-synaptics  after which I restarted my laptop.

I was able to get the same Mouse experiences present in Ubuntu 16.04 to Unity in Ubuntu 18.04 without hassles. Moreover, the fine details of touchpad settings like Reverse Scrolling are now back in Touchpad settings in Ubuntu 18.04.


Sparker0i

Little World

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.