Scrolling Breaks In Virtualized Ubuntu During Mouse Movement Fix

Being a multi-discipline engineer can be challenging at times. Perhaps most challenging when it comes to running all of the preferred environments for mechanical CAD, electrical CAD, and firmware development. I like to run bare metal Windows on my desktops so I can run SolidWorks with good performance but I have also standardized on using Ubuntu for EE and firmware development. To do this, I use a VM with VMware workstation player to avoid having multiple computers.

One of the most annoying issues came up when I initially set up this environment. The issue was that the scrolling behavior stopped any time the mouse cursor was moving. This might not seem like much, but it is extremely difficult to interact with the VM proficiently with this issue. Although a few others had shared their frustrations on various forums, there were no solutions provided. After spending a few hours breaking down the issue, I came up with a solution which I will explain in detail and provide step-by-step instructions to reproduce.

My setup:

  • Windows 10 Pro running bare metal
  • VMware Workstation 17 Player
  • Ubuntu 22.04 LTS running in VMware Workstation


Step-by-step fixes:

  1. Install evdev with:  
sudo apt-get install xserver-xorg-input-evdev-dev

2. Next, update xorg config to use evdev for the pointer:

cd /usr/share/X11/xorg.conf.d/
sudo vim 40-libinput.conf

Change the following:

Section "InputClass"
        Identifier "libinput pointer catchall"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

To:

Section "InputClass"
        Identifier "libinput pointer catchall"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
EndSection

3. Install imwheel with:

sudo apt install imwheel

4. Start imwheel with the following command to only intercept scroll wheel:

imwheel -b "4 5"

5. Now, test it out! The scrolling issue should be resolved in any window with a scroll bar.

6. The final step is to add the command to start imwheel so it will be called conveniently when the system starts. If you want to have it start automatically on boot, you could make a systemd service to call the following in a small script. For my purposes, I just included the following in the .bashrc file so it would run upon launching a terminal:

# Start imwheel for scrolling fix and silence output:
imwheel -b "4 5" > /dev/null 2>&1

That's it, no more super annoying scroll-blocking behavior!