6

Mouse scroll performance is poor in Linux and there is no built-in method to control the same. Hence, I did some digging and came across IMWheel. I followed this tutorial How to Adjust or Increase Mouse Scroll Wheel Speed in Linux and set my mouse scroll speed to 5.

This seemed to fix my physical mouse scroll speed. However, scrolling using the touchpad of my laptop is anything but perfect. The page seems to behave erratically and jumps every time a certain amount of page is scrolled and is very unpleasant. On disabling IMWheel, the touchpad behavior seems to return back to normal.

Is there any method to have a decent scroll speed for physical mouse and yet keep the existing scrolling experience for the touchpad in Linux? Like it is there in Windows? If there is, please guide me on how to fix this issue.

This problem literally keeps me from using Linux at all!

Given below are my current mouse and touchpad settings:

Current Mouse settings: Current Mouse Settings

Current Touchpad settings: Current Touchpad Settings

Hardware and Software Details:

  • OS: Linux Mint Cinnamon 19.1
  • Laptop: HP AB032TX (Dual Boot: Windows 10 & Linux Mint)
  • Software in question: IMWheel
  • Touchpad Driver: Synaptics (Default drivers that came with Mint)
  • Physical Mouse: Logitech normal optical mouse
2
  • Did you ever figure this out? I'm having the same issue. The support for scrolling in Ubuntu is abysmal. – Anthony May 25 '20 at 15:10
  • Unfortunately this is still an open issue. I manually enable and disable imwheel while switching between a mouse and a touchpad. – Animikh_Aich May 26 '20 at 16:49
0

We can do the following to start imwheel when the mouse is plugged in, and stopped when the mouse is unplugged.

I'm on Fedora 33, but a similar solution should work on other distributions.

This method is assuming you have an imwheel service running on your machine.

$HOME/xinputwatcher.sh (remember to chmod +x this file)

#!/bin/bash
while true
do
  if [[ $(xinput list --name-only | grep 'Logitech USB-PS/2 Optical Mouse') ]];
  then
    if [[ $(systemctl --user is-active imwheel) == inactive ]];
    then
      systemctl --user start --now imwheel
      echo "starting imwheel"
    else
      echo "imwheel already running"
    fi
  else
    if [[ $(systemctl --user is-active imwheel) == active ]];
    then
      systemctl --user stop --now imwheel
      echo "stopping imwheel"
    else
      echo "imwheel already stopped"
    fi
  fi
  sleep 3
done
  • Note, you should replace 'Logical .. Mouse' string with whatever your mouse name is (type xinput to get the list of devices).
  • If you have multiple mice, then you want to add an elseif block.
  • Note the sleep command; if we unplug the mouse it should take effect within 3 seconds.
  • Go ahead and test this script by running ./xinputwatcher.sh. It should start imwheel when you plug in your mouse in, and stop imwheel when you unplug it.

Now create the service that runs that script automatically at system start.

$HOME/.config/systemd/user/xinputwatcher.service

[Unit]
Description=xinputwatcher

[Service]
Type=simple
ExecStart=$HOME/xinputwatcher.sh
KillMode=process

[Install]
WantedBy=graphical-session.target

Finally, enable the service so it starts automatically on reboot.

systemctl --user daemon-reload
systemctl --user enable xinputwatcher.sh
0

Ok so what I did to resolve this same issue in ubuntu 20.10 is by setting keyboard shortcuts in ubuntu. Using gnome's custom keyboard shortcuts you can run any command through it. So to start imwheel you type

imwheel

and to stop imwheel you type

killall imwheel

thats it now you can run these commands by assigning keyboard shortcuts like this enter image description here

I have used F1 to start and F2 to stop imwheel you can choose your own! Hope it helps!

1
  • I know how to kill it. But I am not looking for that. – Animikh_Aich Apr 15 at 18:41

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.