Clicking the middle button does't allow me scroll the page. Is there any way to fix this behavior?

Information:

  1. Ubuntu 10.10
  2. Chromium 9.0.597.94
  3. Logitech MX518

Update: also Chrome, and the other Chromium based ones.

up vote 52 down vote accepted

In Linux based/Mac systems, Google Chrome / Chromium hasn't got this feature. You have to get AutoScroll extension. Here it is: AutoScroll AutoScroll

  • 2
    Great tip - worked for me. – Mark Rooney Feb 26 '11 at 10:14
  • 10
    It's a real shame they don't have this in by default. – Jeggy Aug 14 '12 at 21:30
  • How do you control the speed? – Raffi Khatchadourian Mar 30 '15 at 14:27
  • Isn't it in settings? – antivirtel Mar 30 '15 at 14:29
  • Good answer, but why are you asking me to click on an image, and not just provide a regular link? – mwfearnley May 21 '16 at 12:47

This will work with all your applications without the need of installing anything.

Get your input deviceID

xinput list

In my case with a Logitech M315/M235 was 11.

To list available properties use xinput list-props <deviceID>. If you are using libinput (the future/present) almost all properties will start with libinput.

With libinput

Since 17.04 Ubuntu uses libinput, so to set mouse properties:

xinput set-prop 11 "libinput Scroll Method Enabled" 0, 0, 1  # This is button
xinput set-prop 11 "libinput Button Scrolling Button" 2  # This is middle mouse. Already 2 by default

Description from man libinput:

  • libinput Scroll Method Enabled 3 boolean values (8 bit, 0 or 1), in order "two-finger", "edge", "button". Indicates which scroll method is currently enabled n this device.
  • libinput Button Scrolling Button 1 32-bit value. Sets the button number to use for button scrolling. This setting is independent of the scroll method, to nable button scrolling the method must be set to button-scrolling and a valid button must be set.

With evdev

xinput --set-prop 11 'Evdev Wheel Emulation' 1
xinput --set-prop 11 'Evdev Wheel Emulation Button' 2
xinput --set-prop 11 'Evdev Wheel Emulation Axes' 6 7 4 5

  • You can add this to a bash script and run it at login.
  • Like wheel, with the same movement while pressing Ctrl will zoom in/out page. Ctrl+0 to reset.
  • Ubuntu 18.04 use X by default. With Wayland may be another story.
  • Maybe better than Firefox Autoscrolling, more easy to control.
  • Doesn't work for me on Ubuntu 16.04; running the first of the proposed evdev commands gives me "property 'Evdev Wheel Emulation' doesn't exist, you need to specify its type and format" – Mark Amery Feb 3 at 17:36
  • @markAmery I'm using Ubuntu 16.04 too. Probably you are using libinput. List device properties. Don't forget upvote if it help you. – Pablo Bianchi Feb 3 at 18:17
  • 2
    This is the best answer and should be accepted. – jtolds Mar 10 at 19:00
  • evdev worked like a charm. Just to note my mouse device was numbered 10 not 11. – piepi Mar 12 at 11:45
  • @piepi I edit my answer to be more clear, 11 was just in my case. Don't forget to upvote if you found it useful. – Pablo Bianchi Mar 12 at 18:09

I use ubuntu. I recommend another couple of addons, that allows "Scroll a page as if a scrollbar is under your mouse." I found that give us more control over the scroll move.

With both addons you just click and hold secondary button pressed to scroll pages moving the mouse up and down and even horizontally.

  • Extensions named as "Scrollbar Anywhere" is working better then "AutoScroll", because it doesn't blocking mouseDown js-event on website'spages if it needn't. – faiwer Jan 20 '17 at 8:58

I have Ubuntu 14.04 and mouse wheel stopped working on one of my Chrome instances. I followed the tip here and it works great. When I go into the page about::flags, the "Smooth Scrolling" option was enabled. I disabled it and it works.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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