1. Replace libinput touchpad driver with the Synaptics driver
  2. Install Event Device driver for the TrackPoint
  3. Configuration files
  4. Gnome settings
  5. References

This post explains how to install the Synaptics driver on Ubuntu 23.04 and how to tune the sensitivity settings on a Lenovo P1 Gen 2.

Replace libinput touchpad driver with the Synaptics driver

I find that the Synaptics touchpad driver for the P1 performs better than the default one. If you are happy with it, skip everything regarding the Trackpad.

First, go here and install the synaptics driver for the touchpad. You will be prompted for a password that you need to enter again on a blue screen that will show up after the first reboot, since this driver lives in the UEFI.

Install Event Device driver for the TrackPoint

We will be replacing libinput with evdev driver for the trackpoint. It has been around since the IBM laptop days, so this guarantees an even more Vintage experience:

1
sudo apt-get install evdev

Configuration files

You now need to place a few files in certain locations.

sudo vim /etc/X11/xorg.conf.d/70-synaptics.conf

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Example xorg.conf.d snippet that assigns the touchpad driver
# to all touchpads. See xorg.conf.d(5) for more information on
# InputClass.
# DO NOT EDIT THIS FILE, your distribution will likely overwrite
# it when updating. Copy (and rename) this file into
# /etc/X11/xorg.conf.d first.
# Additional options may be added in the form of
#   Option "OptionName" "value"
#
Section "InputClass"
        Identifier "touchpad catchall"
        MatchIsTouchpad "on"
# This option is recommend on all Linux systems using evdev, but cannot be
# enabled by default. See the following link for details:
# http://who-t.blogspot.com/2010/11/how-to-ignore-configuration-errors.html
       	MatchDevicePath "/dev/input/event*"
       	Option "PalmDetect" "1"
       	Option "PalmMinWidth" "10"
       	Option "PalmMinZ" "50"
       	Option "HorizTwoFingerScroll" "1"
	Option "MinSpeed"              "0.6"
        Option "MaxSpeed"              "2.3"
        Option "AccelFactor"           "0.11"
        Option "TapButton1"            "1"
        Option "TapButton2"            "2"     # multitouch
        Option "TapButton3"            "3"     # multitouch
        Option "VertTwoFingerScroll"   "1"     # multitouch
        Option "HorizTwoFingerScroll"  "1"     # multitouch
        Option "VertEdgeScroll"        "1"
        Option "CoastingSpeed"         "0"
        Option "CornerCoasting"        "1"
        Option "CircularScrolling"     "1"
        Option "CircScrollTrigger"     "7"
        Option "EdgeMotionUseAlways"   "1"
        Option "LBCornerButton"        "8"     # browser "back" btn
        Option "RBCornerButton"        "9"     # browser "forward" btn
EndSection

Section "InputClass"
        Identifier "touchpad ignore duplicates"
        MatchIsTouchpad "on"
        MatchOS "Linux"
        MatchDevicePath "/dev/input/mouse*"
        Option "Ignore" "on"
EndSection

# This option enables the bottom right corner to be a right button on clickpads
# and the right and middle top areas to be right / middle buttons on clickpads
# with a top button area.
# This option is only interpreted by clickpads.
Section "InputClass"
        Identifier "Default clickpad buttons"
        MatchDriver "synaptics"
        Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"
        Option "SecondarySoftButtonAreas" "58% 0 0 15% 42% 58% 0 15%"
EndSection

# This option disables software buttons on Apple touchpads.
# This option is only interpreted by clickpads.
Section "InputClass"
        Identifier "Disable clickpad buttons on Apple touchpads"
        MatchProduct "Apple|bcm5974"
        MatchDriver "synaptics"
        Option "SoftButtonAreas" "0 0 0 0 0 0 0 0"
EndSection

sudo vim /etc/X11/xorg.conf.d/90-trackpoint.conf

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Section "InputClass"  
#    Identifier "libinput pointer catchall"  
#    MatchIsPointer "on"  
#    MatchDevicePath "/dev/input/event*"  
#    Driver "libinput"  
#    Option "AccelSpeed" "-1.25"  
# EndSection  

Section "InputClass"
    Identifier "Trackpoint Settings"
    MatchProduct "TPPS/2 Elan TrackPoint"
    MatchDevicePath "/dev/input/event*"
    Driver "evdev"
    Option "EmulateWheel" "true"
    Option "EmulateWheelButton" "2"
    # Option "Emulate3Buttons" "true"
    Option "EmulateWheelInertia"  "10'
    Option "EmulateWheelTimeOut" "200"
    Option "Emulate3Timeout" "50"
    Option "XAxisMapping" "6 7"
    Option "YAxisMapping" "4 5"
    Option "ButtonMapping" "1 0 3 4 5 6 7"


# Set up an acceleration config
    Option   "VelocityScale"           "5"
    Option   "AccelerationProfile"     "7"
    Option   "AccelerationNumerator"   "14"
    Option   "AccelerationDenominator" "3"
    Option   "ConstantDeceleration"  "2"
    option   "AdaptiveDeceleration"  "3"
    Option   "AccelerationScheme" "predictable"
    Option   "AccelerationThreshold" "6"
EndSection
 

Gnome settings

  • In the Gnome Extensions app, go to “Keyboard and Mouse” and make sure that the mouse acceleration profile is “Flat”.
  • In the Gnome Setting app, make sure that the trackpad and mouse speed sliders are in the default (middle) position.

References

How do I set acceleration on “TPPS/2 IBM TrackPoint” ?.

How to get the perfect TrackPoint experience on Linux.