Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1046458

Summary: cannot configure the right resolution for 4 full-screen displays
Product: Red Hat Enterprise Linux 7 Reporter: CongDong <codong>
Component: xorg-x11-drv-qxlAssignee: Marc-Andre Lureau <marcandre.lureau>
Status: CLOSED NOTABUG QA Contact: Desktop QE <desktop-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: acathrow, bugzilla, codong, dblechte, dyuan, jjongsma, juzhou, lcui, marcandre.lureau, mzhan, tzheng, zsong
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-28 23:34:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1009648    
Attachments:
Description Flags
xrandr log for host
none
xrandr log for guest
none
screenshot for the 4 monitors none

Description CongDong 2013-12-25 12:21:10 UTC
Description of problem:
Get the wrong resolution when change the guest's 4 display to full-screen.

Version-Release number of selected component (if applicable):
# rpm -qa virt-viewer spice*
spice-vdagent-0.14.0-5.el7.x86_64
spice-gtk3-0.20-6.el7.x86_64
spice-glib-0.20-6.el7.x86_64
spice-server-0.12.4-3.el7.x86_64
virt-viewer-0.5.7-3.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Prepare a host with 4 monitors and a spice rhel guest with qxl+spicevmc
make sure service spice-vdagentd is running in guest.
# virsh dumpxml $vm
...
    <channel type='spicevmc'>
      <target type='virtio' name='com.redhat.spice.0'/>
      <alias name='channel0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
...
    <graphics type='spice' port='5900' autoport='yes' listen='127.0.0.1'>
      <listen type='address' address='127.0.0.1'/>
    </graphics>
...
    <video>
      <model type='qxl' ram='65536' vram='65536' heads='1'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
...
2. connect the guest and change 4 displays to full-screen
# virt-viewer $vm
View -> Displays ->  check on all the 4 displays
Move every display to a monitor and press "F11" to change it to full-screen mode.
3. Check the resolution of the displays.


Actual results:
Not every display gets the right resolution.

Expected results:
Every display should have the same resolution with the physical monitor


Additional info:

Comment 1 CongDong 2013-12-25 12:22:07 UTC
Created attachment 841475 [details]
xrandr log for host

Comment 2 CongDong 2013-12-25 12:22:33 UTC
Created attachment 841476 [details]
xrandr log for guest

Comment 3 CongDong 2013-12-25 12:24:33 UTC
Created attachment 841477 [details]
screenshot for the 4 monitors

Comment 5 RHEL Program Management 2014-03-24 05:49:39 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 6 David Mansfield 2014-04-21 13:40:13 UTC
I'm certainly no expert on the matter, but I have experienced the exact same thing with Fedora 20, and the cause for me was that the framebuffer memory (which is taken out from the "ram" argument) is only 16MB by default.  The 4 screens together cannot exceed 16MB therefore by default.

Eg. 
4 monitors * 1280(xres) * 1024(yres) * 32bpp = 20971520 bytes 

So this configuration is impossible by default.

The symptom of this is that some of the "monitors" (windows of remote-viewer) get a resolution different than what is desired.

To see if this is your problem, you must override the framebuffer memory by sending a custom command line arg. to qemu, by adding two things to the XML for the domain:

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

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

Maybe even use more than 32 (but definitely see #3 below!)

3. You may need to increase the "ram" size (you have 65536 currently), maybe 131072? The framebuffer memory is taken from the "ram" reservation and the rest is used for something else.

Comment 7 Jonathon Jongsma 2014-06-26 19:36:04 UTC
This is actually a QXL issue rather than a virt-viewer issue.  Reassigning.  Also see Bug 1008312 for related RHEL6 bug

Comment 8 Jonathon Jongsma 2014-06-30 22:12:53 UTC
*** Bug 1046460 has been marked as a duplicate of this bug. ***

Comment 9 Marc-Andre Lureau 2014-08-11 18:27:44 UTC
David is correct, you need to configure vgamem_mb and vram correctly. Please verify, thanks

Comment 10 CongDong 2014-08-12 06:31:55 UTC
(In reply to Marc-Andre Lureau from comment #9)
> David is correct, you need to configure vgamem_mb and vram correctly. Please
> verify, thanks

I tested as David said:

Steps:

1. prepare a rhel6 spice guest with desktop on a 4 monitors host.
2. edit the guest
# virsh edit $vm
<domain type='kvm' id='5' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
...
  <qemu:commandline>
    <qemu:arg value='-global'/>
    <qemu:arg value='qxl-vga.vgamem_mb=32'/>
  </qemu:commandline>
</domain>
3. #virsh start $vm
4. connect the guest and change 4 displays to full-screen
# virt-viewer $vm
View -> Displays ->  check on all the 4 displays
Move every display to a monitor and press "F11" to change it to full-screen mode.

Result:
The 4 displays get the same reslution with monitor.

But on rhel6 host, no need to add the configuration in step2, the resolution of display is configured rightly by default.
The  mechanism on rhel6 rhel7 are different?

Comment 11 Marc-Andre Lureau 2014-08-12 13:29:49 UTC
Hi CongDong, 

(In reply to CongDong from comment #10)
> Result:
> The 4 displays get the same reslution with monitor.
> 

> But on rhel6 host, no need to add the configuration in step2, the resolution
> of display is configured rightly by default.
> The  mechanism on rhel6 rhel7 are different?

Yes, I figured out too. Only on rhel6, vgamem_mb doesn't exist, and guest can resize its framebuffer at will. However with any other qemu release, it will fail to resize when reaching vgamem_mb limit.

I think we need to find a common solution, so let's keep this bug open and assigning to me

Comment 12 Marc-Andre Lureau 2014-08-28 23:34:23 UTC
The bug to track rhel6 vgamem_mb is 1076098

The different qxl behaviour in rhel6 has been revert, see bug 1076728.

With all that, this bug can be closed as it is working as expected according to comment 10.