
{"id":43958,"date":"2023-05-03T12:29:28","date_gmt":"2023-05-03T12:29:28","guid":{"rendered":"https:\/\/ubuntuhandbook.org\/?p=43958"},"modified":"2025-11-14T07:31:37","modified_gmt":"2025-11-14T07:31:37","slug":"adjust-touchpad-scrolling-ubuntu","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2023\/05\/adjust-touchpad-scrolling-ubuntu\/","title":{"rendered":"Adjust Touchpad Scrolling Speed in Ubuntu 24.04 | 22.04 GNOME Wayland"},"content":{"rendered":"<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/05\/touchpad-icon.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-thumbnail wp-image-40004\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/05\/touchpad-icon-250x250.webp\" alt=\"\" width=\"250\" height=\"250\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/05\/touchpad-icon-250x250.webp 250w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/05\/touchpad-icon-300x300.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/05\/touchpad-icon-600x600.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/05\/touchpad-icon-768x768.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/05\/touchpad-icon.webp 1200w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/a><\/p>\n<p>This simple tutorial shows how to increase or decrease the <b>touchpad 2-finger scrolling speed<\/b> in Ubuntu 22.04, Ubuntu 24.04 with default GNOME on Wayland session.<\/p>\n<p>GNOME, the default desktop for Ubuntu, Fedora, and optional in many other Linux, so far lacks option to configure the mouse\/touchpad scroll speed.<\/p>\n<p>For Ubuntu 20.04, Ubuntu 18.04, and other Linux with GNOME on classic Xorg, there&#8217;s a command line tool imwheel available to do the job. And, here&#8217;s a <a href=\"https:\/\/fostips.com\/mouse-wheel-touchpad-scroll-speed-ubuntu\/\" target=\"_blank\" rel=\"noopener\">step by step guide<\/a> show you how.<\/p>\n<p>For Ubuntu 22.04 and higher and other Linux with GNOME Wayland, this tutorial may help by settings virtual touchpad size.<\/p>\n<p><b>IMPORTANT: This tutorial is tested and works in Ubuntu 24.04 &amp; 22.04 on my old HP &amp; ASUS laptop. However, some users report it does NOT work. Don&#8217;t do it on production machine!<\/b><\/p>\n<h3>Step 1: Measure &amp; Set virtual touchpad size<\/h3>\n<p>1. First, open terminal either by pressing Ctrl+Alt+T on keyboard, or by searching from &#8216;Activities&#8217; overview screen.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/terminal-jammy.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-38555\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/terminal-jammy.png\" alt=\"\" width=\"522\" height=\"299\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/terminal-jammy.png 522w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/terminal-jammy-300x172.png 300w\" sizes=\"auto, (max-width: 522px) 100vw, 522px\" \/><\/a><\/p>\n<p>2. When terminal opens, run command to install &#8216;libinput-tools&#8217; package in case you don&#8217;t have it:<\/p>\n<pre>sudo apt install libinput-tools<\/pre>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/05\/apt-libinputtools.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-43959\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/05\/apt-libinputtools-600x211.webp\" alt=\"\" width=\"600\" height=\"211\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/05\/apt-libinputtools-600x211.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/05\/apt-libinputtools-300x105.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/05\/apt-libinputtools-768x270.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/05\/apt-libinputtools.webp 783w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>3. Next, run command to tell your touchpad size (width and height in mm):<\/p>\n<pre>sudo libinput measure touchpad-size 100x100<\/pre>\n<p>As the screenshot shows, may laptop has touchpad with <strong>114.6 mm<\/strong> width and <strong>48.4 mm<\/strong> height. Once you got the value, press <strong>Ctrl+C<\/strong> to exit.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/05\/get-touchpad-size.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-43960\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/05\/get-touchpad-size-600x311.webp\" alt=\"\" width=\"600\" height=\"311\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/05\/get-touchpad-size-600x311.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/05\/get-touchpad-size-300x156.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/05\/get-touchpad-size-768x398.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/05\/get-touchpad-size.webp 777w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>4. Finally, re-run the command in step 3, but with different args. For example, <b>use 172&#215;73 for 1.5x scroll speed<\/b> (Here 172 \u2248 114.6 x 1.5, and 73 \u2248 48.4 x 1.5), run command:<\/p>\n<pre>sudo libinput measure touchpad-size 172x73<\/pre>\n<p>Or <strong>use 92&#215;39 for 0.8x scroll-speed<\/strong> (92 \u2248 114.6 x 0.8, 39 \u2248 48.4 x 0.8):<\/p>\n<pre>sudo libinput measure touchpad-size 92x39<\/pre>\n<p><b>NOTE: You have to change the &#8220;width x height&#8221; number in command. Depends on your need to either increase or decrease scroll-speed, calculate them according the original size of your touchpad!!<\/b><\/p>\n<p>Once you hit run the command, <u>follow the terminal output to &#8220;<i>Move one finger along all edges of the touchpad until the detected axis range stops changing.<\/i>&#8220;<\/u>\u00a0 You&#8217;ll see the little &#8216;0&#8217; in the terminal output moves correspondingly when you moving finger on touchpad.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/05\/set-touchpad-size.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-43961\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/05\/set-touchpad-size-600x320.webp\" alt=\"\" width=\"600\" height=\"320\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/05\/set-touchpad-size-600x320.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/05\/set-touchpad-size-300x160.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/05\/set-touchpad-size-768x409.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/05\/set-touchpad-size.webp 786w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>5. When done, press <b>Ctrl+C<\/b> to stop it. And, you should get similar output as the screenshot shows, if you&#8217;ve done correctly.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/05\/copy-output.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-43962\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/05\/copy-output-600x407.webp\" alt=\"\" width=\"600\" height=\"407\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/05\/copy-output-600x407.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/05\/copy-output-300x203.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/05\/copy-output-768x521.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/05\/copy-output.webp 786w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>And, <b>you need to copy the lines between the 2 &#8220;-8&lt;&#8212;&#8212;&#8212;&#8212;&#8211;&#8221; lines (in my case, the section with white background).<\/b><\/p>\n<h3>Step 2: Apply Changes<\/h3>\n<p>1. Now, open terminal (Ctrl+Alt+T) and run command to edit the config file:<\/p>\n<pre>sudo gedit \/etc\/udev\/hwdb.d\/61-evdev-local.hwdb<\/pre>\n<p><i>Replace <code>gedit<\/code> in command with <code>gnome-text-editor<\/code> for Ubuntu 24.04 and Fedora, or use <code>nano<\/code> instead that works in all desktops.<\/i><\/p>\n<p>When file opens, paste the lines you just copied in &#8216;Step 1&#8217; and save it.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/05\/touchpad-size-config.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-43964\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/05\/touchpad-size-config-600x250.webp\" alt=\"\" width=\"600\" height=\"250\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/05\/touchpad-size-config-600x250.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/05\/touchpad-size-config-300x125.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/05\/touchpad-size-config-768x320.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/05\/touchpad-size-config-1536x641.webp 1536w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/05\/touchpad-size-config-1320x551.webp 1320w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/05\/touchpad-size-config.webp 1572w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>2. Finally, update hardware database by running command:<\/p>\n<pre>sudo systemd-hwdb update<\/pre>\n<p>And, reload udev rules by running command:<\/p>\n<pre>sudo udevadm trigger \/dev\/input\/event*<\/pre>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/05\/update-udev.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-43965\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/05\/update-udev-600x158.webp\" alt=\"\" width=\"600\" height=\"158\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/05\/update-udev-600x158.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/05\/update-udev-300x79.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/05\/update-udev-768x202.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/05\/update-udev.webp 779w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>When everything&#8217;s done. <b>Restart your computer<\/b> to see the effect!<\/p>\n<p>As the steps above also increase or decrease the cursor movement speed, you may also need to open &#8220;<b>Settings -&gt; Mouse &amp; Touchpad<\/b>&#8221; and adjust &#8216;Touchpad Speed&#8217; slider-bar.<\/p>\n<h3>UPDATE for Firefox<\/h3>\n<p>Thanks for @Ellem, if you found the tutorial works for your Ubuntu desktop but NOT for Firefox, then open <b>about:config<\/b> page in your Firefox web browser, and try to<\/p>\n<ul>\n<li>set <code>mousewheel.system_scroll_override.enabled<\/code> to false.<\/li>\n<li>and set <code>apz.gtk.kinetic_scroll.enabled<\/code> to false.<\/li>\n<\/ul>\n<p>Finally, relaunch web browser to apply.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/05\/firefox-mousescroll.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-50015\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/05\/firefox-mousescroll-700x386.webp\" alt=\"\" width=\"610\" height=\"336\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/05\/firefox-mousescroll-700x386.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/05\/firefox-mousescroll-300x166.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/05\/firefox-mousescroll-768x424.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/05\/firefox-mousescroll.webp 1292w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/a><\/p>\n<h3>How to Restore<\/h3>\n<p>To undo the changes you made via the previous steps, first open terminal (Ctrl+Alt+T) and run command to delete the config file:<\/p>\n<pre>sudo rm \/etc\/udev\/hwdb.d\/61-evdev-local.hwdb<\/pre>\n<p>Then update database and reload udev rules by running 2 commands one by one:<\/p>\n<pre>sudo systemd-hwdb update<\/pre>\n<pre>sudo udevadm trigger \/dev\/input\/event*<\/pre>\n<p>Finally, restart your computer and done.<\/p>\n<p style=\"text-align: right;\">via: <a href=\"https:\/\/www.reddit.com\/r\/linux\/comments\/131ywww\/how_to_adjust_trackpadtouchpad_scroll_speed_two\/\" target=\"_blank\" rel=\"noopener\">reddit thread<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":40004,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[1389],"class_list":["post-43958","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","tag-touchpad"],"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/43958","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/comments?post=43958"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/43958\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media\/40004"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=43958"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=43958"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=43958"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}