Linux Touchpad Configuration - ryzendew/Linux-Tips-and-Tricks GitHub Wiki
Linux Touchpad Configuration Guide
Complete beginner-friendly guide to configuring touchpads on Linux, covering Arch Linux, CachyOS, and other distributions including gestures, sensitivity, multi-touch settings, and troubleshooting.
Table of Contents
- Understanding Touchpads
- Touchpad Detection
- libinput Configuration
- Desktop Environment Settings
- Gestures
- Troubleshooting
Understanding Touchpads
What is a Touchpad?
Touchpad is a pointing device on laptops.
What it does:
- Cursor movement: Moves mouse cursor
- Clicking: Left/right click
- Scrolling: Vertical/horizontal scrolling
- Gestures: Multi-touch gestures
Why configure:
- Comfort: Adjust to your preference
- Gestures: Enable useful gestures
- Sensitivity: Adjust touch sensitivity
- Functionality: Enable/disable features
Touchpad Detection
Identify Touchpad
Check touchpad:
# List input devices
xinput list
# Or
libinput list-devices
# Check if touchpad detected
cat /proc/bus/input/devices | grep -i touchpad
libinput Configuration
Install libinput
libinput is default on most distributions:
# Usually installed
# Check
pacman -Q libinput
Configure libinput
Create Xorg config:
sudo vim /etc/X11/xorg.conf.d/30-touchpad.conf
Example config:
Section "InputClass"
Identifier "touchpad"
Driver "libinput"
MatchIsTouchpad "on"
Option "Tapping" "on"
Option "TappingDrag" "on"
Option "NaturalScrolling" "true"
Option "AccelSpeed" "0.5"
EndSection
Options:
Tapping: Enable tap-to-clickTappingDrag: Enable drag with tapNaturalScrolling: Reverse scroll directionAccelSpeed: Acceleration speed (-1 to 1)
Configure via xinput
Set properties:
# List properties
xinput list-props "Touchpad Name"
# Set tapping
xinput set-prop "Touchpad Name" "libinput Tapping Enabled" 1
# Set scrolling
xinput set-prop "Touchpad Name" "libinput Natural Scrolling Enabled" 1
Desktop Environment Settings
GNOME Touchpad Settings
Configure in GNOME:
# Open Settings
gnome-control-center
# Or use gsettings
gsettings set org.gnome.desktop.peripherals.touchpad tap-to-click true
gsettings set org.gnome.desktop.peripherals.touchpad natural-scroll true
KDE Plasma Touchpad Settings
Configure in KDE:
- Open System Settings
- Input Devices > Touchpad
- Configure settings
XFCE Touchpad Settings
Configure in XFCE:
- Open Settings
- Mouse and Touchpad
- Configure settings
Gestures
libinput-gestures
Install libinput-gestures:
# Install
sudo pacman -S libinput-gestures
# Add user to input group
sudo gpasswd -a $USER input
# Configure
libinput-gestures-setup autostart
libinput-gestures-setup start
Edit config:
vim ~/.config/libinput-gestures.conf
Example gestures:
gesture swipe up 3 xdotool key super
gesture swipe down 3 xdotool key super
gesture swipe left 4 xdotool key alt+Right
gesture swipe right 4 xdotool key alt+Left
fusuma (Alternative)
Install fusuma:
# Install fusuma
yay -S fusuma
# Configure
mkdir -p ~/.config/fusuma
vim ~/.config/fusuma/config.yml
Troubleshooting
Touchpad Not Working
Check drivers:
# Check loaded modules
lsmod | grep -i touchpad
# Check Xorg logs
cat /var/log/Xorg.0.log | grep -i touchpad
Disable Touchpad
Temporarily disable:
# Using xinput
xinput disable "Touchpad"
# Enable
xinput enable "Touchpad"
Sensitivity Issues
Adjust sensitivity:
# Using xinput
xinput set-prop "Touchpad" "libinput Accel Speed" 0.5
# Or edit config file
Summary
This guide covered touchpad configuration for Arch Linux, CachyOS, and other distributions, including libinput, desktop environment settings, gestures, and troubleshooting.
Next Steps
- Input Devices - Keyboard and mouse
- Laptop Configuration - Laptop setup
- ArchWiki Touchpad: https://wiki.archlinux.org/title/Touchpad_Synaptics
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.