Adjust Touchpad Scrolling Speed in Ubuntu 24.04 | 22.04 GNOME Wayland

Last updated: May 5, 2024 — 9 Comments

This simple tutorial shows how to increase or decrease the touchpad 2-finger scrolling speed in Ubuntu 22.04, Ubuntu 24.04 with default GNOME on Wayland session.

GNOME, the default desktop for Ubuntu, Fedora, and optional in many other Linux, so far lacks option to configure the mouse/touchpad scroll speed.

For Ubuntu 20.04, Ubuntu 18.04, and other Linux with GNOME on classic Xorg, there’s a command line tool imwheel available to do the job. And, here’s a step by step guide show you how.

For Ubuntu 22.04 and higher and other Linux with GNOME Wayland, this tutorial may help by settings virtual touchpad size.

IMPORTANT: This tutorial is tested and works in Ubuntu 24.04 & 22.04 on my old HP & ASUS laptop. However, some users report it does NOT work. Don’t do it on production machine!

Step 1: Measure & Set virtual touchpad size

1. First, open terminal either by pressing Ctrl+Alt+T on keyboard, or by searching from ‘Activities’ overview screen.

2. When terminal opens, run command to install ‘libinput-tools’ package in case you don’t have it:

sudo apt install libinput-tools

3. Next, run command to tell your touchpad size (width and height in mm):

sudo libinput measure touchpad-size 100x100

As the screenshot shows, may laptop has touchpad with 114.6 mm width and 48.4 mm height. Once you got the value, press Ctrl+C to exit.

4. Finally, re-run the command in step 3, but with different args. For example, use 172×73 for 1.5x scroll speed (Here 172 ≈ 114.6 x 1.5, and 73 ≈ 48.4 x 1.5), run command:

sudo libinput measure touchpad-size 172x73

Or use 92×39 for 0.8x scroll-speed (92 ≈ 114.6 x 0.8, 39 ≈ 48.4 x 0.8):

sudo libinput measure touchpad-size 92x39

NOTE: You have to change the “width x height” number in command. Depends on your need to either increase or decrease scroll-speed, calculate them according the original size of your touchpad!!

Once you hit run the command, follow the terminal output to “Move one finger along all edges of the touchpad until the detected axis range stops changing.  You’ll see the little ‘0’ in the terminal output moves correspondingly when you moving finger on touchpad.

5. When done, press Ctrl+C to stop it. And, you should get similar output as the screenshot shows, if you’ve done correctly.

And, you need to copy the lines between the 2 “-8<————–” lines (the section with white background).

Step 2: Apply Changes

1. Now, open terminal (Ctrl+Alt+T) and run command to edit the config file:

sudo gedit /etc/udev/hwdb.d/61-evdev-local.hwdb

Replace gedit in command with gnome-text-editor for Ubuntu 24.04 and Fedora, or use nano instead that works in all desktops.

When file opens, paste the lines you just copied in ‘Step 1’ and save it.

2. Finally, update hardware database by running command:

sudo systemd-hwdb update

And, reload udev rules by running command:

sudo udevadm trigger /dev/input/event*

When everything’s done. Restart your computer to see the effect!

As the steps above also increase or decrease the cursor movement speed, you may also need to open “Settings -> Mouse & Touchpad” and adjust ‘Touchpad Speed’ slider-bar.

How to Restore

To undo the changes you made via the previous steps, first open terminal (Ctrl+Alt+T) and run command to delete the config file:

sudo rm /etc/udev/hwdb.d/61-evdev-local.hwdb

Then update database and reload udev rules by running 2 commands one by one:

sudo systemd-hwdb update
sudo udevadm trigger /dev/input/event*

Finally, restart your computer and done.

via: reddit thread.


I'm a freelance blogger who started using Ubuntu in 2007 and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please comment to let me know if the tutorial is outdated! And, notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me via [email protected] Buy me a coffee:

9 responses to Adjust Touchpad Scrolling Speed in Ubuntu 24.04 | 22.04 GNOME Wayland

  1. after hours of searching… THANK YOU

  2. Hi, thank you!
    This helped with the standard desktop apps :D

    However, it doesn’t seem to have had any effect on Chrom/ium based apps.
    Scrolling in Telegram is still fast,
    but scrolling in Chrome is insane!

    I imagine it would be the same for any Electron-based app.
    Have you come across any fixes for this yet?

    It seems to me that Chrome/ium is handling the input signals itself, although I have no idea if it is bypassing/undercutting libinput/wayland, or what it could be doing.

    Using multi-finger touchpad motions in Blender with wayland support (libdecor) is wonderful. So I know that the system itself is handling the input fine.

    Thank you so much anyway, this is the first time I’ve ever seen this fix mentioned anywhere!

  3. i would love to have it slower then 0.8 what are the numbers that i shuld use

  4. Alright so I ran in a big problem, my cursor won’t work after those commands, but with the command I can se that it only works for the x axis and not the y axis. How do I revert everything to normal?

  5. I ran into a problem after using this method which is that the mouse click is now not aligned to where the mouse cursor is on the screen, which makes selecting text, for example, really hard. I have tried reverting back to normal and that does change the speed of the touchpad but the alignment problems remains. What do I do?

  6. Sorry to say but this problem, and this solution, in my opinion, is a prime example why Linux is still primarily only for tech people.

  7. it gets faster but amount of lags are critical, sometimes you even just can’t move the cursor around… maybe its due to unstable pre-lts ubuntu, maybe due to conflicting with window gesture extension but for now its totally unusable in my case :( but scrolling works well just like chrome with wayland flag enabled

  8. Thanks a lot for this tutorial, works like a charm here on Zorin 17.1 on a Samsung Galaxy Book 2 Pro 360 with gnome wayland.

Leave a Reply

Text formatting is available via select HTML.

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>