I've recently switched to Ubuntu, and the one thing that has been bothering me is the scroll speed, which I can't seem to change. In windows I used to have it set around 7 lines, but it seem to be around 3 on Ubuntu, and unchangeable. How can I change the speed?


12 Answers 12


If it's only for web, you can change the scroll speed in FireFox:

  • Edit menu > Preferences > Advanced tab > Browsing group: disable smooth scrolling


  • Type enter about:config in the address bar
  • Find and change mousewheel.withnokey.sysnumlines to FALSE
  • Then change the mousewheel.withnokey.numlines from 1 to whatever you want.

  • For Firefox versions 73.3.1 and later: - change the mousewheel.min_line_scroll_amount from 1 to whatever you want.

And a more general, system-wide solution:

  • 6
    Just unplug and plug again the mouse connector. It worked for me. May 10, 2012 at 19:34
  • mousewheel.withnokey does not exist in FF v72 Jan 27, 2020 at 10:20
  • in FF v97 it's now mousewheel.min_line_scroll_amount and mousewheel.system_scroll_override.enabled but I found those didn't work (i'm on KDE). What did work was @joeytwiddle s answer Mar 5 at 16:39
  • My answer is from 2011, I'd be really surprised if it still worked more than 10 years later, specially in something as fast-moving as browser settings
    – MestreLion
    Mar 11 at 16:16

Just unplug the mouse (mine was wireless), and then plug it back in to fix this issue.

I was searching for a long time for this fix and even rebooted the machine to no avail.

Maybe a full shutdown would have fixed the issue.

  • 4
    Wow, this worked for me too with a Microsoft Wireless mouse that was scrolling far too fast. I unplugged the bluetooth dongle and re-plugged it and scrolling became perfect. Amazing that the fix was this simple.
    – Gerry
    Nov 24, 2012 at 8:46
  • Found the perfect solution. No more unplug and plug. Use resetmsmice, and the Ubuntu package
    – Ted Feng
    Sep 30, 2015 at 2:02

For Ubuntu 12.10 I found that it it a little different for the Firefox work around.

Open about:config (type it into the address bar) and search for:


Then change the number associated with it. Mine was set to 5. I changed it to 60 and it works how I want it now.

  • 1
    Thanks! I found that option myself but didn't try that high a number, just something like 10. But together with smooth scrolling it seems that much higher numbers are in order to reach barely sufficient scroll speeds. Currently got mine set to 100.
    – nem75
    Jan 11, 2013 at 12:40

In Firefox 19, run about:config in the address bar, then modify the parameter mousewheel.min_line_scroll_amount to something higher (50). You don't have to restart FF.


This tutorial worked for me:

  1. Open a terminal and run: sudo apt-get install imwheel
  2. gedit ~/.imwheelrc
  3. Paste this, save, and close gedit:

    None,      Up,   Button4, 3
    None,      Down, Button5, 3
    Control_L, Up,   Control_L|Button4
    Control_L, Down, Control_L|Button5
    Shift_L,   Up,   Shift_L|Button4
    Shift_L,   Down, Shift_L|Button5
  4. imwheel --kill --buttons "4 5"

  5. Add the previous line to ~/.bashrc or your session autostart manager.

  • While this does work - on a laptop, when I sometimes use a mouse, and sometimes the trackpad, this causes some buggy behaviour with the trackpad.
    – Novocaine
    Apr 21, 2021 at 10:08

I have Firefox 42.0 here, and I use a touchpad to scroll.

I found if I wanted to adjust the distance scrolled, I could change:


in about:config. Its default value was 100. A larger value would scroll further/faster.


Chromium Wheel Smooth Scroller

In Chrome, this is The Soluttion: https://chrome.google.com/webstore/detail/chromium-wheel-smooth-scr/khpcanbeojalbkpgpmjpdkjnkfcgfkhb

Just brilliant!


If you use two fingers on a touchpad to scroll, you can use synclient to adjust the sensitivity for the whole system.

If you don't have it installed:

sudo apt-get install xserver-xorg-input-synaptics

To see the current sensitivity threshold, check the output of:

synclient -l | grep ScrollDelta

To make it more sensitive, reduce the value:

synclient VertScrollDelta=33

This means you need to move your finger less to send each scroll event.

If you want to reverse the scroll direction, like Mac OS X's "natural scrolling", set a negative value.

But note that this will not let you configure the minimum distance scrolled when you move your fingers only a little bit. That must be configured per-app (or possibly per-desktop environment).

  • only on Synaptic devices - does not apply to ALPS or indeed any other touchpad manufactuter.
    – Wyatt Ward
    Feb 2, 2016 at 20:48

Even if the unplug/plug trick does fix the issue this is not a really good solution

One solution I found is to add

xinput set-prop 10 'Evdev Scrolling Distance' 10 10 10

at the end of my .profile file (or wherever it gets executed once per graphical login)

In the case of my Microsoft mouse the default values were 1 1 1 which are way too sensitive.

10 10 10 are right for me.

I didn't take the time to see what each number actually means

  • 1
    the number immediately following set-prop is the device ID (I believe.) You can check this with xinput list. You'll see your device IDs listed in order. Get the available properties with xinput list-props [id]
    – emf
    Dec 20, 2018 at 18:13
  • Here's what the Evdev params mean: unix.stackexchange.com/a/442666
    – Sam
    Jul 1, 2019 at 10:12

For those, who prefer to fix it Linux Desktop Way.

Wrote exhaustive instruction on how to add Scroll Ratio through libinput sources:


For those, who hates github (gitlab funs?), duplicated here (works for any mouse):

find libinput files

sudo updatedb
ll $(locate -A libinput.so)

most likely Canonical delivers their libinput libs with snaps

sudo snap list
sudo snap remove gnome-3-28-1804

check, that libinput lefts only in system folder, like : /usr/lib/x86_64-linux-gnu/libinput.so /usr/lib/x86_64-linux-gnu/libinput.so.10 /usr/lib/x86_64-linux-gnu/libinput.so.10.13.0

ll $(locate -A libinput.so)

clone libinput source

git clone https://gitlab.freedesktop.org/libinput/libinput
cd libinput

modify src/evdev.c. Find evdev_read_wheel_click_props function and init angles.y = 361;

static inline struct wheel_angle
evdev_read_wheel_click_props(struct evdev_device *device)
    struct wheel_angle angles;
    const char *wheel_count = "MOUSE_WHEEL_CLICK_COUNT";
    const char *wheel_angle = "MOUSE_WHEEL_CLICK_ANGLE";
    const char *hwheel_count = "MOUSE_WHEEL_CLICK_COUNT_HORIZONTAL";
    const char *hwheel_angle = "MOUSE_WHEEL_CLICK_ANGLE_HORIZONTAL";

    /* CLICK_COUNT overrides CLICK_ANGLE */
    if (evdev_read_wheel_click_count_prop(device, wheel_count, &angles.y) ||
        evdev_read_wheel_click_prop(device, wheel_angle, &angles.y)) {
                "wheel: vert click angle: %.2f\n", angles.y);
    if (evdev_read_wheel_click_count_prop(device, hwheel_count, &angles.x) ||
        evdev_read_wheel_click_prop(device, hwheel_angle, &angles.x)) {
                "wheel: horizontal click angle: %.2f\n", angles.y);
    } else {
        angles.x = angles.y;
    // since, src/util-prop-parsers.c : abs(angle) > 360
    angles.y = 361;

    return angles;

modify src/libinput.c. Find libinput_event_pointer_get_axis_value_discrete function and apply scroll ratio as you wish:

libinput_event_pointer_get_axis_value_discrete(struct libinput_event_pointer *event,
                           enum libinput_pointer_axis axis)
    struct libinput *libinput = event->base.device->seat->libinput;
    double value = 0;


    if (!libinput_event_pointer_has_axis(event, axis)) {
        log_bug_client(libinput, "value requested for unset axis\n");
    } else {
        switch (axis) {
      // x5 ratio for horizontal scrolling
            value = event->discrete.x * 5;
      // x5 ratio for vertical scrolling
            value = event->discrete.y * 5;
    return value;

Prepare build directory (dependencies installation required):

meson --prefix=/usr builddir/ -Ddocumentation=false

Compile and install:

ninja -C builddir/ && sudo ninja -C builddir/ install

Verify location:

sudo updatedb
ll $(locate -A libinput.so)

Logout / Login , use.


For Ubuntu 20.04 LTS I have made good experience with mousewheel.system_scroll_override_on_root_content.enabled set to true. This keeps the mousewheel.min_line_scroll_amount intact, which is good for precision. You can additionally set the scroll factor higher: mousewheel.system_scroll_override_on_root_content.vertical.factor (default. 200).

Firefox 80 / about:config

  1. Set mousewheel.system_scroll_override_on_root_content.enabled to true
  2. (optionally) Increase mousewheel.system_scroll_override_on_root_content.vertical.factor (default. 200)

I also wanted to increase the mouse scroll wheel acceleration, and not just the absolute speed. This is a feature in MacOSX but not builtin for Xorg (also Wayland) yet.

I implemented such a feature in user space here (mouse-scroll-wheel-acceleration-userspace). This will increase the scroll speed, or accelerate the scroll speed. You would just run this in the background, with your preferred options. The code is quite simple Python code, and should be easy to modify as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.