libinput is an input device driver for Wayland compositors and X.org window system. It is Gentoo Linux' default input device driver. It provides device detection, device handling, input device event processing and abstraction so minimize the amount of custom input code compositors need to provide the common set of functionality that users expect.
- 1 Installation
- 2 Configuration
- 3 Invocation
- 4 Troubleshooting
- 5 See also
- 6 External resources
- 7 References
Support for Event interface (CONFIG_INPUT_EVDEV) needs to be enabled in the kernel:
Device Drivers ---> Input device support ---> <*> Event interface
To check if it is presently activated, run:
portageq envvar INPUT_DEVICES
If not, add it to the INPUT_DEVICES variable:
After setting the INPUT_DEVICES variable remember to update the system using the following command so the changes take effect:
emerge --ask --changed-use --deep @world
In order to enable actions gestures on the touchpad using the libinput driver, follow the install notes from the official project page on GitHub.
Remember to install the required dependencies:
emerge --ask x11-misc/xdotool x11-misc/wmctrl
By default, when libinput is the only available input driver for Xorg, no additional configuration is needed. Simply (re)start the graphical environment for the changes to take effect.
When multiple drivers are available on the system, Xorg must be instructed to use libinput before trying to use other input drivers. This can be simply performed by symlinking the 40-libinput.conf file into the /etc/X11/xorg.conf.d/ directory:
ln -s /usr/share/X11/xorg.conf.d/40-libinput.conf /etc/X11/xorg.conf.d/
If the 40-libinput.conf will be edited, it is better to copy the file to the configuration directory:
cp /usr/share/X11/xorg.conf.d/40-libinput.conf /etc/X11/xorg.conf.d/
Xorg gives priority to the files in the /etc/X11/xorg.conf.d/ directory.
(Re)start the graphical environment for the changes to take effect.
Many users will desire the native 'tap-to-click" behavior for laptops with modern touchpads. Add the following Option lines to Xorg's libinput configuration section:
Section "InputClass" Identifier "libinput touchpad catchall" MatchIsTouchpad "on" MatchDevicePath "/dev/input/event*" Option "Tapping" "True" Option "TappingDrag" "True" Driver "libinput" EndSection
To list the available input devices:
For detailed information see the libinput-list-devices(1) man page.
Removing another input driver from INPUT_DEVICES does not prevent Xorg from loading it
This issue can occur in a variety of situations, but it is most prominent when migrating from evdev to libinput.
Be sure the x11-drivers/xf86-input-evdev package is no longer installed on the system. If /usr/share/X11/xorg.conf.d/10-evdev.conf exists then Xorg will still reference it.
Verify the evdev driver is no longer referenced anywhere by Portage (check make.conf and package.use), then depclean the system:
emerge --ask --depclean
- Wayland — a simpler replacement for X display server.
- Xorg — an open source implementation of the X Window System.
- Latest libinput API documentation
- Gentoo forums discussion on libinput
- Arch Linux wiki article on libinput
- profiles: Switch default INPUT_DEVICES to libinput on Linux.