Xmir: xrandr outputs information is lost after root window resize

Bug #1504422 reported by Daniel van Vugt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xorg-server (Ubuntu)
Fix Released
Medium
Daniel van Vugt
Nominated for Xenial by Christopher Townsend

Bug Description

[Impact]

Users trying to use xrandr on Xmir will get bogus info for the attached displays after resizing the root window.

[Test Case]

1. Start up an X application through Xmir.
2. Type xrandr and observe output.
3. Resize the window.
4. Type xrandr again.

Valid output should be given.

[Regression Potential]

None observed.

--------------------------------------------
Original Description:
Xmir: xrandr outputs information is lost after root window resize (non-rootless mode)

$ xrandr
Screen 0: minimum 320 x 200, current 1920 x 1200, maximum 32767 x 32767
VGA-0 disconnected
DP-0 disconnected
HDMI-0 disconnected
DP-1 disconnected
HDMI-1 disconnected
DP-2 connected 1920x1200+0+0 520mm x 320mm
   1920x1200@60.0Hz 59.88*+
DP-3 disconnected

# Now I resize the root window in the Mir shell...

$ xrandr
Screen 0: minimum 320 x 200, current 1631 x 1098, maximum 32767 x 32767

Tags: xmir
description: updated
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Hmm, seems to be a feature actually...

   if (!xmir_screen->windowed) {
        xmir_screen->windowed = 1;

Changed in xorg-server (Ubuntu):
status: New → Opinion
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Reopened. If Unity8 is resizing Xmir then we'll hit this bug (which is usually harmless) however some sensitive apps might then fail to start -> bug 1602561

Changed in xorg-server (Ubuntu):
status: Opinion → New
status: New → Triaged
importance: Undecided → Medium
status: Triaged → Confirmed
importance: Medium → Undecided
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The issue is the code says it's inserting a fake output to replace the old ones, but no code has ever existed to actually do that :)

    if (!xmir_screen->windowed) {
        xmir_screen->windowed = 1;

        XMIR_DEBUG(("Root resized, removing all outputs and inserting fake output\n"));

        while (!xorg_list_is_empty(&xmir_screen->output_list)) {
            struct xmir_output *xmir_output = xorg_list_first_entry(&xmir_screen->output_list, typeof(*xmir_output), link);

            RRCrtcDestroy(xmir_output->randr_crtc);
            RROutputDestroy(xmir_output->randr_output);
            xmir_output_destroy(xmir_output);
        }
    }

Changed in xorg-server (Ubuntu):
assignee: nobody → Daniel van Vugt (vanvugt)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :
Changed in xorg-server (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xorg-server - 2:1.18.4-1ubuntu3

---------------
xorg-server (2:1.18.4-1ubuntu3) yakkety; urgency=medium

  * debian/patches/xmir.patch:
    - Fix bottom/right edge corruption. (LP: #1510849)
    - Fix key repeat. (LP: #1591356)
    - Don't delete outputs without replacing them. (LP: #1504422) (LP: #1602561)
    - Xmir -debug: Log WM types by name and number.
    - Implement fake GLX frame notification/timing.
    - Improve focus tracking.

 -- Robert Ancell <email address hidden> Thu, 21 Jul 2016 11:42:03 +0200

Changed in xorg-server (Ubuntu):
status: Fix Committed → Fix Released
description: updated
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.