Coming mostly from Fedora and Archlinux I used to have the latest libinput available in a reasonable time. Currently, on ubuntu 18.04 I do not see how can I have the latest libinput e.g. 1.12 at the time of writing on my machine. Is there a ppa or has anyone tried to install it from source without messing up the whole system?
I do not mind to compile it but I am not well educated in testing it and making sure it is working in conjunction with other packages properly. Having ThinkPad TrackPoint I kinda feel having the latest libinput is crucial!
Here was another answer, but it's been a month since author deleted it. Let's write a new one.
Hopefully, someday someone will create a PPA with latest libinput. Until then, here are instructions on building a latest libinput package yourself.
It is easy, instructions below are mainly taken from here, and the tip about meson is taken from deleted answer. I also assume you don't need to generate docs, so I don't install dependencies for them and disable them in
mesoncall. It's also important for
usrin meson-configuration line, so libraries are installed to standard locations.
Step1: install build depenendencies
Hopefully I didn't miss any, but feel free to comment if I did.
You'll also need
meson. It is in Ubuntu repo, however in the next command I install it with pip. The reason is: due to Ubuntu mostly providing ancient software there's a possibility their meson version will be too old to be able to build libinput. ATM Ubuntu 18.04 is known to have this problem, but I assume with time it may happen to other releases as well.
Step2: clone and build libinput
Step3: create libinput package and install
Though easiest way of installing built libinput is running
ninja -C build install, but I strongly discourage that unless you know what you're doing (you will get untracked files all over your system that may get overwritten on system update, and depending on situation may even break libinput completely).
Instead, use this script I've written to assemble a package.
You can see the name of the new package in the script output, so all that is left is to install it (note: the
./part in the path is needed for
aptto correctly interpret argument as a local file):
To make use of installed libinput you need to restart graphics session (for example, reboot).
Reverting to older libinput
May you wish to get back the distro-provided libinput, just install
libinput10package (it will replace
In case something happens to github gist, here's the current content of the script: