Bug 1061942

Summary: Using KMS sometimes causes empty monitor config info to be sent
Product: Red Hat Enterprise Linux 7 Reporter: Søren Sandmann Pedersen <sandmann>
Component: spice-gtkAssignee: Pavel Grunt <pgrunt>
Status: CLOSED ERRATA QA Contact: SPICE QE bug list <spice-qe-bugs>
Severity: low Docs Contact:
Priority: medium    
Version: 7.0CC: hdegoede, kem, marcandre.lureau, mkrcmari, mxie, pgrunt, pvine, rbalakri, rduda, rh-spice-bugs, sherold, tpelka, tzheng, vbenes, xiaodwan
Target Milestone: rc   
Target Release: 7.3   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: spice-gtk-0.26-8.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 993789 Environment:
Last Closed: 2016-11-04 01:07:12 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: 1026182    

Comment 6 Marc-Andre Lureau 2014-07-21 15:29:31 UTC
no solution yet, this is a harmless warning, moving to 7.2

Comment 10 Marc-Andre Lureau 2015-04-21 15:39:49 UTC
no solution yet, this is a harmless warning, moving to 7.3

Comment 12 Frediano Ziglio 2016-03-02 16:14:27 UTC
Really easy step to reproduce:

  xrandr --output Virtual-0 --off

in this case I'm asking to disable all monitors and X disable the only monitor I have. Also note that in the original conditions of https://bugzilla.redhat.com/show_bug.cgi?id=993789 this does not happen anymore.

In spice-server we have

static void marshall_monitors_config(RedChannelClient *rcc, SpiceMarshaller *base_marshaller,
                                     MonitorsConfig *monitors_config)
{
    int heads_size = sizeof(SpiceHead) * monitors_config->count;
    int i;
    SpiceMsgDisplayMonitorsConfig *msg = spice_malloc0(sizeof(*msg) + heads_size);
    int count = 0; // ignore monitors_config->count, it may contain zero width monitors, remove them now

    red_channel_client_init_send_data(rcc, SPICE_MSG_DISPLAY_MONITORS_CONFIG, NULL);
    for (i = 0 ; i < monitors_config->count; ++i) { 
        if (monitors_config->heads[i].width == 0 || monitors_config->heads[i].height == 0) {
            continue;
        }
        msg->heads[count].id = monitors_config->heads[i].id;
        msg->heads[count].surface_id = monitors_config->heads[i].surface_id;
        msg->heads[count].width = monitors_config->heads[i].width;
        msg->heads[count].height = monitors_config->heads[i].height;
        msg->heads[count].x = monitors_config->heads[i].x;
        msg->heads[count].y = monitors_config->heads[i].y;
        count++;
    }
    msg->count = count;
    msg->max_allowed = monitors_config->max_allowed;
    spice_marshall_msg_display_monitors_config(base_marshaller, msg);
    free(msg);
}

so this seems a valid condition if guest just asked to put all monitors to off.

I propose:
- change the component to spice-gtk (client) as the original problem does not happen anymore
- remove the line in spice-gtk as this condition is expected (not common but expected).

Comment 14 Mike McCune 2016-03-28 23:16:15 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 18 errata-xmlrpc 2016-11-04 01:07:12 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-2016-2229.html