Touchpad using libinput instead of synaptics driver

The touchpad on my lenovo x230 is not running the synaptics driver which I need for its increased capabilities. Instead, it's using libinput. How can I get the synaptics driver to take priority on boot?

The touchpad is (xinput list):

⎜   ↳ PS/2 Synaptics TouchPad                   id=13   [slave  pointer  (2)]

I can check what driver it's using with grep -i "Using input driver" /var/log/Xorg.0.log:

(II) Using input driver 'libinput' for 'PS/2 Synaptics TouchPad'

However, I definitely have the synaptics driver installed (sudo apt install xserver-xorg-input-synaptics):

Reading package lists... Done
Building dependency tree       
Reading state information... Done
xserver-xorg-input-synaptics is already the newest version (1.9.0-1ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

and I can see the synaptics driver's config file alongside the libinput driver (ls /usr/share/X11/xorg.conf.d/):

10-amdgpu.conf  40-libinput.conf          70-wacom.conf
10-quirks.conf  51-synaptics-quirks.conf
10-radeon.conf  70-synaptics.conf

My conclusion is the synaptics and libinput drivers are both installed, but for some reason libinput has higher priority. This is confusing since it's my understanding that the higher the number of the config file in /usr/share/X11/xorg.conf.d/, the higher the priority, meaning synaptics should be selected.

How can I get synaptics to run instead? So far, I attempted to move the synaptics.conf file to /etc/X11/xorg.conf.d because I read this directory has higher priority, but this did not work. The relevant section of /var/log/Xorg.0.log is

[     7.718] (II) config/udev: Adding input device PS/2 Synaptics TouchPad (/dev/input/event5)
[     7.718] (**) PS/2 Synaptics TouchPad: Applying InputClass "libinput pointer catchall"
[     7.718] (II) Using input driver 'libinput' for 'PS/2 Synaptics TouchPad'
[     7.718] (**) PS/2 Synaptics TouchPad: always reports core events
[     7.718] (**) Option "Device" "/dev/input/event5"
[     7.718] (**) Option "_source" "server/udev"
[     7.719] (II) event5  - PS/2 Synaptics TouchPad: is tagged by udev as: Mouse
[     7.719] (II) event5  - PS/2 Synaptics TouchPad: device is a pointer
[     7.719] (II) event5  - PS/2 Synaptics TouchPad: device removed
[     7.748] (**) Option "config_info" "udev:/sys/devices/platform/i8042/serio1/input/input5/event5"
[     7.748] (II) XINPUT: Adding extended input device "PS/2 Synaptics TouchPad" (type: MOUSE, id 13)
[     7.748] (**) Option "AccelerationScheme" "none"
[     7.748] (**) PS/2 Synaptics TouchPad: (accel) selected scheme none/0
[     7.748] (**) PS/2 Synaptics TouchPad: (accel) acceleration factor: 2.000
[     7.748] (**) PS/2 Synaptics TouchPad: (accel) acceleration threshold: 4
[     7.749] (II) event5  - PS/2 Synaptics TouchPad: is tagged by udev as: Mouse
[     7.749] (II) event5  - PS/2 Synaptics TouchPad: device is a pointer
[     7.749] (II) config/udev: Adding input device PS/2 Synaptics TouchPad (/dev/input/mouse0)
[     7.749] (II) No input driver specified, ignoring this device.
[     7.750] (II) This device may have been added with another device file.

What is the other device file it refers to? Where is libinput being selected as the touchpad driver, and how can I get synaptics selected instead?

Edit: My libinput version is

kp@kvnp:~$ libinput --version
1.10.4

Seemingly only one scroll method is available:

kp@kvnp:~$ xinput list-props 16
Device 'PS/2 Synaptics TouchPad':
    Device Enabled (150):   1
    Coordinate Transformation Matrix (152): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    libinput Natural Scrolling Enabled (285):   1
    libinput Natural Scrolling Enabled Default (286):   0
    libinput Scroll Methods Available (289):    0, 0, 1
    libinput Scroll Method Enabled (290):   0, 0, 1
    libinput Scroll Method Enabled Default (291):   0, 0, 1
    libinput Button Scrolling Button (292): 2
    libinput Button Scrolling Button Default (293): 2
    libinput Middle Emulation Enabled (294):    1
    libinput Middle Emulation Enabled Default (295):    0
    libinput Accel Speed (296): 0.000000
    libinput Accel Speed Default (297): 0.000000
    libinput Accel Profiles Available (298):    1, 1
    libinput Accel Profile Enabled (299):   1, 0
    libinput Accel Profile Enabled Default (300):   1, 0
    libinput Left Handed Enabled (301): 0
    libinput Left Handed Enabled Default (302): 0
    libinput Send Events Modes Available (270): 1, 0
    libinput Send Events Mode Enabled (271):    0, 0
    libinput Send Events Mode Enabled Default (272):    0, 0
    Device Node (273):  "/dev/input/event5"
    Device Product ID (274):    2, 1
    libinput Drag Lock Buttons (287):   <no items>
    libinput Horizontal Scroll Enabled (288):   1

When I try to get two finger scrolling in libinput I get the following output:

kp@kvnp:~$ xinput set-prop 16 290 1 0 0 
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  131 (XInputExtension)
  Minor opcode of failed request:  57 ()
  Value in failed request:  0x122
  Serial number of failed request:  19
  Current serial number in output stream:  20

Solution 1:

I reinstalled the kernel and then installed both

xserver-xorg-input-multitouch

xserver-xorg-input-mouse

This fixed this issue by allowing the touchpad to be recognized as SynPS/2 Synaptics Touchpad instead of PS/2 Synaptics Touchpad. In short I think the kernel was identifying the touchpad as just a basic mouse. I am not really sure why.

Solution 2:

I know this thread is old, but I recently had this same problem after updating to Ubuntu 20.04 LTS.

I Solved this problem by changing the synaptics number priority in /usr/share/X11/xorg.conf.d/.

In my case this was the output of the command ls -1 /usr/share/X11/xorg.conf.d/

10-amdgpu.conf
10-quirks.conf
10-radeon.conf
40-libinput.conf
51-synaptics-quirks.conf
70-synaptics.conf
70-wacom.conf

I changed the 70-synaptics.conf to 30-synaptics.conf, with the command

mv 70-synaptics.conf 30-synaptics.conf

which gives it a higher priority than 40-libinput.conf. Be sure to do this as root. Then reboot.