Bug 1008312 - Guest get wrong resolution with 4 displays
Guest get wrong resolution with 4 displays
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: xorg-x11-drv-qxl (Show other bugs)
6.5
Unspecified Unspecified
high Severity unspecified
: rc
: ---
Assigned To: Default Assignee for SPICE Bugs
Desktop QE
:
: 1034397 1052328 (view as bug list)
Depends On: 1076728
Blocks: 1009648
  Show dependency treegraph
 
Reported: 2013-09-16 02:50 EDT by CongDong
Modified: 2014-08-15 08:50 EDT (History)
15 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-08-15 08:50:37 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
The screenshot for guest (2.22 MB, image/png)
2013-09-16 02:52 EDT, CongDong
no flags Details
The screenshot for host (3.24 MB, image/png)
2013-09-16 02:53 EDT, CongDong
no flags Details
The virt-viewer log file (542.39 KB, text/plain)
2013-09-16 02:53 EDT, CongDong
no flags Details
host_xrandr (2.36 KB, text/plain)
2013-09-18 02:08 EDT, Cui Lei
no flags Details
guest xrandr (3.16 KB, text/plain)
2013-09-18 02:09 EDT, Cui Lei
no flags Details
new screenshot in guest (1.40 MB, image/png)
2013-11-20 21:43 EST, CongDong
no flags Details
new screenshot in host (2.54 MB, image/png)
2013-11-20 21:44 EST, CongDong
no flags Details

  None (edit)
Description CongDong 2013-09-16 02:50:44 EDT
Description of problem:
Connect guest with 4 displays, can't get the right resolution for every display.

Version-Release number of selected component (if applicable):
# rpm -qa libvirt virt-viewer spice-gtk
libvirt-0.10.2-24.el6.x86_64
spice-gtk-0.20-9.el6.x86_64
virt-viewer-0.5.6-8.el6.x86_64

How reproducible:
100%


Steps to Reproduce:
1. Prepare a rhel6 guest on a 4 monitors host, with spice+qxl(one) + spicevmc + 4 displays
2. virt-viewer $vm 
3. Change to Fullscreen mode, and check the resolution
4. Save the screenshot in guest and host, check them.

Actual results:
1. Step3, the resolution for display 3 and 4  are very small.
2. On display 2, there are two areas, they are the mirror of display 3 and 4.
3. In the host screenshot, can see there are 4 displays, but in the guest screenshot, can't see display 3 and 4.

Expected results:
1. All the displays should have the right resolution
2. There should not be any mirror for other displays and the screenshot should include all the displays.

Additional info:
Comment 1 CongDong 2013-09-16 02:52:25 EDT
Created attachment 798117 [details]
The screenshot for guest
Comment 2 CongDong 2013-09-16 02:53:08 EDT
Created attachment 798118 [details]
The screenshot for host
Comment 3 CongDong 2013-09-16 02:53:48 EDT
Created attachment 798120 [details]
The virt-viewer log file
Comment 5 Marc-Andre Lureau 2013-09-17 11:17:23 EDT
please provide the xrandr of host (and guest when in fullscreen could be eventually helpful too)
Comment 6 Cui Lei 2013-09-18 02:08:39 EDT
Created attachment 799090 [details]
host_xrandr
Comment 7 Cui Lei 2013-09-18 02:09:30 EDT
Created attachment 799091 [details]
guest xrandr
Comment 8 Cui Lei 2013-09-18 02:14:13 EDT
Help condong providing the host and guest xrandr information which Marc-Andre required.
The guest xrandr is get when in fullscreen status.
Comment 9 Jonathon Jongsma 2013-11-20 13:00:01 EST
I haven't been able to reproduce this here.  It would help if you provided *exact* steps to reproduce this from beginning to end. In other words: instead of saying "Change to Fullscreen mode", describe the exact method you used to do this via clicking on UI elements, etc. This helps reduce any ambiguity and might allow developers to reproduce it on our machines.

Also, thanks for the xrandr output.  Unfortunately, it's a bit hard to draw any conclusions from it for a couple of reasons:

1) the xrandr output doesn't appear to match the screenshots above
2) the guest xrandr output doesn't appear to show any display overlap

It would be nice to have xrandr output and screenshots from the exact same test run so that they're comparable.
Comment 10 CongDong 2013-11-20 21:40:12 EST
Sorry for the confusing steps, make it clear here:

Steps:
1. Prepare a rhel6 guest on a 4 monitors host, with spice+qxl(one) + spicevmc + 4 displays
2. virt-viewer $vm 
3. Open 4 displays, move each display to the corresponding physical monitor and press "F11" to change the display to full-screen mode. Check the resolution.
4. Save the screenshot in guest and host, check them.

The xrandr message is not very long, add here:

On host:
# xrandr
Screen 0: minimum 320 x 200, current 5520 x 1050, maximum 16384 x 16384
DisplayPort-0 connected 1280x1024+0+0 (normal left inverted right x axis y axis) 376mm x 301mm
   1280x1024      60.0*+   75.0  
   1152x864       75.0  
   1024x768       75.1     60.0  
   800x600        75.0     60.3  
   640x480        75.0     60.0  
   720x400        70.1  
HDMI-0 connected 1280x1024+1280+0 (normal left inverted right x axis y axis) 376mm x 301mm
   1280x1024      60.0*+   75.0  
   1152x864       75.0  
   1280x720       50.0     60.0  
   1024x768       75.1     60.0  
   800x600        75.0     60.3  
   720x480        59.9  
   640x480        75.0     60.0  
   720x400        70.1  
DVI-0 connected 1680x1050+2560+0 (normal left inverted right x axis y axis) 474mm x 296mm
   1680x1050      60.0*+   74.9  
   1600x1000      60.0  
   1280x1024      75.0     72.0     60.0  
   1440x900       75.0     59.9  
   1152x864       75.0  
   1024x768       75.1     70.1     60.0  
   800x600        72.2     75.0     60.3  
   640x480        72.8     75.0     66.7     60.0  
   720x400        70.1  
DVI-1 connected 1280x1024+4240+0 (normal left inverted right x axis y axis) 376mm x 301mm
   1280x1024      60.0*+   75.0  
   1152x864       75.0  
   1024x768       75.1     60.0  
   800x600        75.0     60.3  
   640x480        75.0     60.0  
   720x400        70.1

On guest:
# xrandr
Screen 0: minimum 320 x 200, current 2560 x 1024, maximum 8192 x 8192
qxl-0 connected 1280x1024+0+0 0mm x 0mm
   1024x768       60.0 +
   2560x1600      60.0  
   2000x2000      60.0  
   2560x1440      60.0  
   2048x1536      60.0  
   1920x1440      60.0  
   1920x1200      60.0  
   1920x1080      60.0  
   1600x1200      60.0  
   1680x1050      60.0  
   1400x1050      60.0  
   1600x900       60.0  
   1280x1024      60.0* 
   1440x900       60.0  
   1280x960       60.0  
   1366x768       60.0  
   1360x768       60.0  
   1280x800       60.0  
   1152x870       60.0  
   1152x864       60.0  
   1280x768       60.0  
   1280x760       60.0  
   1280x720       60.0  
   1024x600       60.0  
   960x640        60.0  
   832x624        60.0  
   800x600        60.0  
   800x480        60.0  
   640x480        60.0  
qxl-1 connected 1280x1024+1280+0 0mm x 0mm
   1024x768       60.0 +
   2560x1600      60.0  
   2000x2000      60.0  
   2560x1440      60.0  
   2048x1536      60.0  
   1920x1440      60.0  
   1920x1200      60.0  
   1920x1080      60.0  
   1600x1200      60.0  
   1680x1050      60.0  
   1400x1050      60.0  
   1600x900       60.0  
   1280x1024      60.0* 
   1440x900       60.0  
   1280x960       60.0  
   1366x768       60.0  
   1360x768       60.0  
   1280x800       60.0  
   1152x870       60.0  
   1152x864       60.0  
   1280x768       60.0  
   1280x760       60.0  
   1280x720       60.0  
   1024x600       60.0  
   960x640        60.0  
   832x624        60.0  
   800x600        60.0  
   800x480        60.0  
   640x480        60.0  
qxl-2 connected 400x375+1424+0 0mm x 0mm
   1024x768       60.0 +
   2560x1600      60.0  
   2000x2000      60.0  
   2560x1440      60.0  
   2048x1536      60.0  
   1920x1440      60.0  
   1920x1200      60.0  
   1920x1080      60.0  
   1600x1200      60.0  
   1680x1050      60.0  
   1400x1050      60.0  
   1600x900       60.0  
   1280x1024      60.0  
   1440x900       60.0  
   1280x960       60.0  
   1366x768       60.0  
   1360x768       60.0  
   1280x800       60.0  
   1152x870       60.0  
   1152x864       60.0  
   1280x768       60.0  
   1280x760       60.0  
   1280x720       60.0  
   1024x600       60.0  
   960x640        60.0  
   832x624        60.0  
   800x600        60.0  
   800x480        60.0  
   640x480        60.0  
   400x375-2       0.1* 
qxl-3 connected 400x375+1824+0 0mm x 0mm
   1024x768       60.0 +
   2560x1600      60.0  
   2000x2000      60.0  
   2560x1440      60.0  
   2048x1536      60.0  
   1920x1440      60.0  
   1920x1200      60.0  
   1920x1080      60.0  
   1600x1200      60.0  
   1680x1050      60.0  
   1400x1050      60.0  
   1600x900       60.0  
   1280x1024      60.0  
   1440x900       60.0  
   1280x960       60.0  
   1366x768       60.0  
   1360x768       60.0  
   1280x800       60.0  
   1152x870       60.0  
   1152x864       60.0  
   1280x768       60.0  
   1280x760       60.0  
   1280x720       60.0  
   1024x600       60.0  
   960x640        60.0  
   832x624        60.0  
   800x600        60.0  
   800x480        60.0  
   640x480        60.0  
   400x375-3       0.1*
Comment 11 CongDong 2013-11-20 21:43:53 EST
Created attachment 826934 [details]
new screenshot  in guest
Comment 12 CongDong 2013-11-20 21:44:53 EST
Created attachment 826935 [details]
new screenshot  in host
Comment 13 Jonathon Jongsma 2013-11-22 11:52:58 EST
Thanks.  I'm seeing rather strange behavior with 4 displays here as well.  Investigating...
Comment 14 Jonathon Jongsma 2013-11-25 12:49:18 EST
hm, perhaps the strange behavior I'm seeing is slightly different than yours. Can I ask you to get the spice debug output?

virt-viewer --debug --spice-debug $vm
Comment 15 CongDong 2013-11-25 21:02:18 EST
Comment 3 is the log file with spice debug option.
Comment 16 Jonathon Jongsma 2013-11-27 14:25:09 EST
hm, I notice that in the log, after maximizing the last display, the server sends a new MONITORS_CONFIG message with the larger size, but the x-coordinate position of the display makes it so that it does nto intersect the primary canvas that the spice client has for the display channel.  Soon thereafter, the server sends another MONITORS_CONFIG message reverting back to the old size/position for the last monitor.  The same thing happens to the third display.  I still don't understand exactly why the resolution is reverting back to the old size, but I'll continue investigating.

