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 1145939

Summary: change guest resolutions to 4096x2160 and 3840x2160 got black screen
Product: Red Hat Enterprise Linux 7 Reporter: mazhang <mazhang>
Component: libvirtAssignee: Pavel Hrdina <phrdina>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1CC: hhuang, juzhang, kraxel, mazhang, michen, phrdina, rbalakri, virt-maint
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-10-27 10:44:51 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:

Description mazhang 2014-09-24 07:23:36 UTC
Description of problem:
Change guest resolutions to 4096x2160 and 3840x2160 got black screen

Version-Release number of selected component (if applicable):

Host:
qemu-kvm-rhev-debuginfo-2.1.0-4.el7.x86_64
ipxe-roms-qemu-20130517-5.gitc4bce43.el7.noarch
qemu-kvm-rhev-2.1.0-4.el7.x86_64
qemu-img-rhev-2.1.0-4.el7.x86_64
qemu-kvm-common-rhev-2.1.0-4.el7.x86_64
qemu-kvm-tools-rhev-2.1.0-4.el7.x86_64
kernel-3.10.0-169.el7.x86_64
spice-server-0.12.4-5.el7.x86_64

Gust:
xorg-x11-drv-qxl-0.1.1-9.el7.x86_64
kernel-3.10.0-123.el7.x86_64

Client:
virt-viewer-0.5.7-7.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1.Boot guest with follow command line:
gdb --args /usr/libexec/qemu-kvm \
-M pc \
-cpu SandyBridge \
-m 4G \
-smp 4,sockets=2,cores=2,threads=1,maxcpus=160 \
-enable-kvm \
-name rhel \
-uuid 990ea161-6b67-47b2-b803-19fb01d30d12 \
-smbios type=1,manufacturer='Red Hat',product='RHEV Hypervisor',version=el6,serial=koTUXQrb,uuid=feebc8fd-f8b0-4e75-abc3-e63fcdb67170 \
-k en-us \
-rtc base=localtime,clock=host,driftfix=slew \
-nodefaults \
-monitor stdio \
-qmp tcp:0:5555,server,nowait \
-boot menu=on \
-bios /usr/share/seabios/bios.bin \
-monitor unix:/tmp/monitor2,server,nowait \
-vga qxl \
-spice port=5900,disable-ticketing \
-usb \
-device usb-tablet,id=tablet0 \
-drive file=/home/rhel7-64.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,cache=none,werror=stop,rerror=stop,aio=threads \
-device virtio-blk-pci,scsi=off,bus=pci.0,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
-netdev tap,id=hostnet0,vhost=on \
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:01:02:B6:40:21 \

2. Change guest resolution to 3840x2160 by execute "qxl-mode.sh 3840 2160".
# cat qxl-mode.sh 
#!/bin/sh

width="$1"
height="$2"

if test "$width" = "" -o "$height" = ""; then
	echo "usage: $0 width height"
	exit 1
fi

output=$(xrandr --query | awk '/ connected/ { print $1; exit }')
mode="${width}x${height}"
echo "# setting mode $mode on output $output"

if xrandr --query | grep -q -e " $mode "; then
	true # mode already there
else
	modeline=$(cvt $width $height | grep Modeline | cut -d" " -f3-)
	(set -x; xrandr --newmode "$mode" $modeline;
		 xrandr --addmode "$output" "$mode")
fi
(set -x; xrandr --output "$output" --mode "$mode")

3.

Actual results:
1.remote-viewer got black screen, and keep showing "Waiting for display 1"
2.guest network works well.

Expected results:
Resolution changed

Additional info:
4096x2160 hit this problem.
2048x2048 works well.

Comment 2 Gerd Hoffmann 2014-09-24 10:44:27 UTC
Works just fine here.

Things to try:

(1) Use the latest kernel (3.10.0-167 or newer) with the drm backport
    for 7.1 included in the guest.
(2) Double the amount of memory for ram and vram
    (add -global qxl-vga.ram_size_mb=128 -global qxl-vga.vram_size_mb=128)

