19

Is there a way to change how quickly (or how far) a laptop touchpad scrolls?

This question is specific to 22.04 (Jammy Jellyfish). Although there are many similar questions, none asks specifically about 22.04. The answers for 22.04 will likely differ from past answers because 22.04 (I think) uses Wayland instead of X.org (whatever that means).

Related questions:

  • 2
    Did you solve this? Cannot believe that in 2022 (well, 2023 already) we cannot just adjust the scroll speed... – user171780 Jan 02 '23 at 14:28
  • Please do not leave your question as it is. If one of the answers works for you, check that as the accepted answer, if not, leave a comment there and say why. – S.B Jan 18 '23 at 19:39
  • I stopped using Ubuntu (partially because of this issue) long before most of these answers showed up. I will eventually reinstall Ubuntu just to test these answers, but probably not soon. – Randy Cragun May 25 '23 at 19:59

7 Answers7

7

Background

Ubuntu 22.04 is using wayland display server. Apps either use wayland natively , or via an X / xorg compatibility layer. (Xwayland). See also How can I tell if an application is using XWayland

On my box, most apps are native wayland, but firefox by default is using Xwayland.

Input event handling

I believe input events are handled by libinput. If I run the tool libinput debug-events from libinput-tools package, it shows events for two finger scroll. The docs describe how to configure input devices for wayland apps and xorg apps.

xinput does not anymore seem the right tool to configure input devices. See warning in man page. If at all, it can only configure apps using the Xwayland compatibility layer.

Change two finger scroll speed for native wayland apps

For wayland apps the libinput FAQ is stating:

Use the configuration tool provided by your desktop environment (e.g. gnome-control-center)

Since the ubuntu settings are currently not provide an option to configure two finger scroll speed, I believe it is currently not possible to do this.

Improve scroll speed for firefox

You can make firefox to use native wayland instead of Xwayland and for me it is improving the scroll speed ( slowing it down ). How to do it:

  1. Enter sudo gedit /etc/environment
  2. Add one line at the end of the file, containing this string: MOZ_ENABLE_WAYLAND=1
  3. Reboot system

Source: https://ubuntuhandbook.org/index.php/2022/09/enable-wayland-firefox-chrome/

Hope this helps

Michael S
  • 186
  • 1
  • 4
  • Once you have mentioned Firefox specifically, it also has an internal parameter that also influences scroll speed: https://askubuntu.com/q/1447009/1157519 – Levente Jan 23 '24 at 17:59
6

Try the steps below:

  1. Run:

    sudo xinput list
    

    and find the ID for the touchpad ('id of touchpad') of your computer.

  2. Next run:

    xinput list-props 'id of touchpad'
    

    The output will be something like:

    Synaptics Scrolling Distance (351):  -88, 88
    

    As you can see it takes two values. Mine are -88 and 88.

  3. Now try running:

    xinput set-prop 12 "Synaptics Scrolling Distance" -300 300
    

    -300 and 300 worked for me to have a smooth scrolling feeling but try your own values.

  • My device name is Virtual core pointer or xwayland-pointer, and the prop is maybe Device Accel Velocity Scaling, but setting that prop or any other does not have any effect. ( I have Ubuntu on a Macbook ) – Michael S Jan 11 '23 at 07:09
  • I do not have any sort of scrolling distance property on any of the devices listed. – Randy Cragun Jun 08 '23 at 19:22
  • 1
    Thanks for the in-depth step-by-step. In my case, xinput set-prop 13 "libinput Scrolling Pixel Distance" 50 worked as suggested by the other answer, as I didn't have any 'Synaptics'. – Joshua T Dec 11 '23 at 18:37
4

The command below will solve the problem of overscrolling:

 xinput set-prop 13 "libinput Scrolling Pixel Distance" 50

where 13 is device id and 50 is the value. The default value was 15. The more the value, the slower the scroll.

Use this command to look at whether the property is getting changed or not, and please play with other values to get a better touchpad feel:

xinput --watch-props 13
vsp
  • 41
1

In my case i had to change my device id according to the value that i found using:

sudo xinput list

Then i could replace the ID in accordance to my specific laptop:

xinput set-prop 17 "libinput Scrolling Pixel Distance" 50

Thanks for your help!

Swift
  • 11
  • For me, it doesn't work: property 'libinput Scrolling Pixel Distance' doesn't exist, you need to specify its type and format. Any idea how to solve this? – szx Nov 06 '22 at 08:43
  • “change my device id according to the value that i found using” is not clear to me. How did you change the ID? Why? – Randy Cragun Jun 19 '23 at 19:15
1

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

this tool worked for me today: "libinput-config allows you to configure your inputs in case your Wayland compositor doesn't have a certain config or has none."

"How it works

The library wraps around libinput and hacks into the event loop to read the config and configure devices. Additional hackery is used to configure scrolling sensitivity and pointer speed. To do all of this, it uses the /etc/ld.so.preload file, which is modified by the install script. If non-GNU libc support is enabled, an LD_PRELOAD fallback is used instead."

Chris
  • 11
  • 1
    This is the best answer for Wayland/Gnome until they add a config panel that works. Unfortunately, it requires compiling and replacing default libinput, but it works well if you're willing and able. – Duane J Jul 19 '23 at 02:32
0

for me using xinput worked as well. xinput list then xinput list-props <name of touchpad device> and finally xinput set-prop <device name> <property id> <value>

For reference my commands looks like xinput set-prop "ASUE140D:00 04F3:31B9 Touchpad" 346 50

Then add this as a startup command (on Mint there's an app that lets you set up commands on startup but idk how to do it on ubuntu or other distros)

I should add that you should use the full name of the device instead of its id because afaik ids can change when you plug in new devices. The prop id is ok to use (346 for me) because it wont change.

-1

As far as I know, nothing has changed as the input is related to libinput, which has already been used in older versions.

The issue seems to have been finally mitigated (not fixed, but now it should be much better) https://gitlab.gnome.org/GNOME/gtk/-/issues/3631

However I doubt that change is included in 22.04 (I don't even think it is in Gnome 42)

  • 2
    how does that answer help fixing the issue? I see it makes clarifications but if that's the only thing it should be a comment. – ZenVentzi Aug 29 '22 at 14:21