Page 2 of 2

Re: wheel scroll does not work in virtualbox (windows guest) after buster upgrade

Posted: 12. Apr 2020, 00:09
by mencoder
Same problem in VirtualBox 6.1.4 on Arch Linux on my Dell Latitude E5470. Any fix?

Code: Select all

kernel: input: AlpsPS/2 ALPS DualPoint TouchPad as /devices/platform/i8042/serio1/input/input7

Re: wheel scroll does not work in virtualbox (windows guest) after buster upgrade

Posted: 28. Jun 2020, 01:33
by bugXmeXnot
The problem is that XInput2 smooth scroll events are not being received by the guest.

To see this, listen for XInput2 events on the host and the guest by running

Code: Select all

xinput --test-xi2
When scrolling, only the ButtonPress and ButtonRelease events generated by the host will be received by the guest. The smooth scroll Motion events are never received. This is why scrolling vigorously allows some scrolling to work, since this is the only time that ButtonPress and ButtonRelease events are generated by the host.

To work around this issue, you can run VirtualBox with the QT_XCB_NO_XI2=1 environment variable set. This disables QT's usage of XInput2 and has it fall back to using vanilla XInput scrolling behavior. In other words, to work around this issue, from a terminal, you can run

Code: Select all

QT_XCB_NO_XI2=1 VirtualBox
This works because for vanilla XInput clients, the X server is required to emulate smooth scrolling using only ButtonPress and ButtonRelease events, which are the ones, at present, capable of being received by the VirtualBox guest.

Re: wheel scroll does not work in virtualbox (windows guest) after buster upgrade

Posted: 3. Jul 2020, 14:56
by mencoder
bugXmeXnot wrote:QT_XCB_NO_XI2=1
It works! Thank you very much!!!

Re: wheel scroll does not work in virtualbox (windows guest) after buster upgrade

Posted: 6. Sep 2020, 22:34
by johnbendi
bugXmeXnot wrote:The problem is that XInput2 smooth scroll events are not being received by the guest.

To see this, listen for XInput2 events on the host and the guest by running

Code: Select all

xinput --test-xi2
When scrolling, only the ButtonPress and ButtonRelease events generated by the host will be received by the guest. The smooth scroll Motion events are never received. This is why scrolling vigorously allows some scrolling to work, since this is the only time that ButtonPress and ButtonRelease events are generated by the host.

To work around this issue, you can run VirtualBox with the QT_XCB_NO_XI2=1 environment variable set. This disables QT's usage of XInput2 and has it fall back to using vanilla XInput scrolling behavior. In other words, to work around this issue, from a terminal, you can run

Code: Select all

QT_XCB_NO_XI2=1 VirtualBox
This works because for vanilla XInput clients, the X server is required to emulate smooth scrolling using only ButtonPress and ButtonRelease events, which are the ones, at present, capable of being received by the VirtualBox guest.
Awesome! This works for me too. Thanks a lot!

Re: wheel scroll does not work in virtualbox (windows guest) after buster upgrade

Posted: 3. Dec 2020, 17:30
by elsandosgrande
bugXmeXnot wrote:The problem is that XInput2 smooth scroll events are not being received by the guest.

To see this, listen for XInput2 events on the host and the guest by running

Code: Select all

xinput --test-xi2
When scrolling, only the ButtonPress and ButtonRelease events generated by the host will be received by the guest. The smooth scroll Motion events are never received. This is why scrolling vigorously allows some scrolling to work, since this is the only time that ButtonPress and ButtonRelease events are generated by the host.

To work around this issue, you can run VirtualBox with the QT_XCB_NO_XI2=1 environment variable set. This disables QT's usage of XInput2 and has it fall back to using vanilla XInput scrolling behavior. In other words, to work around this issue, from a terminal, you can run

Code: Select all

QT_XCB_NO_XI2=1 VirtualBox
This works because for vanilla XInput clients, the X server is required to emulate smooth scrolling using only ButtonPress and ButtonRelease events, which are the ones, at present, capable of being received by the VirtualBox guest.
So, this gets even spicier when you add Wayland into the mix, because the scrolling events are called `POINTER_AXIS`, which are the only events that get generated when I scroll leisurely, while the only additional events which occur when I scroll vigorously are `POINTER_MOTION` (this information has been acquired from `libinput debug-events /dev/input/event11`; while `POINTER_MOTION` usually signifies the, well, motion of the pointer, the pointer does not actually move when these events are generated as a result of excessive vigor). What makes it funny is that the exact same workaround works on (X)Wayland as well.

Thank you for giving us insight into the problem and providing the workaround!