Problems With Mouse Scroll Wheel When Using Guest Additions

Discussions about using Linux guests in VirtualBox.
oconnor663
Posts: 1
Joined: 27. May 2022, 03:25

Re: Problems With Mouse Scroll Wheel When Using Guest Additions

Post by oconnor663 »

I was able to fix this with imwheel, as suggested by other comments here. Trying to autostart it with systemd didn't work well for me, because it led to "could not open display" errors. (Probably someone who knows better than I do how to specify systemd dependencies could fix this.) Instead, I created an autostart desktop entry at .config/autostart/imwheel.desktop containing the following:

Code: Select all

[Desktop Entry]
Type=Application
Name=imwheel
# "-b 45" restricts this to the wheel and avoids breaking the side buttons.
Exec=imwheel -b 45
StartupNotify=false
Terminal=false
Tomofumi
Posts: 1
Joined: 27. Oct 2022, 06:15

Re: Problems With Mouse Scroll Wheel When Using Guest Additions

Post by Tomofumi »

I have this problem (erratic mouse scroll) on my new install of Ubuntu 22.04 guest, and come across this post from google search.
After my trial-and-error, turns out it is a simple fix without the requirement of imwheel.

Firstly, check the listing from xinput:

Code: Select all

$ xinput --list
⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ VirtualBox mouse integration            	id=9	[slave  pointer  (2)]
⎜   ↳ ImExPS/2 Generic Explorer Mouse         	id=12	[slave  pointer  (2)]
⎜   ↳ VirtualBox USB Tablet                   	id=10	[slave  pointer  (2)]
...
Then dIsable the device id of "VirtualBox USB Tablet":

Code: Select all

$ xinput disable 10
The problem should be solved. :D
On the host side, I'm using the Virtualbox's default "USB tablet" and enable "Mouse Integration".
I guess there is a conflict between "USB tablet" and "mouse integration" in xinput, so I just enable one of them only and it still works.
pbtny
Posts: 1
Joined: 31. Oct 2022, 14:38

Re: Problems With Mouse Scroll Wheel When Using Guest Additions

Post by pbtny »

Thanks Tomofumi
I had a similar problem that began today in my LinuxMint guest. Mouse wheel scrolling not working and all sorts of odd behaviour when I turned mouse integration on and off.

I have no idea what USB Tablet is, but disabling it worked for me too.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Problems With Mouse Scroll Wheel When Using Guest Additions

Post by mpack »

Uh, "disabling it" is not very clear. Apparantly the solution is to choose "PS/2 mouse" as your pointing device, instead of "USB tablet". It isn't possible to just "disable" USB tablet.
Feid
Posts: 1
Joined: 29. May 2023, 07:51

Re: Problems With Mouse Scroll Wheel When Using Guest Additions

Post by Feid »

Unfortunately the workaround to disasable the Inputclass "VirtualBox mouse integration" or disabling the USB Tablet isnt working for me anymore with newer Ubuntu Installations which are featuring wayland. If I start Chrome, move my mouse around and try scrolling it doesnt work.
Now xinput outputs a warning because of wayland so i switched to libinput to get more info. So then I've tried disabling the virtualbox mouse integration and the USB Tablet (in various combinations) with udev with no luck. Also I've tried switching to the ps2 mouse. Now I'm out of ideas and I hope someone else have some clue how to get the wheel running fine again.

Code: Select all

daniel@daniel-VirtualBox:~$ xinput --list
WARNING: running xinput against an Xwayland server. See the xinput man page for details.
⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ xwayland-pointer:16                     	id=6	[slave  pointer  (2)]
⎜   ↳ xwayland-relative-pointer:16            	id=7	[slave  pointer  (2)]
⎜   ↳ xwayland-pointer-gestures:16            	id=8	[slave  pointer  (2)]
⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
    ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
    ↳ xwayland-keyboard:16                    	id=9	[slave  keyboard (3)]

Code: Select all

daniel@daniel-VirtualBox:~$ sudo libinput list-devices
Device:           Power Button
Kernel:           /dev/input/event0
Group:            1
Seat:             seat0, default
Capabilities:     keyboard 
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Accel profiles:   n/a
Rotation:         n/a

Device:           Sleep Button
Kernel:           /dev/input/event1
Group:            2
Seat:             seat0, default
Capabilities:     keyboard 
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Accel profiles:   n/a
Rotation:         n/a

Device:           Video Bus
Kernel:           /dev/input/event3
Group:            3
Seat:             seat0, default
Capabilities:     keyboard 
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Accel profiles:   n/a
Rotation:         n/a

Device:           VirtualBox mouse integration
Kernel:           /dev/input/event6
Group:            4
Seat:             seat0, default
Capabilities:     pointer 
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      disabled
Nat.scrolling:    disabled
Middle emulation: disabled
Calibration:      identity matrix
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Accel profiles:   n/a
Rotation:         n/a

Device:           VirtualBox USB Tablet
Kernel:           /dev/input/event5
Group:            5
Seat:             seat0, default
Capabilities:     pointer 
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      disabled
Nat.scrolling:    disabled
Middle emulation: disabled
Calibration:      identity matrix
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Accel profiles:   n/a
Rotation:         n/a

Device:           AT Translated Set 2 keyboard
Kernel:           /dev/input/event2
Group:            6
Seat:             seat0, default
Capabilities:     keyboard 
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Accel profiles:   n/a
Rotation:         n/a

Device:           ImExPS/2 Generic Explorer Mouse
Kernel:           /dev/input/event4
Group:            7
Seat:             seat0, default
Capabilities:     pointer 
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      disabled
Nat.scrolling:    disabled
Middle emulation: disabled
Calibration:      n/a
Scroll methods:   button
Click methods:    none
Disable-w-typing: n/a
Accel profiles:   flat *adaptive
Rotation:         n/a

Code: Select all

daniel@daniel-VirtualBox:~$ cat /etc/udev/rules.d/99-ignore-my-device.rules
ACTION=="add|change", KERNEL=="event5*", \
   ENV{LIBINPUT_IGNORE_DEVICE}="1"
Fab-121337
Posts: 1
Joined: 19. Jun 2023, 13:56

Re: Problems With Mouse Scroll Wheel When Using Guest Additions

Post by Fab-121337 »

I have found a workaround that works for me on Ubuntu 22.04 LTS. I have uninstalled imwheel complety (sudo apt remove imwheel). And then followed this tutorial to adjust the scrollwheel acceleration in Firefox.
https://www.maketecheasier .com/change-the-scrolling-speed-in-firefox/

More specifically, I have set mousewheel.acceleration.start = 2.

This sets the scroll speed in Firefox only, not in all applications, but that's mostly good enough for me.
Post Reply