Opened 15 years ago
Closed 15 years ago
#6488 closed defect (fixed)
Mouse wheel scrolling interpredted as click events in guest -> fixed after the 3.1.6 release
Reported by: | mwisnicki | Owned by: | |
---|---|---|---|
Component: | other | Version: | VirtualBox 3.1.6 |
Keywords: | Cc: | ||
Guest type: | BSD | Host type: | Windows |
Description
Host: Windows 7 x64
Guest: FreeBSD 8.0/i386, no additions, xorg-7.4, xorg-server-1.6.5
Scrolling down is fine however scrolling up generates additional clicks.
In xev scroll-up generates following events with same timestamp:
- ButtonPress(button=8)
- ButtonPress(button=9)
- ButtonPress(button=4)
- ButtonRelease(button=4)
Obviously first two events make no sense.
Mouse is a simple 2-button usb mouse with scroll which works fine in FreeBSD as a host.
Attachments (1)
Change History (13)
comment:1 by , 15 years ago
comment:2 by , 15 years ago
Seems like that 4 instead of 5 was caused by my shitty mouse.
Now with good mouse it looks like Pressed(8+9) happens always when I move scroll-up but previous event was not Pressed(4). After scrolling up any event different than Pressed(4) will cause Released(8+9).
Basically it is as if buttons 8+9 marked beginning and end of scrolling up.
comment:3 by , 15 years ago
Taking a look at the source code of the FreeBSD mouse driver, it looks to me like it resends the sequence for switching the mouse to IntelliMouse mode after it has already switched it to Explorer mode, as a hack to fool certain KVM switches. I assume that a real MS Explorer mouse would ignore this if it were already in Explorer mode, but our code looks like it will really switch back. You might want to try the following test build from the stable branch (disclaimer here) which contains a change which should address this issue:
comment:5 by , 15 years ago
Yes, sorry for delay. Unfortunately it didn't help.
I have found however that if I stop moused then Xorg's mouse_drv will happily use /dev/psm0 directly instead of /dev/sysmouse and everything will work correct.
Then, if I stop X and start moused again, it will no longer report those extra buttons while scrolling.
comment:6 by , 15 years ago
Would you be able to get a bit of logging for me? If you run the following VBoxManage commands (VBoxManage is a command line tool which comes with VirtualBox):
VBoxManage setextradata "<VM name>" "VBoxInternal/Devices/pckbd/0/Config/R0Enabled" "0" VBoxManage setextradata "<VM name>" "VBoxInternal/Devices/pckbd/0/Config/GCEnabled" "0"
and then start VirtualBox with the environment variables set (those are "L"s, not "1"s):
VBOX_RELEASE_LOG=dev_kbd.e.l.l2.l3.f VBOX_RELEASE_LOG_FLAGS=time
set, it will produce logging for most mouse events inside the VM. It would be great if you could create log files for when you see this issue, and for when you do not. If it is difficult to do separate runs in which the error occurs and in which it doesn't, then note the time (as seen by your host system) as of when the log data represents the problem occurring or not.
comment:7 by , 15 years ago
Hope that's helpful.
As you said, FreeBSD does IMPS/2->IMEX->IMPS/2 but Xorg's own driver switches it correctly IMPS/2->IMEX.
BTW How should I restore default values of {R0,GC}Enabled, set them to 1 ?
comment:9 by , 15 years ago
Sorry, I gave you a link to the wrong revision. Please try http://www.virtualbox.org/download/testcase/VirtualBox-2010-04-12-15-06-35-win-3.1-rel-3.1.7-r59942-MultiArch.exe (same disclaimer...).
comment:11 by , 15 years ago
Summary: | Mouse wheel scrolling interpredted as click events in guest → Mouse wheel scrolling interpredted as click events in guest -> fixed after the 3.1.6 release |
---|
Thanks for the feedback.
Just installed virtualbox additions from ports:
and enabled vboxvideo + vboxmouse
It seems to still happen but somewhat more randomly, every 1 to ~10 moves of scroll invalid events are injected.
I have noticed that buttons 8 and 9 are sometimes reported as released. Also, infrequently instead of button=4 I get button=5 (down).