Bug 98034

Summary: virt viewer QXL connection mouse unusable with >3ms latency with windows 8
Product: Spice Reporter: Andi Kleen <andi-bz>
Component: win32 qxl xddmAssignee: Spice Bug List <spice-bugs>
Status: RESOLVED MOVED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Andi Kleen 2016-10-03 19:42:01 UTC
This was originally in #91219, but it seems like a different problem, so I'm opening a new bug.


I'm connecting with virt-viewer to a remote system running a qemu KVM VM with Windows 8.1. There is some latency on the connection (not a LAN)

I installed QXL drivers in Windows 8.1.

When I don't use the QXL graphics, the mouse works fine, just the repaint refresh is painfully slow (can watch it redraw)

When I use the QXL graphics, the graphics is faster. Everything  works fine when I connect locally on the system to the VM using QXL.

However as soon as there is some latency on the QXL connection the mouse pointer becomes unusable: the mouse pointer still moves, but doesn't react to clicks anymore. When the latency becomes higher it doesn't even move anymore.

The non QXL connection doesn't have this problem, even at higher latencies the mouse always works fine.

I did some experiments to characterize this: i'm running a FC23 guest on the system with the Windows VM and use it to connect virt-viewer to the windows guest running on the same host.

Initially the mouse works fine (latency low enough).

Then I add some extra latency on the guest with 
(this requires install kernel-modules-extra on FC23)

tc qdisc add dev ens3 root netem delay 5ms
...
tc qdisc del dev ens3 root netem  # needed to change the value

With 0ms extra delay the mouse click works fine.
With 1ms extra delay it gets slower, but is still usable.
With 3ms extra delay is barely reacts to mouse click anymore (but still moves)
Usually the first click still works, but then later clicks don't, so it seems something is stuck in the protocol?
With longer delays the mouse pointer also stops moving, not just the clicks.

Other experiments tried:
- It is not the specific FC23 virt viewer version. I also used an older version from OpenSUSE Leap, and also a very recent version from opensuse, and they also had the same problem.


Versions: (FC23)

virt-viewer-3.0-1.fc23.x86_64
qemu-kvm-2.4.1-11.fc23.x86_64

The windows guest is running:

Windows 8.1
Red Hat QXL controller 17.54.59.923  4/21/2016
Comment 1 Pavel Grunt 2016-12-21 16:13:00 UTC
Should be fixed in the version 0.14 of qxl wddm dod driver

You can download the latest version from
 https://www.spice-space.org/download/windows/qxl-wddm-dod/
Comment 2 Andi Kleen 2016-12-21 17:05:59 UTC
Thanks.

There is also a version 0.15. Should I test 0.14 or 0.15 ?
Comment 3 Andi Kleen 2016-12-21 20:37:53 UTC
I tested the 0.14 driver and the same problem still happens
Comment 4 Giovanni Panozzo 2017-01-21 15:10:00 UTC
Same problem here: I have just installed a couple of Windows 10 VM. The standard VGA driver worked quite well with virt-manager remote console. I'm reaching these VM via 47ms roundtrip link (ADSL) with only a 1Mbps of bandwidth from server to virt-manager.
After installing qxl driver (from Fedora iso), performance of the remote console has extremely dropped, and virt-manager or other spice clients are now unuseable remotely. And the video/mouse freezes forever after some minute of spice protocol usage. Only a VM reboot can restore spice access.

I installed version 0.15 from here https://www.spice-space.org/download/windows/qxl-wddm-dod/, but there are no improvements.
Comment 5 Yuri Benditovich 2017-05-22 18:39:11 UTC
1. Please provide exact qemu command line
2. Do you have spice agent installed on the guest system? (https://www.spice-space.org/download/windows/vdagent/vdagent-win-0.8.0/)
Comment 6 Yuri Benditovich 2017-05-24 18:04:21 UTC
I've tried to reproduce the behavior descbed in
https://bugs.freedesktop.org/show_bug.cgi?id=98034#c4

Remote client: Windows 10, VirtViewer 5.0-256
Host: Fedora 25 as is, qemu-kvm + regular spice command-line + '-usbdevice tablet'
Guest: Windows 10, qxl-wddm-dod driver 0.17 (latest at the moment), 1 CPU (intentionally), 4G memory, +spice agent (vdservice)
Spice connection - without TLS

5 runs with LAN and Wi-Fi on Client side and with/without 'tc ... delay', below are numbers of delay, ping time, host channel net test results (printout from qemu when the client connected "main_channel_client_handle_pong" with latency and bandwidth evaluation) 
1. LAN, delay 0, ping < 1ms, latency 11 ms, BW 200 Mbps
2. LAN, delay 5, ping 5 ms, latency 17 ms, BW 100 Mbps
3. Wi-Fi, delay 0, ping 4 ms, latency 15 ms, BW 27 Mbps
4. Wi-Fi, delay 10, ping 14 ms, latency 27 ms, BW 6Mbps
5. Wi-Fi, delay 30, ping 34, latency 47 ms, BW 5Mbps

In all cases I do not see any problem with mouse responsiveness and screen updates (although for best screen responsiveness I use 'optimize for performance' setting and not 'optimized for best appearance').

What is different between our setups? Can you provide your numbers?
Comment 7 Yuri Benditovich 2017-05-24 19:12:02 UTC
I've tried to reproduce the behavior described in
https://bugs.freedesktop.org/show_bug.cgi?id=98034#c4

Remote client: CentOS 7 on the same host where the Windows 10 VM runs
Host: Fedora 25 as is, qemu-kvm + regular spice command-line + '-usbdevice tablet'
Guest: Windows 10, qxl-wddm-dod driver 0.17 (latest at the moment), 1 CPU (intentionally), 4G memory, +spice agent (vdservice)
Spice connection - without TLS

On the CentOS side applying 'tc .. delay 10ms' on its eth0 interface just increases the ping time to its host and does not affect mouse behavior.
Comment 8 Yuri Benditovich 2017-07-24 14:32:29 UTC
Response required to comment #6 and comment #7
Comment 9 GitLab Migration User 2018-06-05 14:17:00 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/spice/win32/qxl-wddm-dod/issues/8.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.