Adjust Touchpad Scrolling Speed in Ubuntu 24.04 | 22.04 GNOME Wayland

Last updated: October 5, 2024 — 18 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 (in my case, 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.

Twitter

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 ubuntuhandbook1@gmail.com Buy me a coffee: https://ko-fi.com/ubuntuhandbook1 |

18 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.

  9. Khaled Abdelaziz July 1, 2024 at 2:30 pm

    It works, but then you need to increase pointer speed from the settings, thank you!

  10. Do you happen to know how to make my touchpad pointer not so jumpy? It’s apparently too sensitive. If you rest your finger in one spot the pointer will sort of dance around a bit. It’s not horrible, and I have been living with it, but it would be nice if it was steady. I looked at these instructions but I don’t think this quite relates to my problem.
    Any thoughts? (Ubuntu 22.04, Acer Aspire)

  11. Thanks for this, it helps to solve the insane scrolling speed in chromium based browsers and other GTK3 apps. There are some downsides to this fix though:
    – GTK4 applications fixed the problems for my touchpad such that I don’t need this fix, therefore those apps such as GNOME Web, GNOME Console are now scrolling slow (not a huge problem since many apps are still on GTK3)
    – Native wayland touchpad gestures inside GNOME (three finger swipes for overview and two finger swipe for next/previous tab) requires a bit more effort

    Still this fix improves the GNOME experience!

  12. This experience is really terrible, gnome doesn’t even have a simple operation like adjusting the scroll speed with 2 fingers naturally like on windows. This operating system is really only for tech people.

  13. I found that changing scroll speed by in-app function “Like about:config” is way better than this method. Tracking sometimes disconnect and often jump.

    Just decide to buy a mouse or change my OS back to Windows.

  14. Thank you very much! Perfect solution to the problem

  15. Thanks. Works 24.10

  16. Scrolling with a wireless mouse works great, but touch pad is just horrible to use scrolling either single or two finger. This has not be very good even when Synaptic driver was the default. I am just surprised someone has not created a useful app that would allow for more incremental adjustments for a touch pad.

  17. It’s worked 24.04, lenovo thinkpad e14 gen 5
    Thanhs

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> 

*