Interesting. I guess this is why Mint 18.2 worked for me where Arch did not. It's using evdev instead of libinput by default. As I mentioned above, the caveat is that while the mousewheel now works as expected in my browsers, it has the "no scroll while pointer is moving" behavior in system applications like Kate, Dolphin, or Konsole. It's a trade off, but one I can live with.WombatFromHell wrote:Basically, the problem is related to a bug in libinput, and switching the pointer driver to evdev is seemingly the only solution.
Problems With Mouse Scroll Wheel When Using Guest Additions
Re: Problems With Mouse Scroll Wheel When Using Guest Additions
Re: Problems With Mouse Scroll Wheel When Using Guest Additions
already 2018 and still not fixed... Previous workaround dosent work with Ubuntu 16.04 as guest. Any news to avoid this bug?
-
- Posts: 3
- Joined: 5. Sep 2017, 22:25
Re: Problems With Mouse Scroll Wheel When Using Guest Additions
I can, in fact, confirm that doing something like the following works for Ubuntu dating as far back as 12.04, but it may require enabling the 'universe' repo in your sources.list:
Then creating an .imwheelrc file in your $HOME, with this in it:
Then running imwheel (most likely by editing your session or using whatever session editor you prefer) with something like:
.. or alternatively (if you get config file related errors) the following may work instead ..
All this restores mousewheel functionality in Xorg back to something closer to normal. Hope this helps!
Code: Select all
sudo apt install imwheel
Code: Select all
"^.*$"
None, Up, Button4, 2
None, Down, Button5, 2
Shift_L, Up, Shift_L|Button4, 2
Shift_L, Down, Shift_L|Button5, 2
Control_L, Up, Control_L|Button4
Control_L, Down, Control_L|Button5
Code: Select all
imwheel -b "4 5" &
Code: Select all
imwheel -b 45 &
-
- Posts: 1
- Joined: 9. Sep 2018, 22:15
Re: Problems With Mouse Scroll Wheel When Using Guest Additions
So I know this is old, but I still had the same problem and although I haven't tried any of the previously mentioned solutions, I found a "good" workaround for this issue.
so here it is: in virtualbox manager, click settings for the OS in question, and go to System and make Pointing Device: PS/2 Mouse.
Not a super fancy or difficult solution, but it works. However, this created the issue for me of loosing my mouse whenever I needed it outside of the virtual environment. But you can get it back by simply switching between different views, like full-screen.
so here it is: in virtualbox manager, click settings for the OS in question, and go to System and make Pointing Device: PS/2 Mouse.
Not a super fancy or difficult solution, but it works. However, this created the issue for me of loosing my mouse whenever I needed it outside of the virtual environment. But you can get it back by simply switching between different views, like full-screen.
Re: Problems With Mouse Scroll Wheel When Using Guest Additions
Crazy this hasn't been handled :0
Maybe someone can patch the core linux mouse driver bug!
Did anyone put in an issue for it?
I wanted to say I found this blog to be super helpful for setting up imwheel
I did remove the 3 at the end of the config lines because I was getting 9 line jumps (3 x 3 ?) - maybe due to the VM? After removing those though it worked nicely.
Edit I guess I cannot post a link until after I have 1 message and 24 hours on my accounts : [
In case I forget to make it back here and update this...
webupd8 org "how to change mouse scroll wheel speed"
Maybe someone can patch the core linux mouse driver bug!
Did anyone put in an issue for it?
I wanted to say I found this blog to be super helpful for setting up imwheel
I did remove the 3 at the end of the config lines because I was getting 9 line jumps (3 x 3 ?) - maybe due to the VM? After removing those though it worked nicely.
Edit I guess I cannot post a link until after I have 1 message and 24 hours on my accounts : [
In case I forget to make it back here and update this...
webupd8 org "how to change mouse scroll wheel speed"
Re: Problems With Mouse Scroll Wheel When Using Guest Additions
Hi Everyone,
Just in case someone is still encountering this problem. What solved my problem was to install evdev (for Ubuntu):
After the evdev was downloaded and installed, it automatically selected evdev, and the mouse wheel worked correctly.
Just in case someone is still encountering this problem. What solved my problem was to install evdev (for Ubuntu):
Code: Select all
sudo apt-get install xserver-xorg-input-evdev-hwe-18.04
Re: Problems With Mouse Scroll Wheel When Using Guest Additions
I found the native solution which I found during work on Linux Mint 19.1 Xfce. Unfortunately, I don't know how to change, described below setting, on Ubuntu. Maybe someone else will be able to help with it.
I was intrigued by the comment:
I hope this gave some better starting point for other readers.
I was intrigued by the comment:
After digging through multiple websites and testing I found out that:Watter wrote:What's interesting, and perhaps irrelevant, is that the mouse functionality is apparently split between the two USB devices. One registers motion events and the other button (and the wheel is a button) events. I thought that perhaps this dual device with different event capturing might be relevant, but perhaps not. According to "xinput --test" on the device that registers button presses, the mousewheel events ARE coming through to the system while the mouse is moving. So where are they getting dropped?
- there are actually 2 devices which handle part of the mouse events separately as Watter mention in his post. In my case it was:
"ImExPS/2 Generic Explorer Mouse" and "VirtualBox mouse integration", one of those devices detects movement, the second one register pressed buttons. And those 2 couldn't work simultaneously. - In Xfce shell settings I found options (Settings -> Mouse and Touchpad) which allow on choosing pointer device. Unfortunately, with Mate, Cinamon or Ubuntu 18.04 it looks differently. So I don't how to find it.
- After the switch pointing device from "VirtualBox Mouse Integration" (disable it as well) to "VirtualBox USB Tablet" and system restart, this became my default pointing device (You can also completely disable "ImExPS/2 Generic Explorer Mouse"). Everything starts to work fine and I could scroll and move the mouse altogether. What is also interesting, that order of pointing devices changes in xinput (what can be seen on the second screenshot). Now with xinput test reacts only for VirtualBox USB Tablet which has both movement and mouse buttons.
- If you don't see VirtualBox USB Tablet in your guest system then check settings of the VM. There should be settings for pointing device in System -> motherboard section just below chipset.
I hope this gave some better starting point for other readers.
Last edited by baloonick on 23. Jul 2019, 08:29, edited 1 time in total.
-
- Site Moderator
- Posts: 27329
- Joined: 22. Oct 2010, 11:03
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Win(*>98), Linux*, OSX>10.5
- Location: Greece
Re: Problems With Mouse Scroll Wheel When Using Guest Additions
Yes, you are allowed, and it's in fact preferred if you attach the images locally in your response (see the "Upload attachment" tab below the reply form). Not a lot of people will go to 3rd party sites. Plus, it's more convenient if the image goes along with the message...baloonick wrote:I'm not allowed to post pictures so I left them in such form:
PS. If it's a Terminal output (like your 2nd image), it would be even better if you copied/pasted the actual text in a <pre> tag...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
-
- Posts: 1
- Joined: 25. Jul 2019, 18:00
Re: Problems With Mouse Scroll Wheel When Using Guest Additions
It worked for me!!! Thanks !WombatFromHell wrote:I registered an account on this forum just so I could share a solution that seems to work for both Virtualbox and VMware. Basically, the problem is related to a bug in libinput, and switching the pointer driver to evdev is seemingly the only solution.
To workaround this you'll need to install the evdev driver (it's named different things in different distro's, google the package name and double check that it's installed before continuing) and change the file /usr/share/X11/xorg.conf.d/40-libinput.conf (it may be named slightly different depending on your distro). There's a section that looks something like the following:Just changeCode: Select all
Section "InputClass" Identifier "libinput pointer catchall" MatchIsPointer "on" MatchDevicePath "/dev/input/event*" Driver "libinput" EndSection
toCode: Select all
Driver "libinput"
Code: Select all
Driver "evdev"
Save the file, and restart your DM (or reboot the guest). Your mousewheel should now work, and if you do an xinput list-props on the vmmouse devices you should see them report with evdev device options.
I hope this helps anyone else that might have issues with this bug.
(Edit: If you're running VMware (this shouldn't be necessary with VirtualBox) as your host you may also need to add the following to your guest's vmx config:)(Edit2: If you still have issues, you may want to double check that you're not running in a Wayland instance (Xorg generally works better for guests anyway). In addition, you may want to combine the evdev workaround with using imwheel to control the speed of scrolling in whatever arbitrary windows you prefer. Besides imwheel there's no other known way to control mouse scrolling speed inside a guest that I've found.)Code: Select all
mouse.vusb.enable = "TRUE" mouse.vusb.useBasicMouse = "FALSE" usb.generic.allowHID = "TRUE"
Re: Problems With Mouse Scroll Wheel When Using Guest Additions
Just wanted to say that baloonick's suggestion worked for me on XUbuntu 19.10.
I was confused and distracted initially as to why VirtualBox was defaulting the input device to tablet on my new VM. Turns out you want this and it is apparently a bit of tribal knowledge baked into the defaults.
After disabling the virtual box mouse pointer in the mouse settings scrolling started to work as expected.
I'm not sure if it's as good as the old mouse pointer + evdev setup.. Hard to believe this issue has been around since the libinput switch and the information required to fix it so obscure.
I was confused and distracted initially as to why VirtualBox was defaulting the input device to tablet on my new VM. Turns out you want this and it is apparently a bit of tribal knowledge baked into the defaults.
After disabling the virtual box mouse pointer in the mouse settings scrolling started to work as expected.
I'm not sure if it's as good as the old mouse pointer + evdev setup.. Hard to believe this issue has been around since the libinput switch and the information required to fix it so obscure.
Re: Problems With Mouse Scroll Wheel When Using Guest Additions
[Apologies for using a BugMeNot account, but I don't intend to return and I sure as hell don't want to give Oracle my email address.]
I was able to fix the problem in Lubuntu 19.10 on the command line with xinput. Find the ID number of the VirtualBox mouse integration (it's 9 in baloonik's screenshot), then do:
Sadly, this does not persist across reboots. To fix that, I used a solution from Stack Exchange. I created a file called 40-vbox-fix.conf in the /etc/X11/xorg.conf.d directory that contains the following text:
This will completely remove the device from the xinput list. Make sure the MatchProduct parameter matches the exact name of the mouse integration device from the xinput list.
I was able to fix the problem in Lubuntu 19.10 on the command line with xinput. Find the ID number of the VirtualBox mouse integration (it's 9 in baloonik's screenshot), then do:
Code: Select all
xinput disable <id>
Code: Select all
Section "InputClass"
Identifier "Fix VBox scroll wheel"
MatchProduct "VirtualBox mouse integration"
Option "Ignore" "on"
EndSection
Re: Problems With Mouse Scroll Wheel When Using Guest Additions
Unfortunately balloonick's approach of disabling the two mice doesn't work for me on CentOS 8 Xfce, it just results in a non-functioning mouse. It doesn't respond to clicks.
Re: Problems With Mouse Scroll Wheel When Using Guest Additions
Many thanks, WombatFromHell, your fix is the one that finally worked! I use ", 1" instead of ", 2", since a single scroll wheel aka button action already skips 3 lines, and imwheel can be configured to start as part of your xsession, cf. /etc/X11/imwheel/startup.conf, but I primarily wanted to confirm that your workaround still solves the issue -- and that this issue still exists in Virtualbox as of 2020, sic.WombatFromHell wrote:I can, in fact, confirm that doing something like the following works for Ubuntu dating as far back as 12.04, but it may require enabling the 'universe' repo in your sources.list:
Then creating an .imwheelrc file in your $HOME, with this in it:Code: Select all
sudo apt install imwheel
Then running imwheel (most likely by editing your session or using whatever session editor you prefer) with something like:Code: Select all
"^.*$" None, Up, Button4, 2 None, Down, Button5, 2 Shift_L, Up, Shift_L|Button4, 2 Shift_L, Down, Shift_L|Button5, 2 Control_L, Up, Control_L|Button4 Control_L, Down, Control_L|Button5
.. or alternatively (if you get config file related errors) the following may work instead ..Code: Select all
imwheel -b "4 5" &
All this restores mousewheel functionality in Xorg back to something closer to normal. Hope this helps!Code: Select all
imwheel -b 45 &
Guest: Debian Testing with virtualbox-guest-utilts 6.1.6
Host: Windows 10 Enterprise 1809 with Virtualbox 6.1.2
Re: Problems With Mouse Scroll Wheel When Using Guest Additions
I can also confirm that WombatFromHell's solution worked.
Code: Select all
imwheel -b "4 5" &
Re: Problems With Mouse Scroll Wheel When Using Guest Additions
I can confirm the issue still persists in the latest release of Virtualbox and Kali.Dr. Mad wrote:Many thanks, WombatFromHell, your fix is the one that finally worked! I use ", 1" instead of ", 2", since a single scroll wheel aka button action already skips 3 lines, and imwheel can be configured to start as part of your xsession, cf. /etc/X11/imwheel/startup.conf, but I primarily wanted to confirm that your workaround still solves the issue -- and that this issue still exists in Virtualbox as of 2020, sic.WombatFromHell wrote:I can, in fact, confirm that doing something like the following works for Ubuntu dating as far back as 12.04, but it may require enabling the 'universe' repo in your sources.list:
All this restores mousewheel functionality in Xorg back to something closer to normal. Hope this helps!Code: Select all
imwheel -b "4 5" &
The workaround does its job for scrolling down, scrolling up however is still not working while moving the mouse.
For some reason I never have this problem in Firefox but in all other applications.