Thursday, November 9, 2017

Dell Precision 5520 Touchpad; openSUSE TW and Leap with libinput

Going forward libinput is in favor of using synaptics touchpad driver and will integrate better with future DE environments especially as things move towards the use of Wayland. Some DE environments allow you to set some of the settings today. You can use the following method to make sure you have libinput setup and some most desired settings defined such as 2 and 3 finger clicking. At least for me. ☺

1) Make sure you remove all synaptics packages. There should be maybe 4 or 5 installed by default
# rpm -qa  | grep synaptics

2) Make sure that you have libinput and friends installed (The following outputs are from TW)
# rpm -qa | grep libinput
libinput-udev-1.9.0-1.1.x86_64
libinput-tools-1.9.0-1.1.x86_64
libinput10-1.9.0-1.1.x86_64
libinput10-32bit-1.9.0-1.1.x86_64
xf86-input-libinput-0.26.0-1.1.x86_64

# rpm -qa | grep xinput
xinput-1.6.2-1.7.x86_64

# rpm -qa | grep xdotool
xdotool-2.2012+git.20130201.65cb0b1-7.2.x86_64

3) Execute the following if you don't have some of them installed.

# zypper in libinput-udev libinput-tools libinput10 libinput10-32bit
xf86-input-libinput xinput xdotool

Reboot!

4) Now your ready to setup some properties for your Touchpad. First lets find
out which ID is yours.

# xinput list | grep Touchpad
⎜   ↳ DLL07BF:01 06CB:7A13 Touchpad             id=14   [slave  pointer  (2)]

On mine the id=14 from the output above. We can use this id to set some properties for the touchpad. There are 3 properties which make sense to me to have enabled in Linux.

Enabling of two-finger and three-finger clicking for the touchpad.  This will allow you to use two-finger for left click and three-finger for middle mouse button actions in Linux such as paste. To enable this use the below command. Notice that I use the 14 which is the id from the previous command in the command options.

# xinput set-prop 14 "libinput Click Method Enabled" 0 1

Another one I like and some might not is the enablement of the natural scrolling ability. To enable this run the following command.

# xinput set-prop 14 "libinput Natural Scrolling Enabled" 1

I also found that my mouse was not moving quite as fast as I would have liked so I changed the pointer speed.

# xinput set-prop 14 "libinput Accel Speed" 1

Those 3 properties I really like to use.  However there are quite a few others you can tweak and tune. Use the following command to get a full list of the properties available to the trackpad. Again makind sure to use your id in the command options.

# xinput list-props 14

If you really like the tapping options you can enable those. Yuk!

There is a small GUI utility you can install called lxinput which has some basic stuff, but not feature complete. Both Gnome and KDE are integrating the ability to use the libinput drivers for the touchpad and both are not feature complete yet. In KDE Plasma you can set the Accel Speed from your System Settings.

To enable some libinput persistence between reboots and sleep modes you can add the following to your xorg configuration.

Edit /etc/X11/xorg.conf.d/40-libinput.conf (This is a default file that's installed with openSUSE)
Modify the Input Class that's labeled with an identifier of "touchpad catchall" to look like the below. Notice I removed the Tapping Option

Section "InputClass"
        Identifier "libinput touchpad catchall"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        MatchProduct "DLL07BF:01 06CB:7A13 Touchpad"
        Driver "libinput"
        Option "ClickMethod" "clickfinger"
        Option "NaturalScrolling" "false"
        Option "AccelSpeed" "1"
EndSection

References:
https://wayland.freedesktop.org/libinput/doc/latest/faq.html
man libinput 4

Enjoy!
Post a Comment