{"id":2024,"date":"2022-05-05T19:54:19","date_gmt":"2022-05-05T14:24:19","guid":{"rendered":"https:\/\/smarttech101.com\/?p=2024"},"modified":"2022-06-24T20:49:07","modified_gmt":"2022-06-24T15:19:07","slug":"libinput-fix-your-linux-touchpad-using-libinput","status":"publish","type":"post","link":"https:\/\/smarttech101.com\/libinput-fix-your-linux-touchpad-using-libinput\/","title":{"rendered":"libinput: Fix your Linux touchpad using libinput"},"content":{"rendered":"\n
libinput is a modern touchpad driver in Linux. Synaptics-based drivers are not being upgraded to include modern laptops. This article is all about the installation, and configuration of libinput. Here, I will talk about how to set up one, two, and three finger gestures, natural scroll, and scrolling acceleration among other things.<\/p>\n\n\n\n
Note: <\/strong>Please note that this article is about X<\/strong> based desktop environment, not Wayland<\/strong>.<\/p>\n\n\n\n Debian based distro (Ubuntu, Linux Mint, Mx Linux)<\/p>\n\n\n\n Arch Linux based distro (Arch Linux, Manjaro, Arco Linux)<\/p>\n\n\n\n Fedora-based distro<\/p>\n\n\n\n libinput conflicts with Synaptics drivers. If both are installed Synaptics will take precedence due to its higher numeric order Create and open the configuration file using your favorite editors:<\/p>\n\n\n\n By the way, libinput supports many devices – keyboard, touchscreen, tablet, touchpad. Here in this file, you need to create a section for each of your devices. Since you are working on your touchpad, the following section for the touchpad needs to be created:<\/p>\n\n\n\n Now you need to set up basic configuration options for gestures etc:<\/p>\n\n\n\n Note: <\/strong>After any changes to the said file restart the x-org server. <\/strong>If you use display managers such as lightdm and sddm, use the following command for restarting the x-org server:<\/p>\n\n\n\n For sddm:<\/p>\n\n\n\n For lightdm:<\/p>\n\n\n\n That’s all folks. This was all about the basic configuration of the touchpad. Look at the man page to further configure it or if you want to configure your tablet etc.<\/p>\n","protected":false},"excerpt":{"rendered":" This article is all libinput – one, two, and three-finger gestures, natural scroll, and scrolling acceleration among other things.<\/p>\n","protected":false},"author":2,"featured_media":2025,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[17],"tags":[18],"class_list":["post-2024","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-command-line-tools","tag-command-line-tools"],"yoast_head":"\nTable of contents<\/h2>\n\n\n\n
Installation of libinput<\/h2>\n\n\n\n
apt-get install xserver-xorg-input-libinput<\/code><\/pre>\n\n\n\n
pacman -S xf86-input-libinput<\/code><\/pre>\n\n\n\n
yum install libinput<\/code><\/pre>\n\n\n\n
Conflicts with Synaptics<\/h2>\n\n\n\n
70-<\/code> in the default installation directory. So either remove Synaptics or give libinput’s configuration file *.conf file a higher number like
100-touchpad.conf<\/code>.<\/p>\n\n\n\n
Configuration of libinput<\/h2>\n\n\n\n
~$ vim \/etc\/X11\/xorg.conf.d\/100-touchpad.conf<\/code><\/pre>\n\n\n\n
Section \"InputClass\"\n Identifier \"libinput touchpad catchall\"\n MatchIsTouchpad \"on\"\n MatchDevicePath \"\/dev\/input\/event*\"\n Driver \"libinput\"\nEndSection<\/code><\/pre>\n\n\n\n
Section \"InputClass\"\n Identifier \"libinput touchpad catchall\"\n MatchIsTouchpad \"on\"\n MatchDevicePath \"\/dev\/input\/event*\"\n Driver \"libinput\"\n Option \"Tapping\" \"on\"\n Option \"NaturalScrolling\" \"true\"\n Option \"ClickMethod\" \"clickfinger\"\n Option \"TappingButtonMap\" \"lrm\"\n Option \"AccelSpeed\" \"0.5\"\n Option \"DisableWhileTyping\" \"true\"\nEndSection<\/code><\/pre>\n\n\n\n
Explanation of above libinput’s option<\/h3>\n\n\n\n
Option \"Tapping\" \"on\"<\/code>: single tap means a single left click<\/li>
Other useful libinput options<\/h3>\n\n\n\n
Option \"LeftHanded\" \"bool\"<\/code>: for left-handed people; it interchanges left and right buttons.<\/li>
Option \"MiddleEmulation\" \"bool\"<\/code>: if
bool<\/code> is set to
true<\/code>, pressing both left and right buttons presses the middle button.<\/li><\/ul>\n\n\n\n
~$ sudo systemctl restart sddm.service<\/code><\/pre>\n\n\n\n
~$ sudo systemctl restart lightdm.service<\/code><\/pre>\n\n\n\n
Conclusion<\/h2>\n\n\n\n