VirtualBox

Ticket #6488 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

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

Reported by: mwisnicki Owned by:
Priority: major 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

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

Change History

comment:1 Changed 4 years ago by mwisnicki

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 Changed 4 years ago by mwisnicki

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 Changed 4 years ago by michael

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 Changed 4 years ago by michael

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

comment:5 Changed 4 years ago by mwisnicki

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 Changed 4 years ago by michael

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.

Changed 4 years ago by mwisnicki

Log files

comment:7 Changed 4 years ago by mwisnicki

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 Changed 4 years ago by michael

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

comment:9 Changed 4 years ago by michael

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 Changed 4 years ago by mwisnicki

I works great now. Thanks!

comment:11 Changed 4 years ago by michael

  • Summary changed from Mouse wheel scrolling interpredted as click events in guest to Mouse wheel scrolling interpredted as click events in guest -> fixed after the 3.1.6 release

Thanks for the feedback.

comment:12 Changed 4 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in 3.1.8

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use