[vbox-dev] UseMouse is skipping mouse clicks intermittently

Vic Lee llyzs.vic at gmail.com
Mon Oct 8 03:01:43 PDT 2012

Hi Michael,

Thanks for the reply. There's no special use case to reproduce the 
problem. For me, I can notice the problem just by using the 4.2 release 
and install a windows 7 guest. However, it happens at a low chance, and 
what's interesting is that after installing the guest additions the 
chance is even lower. Because most people will have guest additions 
install and the chance are very low, they might just ignore it or 
mis-treat it as physical mouse "failure". It will be easier to reproduce 
the problem if you don't have guest addition install and you move and 
click really fast. I think maybe the mouse driver in the guest addition 
"accelerate" the usb processing speed.

By the way I am using Windows 2008R2 as host, but it looks like the 
issue is not depending on host OS.


On Monday, October 08, 2012 04:46 PM, Michael Thayer wrote:
> Hello Vic,
> On 10/06/2012 01:50 PM, Vic Lee wrote:
> [...]
>> I am not sure if anyone is aware of the issue, but for quite a while I
>> notice that virtualbox is obviously skipping my mouse clicks. Depending
>> on whether I have guest mouse driver installed or not, whether I connect
>> to console or through RDP, the skip rate may be different but not solved.
>> I spent some time debugging from source and I am able to identify the
>> issue is in function usbHidMousePutEventAbs() in UsbMouse.cpp. There is
>> a call to usbHidQueueRemoveHead (line 801) which will return NULL
>> whenever my click is skipped. The problem here is that if the button
>> state is not being changed, it will be ok to skip mouse events; but if
>> pThs->PtrDelta.btn != fButtonStates, the event should not be skipped,
>> but must be queued until available. Otherwise either mouse press or
>> release event will not be reported to the host and is quite annoying.
>> usbHidMousePutEvent() function should be the same as well.
>> UsbKbd.cpp, however, is properly queuing pending key events, thus I
>> never experience missed keys. Any idea to improve UsbMouse?
> [...]
> The maintainer of the USB pointing device emulation code (Michal, CC-ed)
> is taking a look at it and can see the problem, but is a bit surprised
> that you are the first person to notice it.  Would you be able to
> provide more information about how you are using VirtualBox which might
> give us a hint?
> Thanks!
> Regards,
> Michael
> --
> ORACLE Deutschland B.V. & Co. KG   Michael Thayer
> Werkstrasse 24                     VirtualBox engineering
> 71384 Weinstadt, Germany           mailto:michael.thayer at oracle.com
> Hauptverwaltung: Riesstr. 25, D-80992 München
> Registergericht: Amtsgericht München, HRA 95603
> Geschäftsführer: Jürgen Kunz
> Komplementärin: ORACLE Deutschland Verwaltung B.V.
> Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
> Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
> Geschäftsführer: Alexander van der Ven, Astrid Kepper, Val Maher

More information about the vbox-dev mailing list