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

2020-09-23 Thread Ian Pilcher

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.

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?

--

 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 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

[Spice-devel] How to build Windows vdagent?

2020-10-28 Thread Ian Pilcher

Following up on my earlier thread re the agent's incompatibility with
"mixed" (QXL + passthrough) configurations.  I'd like to take a crack
at this issue, but I've been unable to find any instructions for
building the Windows vdagent.

Can anyone point me to the instructions?

Thanks!

--

 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] How to build Windows vdagent?

2020-10-29 Thread Ian Pilcher

On 10/29/20 3:10 AM, Frediano Ziglio wrote:

It depends on the environment you want to use.
Either you can use MingW + classic Autoconf (configure) and compile as many Unix
projects (better to have a Linux machine) or you can use CMake, better suited
for use with Visual Studio (for instance).


The MingW/Linux (Fedora) option would be easiest for me, but I can't get
it to work; I can't figure how to get around this error:

  configure: error: static libpng not found

I have installed every single *libpng* package in Fedora:

$ sudo dnf list '*libpng*'
Last metadata expiration check: 2:32:12 ago on Thu 29 Oct 2020 07:37:22 
AM CDT.

Installed Packages
libpng.i6862:1.6.37-3.fc32   @fedora
libpng.x86_64  2:1.6.37-3.fc32   @fedora
libpng-devel.i686  2:1.6.37-3.fc32   @fedora
libpng-devel.x86_642:1.6.37-3.fc32   @fedora
libpng-static.i686 2:1.6.37-3.fc32   @fedora
libpng-static.x86_64   2:1.6.37-3.fc32   @fedora
libpng-tools.x86_642:1.6.37-3.fc32   @fedora
libpng12.i686  1.2.57-11.fc32@fedora
libpng12.x86_641.2.57-11.fc32@fedora
libpng12-devel.i6861.2.57-11.fc32@fedora
libpng12-devel.x86_64  1.2.57-11.fc32@fedora
libpng15.i686  1.5.30-9.fc32 @fedora
libpng15.x86_641.5.30-9.fc32 @fedora
mingw32-libpng.noarch  1.6.37-3.fc32 @fedora
mingw32-libpng-static.noarch   1.6.37-3.fc32 @fedora
mingw64-libpng.noarch  1.6.37-3.fc32 @fedora
mingw64-libpng-static.noarch   1.6.37-3.fc32 @fedora

--

 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] How to build Windows vdagent?

2020-11-03 Thread Ian Pilcher

On 10/29/20 10:33 AM, Jakub Janku wrote:

are you using mingw64-configure?


I wasn't before, as I didn't know about it.  (Thus my original "how do I
do this" question.)


Sometimes, when you don't know how to build something, you can get
some hints from the pipeline configuration file, in this case
.gitlab-ci.yml.


That got me going.  With the hints from that file, I was able to build
the agent.

As it turns out, the "static libpng" error I was seeing was due to this:

  https://gitlab.freedesktop.org/spice/win32/vd_agent/-/issues/17

Thanks!

--

 In Soviet Russia, Google searches you!


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


[Spice-devel] [PATCH] desktop_layout: ignore unconnected video devices

2020-11-03 Thread Ian Pilcher

Currently, the Windows agent does not function properly if it detects a
non-QXL video adapter connected to the guest.  See:

  https://gitlab.freedesktop.org/spice/win32/vd_agent/-/issues/15
  https://gitlab.freedesktop.org/spice/win32/vd_agent/-/issues/13

This is true even when the non-QXL adapter does not have any displays
attached, such as when a physical GPU is passed through to the guest for
AI/ML workloads.

With this patch, the agent ignores the presence of unconnected video
outputs and the mouse works as expected.  If a display is connected to
a non-QXL adapter, the behavior is unchanged.  (Tested on Windows 10 Pro
x64.)

---
 vdagent/desktop_layout.cpp | 13 +
 1 file changed, 13 insertions(+)

diff --git a/vdagent/desktop_layout.cpp b/vdagent/desktop_layout.cpp
index 07074da..8b538a1 100644
--- a/vdagent/desktop_layout.cpp
+++ b/vdagent/desktop_layout.cpp
@@ -48,6 +48,16 @@ DesktopLayout::~DesktopLayout()
 delete _display_config;
 }

