[Bug 47844] Add a dual-screen Wine VM

WineHQ Bugzilla wine-bugs at winehq.org
Sun Sep 29 19:44:24 CDT 2019


https://bugs.winehq.org/show_bug.cgi?id=47844

--- Comment #1 from François Gouget <fgouget at codeweavers.com> ---
Officially multi-head setups are very easy with Linux guests in a QEmu VM, much
easier than with Windows guests. But that's all lies. Here's what's really
needed to get multi-head going with Debian 10.

1. virsh edit wtbdebian10 (this cannot be done from virt-manager!)
   Set heads=2 and double the memory in the QXL device. So this line

   <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1'
primary='yes'/>

   becomes:

   <model type='qxl' ram='131072' vram='131072' vgamem='32768' heads='2'
primary='yes'/>

2. In the guest install the spice-vdagent package. However note that in Debian
the required daemons are only started by desktop environments which honor
/etc/xdg/autostart (i.e. GNOME). We cannot run GNOME since its window manager
is not up to the task of running Wine's windowing tests. And fvwm does not
start the required spice-vdagent daemon.

3. So it's necessary to start spice-vdagent manually when the X session starts.
I found the easiest way to be to add a
/etc/X11/Xsession.d/90local-spice-vdagent file containing:

   /usr/bin/spice-vdagent &

4. Note that spice-vdagentd is not started on boot despite the presence of a
spice-vdagentd.service file. That's ok. That service is configured to start the
vdagentd daemon on demand when its socket is used. So starting spice-vdagent as
described above will trigger the start of spice-vdagentd.

5. With this setup Lightdm will not be running spice-vdagent. This can be fixed
by setting either display-setup-script or greeter-setup-script:

   display-setup-script=/usr/bin/spice-vdagent

   However that does not seem to make any noticeable difference (see below) so
I did not add this line.

6. Then virt-manager does not support multi-head displays. So once the VM has
booted one must connect to it with virt-viewer wtbdebian10 and go to View ->
Displays -> Display 2 to 'connect' the second screen. But there are some
gotchas.

   a. First spice-vdagent must be running. This means waiting for the winetest
user autologin.

   b. Then the second screen remains stuck in the 'Waiting for display 2'
state. The workaround is to log out and Lightdm fixes it. Then wait for the
autologin again.

   c. If you power off the VM the second screen will not be present on the next
boot. It can be added back going through steps 6a and 6b again. I don't know of
an API to add it back (it obviously exists but it may be a Spice API, not a
Libvirt one). That means the TestBot cannot auto-create live snapshots for
multi-head Wine VMs.

   d. Starting spice-vdagent in Lightdm changes none of the above.

7. Having a tablet (e.g. Virtio Tablet) for absolute mouse positions is not
necessary but it helps if one moves the virt-viewer windows around.

8. I thought at a point that using the Q35+BIOS virtual hardware instead of the
i440FX+BIOS one was necessary. But now I doubt so although I did not test to
confirm it.

To be fair, if one uses an Ubuntu/GNOME guest then the spice-vdagent issues are
automatically taken care of. However this does not solve points 1 and 6c.

Also vdagent is meant to integrate the guest with the host environment to allow
for features like resizing the guest desktop by resizing the viewer window on
the host, allow copy/paste to/from the guest, etc. None of this is useful to
Wine tests, particularly since no viewer will be connected anyway. Hopefully
this also means vdagent will not interfere with the Wine tests.

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


More information about the wine-bugs mailing list