Question: Trackpad two finger scrolling and right-click issue with Ubuntu 17.10 (i386, 64bit, GNOME 3.26.1) on a Lenovo T540p (the model with a Intel Core i5-4210M Haswell CPU etc)

Answer: 
As mentioned in the [answer by @hpotter40](https://askubuntu.com/a/971735), this is behavior is bug [LP #1722478](https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1722478). It affects a wide variety of relatively recent ThinkPad computers, and is still present in Ubtuntu 19.04. Three workarounds are discussed in the Launchpad issue. One is mentioned by @hpotter40 in his answer, the other two are here:

Option 1: Switch off Intertouch
-------------------------------

This is my favourite, as it is the simplest to configure.

1. Edit file `/etc/default/grub` and change the line

```
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

```

into this:

```
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash psmouse.synaptics_intertouch=0"

```
2. Execute:

```
sudo update-grub

```
3. Reboot.

Source: from [here](https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1722478/comments/45) and [here](https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1722478/comments/46). Also I just saw it's covered already in [another answer here](https://askubuntu.com/a/981648).

Option 2: i2c-801 module
------------------------

1. If your `/etc/modprobe.d/blacklist.conf` contains a line `blacklist i2c_i801`, remove it or make it into a comment.
2. Use [this technique](https://askubuntu.com/a/1030154) to reload the `i2c-i801` module after each resume from suspended state. You can of course also do that manually, in which case the commands are:

```
sudo modprobe -r i2c-i801
sudo modprobe i2c-i801

```

There is no need to `modprobe` this module at system start explicitly, as two-finger scrolling and two-finger-tap for right-clicking only breaks at the first resume from suspended state.

Source: from [here](https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1722478/comments/66).
You probably were using Unity as your desktop environment before and are using Gnome Shell now. (Whether you wanted it or not, the upgrade decided for you.)

If you want to use Unity even now, that is an option, and it will resolve your problem. You may already have Unity installed, whether you know it or not, but in case you don't:

```
sudo apt install unity

```

Then when you restart and select your user on the login screen, don't enter your password right away. Instead, notice the little gear icon by your 'Sign in' button. Click it, and you should see that you have a choice between 'Ubuntu', 'Ubuntu on Xorg', and 'Unity'. Click 'Unity', then sign in with your password as usual.

I recommend this for users who want to go back to the environment they had before.