1

The TrackPoint motion on this ThinkPad X390 with Ubuntu 18.04 LTS is jumpy, laggy and unusable for delicate, small movements. I have confirmed that this is likely a software issue because I've tested an external keyboard with a TrackPoint and it is fine on 16.04 but shows the same problems on 18.04.

I can see comments online that suggest that switching libinput to a newer version can help and that switching from libinput to Synaptics can help. How can the latter be done? I can see from here that a possibility is to install xserver-xorg-input-synaptics, however, when I do this I run into problems:

$ sudo apt install xserver-xorg-input-synaptics
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies.
 xserver-xorg-input-synaptics : Depends: xserver-xorg-core (>= 2:1.18.99.901)
E: Unable to correct problems, you have held broken packages.

$ sudo apt install xserver-xorg-core
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libunity-gtk2-parser0 libunity-gtk3-parser0 libxatracker2 unity-gtk-module-common xinput
Use 'sudo apt autoremove' to remove them.
Suggested packages:
  xfonts-100dpi | xfonts-75dpi
The following packages will be REMOVED
  ubuntu-desktop ubuntu-mate-core ubuntu-mate-desktop ubuntu-unity-desktop xorg
  xserver-xorg-core-hwe-18.04 xserver-xorg-hwe-18.04 xserver-xorg-input-all-hwe-18.04
  xserver-xorg-input-libinput-hwe-18.04 xserver-xorg-input-synaptics-hwe-18.04
  xserver-xorg-input-wacom-hwe-18.04 xserver-xorg-video-all-hwe-18.04
  xserver-xorg-video-amdgpu-hwe-18.04 xserver-xorg-video-ati-hwe-18.04
  xserver-xorg-video-fbdev-hwe-18.04 xserver-xorg-video-intel-hwe-18.04
  xserver-xorg-video-nouveau-hwe-18.04 xserver-xorg-video-qxl-hwe-18.04
  xserver-xorg-video-radeon-hwe-18.04 xserver-xorg-video-vesa-hwe-18.04
  xserver-xorg-video-vmware-hwe-18.04
The following NEW packages will be installed
  xserver-xorg-core
0 to upgrade, 1 to newly install, 21 to remove and 11 not to upgrade.
Need to get 1,351 kB of archives.
After this operation, 5,808 kB disk space will be freed.
Do you want to continue? [Y/n] n
Abort.

How might one proceed?


EDIT: As per the suggestions of @Pilot6 here, I installed xserver-xorg-input-synaptics-hwe-18.04 (which appears to have been successful) and I checked the files at directory /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 removed the file 40-libinput.conf and rebooted in the hopes that the Synaptics driver would kick in. It didn't, resulting in the keyboard and TrackPoint (and touchpad) being unresponsive. Luckily the touchscreen and onscreen keyboard enabled replacing the file 40-libinput.conf. I'm not sure what to do next.

The contents of 40-libinput.conf are as follows:

# Match on all types of devices but joysticks
Section "InputClass"
        Identifier "libinput pointer catchall"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput keyboard catchall"
        MatchIsKeyboard "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput touchpad catchall"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput touchscreen catchall"
        MatchIsTouchscreen "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput tablet catchall"
        MatchIsTablet "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

The contents of 70-synaptics.conf are as follows:

# 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"
        Driver "synaptics"
        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*"
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
  • 1
    Please check whether it works with latest libinput (latest libinput at the moment is 1.14.1, and I bet this isn't the version you have). Also FWIW, an year ago libinput maintainer was calling for testing the trackpoint code, so I presume any input on that would be welcome as well. – Hi-Angel Aug 26 '19 at 22:16
  • @Hi-Angel Thanks for the suggestion. I appear to be using libinput version 1.91 and would be happy to test out the current version, and to provide feedback on it to the developers. Do you know if the instructions here are what I should follow? – BlandCorporation Aug 27 '19 at 10:57
  • 1
    Yeah, well, though I don't like that these instructions would result in files untracked by package manager, and gonna be overwritten on upgrade. Ideally instead of sudo ninja … install one would use sudo checkinstall (checkinstall would assemble package; I think though you may need to hint it that the installation command is ninja … install). But for testing purposes I think it's fine. Note: if something goes wrong, just do sudo apt-get install --reinstall libinput-bin to revert that back. I recommend to run immediately after installation libinput list-devices to see if it works. – Hi-Angel Aug 27 '19 at 11:42
  • 1
    Also note: xserver opens libinput.so library on start, so to test the newly installed libinput you'll need to restart xserver (basically, just reboot). However, libinput executable would immediately use the newly installed libinput.so library, which is the reason I suggest to run libinput list-devices immediately after installation: so you still would have working XServer if something went wrong, before you gone reboot. – Hi-Angel Aug 27 '19 at 11:47
  • @Hi-Angel Ok so thanks very much for the suggestions there, it lead to some success. I've added an answer there and referenced your comment. – BlandCorporation Aug 28 '19 at 15:21

2 Answers2

2

For HWE installations the command would be

sudo apt install xserver-xorg-input-synaptics-hwe-18.04

You can switch to synaptics driver by removing /usr/share/X11/xorg.conf.d/XX-libinput.conf file.

K7AAY
  • 17,202
Pilot6
  • 90,100
  • 91
  • 213
  • 324
  • Ah, thanks for that. The system actually reports that this is already installed: xserver-xorg-input-synaptics-hwe-18.04 is already the newest version (1.9.1-1ubuntu1~18.04.1). Is there some trick to getting Ubuntu to use the Synaptics driver? (I thought it would use it automatically if installed.) – BlandCorporation Aug 26 '19 at 12:42
  • 1
    I added that to the answer. – Pilot6 Aug 26 '19 at 12:44
  • Thanks again for those suggestions. I gave it a shot (and edited the post for details) but unfortunately the Synaptics driver didn't kick in, leaving the input devices unresponsive. Can you think of what might be preventing the Synaptics driver from being used? – BlandCorporation Aug 27 '19 at 10:46
1

So following from the suggestions of @Hi-Angel I have upgraded libinput from the default and this appears to have improved things a great deal. The procedure was as follows:

sudo apt install check doxygen libev-dev python3-sphinx
sudo pip3 install recommonmark sphinx_rtd_theme    
git clone https://gitlab.freedesktop.org/libinput/libinput
cd libinput
meson --prefix=/usr builddir/
ninja -C builddir/
sudo ninja -C builddir/ install
sudo systemd-hwdb update

This is followed by a reboot.

  • Amazing! You may also want to copy-paste this as an answer to this question. – Hi-Angel Aug 28 '19 at 21:52
  • Btw, worth noting that libinput installed this way likely to get overwritten on the next update, because package manager has no idea you copied some files over to /usr and /etc with ninja-install command. If you want to make package manager aware of newly installed libinput, I recommend using sudo checkinstall ninja -C builddir/ install. The checkinstall would ask you some questions interactively (such as package name, version, etc), and then run the ninja-install command — however, this time files that get copied over your filesystem would actually be tracked by package manager. – Hi-Angel Aug 28 '19 at 22:01
  • Oh, do not ever use sudo pip3 or sudo gem unless you really know what you're doing (however using them without* sudo is fine)*. Because making random package managers to install stuff over to /usr/ may result in conflicts with apt/dpkg. The packages you're installing with pip3 should be installed with apt as: sudo apt install python3-recommonmark python3-sphinx-rtd-theme – Hi-Angel Aug 28 '19 at 22:09