https://bugs.winehq.org/show_bug.cgi?id=47844
Bug ID: 47844 Summary: Add a dual-screen Wine VM Product: Wine-Testbot Version: unspecified Hardware: x86 OS: Linux Status: NEW Severity: normal Priority: P2 Component: unknown Assignee: wine-bugs@winehq.org Reporter: fgouget@codeweavers.com Distribution: ---
Wine has tests that deal with multi-head displays. These would need some matching multi-head test Wine VMs.
https://bugs.winehq.org/show_bug.cgi?id=47844
--- Comment #1 from François Gouget fgouget@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.
https://bugs.winehq.org/show_bug.cgi?id=47844
--- Comment #2 from François Gouget fgouget@codeweavers.com --- One positive point: multi-head does not seem to break screenshots for Linux guests. Maybe because they run vdagent. Even better, the screenshot contains both screen.
I also tried Xinerama mode, i.e. configuring the VM with two QXL graphics cards, in an attempt to avoid the issues mentioned in the previous post. However I could not get it to work with fvwm.
https://bugs.winehq.org/show_bug.cgi?id=47844
--- Comment #3 from François Gouget fgouget@codeweavers.com --- I also got the "Guest has not initialized the display (yet)." message in a Wine VM screenshot. So something else is afoot.
https://bugs.winehq.org/show_bug.cgi?id=47844
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|NEW |RESOLVED
--- Comment #4 from François Gouget fgouget@codeweavers.com --- The debian10 VM now uses this dual-screen configuration and the screenshots seem to work ok (at least most of the time). So I consider this done.
https://bugs.winehq.org/show_bug.cgi?id=47844
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #5 from François Gouget fgouget@codeweavers.com --- The screenshot issues should be dealt with as part of bug 44709 (guest-side screenshotting).
Closing.