Bug 665017 - lost double clicks on slow connections
Summary: lost double clicks on slow connections
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: xen
Version: 5.7
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: rc
: ---
Assignee: Paolo Bonzini
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 514499 630814
TreeView+ depends on / blocked
 
Reported: 2010-12-22 13:16 UTC by Paolo Bonzini
Modified: 2011-07-21 12:00 UTC (History)
4 users (show)

Fixed In Version: xen-3.0.3-126.el5
Doc Type: Bug Fix
Doc Text:
Prior to this update, double click or dragging mouse events were sometimes lost when using an emulated USB mouse or a tablet device in a fully-virtualized guest. With this update, buffering of mouse events has been added to the emulation of USB pointer devices, and lost mouse events occur much less frequently.
Clone Of:
: 665023 (view as bug list)
Environment:
Last Closed: 2011-07-21 09:18:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
the mouse config program in control panel I used for mouse double click test (71.00 KB, image/png)
2011-05-26 12:52 UTC, Pengzhen Cao
no flags Details
unknown message type error (75.36 KB, image/png)
2011-05-26 12:53 UTC, Pengzhen Cao
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1070 0 normal SHIPPED_LIVE xen bug fix and enhancement update 2011-07-21 09:12:56 UTC

Description Paolo Bonzini 2010-12-22 13:16:16 UTC
qemu doesn't enqueue mouse events, it just records the latest mouse state. This can cause some lost mouse double clicks if the events are not processed fast enough.  In particular, dragging/doubleclicking are impossible on a high latency connection (e.g. Milan->Phoenix->Brno).

There is a patch (with subsequent fixups) in xen-unstable qemu.git to fix this.

28b7599603cc2165cd68961be034979657759f40
    Queue some mouse events.

bfaaa608ded03c458a970be818cc319f5fe914d7
    Try to fix USB HID and make the HID reports readable

dd0a0055a99b0226f31b29c14e2c18eeaac757f7
    Fix new USB HID queueing


A few other mouse/tablet related backports will be done for this bugzilla as well:

- update the USB descriptors to the latest QEMU

659139d780ed6ecfaff4a8a904dab37d179017d1
      Make USB hid devices self-powered

de5c2d0a1fd1668fe38bf88706c099b24407b079
      Fix range in the hid report descriptor for USB tablet.

c21c583a1de9c1033252ef51929398ddc237a7c0
      Fix USB and HID report descriptors for mouse and tablet.

1451299039e4cae0989abbb92749ed6e444f7e9e
      Add mouse wheel in the usb-mouse HID Report (by Daniel Godás).

e126cf13ee2b88949409c1c93bcf27413e97b241
      Fix usb hid and mass-storage protocol revision, by Juergen Keil.

f2f1ac827d9867db4444498a64582595b001e40f
      increase USB table poll interval

- VNC and SDL fixes for mouse

b94ed5772eb31e8fad4b823351e8152839bf722a
      Let the USB tablet reach the far bottom and right pixels

4c44bdcb704945980898a04c556d1377c267a3f1
      SDL mouse events smoothness

Comment 2 Paolo Bonzini 2010-12-23 09:31:53 UTC
> Second, are you sure that queueing guarantees double-clicks working? If the
> widget toolkit starts to measure time after the first click (press+release),
> and the second event (which may be queued alright) takes a long time to travel,
> then the double-click interval will time out on the receiver side. The client
> side double-click will be interpreted as two single clicks on the server.

Assuming latency is relatively stable it should help (i.e. the first click will also have taken a long time to travel).

Comment 4 Miroslav Rezanina 2011-03-17 09:54:25 UTC
Fix built into xen-3.0.3-126.el5

Comment 7 Pengzhen Cao 2011-05-26 12:52:03 UTC
Created attachment 501072 [details]
the mouse config program in control  panel I used for mouse double click test

the mouse config program in control  panel I used for mouse double click test

Comment 8 Pengzhen Cao 2011-05-26 12:53:42 UTC
Created attachment 501073 [details]
unknown message type error

unknown message type error

Comment 10 Pengzhen Cao 2011-05-28 18:28:15 UTC
Ok, I added (usbdevice='tablet') option in configuration file, now VM's mouse could sync with host's.

Use the same mouse setup tool in control panel per comment#6 with windows XP 32bit guest on a RHEL5 host. This time I set the double click speed to fatest to make it easy to repro this issue. And this time the network I used is 3G WCDMA network at home with pnx2 VPN connection. The bandwidth is <500kbps and the latency should be high due to the nature of 3G network(ping host ~600ms).

Without the fix on xen-3.0.3-120 build, there is 30% or more chance of  failed double click
With the fix on xen-3.0.3-131 build,  there is less than 10 percent of failed double click.
This patch could work,  although  not ideal  just as mentioned in comment#1. Queued mouse click with high latency could also time out due to the latency of package travel time.

Bug verified.

Comment 11 Tomas Capek 2011-07-13 13:29:31 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
The QEMU emulator does not enqueue mouse events; it simply records the latest mouse state. Prior to this update, double click or dragging mouse events were sometimes lost, especially on  high-latency connections. Now, the code for mouse descriptors has been fixed, and lost mouse events occur much less frequently.

Comment 12 Paolo Bonzini 2011-07-13 14:55:58 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-The QEMU emulator does not enqueue mouse events; it simply records the latest mouse state. Prior to this update, double click or dragging mouse events were sometimes lost, especially on  high-latency connections. Now, the code for mouse descriptors has been fixed, and lost mouse events occur much less frequently.+Prior to this update, double click or dragging mouse events were sometimes lost when using an emulated USB mouse or tablet device in a fully-virtualized guest. With this update, buffering of mouse events has been added to the emulation of USB pointer devices, and lost mouse events occur much less frequently.

Comment 13 Tomas Capek 2011-07-14 13:45:01 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-Prior to this update, double click or dragging mouse events were sometimes lost when using an emulated USB mouse or tablet device in a fully-virtualized guest. With this update, buffering of mouse events has been added to the emulation of USB pointer devices, and lost mouse events occur much less frequently.+Prior to this update, double click or dragging mouse events were sometimes lost when using an emulated USB mouse or a tablet device in a fully-virtualized guest. With this  update, buffering of mouse events has been added to the emulation of USB pointer devices, and lost mouse events occur much less frequently.

Comment 14 errata-xmlrpc 2011-07-21 09:18:00 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-1070.html

Comment 15 errata-xmlrpc 2011-07-21 12:00:29 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-1070.html


Note You need to log in before you can comment on or make changes to this bug.