Setting mode with xrandr fails after changing panning region

Reported by Felix Kuehling on 2010-03-02
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
X.Org X server
Confirmed
High
x11-xserver-utils (Ubuntu)
Medium
Chris Halse Rogers

Bug Description

Binary package hint: x11-xserver-utils

The problem was observed on both Karmic and Lucid (current as at March 2, 2010) using both the open-source radeon driver and the proprietary fglrx driver on different ATI cards (at least RV730 and RV740).

Steps to reproduce (with a 1900x1200 DFP monitor using the fglrx driver, output names are different with radeon):
- xrandr --output DFP1 --mode 1440x900
- xrandr --output DFP1 --panning 1920x1200
- pan around
- xrandr --output DFP1 --panning 1440x900
- xrandr --output DFP1 --mode 1920x1200

Expected result:
- DFP1 should switch mode to 1920x1200, adjusting the desktop size as appropriate

Actual result:
- mode does not change from 1440x900
- the terminal shows the following message: "xrandr: Configure crtc0 invalid time"
- the system remains usable but the mode cannot be changed using xrandr on DFP1

After restarting the Xserver, modes can be changed again.

One of our engineers found a workaround in xrandr. It allows the mode to be changed but there are still other error messages:

--- bak/x11-xserver-utils-7.4+2ubuntu3/xrandr/xrandr.c 2009-04-01 11:01:55.000000000 -0400
+++ x11-xserver-utils-7.4-panningchg/xrandr/xrandr.c 2010-03-01 18:54:30.000000000 -0500
@@ -1346,7 +1346,10 @@ crtc_apply (crtc_t *crtc)
                              rr_outputs, crtc->noutput);
        if (s == RRSetConfigSuccess && crtc->panning_info) {
            if (has_1_3)
+ {
+ crtc->panning_info->timestamp = CurrentTime;
                s = XRRSetPanning (dpy, res, crtc->crtc.xid, crtc->panning_info);
+ }
            else
                fatal ("panning needs RandR 1.3\n");
        }

Bryce Harrington (bryce) wrote :

Thanks, btw if you attach patches to the bug report (and make sure they're marked as patches) rather than paste them in, they'll show up in my patch review queue which ensures they'll get attention. It's just lucky happenstance I noticed this one come in just now; since this package does not often get reviewed this likely would have gotten lost in the shuffle.

Changed in x11-xserver-utils (Ubuntu):
assignee: nobody → Bryce Harrington (bryceharrington)
Bryce Harrington (bryce) wrote :

Hi felix-kuehling,

Please attach the output of `lspci -vvnn` and `dmesg`, and attach your /var/log/Xorg.0.log (and maybe Xorg.0.log.old) file from after reproducing this issue. If you're using a custom /etc/X11/xorg.conf please attach that as well.

[This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: needs-xorglog
tags: added: needs-lspci-vvnn
Changed in x11-xserver-utils (Ubuntu):
status: New → Incomplete
Felix Kuehling (felix-kuehling) wrote :
Felix Kuehling (felix-kuehling) wrote :

This system has two monitors and reproduces the problem as described. Two other systems with only one monitor show slightly different symptoms after the last xrandr --mode call: the screen freezes or stops updating while the mouse pointer is still responsive. I can still move windows around and by the shape of the mouse pointer I can tell that I did move the window. But the image on the screen is not getting updated.

Created an attachment (id=33773)
Xorg.0.log

Hi Keith, I'm forwarding this bug report from Felix Kuehling. He provides a patch however since it sounds like it only partially fixes the problem I want to run it by you first.

[Problem]
After setting a panning region, xrandr errors "Configure crtc0 invalid time" and is no longer able to change resolution settings.

[Original Report]
The problem was observed on both Karmic and Lucid (current as at March 2, 2010) using both the open-source radeon driver and the proprietary fglrx driver on different ATI cards (at least RV730 and RV740).

Steps to reproduce (with a 1900x1200 DFP monitor using the fglrx driver, output names are different with radeon):
- xrandr --output DFP1 --mode 1440x900
- xrandr --output DFP1 --panning 1920x1200
- pan around
- xrandr --output DFP1 --panning 1440x900
- xrandr --output DFP1 --mode 1920x1200

Expected result:
- DFP1 should switch mode to 1920x1200, adjusting the desktop size as appropriate

Actual result:
- mode does not change from 1440x900
- the terminal shows the following message: "xrandr: Configure crtc0 invalid time"
- the system remains usable but the mode cannot be changed using xrandr on DFP1

After restarting the Xserver, modes can be changed again.

One of our engineers found a workaround in xrandr. It allows the mode to be changed but there are still other error messages:

--- bak/x11-xserver-utils-7.4+2ubuntu3/xrandr/xrandr.c 2009-04-01 11:01:55.000000000 -0400
+++ x11-xserver-utils-7.4-panningchg/xrandr/xrandr.c 2010-03-01 18:54:30.000000000 -0500
@@ -1346,7 +1346,10 @@ crtc_apply (crtc_t *crtc)
                              rr_outputs, crtc->noutput);
        if (s == RRSetConfigSuccess && crtc->panning_info) {
            if (has_1_3)
+ {
+ crtc->panning_info->timestamp = CurrentTime;
                s = XRRSetPanning (dpy, res, crtc->crtc.xid, crtc->panning_info);
+ }
            else
                fatal ("panning needs RandR 1.3\n");
        }

Attached are files from a system with two monitors that reproduces the problem as described. Two other systems with only one monitor show slightly different symptoms after the last xrandr --mode call: the screen freezes or stops updating while the mouse pointer is still responsive. I can still move windows around and by the shape of the mouse pointer I can tell that I did move the window. But the image on the screen is not getting updated.

02:00.0 VGA compatible controller [0300]: ATI Technologies Inc Radeon HD 4770 [RV740] [1002:94b3]
 Subsystem: ATI Technologies Inc Device [1002:0d00]

Bryce Harrington (bryce) wrote :

Hi Felix,

Weird, I'm not sure what's going on there but rather than apply this patch I'd like to get upstream's review of it in case there is something deeper going on, particularly since you indicate the patch mitigates the issue but doesn't completely solve it. I've forwarded your bug upstream to https://bugs.freedesktop.org/show_bug.cgi?id=26895 - please subscribe to this bug report in case Keith has questions or wants you to test something.

Changed in x11-xserver-utils (Ubuntu):
importance: Undecided → Medium
status: Incomplete → Triaged
Changed in xorg-server:
status: Unknown → Confirmed
Bryce Harrington (bryce) on 2010-03-18
tags: added: lucid
Bryce Harrington (bryce) on 2010-04-30
Changed in x11-xserver-utils (Ubuntu):
assignee: Bryce Harrington (bryceharrington) → Chris Halse Rogers (raof)
Bryce Harrington (bryce) on 2010-05-14
tags: added: hardy
Changed in xorg-server:
importance: Unknown → Medium
Changed in xorg-server:
importance: Medium → Unknown
Changed in xorg-server:
importance: Unknown → Medium
Changed in xorg-server:
importance: Medium → High
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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