Skip to content

Instantly share code, notes, and snippets.

@jjszaniszlo
Last active April 15, 2026 14:18
Show Gist options
  • Select an option

  • Save jjszaniszlo/f36cc75f1e46da1af15b8894ba13757e to your computer and use it in GitHub Desktop.

Select an option

Save jjszaniszlo/f36cc75f1e46da1af15b8894ba13757e to your computer and use it in GitHub Desktop.

How to configure touchpad scrolling speed

Prerequisites

Start off by installing the following with dnf.

sudo dnf install libinput-devel meson

Meson is a build tool and libinput-devel are header files for libinput.

Building libinput-config

Start off by cloning the libinput-config repository

git clone https://gitlab.com/warningnonpotablewater/libinput-config.git libinput-config

Then enter the directory with

cd libinput-config

Next, run meson build and enter the build directory. Meson will generate build scripts based on your environment.

meson build
cd build

Next, we will use the build scripts that meson created for us to build libinput-config, then to install it with elevated privileges.

ninja
sudo ninja install

Ninja will first build the utility, then install it into the correct place.

IMPORTANT!!!

For the libinput-config to start working you must either log out then log back in or reboot.

Configuration

Preface

To preface this section, the full list of configurable options according to this section in the repo is the following:

We will only use a couple of settings to adjust the trackpad scrolling speed.

override-compositor={disabled,enabled}
tap={disabled,enabled}
tap-button-map={lrm,lmr}
drag={disabled,enabled}
drag-lock={disabled,enabled}
accel-speed=[number]
accel-profile={none,flat,adaptive}
natural-scroll={disabled,enabled}
left-handed={disabled,enabled}
click-method={none,button-areas,clickfinger}
middle-emulation={disabled,enabled}
scroll-method={none,two-fingers,edge,on-button-down}
scroll-button=[number]
scroll-button-lock={disabled,enabled}
dwt={disabled,enabled}
scroll-factor=[number]
scroll-factor-x=[number]
scroll-factor-y=[number]
discrete-scroll-factor=[number]
discrete-scroll-factor-x=[number]
discrete-scroll-factor-y=[number]
speed=[number]
speed-x=[number]
speed-y=[number]
gesture-speed=[number]
gesture-speed-x=[number]
gesture-speed-y=[number]
remap-key=[number]:[number]

Instructions on creating config

We only really care about the scroll-factor.

To set the scroll-factor we need to edit a file located in /etc/libinput.conf with the format specified in the preface.

To set this option quickly without using a text editor we can use tee.

For example to set scroll-factor to 0.25, you can enter the following

echo "scroll-factor=0.25" | sudo tee /etc/libinput.conf

Then obviouslly to adjust it, you can tweak that number to be anything.

You do have to relog everytime something is tweaked sadly.

If you want to configure any other setting, open it with a text editor because tee will do a full file buffer replacement. You must edit it with elevated privileges.

For example:

sudo vim /etc/libinput.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment