Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

As the title says, I want to increase the number of rows that are passed when I use the mouse wheel for scrolling. I know that there exists ways to do that for Firefox and Chromium, although I want something for the entire system, mainly because of the PDF reader.

I am on a Desktop and use a Microsoft Wireless Mouse 5000.

share|improve this question
One would think that this should be possible from the Mouse & Touchpad system configuration. Too bad, we still need 3rd party software (for now). – Domi Oct 20 '14 at 17:48
up vote 33 down vote accepted


With the currently used input driver system it is not possible to change the scroll speed of your mouse, at least not without drawbacks. You are able to adjust the scroll speed for Qt-Applications using a KDE Settings but the only current way to change the scrolling in a generic fashion is by using imwheel which seems to be problematic in many ways (see comments). In the future this will be fixed with libinput and the systemd hardware database.

Current Way

Install imwheel with the following command or from the Software Center:

$ sudo apt-get install imwheel

And edit the configfile ~/.imwheelrc with an editor of your choice (e.g. gedit). Fill in the following for increasing the scroll speed for every Command:

None,       Up,     Up,     3
None,       Down,   Down,   3

The 3 is the increase of the scroll. For more specific scroll increases take a look to the manpage

$ man imwheel

or read the README of the project.

You can start it by typing:

$ imwheel

be sure that you don't start the imwheel twice! That's a known bug, but you can stop imwheel with the command:

$ killall imwheel


This tutorial is currently under development. Hints and corrections are welcome, at this time I have not been able to actualy change behavior using this tutorial. So it is work in progress.

libinput seems to be included with Wily Werewolf (15.10) where you need to install the package xserver-xorg-input-libinput. After you installed libinput with

$ sudo apt-get install xserver-xorg-input-libinput

it should be used for every input after you restarted the Xorg (logout would be sufficient). Now that you are using libinput you are able to adjust the settings of your mouse. You can find a full tutorial in the file /lib/udev/hwdb.d/70-mouse.hwdb. Let me cover here only the basics.

The following steps are need to be done as root. Because of that I am friendliy reminding you that everything you do you need to take responibility.

First get the vendor id <vid> and the product id <pid> using lsusb. Here with a MX 518 Logitec Mouse as example. If you have the following line in the output of lsusb.

Bus 005 Device 002: ID 046d:c051 Logitech, Inc. G3 (MX518) Optical Mouse

The <vid> is 046d and the <pid> is c051.

Then create a File that looks like the following with gksudo gedit /etc/udev/hwdb.d/71-mouse.hwdb


For example this file:


So in this file the mouse wheels click angle is set to 30°. To use this setting you need to update the hwdb with the following commands:

udevadm hwdb --update
udevadm trigger /dev/input/event*
share|improve this answer
It worked! Thanks, although the only thing I have to complain is that using imwheel disables the function to change between windows just scrolling the mouse over their icons in the Unity Launcher. – Rodrigo Martins Jun 6 '13 at 13:04
You're welcome. Yesterday I checked your problem, if you only need the increased wheelspeed on your pdf viewer you can replace the ".*" by "Evince" if you're using Evince. Then the Unity-Launcher works as expected. – tvn Jun 7 '13 at 8:30
Can the numbers go lower? My wheel scrolls way too fast. Trying '1' in place of '3' is still too fast. – DarenW Sep 5 '13 at 0:47
@DarenW have you tried numbers like '0.5' ou '0.1' ? – Rodrigo Martins Sep 26 '13 at 16:53
This is a bad, hacky not really working method. In Nautilus the marked files jump 3 lines back or forth instead of actually scrolling. It scrolls when you getting "over the borders" but its like bushing up/down on the keyboard 3 times. Same in sublime text and I guess in a lot of other progs. (Ubuntu 13.10) – redanimalwar Feb 4 '14 at 5:45

// Edit

As this gets some upvotes from time to time: I not use this anymore (out of laziness after reinstalls) and I now think this script the slider and stuff is too much overhead. Just thinking about using something like it again. Also people have pointed out issues with this over time. So as a minimalistic guy I would create the config myself. Its probably a one time thing for most people.

// End Edit

The accepted answer has a config that for whatever reason maps the scrolling to UP and DOWN on the keyboard. Makes no sense to me.

I have found a perfect script that actually maps to the mouse and adds a GUI to set up the mouse speed.

# Version 0.1 Tuesday, 07 May 2013
# Comments and complaints
# GUI for mouse wheel speed using imwheel in Gnome
# imwheel needs to be installed for this script to work
# sudo apt-get install imwheel
# Pretty much hard wired to only use a mouse with
# left, right and wheel in the middle.
# If you have a mouse with complications or special needs,
# use the command xev to find what your wheel does.
### see if imwheel config exists, if not create it ###
if [ ! -f ~/.imwheelrc ]

cat >~/.imwheelrc<<EOF
None,      Up,   Button4, 1
None,      Down, Button5, 1
Control_L, Up,   Control_L|Button4
Control_L, Down, Control_L|Button5
Shift_L,   Up,   Shift_L|Button4
Shift_L,   Down, Shift_L|Button5


CURRENT_VALUE=$(awk -F 'Button4,' '{print $2}' ~/.imwheelrc)

NEW_VALUE=$(zenity --scale --window-icon=info --ok-label=Apply --title="Wheelies" --text "Mouse wheel speed:" --min-value=1 --max-value=100 --value="$CURRENT_VALUE" --step 1)

if [ "$NEW_VALUE" == "" ];
then exit 0

sed -i "s/\($TARGET_KEY *Button4, *\).*/\1$NEW_VALUE/" ~/.imwheelrc # find the string Button4, and write new value.
sed -i "s/\($TARGET_KEY *Button5, *\).*/\1$NEW_VALUE/" ~/.imwheelrc # find the string Button5, and write new value.

cat ~/.imwheelrc
imwheel -kill

There is also a video where it is introduced. I have not even finished watching this because I got it running in no time. The following would install the required packages, download the script and execute it for us:

sudo apt-get install -y imwheel
wget ~/bin/set-mousewheel
chmod +x ~/bin/set-mousewheel

Set the wheel speed on a nice slider and be happy. Later just change with set-mousewheel command.

Not sure if imweel is automatically started after install, else we need to add it to startup applications.

share|improve this answer
Outstanding stuff! The script doesn't work out of the box in Ubuntu 14.04 LTS, but if I take the config directly out of the script and put it into .imwheelrc, it works like a charm. – aroll605 May 26 '14 at 0:29
There seems to be a bug with it in 14.04 LTS. Occasionally, it would stop the wheel from working completely, until I restart the process. Happens only on boot and 'imwheel' is included in the startup applications list. – aroll605 Jun 23 '14 at 17:21
I've had the problem that imwheel kills the back/forward buttons. The fix is to start imwheel with the options imwheel -b "4 5" to restrict it to the scrollwheel:… – jmiserez May 12 at 9:08

To provide a concise answer for Ubuntu 14.04 (combining the answers from @tvm and @redanimalwar with the comment from @aroll605), it seems the best option to actually increase the scroll wheel speed is to install imwheel

$ sudo apt-get install imwheel

then create the file ~/.imwheelrc containing

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

where you should try different values for # in the lines

None,      Up,   Button4, #
None,      Up,   Button5, #

To test the settings use the command

killall imwheel && imwheel

to stop any previous running instances before starting.

As a note, using the ~/.imwheelrc recommended in the accepted answer does not actually increase the scroll wheel speed. Rather, it replaces scrolling with multiple arrow key strokes. This has the disadvantage of not being able to scroll a window until you change focus to it, not the default behavior.

share|improve this answer

My two cents: my Microsoft Sculpt Ergonomic mouse was scrolling about half a page at a time on Ubuntu 15.04 (Lenovo ThinkPad x220), which was really annoying me. I tried various solutions, but ended up having the idea of disconnecting the mouse from the USB port (the wireless dongle thing) and reconnecting it. Voila!..."normal" scrolling speeds ensued :). Hope that helps somebody.

share|improve this answer
I have the same setup and had the same problem and got the same successful results. I'm glad I read this answer before trying the others. Thanks @sammy34 – nic Sep 22 '15 at 0:22
Same here, reconnecting the dongle solved it. Microsoft Wireless Mouse 2000 – Omer Sabic Dec 4 '15 at 8:34
How can this be a solution???? BUT IT WORKED :) thanks :) – Himanshu Bhandari May 15 at 6:53

While the above imwheel suggestions helped a bit, I found that removing the mechanical scroll-clicking mechanism made my mouse wheel much more pleasant to use -- not only removing the click, but making it faster and more precise to control!

And it only took 3 minutes - check out these instructions:

In a nutshell, you're removing this left spring (be careful to get the right spring back in place exactly):

enter image description here

Note: I have a standard, cheap mouse - a Logitech B100, others report success on similar models. Your mileage may vary.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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