Re: [Spice-devel] Windows 10 VDAgent incompatible with "hidden" KVM?

2020-09-25 Thread Frediano Ziglio
> 
> I'm in the process of setting up a Windows 10 (x64) VM with an NVIDIA
> Quadro P1000 GPU (using PCI passthrough).  The GPU will be used only for
> video processing, so it has no displays connected, and access to the
> VM's user interface is via RDP or (preferably) SPICE.
> 
> I have everything working, right up to the point at which I install the
> SPICE Guest Tools, specifically the guest agent.  As soon as the agent
> is installed, the VM stops responding to any mouse actions; the pointer
> is still visible, but it has no effect.
> 
> I am able to connect to the guest with RDP and stop the SPICE VDAgent
> service.  As soon as the service is stopped, the mouse begins working
> again in the SPICE console (and restarting the agent again causes the
> mouse to stop working, etc.).
> 
> This seems to be related to the "hidden KVM" feature that is required
> by the NVIDIA drivers.
> 
>
>  
>
> 
> Without this flag, the NVIDIA drivers refuse to load in a virtual
> machine, giving a "Code 43" error.
> 

Do you know what this flag is doing?
Can you post the agent logs when it's not working?

> If I remove these lines from my guest's domain XML, I an able to enable
> the SPICE agent in my Windows 10 guest without breaking my mouse, but of
> course the NVIDIA GPU doesn't work.
> 
> Is there any way that this combination can be made to work?
> 


Frediano

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [PATCH v2 0/6] Add physical display dimensions to spice/virtio-gpu

2020-09-25 Thread marcandre . lureau
From: Marc-André Lureau 

Hi,

This series improves the support for HiDPI displays with Spice.
The related spice series have already been merged.

v2:
- add patch to "spice: remove the single monitor config logic" (Gerd)

Marc-André Lureau (6):
  edid: fix physical display size computation
  edid: use physical dimensions if available
  ui: add getter for UIInfo
  spice: remove the single monitor config logic
  spice: get monitors physical dimension
  virtio-gpu: set physical dimensions for EDID

 hw/display/edid-generate.c | 36 +++--
 hw/display/virtio-gpu-base.c   |  2 ++
 hw/display/virtio-gpu.c|  2 ++
 include/hw/display/edid.h  |  5 -
 include/hw/virtio/virtio-gpu.h |  1 +
 include/ui/console.h   |  4 
 qemu-edid.c| 11 --
 ui/console.c   |  7 +++
 ui/spice-display.c | 37 +-
 9 files changed, 68 insertions(+), 37 deletions(-)

-- 
2.26.2


___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [PATCH v2 2/6] edid: use physical dimensions if available

2020-09-25 Thread marcandre . lureau
From: Marc-André Lureau 

Replace dpi with width_mm/height_mm in qemu_edid_info.

Use it when set (non-zero) to compute the DPI and generate the EDID.

Signed-off-by: Marc-André Lureau 
---
 hw/display/edid-generate.c | 36 +---
 include/hw/display/edid.h  |  5 -
 qemu-edid.c| 11 +--
 3 files changed, 38 insertions(+), 14 deletions(-)

