Proper touchpad thumb & palm detection with libinput
For Ubuntu 15.10+ you can install libinput
(wily, xenial, yakkety) through apt
:
sudo apt install xserver-xorg-input-libinput
I did still have to edit the config file to enable tapping, I assume as Unity absorbs libinput it'll expose this via control panel settings (I used vi here, you can use gedit or whatever you like):
Edit the following file (tested on 16.04 2016-4-14 and 16.10 2016-10-14):
sudo vi /usr/share/X11/xorg.conf.d/90-libinput.conf
Adjust the 'touchpad' section to add Option "tapping" "True"
and Option "DisableWhileTyping" "True"
if you prefer this behavior:
Section "InputClass"
Identifier "libinput touchpad catchall"
MatchIsTouchpad "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
Option "Tapping" "True"
Option "DisableWhileTyping" "True"
EndSection
Log out, log in .. enjoy! :)
This is how to install libinput to Ubuntu.
Install some needed packages
sudo apt-get install git build-essential autoconf automake pkg-config libtool sudo apt-get install libmtdev1 libmtdev-dev libudev-dev libevdev-dev xutils-dev libwacom-dev
Install
xserver-xorg-dev
. For 14.04.3 it may bexserver-xorg-dev-lts-vivid
. Be careful. You need to check whatxserver-xorg
package is installed.sudo apt-get install xserver-xorg-dev
Clone
libinput
andxf86-input-libinput
.git clone git://anongit.freedesktop.org/git/wayland/libinput git clone git://anongit.freedesktop.org/xorg/driver/xf86-input-libinput
Build and install.
cd libinput ./autogen.sh --prefix=/usr make && sudo make install cd ../xf86-input-libinput ./autogen.sh --prefix=/usr make && sudo make install
Add to file
conf/90-libinput.conf
stringOption "Tapping" "True"
beforeEndSection
to the touchpad section.Copy config file to enable
libinput
.sudo cp conf/90-libinput.conf /usr/share/X11/xorg.conf.d/
Log off and log on.
You will see that libinput
is used by running xinput list-props <your_touchpad_id>
.
If you do not like using libinput
, you can always disable it by
sudo rm /usr/share/X11/xorg.conf.d/90-libinput.conf
I just installed it, now I am figuring out how to setup palm detection. It looks like it is enabled by default, but I do not quite understand yet how does it use kernel reported width and pressure.
It looks like currently there are no major advantages of using libinput
in Ubuntu.
xf86-input-libinput
just wraps it to Xorg and nothing else. So extra gestures are not supported. At least I do not know if they do. Wayland or Mir will be more capable, I guess.
After some testing I found an advantage. There is an issue with xorg-synaptics
that when you put a finger on button area, you can't use another finger to move cursor. That is inconvenient for people who like to use hardware buttons for clicking. That problem has been reported many times as a bug.
In libinput
there is no this issue at all.
That was a fun to test. Thanks for the question.
On 16.04 you have to install xserver-xorg-input-libinput-hwe-16.04
instead
Problem installing libinput on 16.04.2