+static BOOL
+dev_has_monitor(DISPLAY_DEVICE &dev_info)
+{
+DISPLAY_DEVICE mon_info;
+
+ZeroMemory(&mon_info, sizeof(mon_info));
+mon_info.cb = sizeof(mon_info);
+return EnumDisplayDevices(dev_info.DeviceName, 0, &mon_info, 0);
+}
+
 static bool
 get_next_display(DWORD &dev_id, DISPLAY_DEVICE &dev_info)
 {
@@ -64,6 +74,9 @@ get_next_display(DWORD &dev_id, DISPLAY_DEVICE &dev_info)
 if (wcsstr(dev_info.DeviceString, L"Citrix Indirect Display")) {
 continue;
 }
+if (!dev_has_monitor(dev_info)) {
+continue;
+}
 return true;
 }
 return false;
--
2.26.2

--

 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] [PATCH] desktop_layout: ignore unconnected video devices

2020-11-04 Thread Ian Pilcher

On 11/4/20 1:45 AM, Frediano Ziglio wrote:

Did you test with multiple monitors, specially with the first(s) QXL disabled?


I've tested with multiple QXL displays, which appears to work just fine,
including when I disable the first QXL display with the display
settings.  (Disabling the actual QXL device in Device Manager messes us
the agent, because it causes a non-QXL "Microsoft Basic Display Driver"
adapter to appear.)

This patch doesn't change the behavior of the agent when a non-QXL
adapter has a monitor attached.  It's exactly as functional (or not) as
it is without the patch.

--

 In Soviet Russia, Google searches you!

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


[Spice-devel] Windows 7 dual-head - does it work?

2011-06-25 Thread Ian Pilcher
After figuring out the syntax required to start a VM with multiple QXL
devices, I've been able to get a "dual-head" Windows XP guest working.
(This is on a fully updated Fedora 15 system, using spicec.)

I have been unable to get this to work with Windows 7 (32-bit).  It
works fine in single-head mode, but I haven't been able to get the QXL
driver to work with the second QXL device.  (Device Manager just shows
it as a "Video Controller".)  I've tried various ways of installing the
driver; none of them has worked, and I've experienced a number of blue
screens during my attempts.

Has anyone got this working?  If so, how?

Alternatively, if this is known to not work, please tell me, so I can
stop wasting my time.  ;-)

Thanks!

-- 
========
Ian Pilcher arequip...@gmail.com
"If you're going to shift my paradigm ... at least buy me dinner first."


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


Re: [Spice-devel] Windows 7 dual-head - does it work?

2011-06-25 Thread Ian Pilcher
On 06/25/2011 02:00 PM, Alon Levy wrote:
> Works fine here. What version of the driver are you using? have you built
> it yourself or are you using the ones on spice-space (I hope we have some 
> there :)?

I am using version 0.6.1 from
http://spice-space.org/download/binaries/qxl-win32-0.6.1.zip

I am able to install the QXL driver for the "Standard VGA Adapter" (or
whatever Windows calls it) using the technique here:

http://lists.fedoraproject.org/pipermail/virt/2011-February/002543.html

Trying to use the same technique for the "Video Controller" gets me an
error message that the device can't start (code 10) followed by a BSOD.
I notice that qemu-kvm says:

qemu-kvm: virtio_ioport_write: unexpected address 0x13 value 0x1
qemu-kvm: virtio: trying to map MMIO memory

(I also got a repeating BSOD at the first reboot when I tried to install
Windows 7 SP1 with 2 QXL devices.  I had to remove the second QXL device
to complete the installation and then add it back.)

I am attaching the script that I use to start the guest.

Thanks!

-- 
============
Ian Pilcher arequip...@gmail.com
"If you're going to shift my paradigm ... at least buy me dinner first."



win7-dual.sh
Description: application/shellscript
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] Updated Windows QXL driver needed for SPICE 0.8?

2011-03-13 Thread Ian Pilcher
I am running Fedora 15 Alpha, which has been updated to SPICE 0.8.0.
This appears to cause a "black screen of death" when Windows (7 or XP)
loads the QXL driver from qxl-win32-0.6.1.zip.  spicec simply shows a
black screen, and there's nothing to do but kill the guest.

Downgrading the SPICE packages to the 0.7.x versions makes things work.

Are there protocol changes in 0.8 that make a new QXL driver necessary?

Thanks!

-- 
============
Ian Pilcher arequip...@gmail.com


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


Re: [Spice-devel] Updated Windows QXL driver needed for SPICE 0.8?

2011-03-14 Thread Ian Pilcher
On 03/14/2011 02:26 AM, Arnon Gilboa wrote:
> I guess they are outdated/broken in some way. We will build & upload a
> zip later today.

Looking forward to testing it.

Thanks!

-- 
========
Ian Pilcher arequip...@gmail.com


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