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?

| improve this question | | | | |

10 Answers 10


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:

| improve this answer | | | | |
  • 3
    For the whole system. – Kironide Feb 20 '11 at 16:34
  • 5
    Just unplug and plug again the mouse connector. It worked for me. – Airton Sobral May 10 '12 at 19:34
  • 3
    Yes. It did worked for me too. I was using a wireless mouse. First I tried to switch off & on the mouse power, but that didnt help. Then I unplugged the usb adapter, waited for a few seconds and then plugged in again. – user81089 Aug 3 '12 at 16:09
  • 1
    @AirtonSobral That's pretty odd! Worked for me too, except in my case my scrollwheel would jump full page lengths (too fast). Now it's smooth! :) – Web_Designer Aug 2 '13 at 15:55
  • 1
    Is this answer up-to-date? – ahorn Jun 17 '17 at 15:45

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.

| improve this answer | | | | |
  • 2
    This worked for me as well. It's a little annoying that I have to do this on every startup, but oh well, at least it works. – Tamás Szelei Sep 26 '12 at 11:26
  • 2
    A full shutdown didn't work for me but, unplugging and replugging worked! I hope I don't have to do this every restart cycle. – TechplexEngineer Nov 18 '12 at 14:04
  • 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 '12 at 8:46
  • Surely there is no way to fully express my gratitude within a lifetime, so I'll just say THANK YOU, it DOES work. – AndreasT Jun 25 '13 at 20:09
  • Found the perfect solution. No more unplug and plug. Use resetmsmice, and the Ubuntu package – Ted Feng Sep 30 '15 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.

| improve this answer | | | | |
  • 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 '13 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.

| improve this answer | | | | |

Chromium Wheel Smooth Scroller

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

Just brilliant!

| improve this answer | | | | |
  • 2
    I used this to solve my problem, worked well for me. – Zzzach... Sep 27 '15 at 7:20

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.

| improve this answer | | | | |

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

| improve this answer | | | | |
  • only on Synaptic devices - does not apply to ALPS or indeed any other touchpad manufactuter. – Wyatt8740 Feb 2 '16 at 20:48

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.

| improve this answer | | | | |

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

| improve this answer | | | | |
  • 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 '18 at 18:13
  • Here's what the Evdev params mean: unix.stackexchange.com/a/442666 – Sam Jul 1 '19 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.

| improve this answer | | | | |

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.