Problem: Gnome3 and Cinnamon work in dual head setup, but other desktops don't (eg. mate, lxde, fluxbox). Steps to reproduce: use remote-viewer to connect to a vm running lxde. Try to open a second monitor. Actual results: The second remote-viewer window opens, but never connects. Expected results: The second remote-viewer should open and connect, showing me the desktop. Additional info: use remote-viewer to connect to a vm running gnome3 or cinnamon works as expected. 2D vs 3D problem? More info, including debugging: https://www.mail-archive.com/spice-devel@lists.freedesktop.org/msg16307.html
Created attachment 99946 [details] [review] use surface_id 0 for primary surface on all monitors spice-server and downstream code expect that the primary surface will always have surface_id = 0. In a dual head environment, all monitors render portions of the primary surface. However, when the monitor config events are generated and sent, the primary surface (which has an actual id which is NEVER 0 once it is allocated), is only mapped to the correct identifier (0) for the primary head (where crtc index is 0). The fix is to look at the "primary" flag in the bo and always use id 0, irrespective of which head is being configured.
Oh, and by the way, the reason it works for GNOME3 is a coincidence. As mentioned in the description, all surfaces have id > 0 _once allocated_. In GNOME3, the order of the ioctl to resize the monitors is slightly different and the monitor change events are generated before the surface has been "allocated". Unallocated surfaces have an internal id of '0' so it just works by coincidence.
This fix was committed into drm-next: http://cgit.freedesktop.org/~airlied/linux/commit/?h=drm-next&id=52571ad5f4c57067ac593a6bdb1f7a35ed032d27 So it's problably just a matter of time before the fixed kernel is available at stores near you. I have been using the patched qxl.ko for a while and it works for me. So with that, I think RESOLVED is in order.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.