VirtualBox

Opened 14 years ago

Closed 14 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:

  1. ButtonPress(button=8)
  2. ButtonPress(button=9)
  3. ButtonPress(button=4)
  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)

logs.zip (21.6 KB ) - added by mwisnicki 14 years ago.
Log files

Download all attachments as: .zip

Change History (13)

comment:1 by mwisnicki, 14 years ago

Just installed virtualbox additions from ports:

virtualbox-ose-additions-3.1.51.r25618_2

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).

comment:2 by mwisnicki, 14 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 Michael Thayer, 14 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:

http://www.virtualbox.org/download/testcase/VirtualBox-2010-04-06-02-40-22-win-3.1-rel-3.1.7-r59656-MultiArch.exe

comment:4 by Michael Thayer, 14 years ago

Any news? Did you get a chance to try out the updated version?

comment:5 by mwisnicki, 14 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 Michael Thayer, 14 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.

by mwisnicki, 14 years ago

Attachment: logs.zip added

Log files

comment:7 by mwisnicki, 14 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:8 by Michael Thayer, 14 years ago

Set them to "". I will comment further after I have checked the logs.

comment:9 by Michael Thayer, 14 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:10 by mwisnicki, 14 years ago

I works great now. Thanks!

comment:11 by Michael Thayer, 14 years ago

Summary: Mouse wheel scrolling interpredted as click events in guestMouse wheel scrolling interpredted as click events in guest -> fixed after the 3.1.6 release

Thanks for the feedback.

comment:12 by Frank Mehnert, 14 years ago

Resolution: fixed
Status: newclosed

Fixed in 3.1.8

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use