Bug 987312 - Display mess when boot guest w/ multiple display devices
Display mess when boot guest w/ multiple display devices
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev (Show other bugs)
7.0
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Gerd Hoffmann
Virtualization Bugs
:
: 1048654 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-23 04:34 EDT by Qian Guo
Modified: 2015-12-04 11:13 EST (History)
13 users (show)

See Also:
Fixed In Version: qemu-2.3
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-04 11:13:33 EST
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)
spice + -device qxl ... works well, just attach the Xorg log (17.04 KB, text/plain)
2014-08-26 05:00 EDT, Qian Guo
no flags Details
spice + qxl and non_qxl, will display 2 display auto. attach the Xorg log (28.05 KB, text/plain)
2014-08-26 05:03 EDT, Qian Guo
no flags Details
vnc + qxl and non_qxl, can not display GUI, attach the Xorg log (28.05 KB, text/plain)
2014-08-26 05:04 EDT, Qian Guo
no flags Details
vnc with qxl , works well, just attach the Xorg log (17.04 KB, text/plain)
2014-08-26 05:04 EDT, Qian Guo
no flags Details

  None (edit)
Description Qian Guo 2013-07-23 04:34:30 EDT
Description of problem:
I test following matrix under rhel7 guest:
1. vnc  +  ...-vga std -device qxl,id=video1,ram_size=67108864,vram_size=67108864 ...

2. spice + ...-vga std -device qxl,id=video1,ram_size=67108864,vram_size=67108864 ...

for '1', remote-viewer displays that screen keeps flashing.

for '2', when try to launch guest, remote-viewer automatically two spice windows.

Version-Release number of selected component (if applicable):
Host/guest kernel:
# uname -r
3.10.0-2.el7.x86_64

qemu-kvm build:
# rpm -q qemu-kvm
qemu-kvm-1.5.1-2.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.1 Boot guest w/ two different display devices and vnc, e.g. std and qxl:
# /usr/libexec/qemu-kvm -M pc  -cpu Penryn -m 6G -smp 4,sockets=1,cores=4,threads=1 -enable-kvm -nodefaults -nodefconfig -drive file=/home/rhel7_img/rhel7cp1.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,werror=stop,rerror=stop,aio=native -device virtio-scsi-pci,id=virtio-disk0, -device scsi-hd,bus=virtio-disk0.0,drive=drive-virtio-disk0,id=scsi-hd1 -vnc :10  -device qxl,id=video1,vram_size=67108864  -monitor stdio -netdev tap,id=vnet0,vhost=on,script=/etc/ovs-ifup,downscript=/etc/ovs-ifdown -device virtio-net-pci,netdev=vnet0,mac=54:52:1a:0b:c2:01,id=vnic1  -boot menu=on -qmp tcp:0:4444,server,nowait -vga std

1.2 Boot guest w/ two different display devices and spice, e.g. std and qxl:

# /usr/libexec/qemu-kvm -M pc  -cpu Penryn -m 6G -smp 4,sockets=1,cores=4,threads=1 -enable-kvm -nodefaults -nodefconfig -drive file=/home/rhel7_img/rhel7cp1.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,werror=stop,rerror=stop,aio=native -device virtio-scsi-pci,id=virtio-disk0, -device scsi-hd,bus=virtio-disk0.0,drive=drive-virtio-disk0,id=scsi-hd1 -spice port=5930,disable-ticketing -global qxl-vga.vram_size=67108864  -device qxl,id=video1,vram_size=67108864  -monitor stdio -netdev tap,id=vnet0,vhost=on,script=/etc/ovs-ifup,downscript=/etc/ovs-ifdown -device virtio-net-pci,netdev=vnet0,mac=54:52:1a:0b:c2:01,id=vnic1  -boot menu=on -qmp tcp:0:4444,server,nowait -vga none

