Re: [PATCH] how can i trace monitor change (etc) events

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 04/16/2014 09:41 AM, David Mansfield wrote:

On 04/16/2014 03:15 AM, Christophe Fergeau wrote:
On Wed, Apr 16, 2014 at 06:32:30AM +1000, Lindsay Mathieson wrote:
Monitor resize is handled by the spice-vdagent app in the *guest* system, it must be installed and running in the guest for that to work. It serves the
same purpose as the guest tools in vmware, virtualbox etc.
With a recent qemu (with spice client monitor config support) and a guest
with the kms qxl driver, the agent is no longer involved in resizing the
guest.


Ok, good to know. So how can I trace the interaction of kms/qxl.ko => spice-server => remote-viewer. I have already posted a debug trace from remote-viewer showing that the "monitor config" events received by remote-viewer are different when using MATE vs GNOME3.

In particular, with MATE we get a bunch of:

(remote-viewer:12916): GSpice-WARNING **: FIXME: only support monitor config with primary surface 0, but given config surface 5

Which seems suspicious to me, given that these are followed immediately by incorrect behavior and don't happen in GNOME3.

Ok. This is worse than suspicious. It's the bug. In the source gtk/spice-widget.c, right after this "FIXME" we goto "whole". Maybe a guru can explain why we need to bail out here and display the whole framebuffer on the second monitor *on purpose*. However, the following patch works for me:

diff -ur spice-gtk-0.23.orig/gtk/spice-widget.c spice-gtk-0.23/gtk/spice-widget.c
--- spice-gtk-0.23.orig/gtk/spice-widget.c	2014-02-06 06:07:13.000000000 -0500
+++ spice-gtk-0.23/gtk/spice-widget.c	2014-04-17 16:46:20.204422442 -0400
@@ -325,7 +325,7 @@
 whole:
     g_clear_pointer(&monitors, g_array_unref);
     /* by display whole surface */
-    update_area(display, 0, 0, d->width, d->height);
+    update_area(display, c->x, c->y, c->width, c->height);
     set_monitor_ready(display, true);
 }

Can someone explain why this would not be better than the currently broken behavior?

Note that after this patch, the code above the 'goto' label and the code below are basically the same.

It's very curious that running MATE in the VM triggers this but running GNOME3 does not, but nevertheless the bug is clearly in spice-gtk.

--
Thanks,
David Mansfield
Cobite, INC.



_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]