Comment 3 mazhang 2014-09-25 02:27:12 UTC
(In reply to Gerd Hoffmann from comment #2)
> Works just fine here.
> 
> Things to try:
> 
> (1) Use the latest kernel (3.10.0-167 or newer) with the drm backport
>     for 7.1 included in the guest.
> (2) Double the amount of memory for ram and vram
>     (add -global qxl-vga.ram_size_mb=128 -global qxl-vga.vram_size_mb=128)

Update host and guest kernel, and added "-global qxl-vga.ram_size_mb=128 -global qxl-vga.vram_size_mb=128", still hit this problem.

Host:
kernel-3.10.0-169.el7.x86_64

Guest:
kernel-3.10.0-169.el7.x86_64

(qemu) info qtree 
...
      dev: qxl-vga, id ""
        ram_size = 134217728 (0x8000000)
        vram_size = 134217728 (0x8000000)
        revision = 4 (0x4)
        debug = 0 (0x0)
        guestdebug = 0 (0x0)
        cmdlog = 0 (0x0)
        ram_size_mb = 128 (0x80)
        vram_size_mb = 128 (0x80)
        vram64_size_mb = 4294967295 (0xffffffff)
        vgamem_mb = 16 (0x10)
        surfaces = 1024 (0x400)
        addr = 02.0
        romfile = "vgabios-qxl.bin"
        rombar = 1 (0x1)
        multifunction = false
        command_serr_enable = true
        class VGA controller, addr 00:02.0, pci id 1b36:0100 (sub 1af4:1100)
        bar 0: mem at 0xe8000000 [0xefffffff]
        bar 1: mem at 0xf0000000 [0xf7ffffff]
        bar 2: mem at 0xf8050000 [0xf8051fff]
        bar 3: i/o at 0xc060 [0xc07f]
        bar 6: mem at 0xffffffffffffffff [0xfffe]

Comment 4 Gerd Hoffmann 2014-09-25 08:06:18 UTC
> > (2) Double the amount of memory for ram and vram
> >     (add -global qxl-vga.ram_size_mb=128 -global qxl-vga.vram_size_mb=128)
> 
> Update host and guest kernel, and added "-global qxl-vga.ram_size_mb=128
> -global qxl-vga.vram_size_mb=128", still hit this problem.

>         vgamem_mb = 16 (0x10)

What happens if you add -global qxl-vga.vgamem_mb=32?

Comment 5 mazhang 2014-09-25 08:40:22 UTC
add -global qxl-vga.vgamem_mb=32, the problem gone.

Comment 6 mazhang 2014-09-25 10:18:32 UTC
Hi Gerd,

1. If its not a bug, is that mean we must specify -global qxl-vga.ram_size_mb=128 -global qxl-vga.vram_size_mb=128 -global qxl-vga.vgamem_mb=32 in command line for support 4096x2160 and 3840x2160, right? 

2. What's the difference between qxl-vga.ram_size_mb and qxl-vga.ram_size? seems qxl-vga doesn't has those(*_mb) properties in rhel6.

eg.
RHEL7
# /usr/libexec/qemu-kvm -device qxl-vga,?
qxl-vga.command_serr_enable=on/off
qxl-vga.multifunction=on/off
qxl-vga.rombar=uint32
qxl-vga.romfile=str
qxl-vga.addr=pci-devfn
qxl-vga.surfaces=int32
qxl-vga.vgamem_mb=uint32
qxl-vga.vram64_size_mb=uint32
qxl-vga.vram_size_mb=uint32
qxl-vga.ram_size_mb=uint32
qxl-vga.cmdlog=uint32
qxl-vga.guestdebug=uint32
qxl-vga.debug=uint32
qxl-vga.revision=uint32
qxl-vga.vram_size=uint32
qxl-vga.ram_size=uint32
qxl-vga.hotplugged=bool

RHEL6
# /usr/libexec/qemu-kvm -device qxl-vga,?
qxl-vga.ram_size=uint32
qxl-vga.vram_size=uint32
qxl-vga.revision=uint32
qxl-vga.debug=uint32
qxl-vga.guestdebug=uint32
qxl-vga.cmdlog=uint32
qxl-vga.addr=pci-devfn
qxl-vga.romfile=string
qxl-vga.rombar=uint32
qxl-vga.multifunction=on/off

Thanks,
Mazhang.

Comment 7 Gerd Hoffmann 2014-09-25 14:03:18 UTC
> 1. If its not a bug, is that mean we must specify -global
> qxl-vga.ram_size_mb=128 -global qxl-vga.vram_size_mb=128 -global
> qxl-vga.vgamem_mb=32 in command line for support 4096x2160 and 3840x2160,
> right? 

Correct.

As far I know libvirt doesn't support it yet.  There have been patches to add vgamem_mb support to libvirt, but I think they are not merged (yet).

So it is probably a good idea to clone or reassign this to libvirt, so we get proper support for the high resolutions in the management stack.

> 2. What's the difference between qxl-vga.ram_size_mb and qxl-vga.ram_size?
> seems qxl-vga doesn't has those(*_mb) properties in rhel6.

The *_mb versions are just for convinience, they accept megabytes instead of bytes, i.e. ram_size_mb=128 is the same as ram_size=134217728

Comment 8 Gerd Hoffmann 2014-10-27 10:10:12 UTC
see comment 7

Comment 9 Pavel Hrdina 2014-10-27 10:44:51 UTC
Hi, yes there were some patches, but it wasn't enough to implement support for vgamem_mb. I'm working on it and we have already bug to track that issue, BZ 1076098.

*** This bug has been marked as a duplicate of bug 1076098 ***