(when boot w/ spice, will get this messages:

(qemu) (/usr/libexec/qemu-kvm:4220): SpiceWorker-Warning **: red_worker.c:11477:dev_destroy_primary_surface: double destroy of primary surface
(/usr/libexec/qemu-kvm:4220): SpiceWorker-Warning **: red_worker.c:9663:red_create_surface: condition `surface->context.canvas' 
reached

)

2 Launch guest w/ remote-viewer :
 2.1:# remote-viewer vnc://0:5910
 2.2:# remote-viewer spice://0:5930


Actual results:
Display mess:

for '2.1', remote-viewer displays that screen keeps flashing.

for '2.2', when try to launch guest, remote-viewer automatically two spice windows.

Expected results:
No such issue, only can display one window, and no flashing.

Additional info:
I test this w/ virt-manager, for vnc, the issue is same as 2.1 ;
and when for spice, the virt-manager displays keep flashing, if I manuely launch the spice client, hit issue 2.2.

The virt-manager qemu-kvm cmdline:
1. using vnc

# /usr/libexec/qemu-kvm -name rhel -S -machine pc-i440fx-rhel7.0.0,accel=kvm,usb=off -m 4096 -realtime mlock=off -smp 2,sockets=2,cores=1,threads=1 -uuid 5d071055-0ebe-b743-5998-fa51a392dcdf -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/rhel.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=/home/rhel7_img/rhel7cp1.qcow2,if=none,id=drive-virtio-disk0,format=raw,cache=none -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -device usb-tablet,id=input0 -vnc 127.0.0.1:0 -vga std -device qxl,id=video1,ram_size=67108864,vram_size=67108864,bus=pci.0,addr=0x6 -device intel-hda,id=sound0,bus=pci.0,addr=0x3 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5

2.using spice:

# /usr/libexec/qemu-kvm -name rhel -S -machine pc-i440fx-rhel7.0.0,accel=kvm,usb=off -m 4096 -realtime mlock=off -smp 2,sockets=2,cores=1,threads=1 -uuid 5d071055-0ebe-b743-5998-fa51a392dcdf -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/rhel.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x7 -drive file=/home/rhel7_img/rhel7cp1.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,cache=none -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev spicevmc,id=charchannel0,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 -device usb-tablet,id=input0 -spice port=5900,addr=127.0.0.1,disable-ticketing,seamless-migration=on -vga std -device qxl,id=video1,ram_size=67108864,vram_size=67108864,bus=pci.0,addr=0x6 -device intel-hda,id=sound0,bus=pci.0,addr=0x3 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5
Comment 1 Qian Guo 2013-07-23 04:43:48 EDT
When boot guest only w/ ... -device qxl,id=video1,ram_size=67108864,vram_size=67108864 ... and spice, when launch guest, will automatically remote-viewer 2 spice clients.
Comment 4 Gerd Hoffmann 2013-10-11 08:45:07 EDT
Mixing qxl and non-qxl doesn't work today.  Improving multihead support upstream should fix that, but that isn't going to happen that quickly, targeting 7.0 isn't realistic.
Comment 5 Gerd Hoffmann 2014-01-15 10:40:37 EST
*** Bug 1048654 has been marked as a duplicate of this bug. ***
Comment 9 Qian Guo 2014-08-26 04:52:51 EDT
(In reply to Gerd Hoffmann from comment #4)
> Mixing qxl and non-qxl doesn't work today.  Improving multihead support
> upstream should fix that, but that isn't going to happen that quickly,
> targeting 7.0 isn't realistic.

Hi, Gerd

I just test this with qemu-kvm-rhev-2.1.0-2.el7.x86_64

Found that it is not fixed, followings are my tests, if I mis understood you please feel free to fix me:

a.Test vnc + -vga std + -device qxl :
1.Boot RHEL7.0 GA guest:
# /usr/libexec/qemu-kvm -M pc  -cpu Penryn -m 6G -smp 4,sockets=1,cores=4,threads=1 -enable-kvm -nodefaults -nodefconfig -drive file=/home/rhel7/sn1.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,werror=stop,rerror=stop,aio=native -device virtio-scsi-pci,id=virtio-disk0, -device scsi-hd,bus=virtio-disk0.0,drive=drive-virtio-disk0,id=scsi-hd1 -vnc :10  -device qxl,id=video1,vram_size=67108864  -monitor stdio -netdev tap,id=vnet0,vhost=on,script=/etc/qemu-ifup -device virtio-net-pci,netdev=vnet0,mac=54:52:1a:0b:c2:01,id=vnic1  -boot menu=on -qmp tcp:0:4444,server,nowait -vga std -serial unix:/tmp/s1,server,nowait

Result:
Use remote-viewer to display, GUI can not be displayed, I will attach the Xorg.0.log

b).Test spice + -vga std + -device qxl
1.Boot RHEL7.0 GA guest:
# /usr/libexec/qemu-kvm -M pc  -cpu Penryn -m 6G -smp 4,sockets=1,cores=4,threads=1 -enable-kvm -nodefaults -nodefconfig -drive file=/home/rhel7/sn1.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,werror=stop,rerror=stop,aio=native -device virtio-scsi-pci,id=virtio-disk0, -device scsi-hd,bus=virtio-disk0.0,drive=drive-virtio-disk0,id=scsi-hd1 -spice port=5930,disable-ticketing -global qxl-vga.vram_size=67108864  -device qxl,id=video1,vram_size=67108864  -monitor stdio -netdev tap,id=vnet0,vhost=on,script=/etc/qemu-ifup -device virtio-net-pci,netdev=vnet0,mac=54:52:1a:0b:c2:01,id=vnic1  -boot menu=on -qmp tcp:0:4444,server,nowait  -serial unix:/tmp/s1,server,nowait -vga std

Result:
Use remote-viewer to display, GUI can not be displayed, and will automatically come out 2 spice display. I will attach the Xorg.0.log

c.Test vnc/spice + -device qxl (comment 1 is fixed)
Result: works well, I will attach the Xorg.0.log

d.Test vnc/spice + -device qxl + -vga qxl
Result: works well, I will attach the Xorg.0.log


So according to above, the latest qemu-kvm-rhev 2.1 only fixed comment 1, did not fix the qxl+non_qxl issue
Comment 10 Qian Guo 2014-08-26 05:00:19 EDT
Created attachment 930787 [details]
spice + -device qxl ... works well, just attach the Xorg log
Comment 11 Qian Guo 2014-08-26 05:03:10 EDT
Created attachment 930788 [details]
spice + qxl and non_qxl, will display 2 display auto. attach the Xorg log
Comment 12 Qian Guo 2014-08-26 05:04:04 EDT
Created attachment 930789 [details]
vnc + qxl and non_qxl, can not display GUI, attach the Xorg log
Comment 13 Qian Guo 2014-08-26 05:04:55 EDT
Created attachment 930790 [details]
vnc with qxl , works well, just attach the Xorg log
Comment 14 Gerd Hoffmann 2014-08-26 07:34:18 EDT
Improved compared to 7.0, but not yet fully functional indeed.
Comment 15 Gerd Hoffmann 2014-08-28 09:09:11 EDT
(In reply to Gerd Hoffmann from comment #14)
> Improved compared to 7.0, but not yet fully functional indeed.

Spoke to soon.  Seems to be a problem with remote-viewer or spice-gtk.

Details:

We have two display devices.  The easiest way to test out stuff is to create a seat for each display device, so you'll get a login screen on both displays.

(1) use loginctl to list the (default) seat0, find the qxl device nodes:

[root@rhel7 ~]# loginctl seat-status seat0
seat0
        Sessions: *c1
         Devices:
[ ... ]
                  ├─/sys/devices/pci0000:00/0000:00:03.0/drm/card0
                  │ drm:card0
                  ├─/sys/devices/pci0000:00/0000:00:03.0/graphics/fb0
                  │ [MASTER] graphics:fb0 "qxldrmfb"
[ ... ]

(2) Attach those two device nodes to another seat:

[root@rhel7 ~]# loginctl attach seat-qxl /sys/devices/pci0000:00/0000:00:03.0/drm/card0
[root@rhel7 ~]# loginctl attach seat-qxl /sys/devices/pci0000:00/0000:00:03.0/graphics/fb0

(3) reboot.

Expected behavior:

gdm login screen shows up on seat-qxl.
gdm login screen shows up on seat0 in case a kms driver is available
   [ rhel 7.0 guest: works with cirrus only ]
   [ rhel 7.1 guest: planned to work with both cirrus+stdvga, but the drm
                     backport isn't (yet) merged ]
   [ fedora 20 guest: works with both cirrus+stdvga if you install latest
                      kernel from updates ]
any user input (mouse+kbd) goes to seat0.

When using vnc:  You can use Ctrl-Alt-1 and Ctrl-Alt-2 hotkeys to switch between displays devices / seats.

When using spice:  You get two windows, one for each display device / seat.  In my testing this works just fine with rhel6 spicec.  remote-viewer has problems to deal with this though.

See also: http://git.qemu.org/?p=qemu.git;a=blob;f=docs/multiseat.txt
Comment 18 Gerd Hoffmann 2015-05-04 04:22:07 EDT
please retest with latest qemu (2.3+) and virt-viewer packages.
Comment 19 Qian Guo 2015-08-06 01:32:03 EDT
Test components:
qemu-kvm-rhev-2.3.0-15.el7.x86_64
kernel-3.10.0-302.el7.x86_64
virt-viewer-2.0-5.el7.x86_64

test scenarios:
1.Test with virt-manager 

1.1  spice + -vga std + -device qxl ...
  
     result, in virt-manager window, only can get one window, and can not find the method to switch the window(if it have 2 windows)

1.2  vnc + -vga std + -device qxl ...
  
     result, n virt-manager window, only can get one window, and can not find the method to switch the window(if it have 2 windows)

2.Test with qemu cli directly and with virt-viewer

1.1  vnc + -vga std + -device qxl ...
     result, n virt-manager window, only can get one window, and can not find the method to switch the window(if it have 2 windows)

1.2 spice + -vga std + -device qxl ...
    
    result, 2 spice windows, and after attach the secondery graphic(qxl) to login, the 2 windows both have the login screen.
    
    issues:
    1.2.1 but the 2nd windows has no mouse+keyboard control.
    1.2.2 the virt-viewer crashed when switch the pty by "ctrl-alt-fx" --- I will file a bug against this.

So I think the latest qemu-kvm-rhev have fixed the bug.



Additional infos:
1.Inside guest:
# loginctl seat-status seat0 seat-qxl 
seat0
        Sessions: *2 c2
         Devices:
                  ├─/sys/devices/LNXSYSTM:00/LNXPWRBN:00/input/input0
                  │ input:input0 "Power Button"
                  ├─/sys/devices/pci0000:00/0000:00:02.0/drm/card1
                  │ drm:card1
                  ├─/sys/devices/pci0000:00/0000:00:02.0/graphics/fb1
                  │ [MASTER] graphics:fb1 "bochsdrmfb"
                  ├─/sys/devices/pci0000:00/0000:00:04.0/sound/card0
                  │ sound:card0 "Intel"
                  ├─/sys/devices/pci0000:00/0000:00:06.0/usb2
                  │ usb:usb2
                  ├─/sys/devices/pci0000:00/0000:00:06.1/usb3
                  │ usb:usb3
                  ├─/sys/devices/pci0000:00/0000:00:06.2/usb4
                  │ usb:usb4
                  ├─/sys/devices/pci0000:00/0000:00:06.7/usb1
                  │ usb:usb1
                  ├─/sys/devices/platform/i8042/serio0/input/input1
                  │ input:input1 "AT Translated Set 2 keyboard"
                  ├─/sys/devices/platform/i8042/serio1/input/input2
                  │ input:input2 "ImExPS/2 Generic Explorer Mouse"
                  ├─/sys/devices/platform/pcspkr/input/input3
                  │ input:input3 "PC Speaker"
                  └─/sys/devices/virtual/misc/rfkill
                    misc:rfkill

seat-qxl
        Sessions: *c1
         Devices:
                  ├─/sys/devices/pci0000:00/0000:00:0e.0/drm/card0
                  │ drm:card0
                  └─/sys/devices/pci0000:00/0000:00:0e.0/graphics/fb0
                    [MASTER] graphics:fb0 "qxldrmfb"


2.The cli of vnc scenario:
-device qxl,id=video0,ram_size=67108864,vram_size=67108864,vgamem_mb=16,bus=pci.0,addr=0xe \
-vga std.


Hi, Gerd

Could you help check above test, do you think it is fixed ?

Thanks,
qian
Comment 20 Gerd Hoffmann 2015-08-17 18:18:14 EDT
> So I think the latest qemu-kvm-rhev have fixed the bug.

> Could you help check above test, do you think it is fixed ?

Test is fine, bug is fixed indeed.
Comment 22 juzhang 2015-09-21 01:25:44 EDT
According to comment19 and comment20, set this issue as verified.
Comment 24 errata-xmlrpc 2015-12-04 11:13:33 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-2546.html

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