Bug 1111425 - The disabled display will come out when reconnect the guest
Summary: The disabled display will come out when reconnect the guest
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virt-viewer
Version: 6.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Fabiano Fidêncio
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 1111429 (view as bug list)
Depends On:
Blocks: 1111429
TreeView+ depends on / blocked
 
Reported: 2014-06-20 02:55 UTC by CongDong
Modified: 2015-07-22 06:31 UTC (History)
12 users (show)

Fixed In Version: virt-viewer-2.0-4.el6
Doc Type: Bug Fix
Doc Text:
In some monitor configurations, after removing a guest display, the display in some cases unintendedly reappeared when the virt-viewer tool was started. The guest now updates its geometry every time a guest display is enabled or disabled, and guest displays now correctly stay removed.
Clone Of:
: 1111429 (view as bug list)
Environment:
Last Closed: 2015-07-22 06:31:13 UTC
Target Upstream Version:


Attachments (Terms of Use)
virt-viewer log with spice debug option (40.44 KB, text/x-log)
2014-06-20 02:55 UTC, CongDong
no flags Details


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1322 normal SHIPPED_LIVE virt-viewer and spice-gtk bug fix and enhancement update 2015-07-20 17:53:14 UTC

Description CongDong 2014-06-20 02:55:01 UTC
Description of problem:
If disable one display when there are 3 or 4 displays.
After reconnect the guest, the disabled one will come out again.

Version-Release number of selected component (if applicable):
virt-viewer-0.6.0-7.el6.x86_64
spice-server-0.12.4-9.el6.x86_64
spice-gtk-python-0.22-7.el6.x86_64
spice-vdagent-0.14.0-3.el6_5.x86_64
spice-gtk-0.22-7.el6.x86_64
spice-xpi-2.7-24.el6.x86_64
spice-glib-0.22-7.el6.x86_64
spice-gtk-tools-0.22-7.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. use virt-viewer to connect a rhel spice guest
#virt-viewer $vm
2. enable 4 displays
Click "View" -> "Displays" -> "Display(1,2,3,4)"
3. disable display 2
Click "View" -> "Displays" -> "Display 2"
4. run "xrandr" in guest
5. close virt-viewer
6. reconnect guest with virt-viewer
#virt-viewer $vm

Actual results:
Step 4:
# xrandr
Screen 0: minimum 320 x 200, current 2224 x 768, maximum 8192 x 8192
qxl-0 connected 1024x768+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
   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* 

Step 6:
There are 4 displays, display 2 is enabled.

Expected results:
After disable the display, status of the screen in guest should be disconnected.
Reconnect the guest again, the dispaly should keep disabled.

Additional info:

Comment 1 CongDong 2014-06-20 02:55:45 UTC
Created attachment 910617 [details]
virt-viewer log with spice debug option

Comment 3 Marc-Andre Lureau 2014-06-20 12:08:34 UTC
I can reproduce

Comment 4 Marc-Andre Lureau 2014-06-20 12:38:47 UTC
The configuration is correctly sent to guest:
(virt-viewer:3696): GSpice-DEBUG: channel-main.c:1176 main-1:0: monitor config: #0 1024x768+0+0 @ 32 bpp
(virt-viewer:3696): GSpice-DEBUG: channel-main.c:1176 main-1:0: monitor config: #2 400x375+1424+0 @ 32 bpp
(virt-viewer:3696): GSpice-DEBUG: channel-main.c:1176 main-1:0: monitor config: #3 400x375+1824+0 @ 32 bpp
(virt-viewer:3696): GSpice-DEBUG: channel-main.c:1954 main_agent_handle_msg: reply: type 2, success

However, the agent doesn't correctly "disconnect" the display:
qxl-1 connected
   1024x768       60.0 +

(note the missing config next to "qxl-1 connected"!)

A second monitor config message with the same content is enough to solve the issue.

This quite clearly points out an agent bug. moving

Comment 5 Marc-Andre Lureau 2014-06-20 12:52:54 UTC
It seems xrandr doesn't support disconnecting monitors with sparse config. 

monitors 1,2,3: enabled, disabling 3:
xrandr --output qxl-2 --off -> disconnected


monitors 1,2,3: enabled, disabling 2:
xrandr --output qxl-2 --off -> connected

Comment 6 Marc-Andre Lureau 2014-06-20 12:56:01 UTC
David, any idea why sparse monitors don't get "disconnected" with xrandr (see comment #5)

Comment 7 Marc-Andre Lureau 2014-06-20 12:58:35 UTC
*** Bug 1111429 has been marked as a duplicate of this bug. ***

Comment 8 Fabiano Fidêncio 2014-08-22 08:27:13 UTC
(In reply to Marc-Andre Lureau from comment #5)
> It seems xrandr doesn't support disconnecting monitors with sparse config. 

I don't think it's a xrandr issue. When tested on a RHEL7 guest (where the issue doesn't happen), I have as output the same I have in RHEL6:

[ffidenci@rhel7 ~]$ xrandr | grep connected
Virtual-0 connected primary 1600x807+0+0 0mm x 0mm
Virtual-1 connected 400x373+1600+0 0mm x 0mm
Virtual-2 connected 400x373+2000+0 0mm x 0mm
Virtual-3 disconnected
[ffidenci@rhel7 ~]$ xrandr --output Virtual-1 --off
[ffidenci@rhel7 ~]$ xrandr | grep connected
Virtual-0 connected primary 1600x807+0+0 0mm x 0mm
Virtual-1 connected
Virtual-2 connected 400x373+2000+0 0mm x 0mm
Virtual-3 disconnected

However, when disabling the monitor by the virt-viewer menu (Displays -> Display 1), it changes the root size window, triggering a ConfigureNotify event that will end up in the agent cide and then the monitor will be disabled. It doesn't happen with the RHEL-6.6, the ConfigureNotify event is never triggered.

I've tested with the *same* agent on RHEL6 and RHEL7.
Any kind of tip from people more experienced with X will be really appreciated, if it does look like something trivial/easy to see.

Comment 10 Fabiano Fidêncio 2015-03-04 14:29:30 UTC
Patch sent upstream: http://lists.freedesktop.org/archives/spice-devel/2015-March/019082.html

Comment 11 Fabiano Fidêncio 2015-03-04 22:46:48 UTC
(In reply to Fabiano Fidêncio from comment #10)
> Patch sent upstream:
> http://lists.freedesktop.org/archives/spice-devel/2015-March/019082.html

Actually, this solution is wrong and a proper solution was found on the virt-viewer side. The virt-viewer patch can be found here https://www.redhat.com/archives/virt-tools-list/2015-March/msg00024.html (so, I'm keeping the status as POST) and I'm moving the bug to virt-viewer.

Comment 13 CongDong 2015-03-25 07:28:16 UTC
Can reproduce with:
virt-viewer-2.0-3.el6.x86_64

Steps:
Same with Description

Verify with virt-viewer-2.0-4.el6.x86_64

Result:
After disable display 2, 
In guest:
# xrandrScreen 0: minimum 320 x 200, current 3072 x 768, maximum 8192 x 8192
qxl-0 connected 1024x768+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 disconnected
qxl-2 connected 1024x743+1024+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  
   1024x743-2      0.1* 
qxl-3 connected 1024x743+2048+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  
   1024x743-3      0.1* 

After reconnect the guest, display 2 is still disabled.

As the result, move to VERIFIED.

Comment 16 errata-xmlrpc 2015-07-22 06:31:13 UTC
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-1322.html


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