7

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.

7

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
    You are a hero. I struggled with this for months. Thanks a lot! Can confirm this is working on my XFCE Manjaro as well. That being said, Emacs now doesn't want to scroll: C-M-( and C-M-) is undefined, it says. – dimitarvp Apr 13 '18 at 1:07
  • Thanks for this; for me all that was needed was imwheel, it fixed my issues while still using libinput. – amnesia Jun 2 '18 at 20:35
  • Same problem here on VBox 5.2.22 and Ubuntu 18.04.1 LTS. I only needed to do the switch to evdev. No imwheel necessary. Scrollwheel works just fine now. – Arne Jan 22 at 10:42
  • Fixes my problem on KDE neon 5.14 (Ubuntu 18.04 LTS). See askubuntu.com/a/304653/112818 for more details on how to config imwheel – Faramarz Salehpour Jan 24 at 8:07
  • I can fix the scrollwheel too by switching to evdev, but not in Qt apps. There it still doesn't work, while moving the cursor. – Dominik May 18 at 1:24

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.