Ctrl K

i3 Touchpad Scrolling on Arch

Configure natural scrolling, tap-to-click, and slower touchpad scrolling on Arch with i3, X11, and libinput.

Configure touchpad behavior on Arch in an i3/X11 session with libinput. This setup enables natural scrolling, enables tap-to-click, slows two-finger scrolling with ScrollPixelDistance, and persists the settings across reboot and future i3 logins.

Install the X11 input tools

Install the libinput Xorg driver and xinput command-line tool if they are not already present.

sudo pacman -S xf86-input-libinput xorg-xinput

Find the touchpad name

List input devices and copy the full touchpad device name. Do not rely on the numeric device id because it can change after reboot.

xinput list

# Example touchpad name from this ASUS setup:
# ASUF1204:00 2808:0202 Touchpad

Inspect current properties

Inspect the current libinput properties for the touchpad. The exact property ids can change, so use the property names in commands.

xinput list-props "ASUF1204:00 2808:0202 Touchpad"
PropertyUseful value
libinput Natural Scrolling Enabled0 is traditional scrolling, 1 is natural scrolling
libinput Tapping Enabled0 disables tap-to-click, 1 enables tap-to-click
libinput Scroll Method Enabled1, 0, 0 means two-finger scrolling is active
libinput Scrolling Pixel DistanceHigher values feel slower, lower values feel faster

Live-test the settings

Set the properties live first. These commands affect the current X11 session only and are useful for choosing a comfortable scroll distance before making the setup permanent.

xinput set-prop "ASUF1204:00 2808:0202 Touchpad" "libinput Natural Scrolling Enabled" 1
xinput set-prop "ASUF1204:00 2808:0202 Touchpad" "libinput Tapping Enabled" 1
xinput set-prop "ASUF1204:00 2808:0202 Touchpad" "libinput Scrolling Pixel Distance" 40
  • Natural scrolling reverses the touchpad scroll direction to the mac-style direction.
  • Tapping enables tap-to-click.
  • A ScrollPixelDistance value of 40 worked well on this setup.
  • Increase ScrollPixelDistance for slower scrolling.
  • Decrease ScrollPixelDistance for faster scrolling.

Verify live values

xinput list-props "ASUF1204:00 2808:0202 Touchpad" | grep -E "Natural Scrolling|Tapping Enabled|Scrolling Pixel Distance"

# Expected result:
# libinput Natural Scrolling Enabled: 1
# libinput Tapping Enabled: 1
# libinput Scrolling Pixel Distance: 40

Make the setup permanent

Persist the touchpad settings with an Xorg input class. This is an Xorg/libinput configuration, not an i3 configuration.

sudo mkdir -p /etc/X11/xorg.conf.d
sudo nano /etc/X11/xorg.conf.d/30-touchpad.conf
Section "InputClass"
    Identifier "ASUS touchpad libinput"
    MatchIsTouchpad "on"
    Driver "libinput"

    Option "NaturalScrolling" "true"
    Option "Tapping" "true"
    Option "ScrollMethod" "twofinger"
    Option "DisableWhileTyping" "true"
    Option "ScrollPixelDistance" "40"
EndSection

Restart the X11 session

Restart the i3/X11 session after changing the Xorg input file. Reloading i3 is not enough because Xorg reads this input configuration when the graphical session starts.

i3-msg exit

Log back into i3, then verify the permanent values.

xinput list-props "ASUF1204:00 2808:0202 Touchpad" | grep -E "Natural Scrolling|Tapping Enabled|Scrolling Pixel Distance"

Optional app-level tuning

Browser and terminal scroll feel can still be tuned separately. Picom does not control touchpad scrolling or smoothness, and true global smooth or inertia scrolling is not normally handled by X11/libinput.

For Alacritty, edit the terminal scrolling multiplier if terminal scrolling feels too fast or jumpy.

nano ~/.config/alacritty/alacritty.toml
[scrolling]
history = 10000
multiplier = 2
  • Use multiplier = 1 for slower terminal scrolling.
  • Use multiplier = 2 or 3 for faster terminal scrolling.
  • In Firefox, check general.smoothScroll and apz.gtk.kinetic_scroll.enabled in about:config.
  • Firefox settings are app-level browser settings, not system-wide touchpad settings.

File locations

  • Persistent Xorg touchpad config: /etc/X11/xorg.conf.d/30-touchpad.conf
  • Alacritty config: ~/.config/alacritty/alacritty.toml
  • Touchpad inspection tool: xinput
  • Xorg libinput driver package: xf86-input-libinput