diff --git a/hw/display/edid-generate.c b/hw/display/edid-generate.c
index 618c74e1df..1665b7cbb2 100644
--- a/hw/display/edid-generate.c
+++ b/hw/display/edid-generate.c
@@ -205,12 +205,8 @@ static void edid_desc_dummy(uint8_t *desc)
 
 static void edid_desc_timing(uint8_t *desc,
  uint32_t xres, uint32_t yres,
- uint32_t dpi)
+ uint32_t xmm, uint32_t ymm)
 {
-/* physical display size */
-uint32_t xmm = xres * 254 / 10 / dpi;
-uint32_t ymm = yres * 254 / 10 / dpi;
-
 /* pull some realistic looking timings out of thin air */
 uint32_t xfront = xres * 25 / 100;
 uint32_t xsync  = xres *  3 / 100;
@@ -290,12 +286,24 @@ static void edid_colorspace(uint8_t *edid,
 edid[34] = white_y >> 2;
 }
 
+static uint32_t qemu_edid_dpi_from_mm(uint32_t mm, uint32_t res)
+{
+return res * 254 / 10 / mm;
+}
+
+uint32_t qemu_edid_dpi_to_mm(uint32_t dpi, uint32_t res)
+{
+return res * 254 / 10 / dpi;
+}
+
 void qemu_edid_generate(uint8_t *edid, size_t size,
 qemu_edid_info *info)
 {
 uint32_t desc = 54;
 uint8_t *xtra3 = NULL;
 uint8_t *dta = NULL;
+uint32_t width_mm, height_mm;
+uint32_t dpi = 100; /* if no width_mm/height_mm */
 
 /* === set defaults  === */
 
@@ -305,15 +313,20 @@ void qemu_edid_generate(uint8_t *edid, size_t size,
 if (!info->name) {
 info->name = "QEMU Monitor";
 }
-if (!info->dpi) {
-info->dpi = 100;
-}
 if (!info->prefx) {
 info->prefx = 1024;
 }
 if (!info->prefy) {
 info->prefy = 768;
 }
+if (info->width_mm && info->height_mm) {
+width_mm = info->width_mm;
+height_mm = info->height_mm;
+dpi = qemu_edid_dpi_from_mm(width_mm, info->prefx);
+} else {
+width_mm = qemu_edid_dpi_to_mm(dpi, info->prefx);
+height_mm = qemu_edid_dpi_to_mm(dpi, info->prefy);
+}
 
 /* === extensions  === */
 
@@ -360,8 +373,8 @@ void qemu_edid_generate(uint8_t *edid, size_t size,
 edid[20] = 0xa5;
 
 /* screen size: undefined */
-edid[21] = info->prefx * 254 / 100 / info->dpi;
-edid[22] = info->prefy * 254 / 100 / info->dpi;
+edid[21] = width_mm / 10;
+edid[22] = height_mm / 10;
 
 /* display gamma: 2.2 */
 edid[23] = 220 - 100;
@@ -387,7 +400,8 @@ void qemu_edid_generate(uint8_t *edid, size_t size,
 
 /* === descriptor blocks === */
 
-edid_desc_timing(edid + desc, info->prefx, info->prefy, info->dpi);
+edid_desc_timing(edid + desc, info->prefx, info->prefy,
+ width_mm, height_mm);
 desc += 18;
 
 edid_desc_ranges(edid + desc);
diff --git a/include/hw/display/edid.h b/include/hw/display/edid.h
index 5b1de57f24..1f8fc9b375 100644
--- a/include/hw/display/edid.h
+++ b/include/hw/display/edid.h
@@ -5,7 +5,8 @@ typedef struct qemu_edid_info {
 const char *vendor; /* http://www.uefi.org/pnp_id_list */
 const char *name;
 const char *serial;
-uint32_tdpi;
+uint16_twidth_mm;
+uint16_theight_mm;
 uint32_tprefx;
 uint32_tprefy;
 uint32_tmaxx;
@@ -18,6 +19,8 @@ size_t qemu_edid_size(uint8_t *edid);
 void qemu_edid_region_io(MemoryRegion *region, Object *owner,
  uint8_t *edid, size_t size);
 
+uint32_t qemu_edid_dpi_to_mm(uint32_t dpi, uint32_t res);
+
 #define DEFINE_EDID_PROPERTIES(_state, _edid_info)  \
 DEFINE_PROP_UINT32("xres", _state, _edid_info.prefx, 0),\
 DEFINE_PROP_UINT32("yres", _state, _edid_info.prefy, 0),\
diff --git a/qemu-edid.c b/qemu-edid.c
index 46eef70498..1db3372b98 100644
--- a/qemu-edid.c
+++ b/qemu-edid.c
@@ -9,7 +9,10 @@
 #include "qemu/cutils.h"
 #include "hw/display/edid.h"
 
-static qemu_edid_info info;
+static qemu_edid_info info = (qemu_edid_info) {
+.prefx = 1024,
+.prefy = 768,
+};
 
 static void usage(FILE *out)
 {
@@ -39,6 +42,7 @@ int main(int argc, char *argv[])
 {
 FILE *outfile = NULL;
 uint8_t blob[256];
+uint32_t dpi = 100;
 int rc;
 
 for (;;) {
@@ -83,7 +87,7 @@ int main(int argc, char *argv[])
 }
 break;
 case 'd':
-if (qemu_strtoui(optarg, NULL, 10, &info.dpi) < 0) {
+if (qemu_strtoui(optarg, NULL, 10, &dpi) < 0) {
 fprintf(stderr, "not a number: %s\n", optarg);
 exit(1);
 }
@@ -110,6 +114,9 @@ int main(int argc, char *argv[])
 outfile 

[Spice-devel] [PATCH v2 3/6] ui: add getter for UIInfo

2020-09-25 Thread marcandre . lureau
From: Marc-André Lureau 

The following patch is going to introduce extra fields / details to
UIInfo. Add a getter and keep the current values, instead of memset(0)

Signed-off-by: Marc-André Lureau 
---
 include/ui/console.h | 1 +
 ui/console.c | 7 +++
 ui/spice-display.c   | 2 +-
 3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/include/ui/console.h b/include/ui/console.h
index 79e301f946..353d2e49a1 100644
--- a/include/ui/console.h
+++ b/include/ui/console.h
@@ -264,6 +264,7 @@ void update_displaychangelistener(DisplayChangeListener 
*dcl,
 void unregister_displaychangelistener(DisplayChangeListener *dcl);
 
 bool dpy_ui_info_supported(QemuConsole *con);
+const QemuUIInfo *dpy_get_ui_info(const QemuConsole *con);
 int dpy_set_ui_info(QemuConsole *con, QemuUIInfo *info);
 
 void dpy_gfx_update(QemuConsole *con, int x, int y, int w, int h);
diff --git a/ui/console.c b/ui/console.c
index 7592c3c324..54a74c0b16 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -1516,6 +1516,13 @@ bool dpy_ui_info_supported(QemuConsole *con)
 return con->hw_ops->ui_info != NULL;
 }
 
+const QemuUIInfo *dpy_get_ui_info(const QemuConsole *con)
+{
+assert(con != NULL);
+
+return &con->ui_info;
+}
+
 int dpy_set_ui_info(QemuConsole *con, QemuUIInfo *info)
 {
 assert(con != NULL);
diff --git a/ui/spice-display.c b/ui/spice-display.c
index 19632fdf6c..625d9232b9 100644
--- a/ui/spice-display.c
+++ b/ui/spice-display.c
@@ -672,7 +672,7 @@ static int interface_client_monitors_config(QXLInstance 
*sin,
 return 1;
 }
 
-memset(&info, 0, sizeof(info));
+info = *dpy_get_ui_info(ssd->dcl.con);
 
 if (mc->num_of_monitors == 1) {
 /*
-- 
2.26.2

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [PATCH v2 4/6] spice: remove the single monitor config logic

2020-09-25 Thread marcandre . lureau
From: Marc-André Lureau 

Introduced in commit 9c956e646178fee8c14ce7dfae5a9d7cb901876c ("spice:
prepare for upcoming spice-server change"), the new logic never
materialized in the spice server source tree. Let's remove it for now,
until it actually changes in Spice.

Signed-off-by: Marc-André Lureau 
---
 ui/spice-display.c | 26 --
 1 file changed, 4 insertions(+), 22 deletions(-)

diff --git a/ui/spice-display.c b/ui/spice-display.c
index 625d9232b9..b304c13149 100644
--- a/ui/spice-display.c
+++ b/ui/spice-display.c
@@ -674,28 +674,10 @@ static int interface_client_monitors_config(QXLInstance 
*sin,
 
 info = *dpy_get_ui_info(ssd->dcl.con);
 
-if (mc->num_of_monitors == 1) {
-/*
- * New spice-server version which filters the list of monitors
- * to only include those that belong to our display channel.
- *
- * single-head configuration (where filtering doesn't matter)
- * takes this code path too.
- */
-info.width  = mc->monitors[0].width;
-info.height = mc->monitors[0].height;
-} else {
-/*
- * Old spice-server which gives us all monitors, so we have to
- * figure ourself which entry we need.  Array index is the
- * channel_id, which is the qemu console index, see
- * qemu_spice_add_display_interface().
- */
-head = qemu_console_get_index(ssd->dcl.con);
-if (mc->num_of_monitors > head) {
-info.width  = mc->monitors[head].width;
-info.height = mc->monitors[head].height;
-}
+head = qemu_console_get_index(ssd->dcl.con);
+if (mc->num_of_monitors > head) {
+info.width  = mc->monitors[head].width;
+info.height = mc->monitors[head].height;
 }
 
 trace_qemu_spice_ui_info(ssd->qxl.id, info.width, info.height);
-- 
2.26.2

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [PATCH v2 5/6] spice: get monitors physical dimension

2020-09-25 Thread marcandre . lureau
From: Marc-André Lureau 

Note that for consistency, we use the same logic as MonitorsConfig to
figure out the associated monitor. However, I can't find traces of the
discussion/patches about the "new spice-server" behaviour: it still uses
the multiple-configurations path in git master.

Signed-off-by: Marc-André Lureau 
---
 include/ui/console.h | 3 +++
 ui/spice-display.c   | 9 +
 2 files changed, 12 insertions(+)

diff --git a/include/ui/console.h b/include/ui/console.h
index 353d2e49a1..e7303d8b98 100644
--- a/include/ui/console.h
+++ b/include/ui/console.h
@@ -119,6 +119,9 @@ typedef struct DisplaySurface {
 } DisplaySurface;
 
 typedef struct QemuUIInfo {
+/* physical dimension */
+uint16_t width_mm;
+uint16_t height_mm;
 /* geometry */
 int   xoff;
 int   yoff;
diff --git a/ui/spice-display.c b/ui/spice-display.c
index b304c13149..a10f72bc5c 100644
--- a/ui/spice-display.c
+++ b/ui/spice-display.c
@@ -679,7 +679,16 @@ static int interface_client_monitors_config(QXLInstance 
*sin,
 info.width  = mc->monitors[head].width;
 info.height = mc->monitors[head].height;
 }
+#if SPICE_SERVER_VERSION >= 0x000e04 /* release 0.14.4 */
+if (mc->flags & VD_AGENT_CONFIG_MONITORS_FLAG_PHYSICAL_SIZE) {
+VDAgentMonitorMM *mm = (void *)&mc->monitors[mc->num_of_monitors];
 
+if (mc->num_of_monitors > head) {
+info.width_mm = mm[head].width;
+info.height_mm = mm[head].height;
+}
+}
+#endif
 trace_qemu_spice_ui_info(ssd->qxl.id, info.width, info.height);
 dpy_set_ui_info(ssd->dcl.con, &info);
 return 1;
-- 
2.26.2

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [PATCH v2 6/6] virtio-gpu: set physical dimensions for EDID

2020-09-25 Thread marcandre . lureau
From: Marc-André Lureau 

Signed-off-by: Marc-André Lureau 
---
 hw/display/virtio-gpu-base.c   | 2 ++
 hw/display/virtio-gpu.c| 2 ++
 include/hw/virtio/virtio-gpu.h | 1 +
 3 files changed, 5 insertions(+)

diff --git a/hw/display/virtio-gpu-base.c b/hw/display/virtio-gpu-base.c
index aeb8723542..40ccd00f94 100644
--- a/hw/display/virtio-gpu-base.c
+++ b/hw/display/virtio-gpu-base.c
@@ -82,6 +82,8 @@ static int virtio_gpu_ui_info(void *opaque, uint32_t idx, 
QemuUIInfo *info)
 g->req_state[idx].y = info->yoff;
 g->req_state[idx].width = info->width;
 g->req_state[idx].height = info->height;
+g->req_state[idx].width_mm = info->width_mm;
+g->req_state[idx].height_mm = info->height_mm;
 
 if (info->width && info->height) {
 g->enabled_output_bitmask |= (1 << idx);
diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
index 90be4e3ed7..f3b71fa9c7 100644
--- a/hw/display/virtio-gpu.c
+++ b/hw/display/virtio-gpu.c
@@ -212,6 +212,8 @@ virtio_gpu_generate_edid(VirtIOGPU *g, int scanout,
 {
 VirtIOGPUBase *b = VIRTIO_GPU_BASE(g);
 qemu_edid_info info = {
+.width_mm = b->req_state[scanout].width_mm,
+.height_mm = b->req_state[scanout].height_mm,
 .prefx = b->req_state[scanout].width,
 .prefy = b->req_state[scanout].height,
 };
diff --git a/include/hw/virtio/virtio-gpu.h b/include/hw/virtio/virtio-gpu.h
index 455e0a7433..1aed7275c8 100644
--- a/include/hw/virtio/virtio-gpu.h
+++ b/include/hw/virtio/virtio-gpu.h
@@ -62,6 +62,7 @@ struct virtio_gpu_scanout {
 };
 
 struct virtio_gpu_requested_state {
+uint16_t width_mm, height_mm;
 uint32_t width, height;
 int x, y;
 };
-- 
2.26.2

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [PATCH v2 1/6] edid: fix physical display size computation

2020-09-25 Thread marcandre . lureau
From: Marc-André Lureau 

Divide the resolution by the DPI, and multiply to mm.

Note the computation done for edid[21/22] is correct (in cm).

Signed-off-by: Marc-André Lureau 
---
 hw/display/edid-generate.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/display/edid-generate.c b/hw/display/edid-generate.c
index e58472fde5..618c74e1df 100644
--- a/hw/display/edid-generate.c
+++ b/hw/display/edid-generate.c
@@ -208,8 +208,8 @@ static void edid_desc_timing(uint8_t *desc,
  uint32_t dpi)
 {
 /* physical display size */
-uint32_t xmm = xres * dpi / 254;
-uint32_t ymm = yres * dpi / 254;
+uint32_t xmm = xres * 254 / 10 / dpi;
+uint32_t ymm = yres * 254 / 10 / dpi;
 
 /* pull some realistic looking timings out of thin air */
 uint32_t xfront = xres * 25 / 100;
-- 
2.26.2

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] Windows 10 VDAgent incompatible with "hidden" KVM?

2020-09-25 Thread Ian Pilcher

On 9/25/20 2:34 AM, Frediano Ziglio wrote:



  


Without this flag, the NVIDIA drivers refuse to load in a virtual
machine, giving a "Code 43" error.



Do you know what this flag is doing?


The only documentation that I've been able to find is on the libvirt
site:

  https://libvirt.org/formatdomain.html

All it says is "hide the hypervisor from standard MSR based discovery."

On reflection it's entirely possible that its the NVIDIA drivers them-
selves that are breaking things, and the breakage only shows up when the
flag is set, because the drivers don't run without the flag.

A bit of testing shows that this is the case.  As soon as I disable the
P1000 in Device Manager, my mouse begins working.  In fact, I can
re-enable the P1000, and the mouse continues to work.  It's acting like
it's some sort of ordering issue.

And as a further test, stopping and starting the agent while the GPU is
enabled causes the mouse to stop working again.  It definitely seems
that NVIDIA driver "grabs" the mouse if it starts/runs before the agent.


Can you post the agent logs when it's not working?


Where are the agent logs stored?

--

 In Soviet Russia, Google searches you!

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] Windows 10 VDAgent incompatible with "hidden" KVM?

2020-09-25 Thread Ian Pilcher

On 9/25/20 9:47 AM, Ian Pilcher wrote:

On 9/25/20 2:34 AM, Frediano Ziglio wrote:


Can you post the agent logs when it's not working?


Where are the agent logs stored?



Found 'em.

Here is the vdagent.log when the GPU is disabled (when the mouse works):

4348::INFO::2020-09-25 10:26:31,627::run::***Agent started in session 1***
4348::INFO::2020-09-25 10:26:31,627::log_version::0.9.0.0
4348::INFO::2020-09-25 10:26:31,627::debug_print_config::\\.\DISPLAY1 
[Before SetDisplayConfig] (0,0) (1680x1050).
4348::INFO::2020-09-25 10:26:31,627::set_display_config::path states 
says nothing changed

4348::INFO::2020-09-25 10:26:31,627::consistent_displays::#qxls 1 #others 0
4348::INFO::2020-09-25 10:26:31,643::send_announce_capabilities::Sending 
capabilities:

4348::INFO::2020-09-25 10:26:31,643::send_announce_capabilities::6B7
4348::INFO::2020-09-25 10:26:31,643::run::Connected to server
4348::INFO::2020-09-25 
10:26:31,643::input_desktop_message_loop::Desktop: Winlogon
4348::INFO::2020-09-25 10:26:31,658::handle_announce_capabilities::Got 
capabilities (1)

4348::INFO::2020-09-25 10:26:31,674::handle_announce_capabilities::35077
4348::INFO::2020-09-25 10:26:31,674::send_announce_capabilities::Sending 
capabilities:

4348::INFO::2020-09-25 10:26:31,674::send_announce_capabilities::6B7
4348::INFO::2020-09-25 10:26:31,674::handle_announce_capabilities::Got 
capabilities (1)

4348::INFO::2020-09-25 10:26:31,674::handle_announce_capabilities::35077
4348::INFO::2020-09-25 10:26:31,674::set::setting display options
4348::INFO::2020-09-25 10:26:31,674::get_user_process_id::explorer.exe 
not found
4348::INFO::2020-09-25 
10:26:31,674::reload_from_registry::get_user_process_id failed
4348::INFO::2020-09-25 10:26:31,674::handle_max_clipboard::Set max 
clipboard size: 104857600
4348::INFO::2020-09-25 10:26:31,674::handle_mon_config::0. 1680*1050*32 
(0,0) 1

4348::INFO::2020-09-25 10:26:31,674::consistent_displays::#qxls 1 #others 0
4348::INFO::2020-09-25 10:26:31,674::update_mode_position::\\.\DISPLAY1 
updated path mode to (0, 0) - (1680 x1050)
4348::INFO::2020-09-25 10:26:31,674::handle_max_clipboard::Set max 
clipboard size: 104857600
4348::INFO::2020-09-25 10:26:31,674::handle_mon_config::0. 1680*1050*32 
(0,0) 1

4348::INFO::2020-09-25 10:26:31,674::consistent_displays::#qxls 1 #others 0
4348::INFO::2020-09-25 10:26:31,674::update_mode_position::\\.\DISPLAY1 
updated path mode to (0, 0) - (1680 x1050)

4348::INFO::2020-09-25 10:26:33,408::handle_control_event::Control command 3
4348::INFO::2020-09-25 10:26:33,408::handle_control_event::session logon
4348::INFO::2020-09-25 10:26:36,440::handle_control_event::Control command 2
4348::INFO::2020-09-25 
10:26:36,440::input_desktop_message_loop::Desktop: Default
4348::INFO::2020-09-25 10:26:36,440::input_desktop_message_loop::First 
display setting

4348::INFO::2020-09-25 10:26:36,440::load::loading display setting
4348::INFO::2020-09-25 10:26:36,440::reload_from_registry::explorer pid 5796
4348::INFO::2020-09-25 10:26:36,440::reload_wallpaper::
4348::INFO::2020-09-25 10:26:36,440::reload_wallpaper::wallpaper wasn't 
disabled

4348::INFO::2020-09-25 10:26:36,440::reload_font_smoothing::
4348::INFO::2020-09-25 10:26:36,440::reload_font_smoothing::font 
smoothing value didn't change

4348::INFO::2020-09-25 10:26:36,440::reload_animation::
4348::INFO::2020-09-25 10:26:36,440::reload_win_animation::
4348::INFO::2020-09-25 10:26:36,440::reload_win_animation::reload window 
animation: success

4348::INFO::2020-09-25 10:26:36,440::reload_ui_effects::
4348::INFO::2020-09-25 
10:26:36,440::reload_ui_effects::UserPreferencesMask = 80071e9e 12

4348::INFO::2020-09-25 10:26:46,268::handle_control_event::Control command 2
4348::INFO::2020-09-25 
10:26:46,268::input_desktop_message_loop::Desktop: Winlogon

4348::INFO::2020-09-25 10:26:50,596::handle_control_event::Control command 2
4348::INFO::2020-09-25 
10:26:50,596::input_desktop_message_loop::Desktop: Default

4348::INFO::2020-09-25 10:27:48,096::event_dispatcher::received stop event
4348::INFO::2020-09-25 10:27:48,112::run::Agent stopped

And here is vdagent.log when the GPU is enabled (when the mouse doesn't
work):

4172::INFO::2020-09-25 10:09:09,885::run::***Agent started in session 1***
4172::INFO::2020-09-25 10:09:09,885::log_version::0.9.0.0
4172::INFO::2020-09-25 10:09:09,885::debug_print_config::\\.\DISPLAY1 
[Before SetDisplayConfig] (0,0) (1680x1050).
4172::INFO::2020-09-25 10:09:09,885::set_display_config::path states 
says nothing changed

4172::INFO::2020-09-25 10:09:09,885::consistent_displays::#qxls 1 #others 4
4172::INFO::2020-09-25 10:09:09,885::run::No QXL devices!
4172::INFO::2020-09-25 10:09:09,901::send_announce_capabilities::Sending 
capabilities:

4172::INFO::2020-09-25 10:09:09,901::send_announce_capabilities::6B7
4172::INFO::2020-09-25 10:09:09,901::run::Connected to server
4172::INFO::2020-09-25 
10:09:09,901::input_desktop_message_loop::Desktop: Winlogon
4172::INFO::2020-09-25 10:09:09,916::handle_anno

Re: [Spice-devel] Windows 10 VDAgent incompatible with "hidden" KVM?

2020-09-25 Thread Frediano Ziglio
> 
> On 9/25/20 9:47 AM, Ian Pilcher wrote:
> > On 9/25/20 2:34 AM, Frediano Ziglio wrote:
> > 
> >> Can you post the agent logs when it's not working?
> > 
> > Where are the agent logs stored?
> > 
> 
> Found 'em.
> 
> Here is the vdagent.log when the GPU is disabled (when the mouse works):
> 
> 4348::INFO::2020-09-25 10:26:31,627::run::***Agent started in session 1***
> 4348::INFO::2020-09-25 10:26:31,627::log_version::0.9.0.0
> 4348::INFO::2020-09-25 10:26:31,627::debug_print_config::\\.\DISPLAY1
> [Before SetDisplayConfig] (0,0) (1680x1050).
> 4348::INFO::2020-09-25 10:26:31,627::set_display_config::path states
> says nothing changed
> 4348::INFO::2020-09-25 10:26:31,627::consistent_displays::#qxls 1 #others 0
> 4348::INFO::2020-09-25 10:26:31,643::send_announce_capabilities::Sending
> capabilities:
> 4348::INFO::2020-09-25 10:26:31,643::send_announce_capabilities::6B7
> 4348::INFO::2020-09-25 10:26:31,643::run::Connected to server
> 4348::INFO::2020-09-25
> 10:26:31,643::input_desktop_message_loop::Desktop: Winlogon
> 4348::INFO::2020-09-25 10:26:31,658::handle_announce_capabilities::Got
> capabilities (1)
> 4348::INFO::2020-09-25 10:26:31,674::handle_announce_capabilities::35077
> 4348::INFO::2020-09-25 10:26:31,674::send_announce_capabilities::Sending
> capabilities:
> 4348::INFO::2020-09-25 10:26:31,674::send_announce_capabilities::6B7
> 4348::INFO::2020-09-25 10:26:31,674::handle_announce_capabilities::Got
> capabilities (1)
> 4348::INFO::2020-09-25 10:26:31,674::handle_announce_capabilities::35077
> 4348::INFO::2020-09-25 10:26:31,674::set::setting display options
> 4348::INFO::2020-09-25 10:26:31,674::get_user_process_id::explorer.exe
> not found
> 4348::INFO::2020-09-25
> 10:26:31,674::reload_from_registry::get_user_process_id failed
> 4348::INFO::2020-09-25 10:26:31,674::handle_max_clipboard::Set max
> clipboard size: 104857600
> 4348::INFO::2020-09-25 10:26:31,674::handle_mon_config::0. 1680*1050*32
> (0,0) 1
> 4348::INFO::2020-09-25 10:26:31,674::consistent_displays::#qxls 1 #others 0
> 4348::INFO::2020-09-25 10:26:31,674::update_mode_position::\\.\DISPLAY1
> updated path mode to (0, 0) - (1680 x1050)
> 4348::INFO::2020-09-25 10:26:31,674::handle_max_clipboard::Set max
> clipboard size: 104857600
> 4348::INFO::2020-09-25 10:26:31,674::handle_mon_config::0. 1680*1050*32
> (0,0) 1
> 4348::INFO::2020-09-25 10:26:31,674::consistent_displays::#qxls 1 #others 0
> 4348::INFO::2020-09-25 10:26:31,674::update_mode_position::\\.\DISPLAY1
> updated path mode to (0, 0) - (1680 x1050)
> 4348::INFO::2020-09-25 10:26:33,408::handle_control_event::Control command 3
> 4348::INFO::2020-09-25 10:26:33,408::handle_control_event::session logon
> 4348::INFO::2020-09-25 10:26:36,440::handle_control_event::Control command 2
> 4348::INFO::2020-09-25
> 10:26:36,440::input_desktop_message_loop::Desktop: Default
> 4348::INFO::2020-09-25 10:26:36,440::input_desktop_message_loop::First
> display setting
> 4348::INFO::2020-09-25 10:26:36,440::load::loading display setting
> 4348::INFO::2020-09-25 10:26:36,440::reload_from_registry::explorer pid 5796
> 4348::INFO::2020-09-25 10:26:36,440::reload_wallpaper::
> 4348::INFO::2020-09-25 10:26:36,440::reload_wallpaper::wallpaper wasn't
> disabled
> 4348::INFO::2020-09-25 10:26:36,440::reload_font_smoothing::
> 4348::INFO::2020-09-25 10:26:36,440::reload_font_smoothing::font
> smoothing value didn't change
> 4348::INFO::2020-09-25 10:26:36,440::reload_animation::
> 4348::INFO::2020-09-25 10:26:36,440::reload_win_animation::
> 4348::INFO::2020-09-25 10:26:36,440::reload_win_animation::reload window
> animation: success
> 4348::INFO::2020-09-25 10:26:36,440::reload_ui_effects::
> 4348::INFO::2020-09-25
> 10:26:36,440::reload_ui_effects::UserPreferencesMask = 80071e9e 12
> 4348::INFO::2020-09-25 10:26:46,268::handle_control_event::Control command 2
> 4348::INFO::2020-09-25
> 10:26:46,268::input_desktop_message_loop::Desktop: Winlogon
> 4348::INFO::2020-09-25 10:26:50,596::handle_control_event::Control command 2
> 4348::INFO::2020-09-25
> 10:26:50,596::input_desktop_message_loop::Desktop: Default
> 4348::INFO::2020-09-25 10:27:48,096::event_dispatcher::received stop event
> 4348::INFO::2020-09-25 10:27:48,112::run::Agent stopped
> 
> And here is vdagent.log when the GPU is enabled (when the mouse doesn't
> work):
> 
> 4172::INFO::2020-09-25 10:09:09,885::run::***Agent started in session 1***
> 4172::INFO::2020-09-25 10:09:09,885::log_version::0.9.0.0
> 4172::INFO::2020-09-25 10:09:09,885::debug_print_config::\\.\DISPLAY1
> [Before SetDisplayConfig] (0,0) (1680x1050).
> 4172::INFO::2020-09-25 10:09:09,885::set_display_config::path states
> says nothing changed
> 4172::INFO::2020-09-25 10:09:09,885::consistent_displays::#qxls 1 #others 4
> 4172::INFO::2020-09-25 10:09:09,885::run::No QXL devices!
> 4172::INFO::2020-09-25 10:09:09,901::send_announce_capabilities::Sending
> capabilities:
> 4172::INFO::2020-09-25 10:09:09,901::send_announce_capabilities::6B7
> 4172::INFO::2020-09-25 10:09

Re: [Spice-devel] [PATCH v2 5/6] spice: get monitors physical dimension

2020-09-25 Thread Frediano Ziglio
> 
> From: Marc-André Lureau 
> 
> Note that for consistency, we use the same logic as MonitorsConfig to
> figure out the associated monitor. However, I can't find traces of the
> discussion/patches about the "new spice-server" behaviour: it still uses
> the multiple-configurations path in git master.
> 

This part is now obsolete.

> Signed-off-by: Marc-André Lureau 
> ---
>  include/ui/console.h | 3 +++
>  ui/spice-display.c   | 9 +
>  2 files changed, 12 insertions(+)
> 
> diff --git a/include/ui/console.h b/include/ui/console.h
> index 353d2e49a1..e7303d8b98 100644
> --- a/include/ui/console.h
> +++ b/include/ui/console.h
> @@ -119,6 +119,9 @@ typedef struct DisplaySurface {
>  } DisplaySurface;
>  
>  typedef struct QemuUIInfo {
> +/* physical dimension */
> +uint16_t width_mm;
> +uint16_t height_mm;
>  /* geometry */
>  int   xoff;
>  int   yoff;
> diff --git a/ui/spice-display.c b/ui/spice-display.c
> index b304c13149..a10f72bc5c 100644
> --- a/ui/spice-display.c
> +++ b/ui/spice-display.c
> @@ -679,7 +679,16 @@ static int interface_client_monitors_config(QXLInstance
> *sin,
>  info.width  = mc->monitors[head].width;
>  info.height = mc->monitors[head].height;
>  }
> +#if SPICE_SERVER_VERSION >= 0x000e04 /* release 0.14.4 */
> +if (mc->flags & VD_AGENT_CONFIG_MONITORS_FLAG_PHYSICAL_SIZE) {
> +VDAgentMonitorMM *mm = (void *)&mc->monitors[mc->num_of_monitors];
>  
> +if (mc->num_of_monitors > head) {

This check is the same of above. Won't be better to move al these block
inside the above if block and remove here?

> +info.width_mm = mm[head].width;
> +info.height_mm = mm[head].height;
> +}
> +}
> +#endif
>  trace_qemu_spice_ui_info(ssd->qxl.id, info.width, info.height);
>  dpy_set_ui_info(ssd->dcl.con, &info);
>  return 1;

Frediano

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel