22

I have Manjaro Linux in VirtualBox, and in some applications such as the terminal the mouse wheel seems not to register many of the scroll ticks. Sometimes it scrolls fine, then suddenly it scrolls only half as much or stops scrolling at all. In other applications such as Firefox, the scroll wheel always works.

After some experimentation I found that I can't scroll at all while I'm moving the mouse pointer. Yet, when I hold the pointer perfectly still, scrolling works as expected.

There are some related questions on this site, but none have this specific issue caused by moving the mouse pointer while scrolling in Linux.

5 Answers5

19

I found this post on the VirtualBox forums in a thread that exactly describes my problem. It seems to be unrelated to VirtualBox, as VMWare shows the same behavior.

The solution that worked for me:

  1. Check that you're currently using libinput.

    $ grep "Using input" /var/log/Xorg.0.log
    [     0.000] (II) Using input driver 'libinput' for 'Power Button'
    [     0.001] (II) Using input driver 'libinput' for 'Sleep Button'
    [     0.002] (II) Using input driver 'libinput' for 'Video Bus'
    [     0.003] (II) Using input driver 'libinput' for 'VirtualBox mouse integration'
    [     0.004] (II) Using input driver 'libinput' for 'VirtualBox USB Tablet'
    [     0.005] (II) Using input driver 'libinput' for 'AT Translated Set 2 keyboard'
    [     0.006] (II) Using input driver 'libinput' for 'ImExPS/2 Generic Explorer Mouse'
    [     0.007] (II) Using input driver 'libinput' for 'VirtualBox USB Tablet'
    
  2. Install the evdev input drivers.
    On Manjaro this is found in the xf86-input-evdev package, which was already installed.

  3. Enable the evdev drivers by modifying the X11 configuration.
    In the directory /usr/share/X11/xorg.conf.d/ I already had a file 10-evdev.conf with the evdev configuration. It was just overridden by the higher-priority 40-libinput.conf configuration. So all I had to do was:

    cd /usr/share/X11/xorg.conf.d/
    sudo mv 10-evdev.conf 80-evdev.conf
    
  4. Restart.

  5. Verify that the evdev drivers are now used instead:

    $ grep "Using input" /var/log/Xorg.0.log
    [     0.000] (II) Using input driver 'evdev' for 'Power Button'
    [     0.001] (II) Using input driver 'evdev' for 'Sleep Button'
    [     0.002] (II) Using input driver 'evdev' for 'Video Bus'
    [     0.003] (II) Using input driver 'evdev' for 'VirtualBox mouse integration'
    [     0.004] (II) Using input driver 'evdev' for 'VirtualBox USB Tablet'
    [     0.005] (II) Using input driver 'evdev' for 'AT Translated Set 2 keyboard'
    [     0.006] (II) Using input driver 'evdev' for 'ImExPS/2 Generic Explorer Mouse'
    [     0.007] (II) Using input driver 'evdev' for 'VirtualBox USB Tablet'
    

    This however didn't yet fix my problem. Apparently I needed imwheel too.

  6. Install imwheel. On Arch, I had to install the imwheel AUR package.
  7. Run imwheel to verify that this fixes the issue.

    $ imwheel
    
  8. All that remained was to make imwheel run at startup. I run this command, as it only intercepts the scroll wheel:

    imwheel -b 45
    

This fixed the issues! Scrolling is now working correctly in all applications.

1

Had the same issue running "Mint 19.3 XFCE" on "VBox 6.0.18" (Host: Windows 10 Professional).

All I did to fix it was go to Settings / "Mouse and Touchpad" and in Devices turn off "VirtualBox mouse integration".

I have not yet noticed any side effects of my now less integrated mouse, except that it scrolls perfectly.

vssher
  • 928
luebbe
  • 11
1

Daniel Pelsmaeker's answer was exactly what I needed! I'm running Ubuntu Budgie 19.10 on VirtualBox 6.15 on a Windows 10 host.

For users using Ubuntu instead of Manjaro, xserver-xorg-input-evdev is the package you'll want. To install it, run the following command:

sudo apt install xserver-xorg-input-evdev

Milan M
  • 11
1

After banging my head against a wall for months with this I finally used imwheel. I have tried all the above to include uninstalling/reinstalling guest additions and changes to Virtualbox mouse settings, etc.

sudo apt install imwheel

fixed.

Worked for me on Ubuntu 22.04

rune711
  • 111
  • 1
0

Same problem on Debian 11 (bullseye) with Xfce 4.16 and VirtualBox 6.1.40.

  1. I have installed the evdev drivers.
apt install xserver-xorg-input-evdev
  1. I moved the 40-evdev.conf file.
cd /usr/share/X11/xorg.conf.d
mv 40-evdev.conf 80-evdev.conf
  1. In "Settings" -> "Mouse and Touchpad" -> "Devices" turn off "VirtualBox mouse integration".

Show this image to turn off virtualbox mouse integration