The fix that was recently applied upstream for bug #1002156 should reduce the impact of the bug slightly though, by preventing overlap between display regions.
Comment 17 Jonathon Jongsma 2013-12-03 12:09:44 EST
Talking with Hans, it seems that this is mostly likely a configuration issue rather than a bug.  What is your QXL memory set to?  The default is 64MB, which is apparently known to be insufficient for 4 displays.  Can you try to increase your qxl memory to 128MB or 256MB and see if this fixes the issue.  You can use 'virsh edit $vmname' and change the qxl memory to something like:

<model type='qxl' ram='131072' vram='131072' heads='1'/>
Comment 18 CongDong 2013-12-03 21:29:30 EST
The default is 64MB, and I tested as you said, increase the memory to 128MB

<model type='qxl' ram='131072' vram='131072' heads='1'/>

The problem still can be reproduced,and then I increase the memory to 256MB, can reproduce too.
Comment 19 Jonathon Jongsma 2013-12-05 14:33:07 EST
*** Bug 1034397 has been marked as a duplicate of this bug. ***
Comment 20 Jonathon Jongsma 2014-02-05 16:45:37 EST
*** Bug 1052328 has been marked as a duplicate of this bug. ***
Comment 22 Jonathon Jongsma 2014-02-28 12:10:02 EST
Re-assigning to qxl based on the following conversation, apologies for the delay:

http://lists.freedesktop.org/archives/spice-devel/2013-December/015658.html
http://lists.freedesktop.org/archives/spice-devel/2013-December/015659.html
Comment 23 David Mansfield 2014-06-26 16:20:25 EDT
There are two bugs / issues here, IMHO.

1) Not enough memory for framebuffer in qxl causes the resolution of additional monitors to "shrink" after configuration.  The fix in comment#18 MAY be necessary, but is not sufficient to fix this issue, because the default 16MB is still in effect until you edit the domain XML ("virsh edit myvm")

a. In the <domain> element (at the top), add the attribute:
 xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'

b. Add the following:
  <qemu:commandline>
    <qemu:arg value='-global'/>
    <qemu:arg value='qxl-vga.vgamem_mb=32'/>
  </qemu:commandline>

Maybe the default value should be changed or calculated dynamically based on the "ram" or "vram" configuration.

2) The issue where the second "monitor" shows a combined view of two of the other monitors (part two of the "actual" issue) is "fixed" (according to me as author of the fix ;-) by this commit in the linux kernel which has been merged into Linus's tree for inclusion in release 3.16:

http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=52571ad5f4c57067ac593a6bdb1f7a35ed032d27

See upstream bug: 
https://bugs.freedesktop.org/show_bug.cgi?id=78131

(Note: this part of the bug is not necessarily triggered on GNOME3 because of some lucky ordering of ioctl during monitor resizing).
Comment 24 David Mansfield 2014-06-26 17:51:51 EDT
One more note: It may be that the underlying configuration option "-global qxl-vga.vgamem_mb=32" may not be supported in rhel6, and only works in rhel7/fedora so the 16MB framebuffer limit may be impossible to pass without re-compiling...

This limitation is referenced in the second message linked in comment#22.

In that message, the suggestion that the increased FB allocation be tied to the memory reservation  (e.g. ram='131072' vram='131072' should imply a 32MB framebuffer instead of 16mb) seems to be the recommended approach.
Comment 25 Marc-Andre Lureau 2014-08-12 14:28:03 EDT
it's tempting to close as duplicate of bug 1076728, adding dep
Comment 26 Marc-Andre Lureau 2014-08-14 14:43:47 EDT
CongDong, can you still reach the mirror display bug?

To reach higher resolution, bug 1053039 provides a mean to configure the maximum framebuffer size.
Comment 27 CongDong 2014-08-14 21:37:09 EDT
I cannot reproduce this with the latest pkg and os.

But if I downgrade xorg-x11-drv-qxl to old version like 0.1.1-9.el6,
then I can reproduce this.
Comment 28 Marc-Andre Lureau 2014-08-15 08:50:37 EDT
thanks

Note You need to log in before you can comment on or make changes to this bug.