Added:
Description: Loop delay on CRTc config failure
--- xfce4-settings-4.13.4.orig/xfsettingsd/displays.c +++ xfce4-settings-4.13.4/xfsettingsd/displays.c @@ -1256,10 +1256,17 @@ xfce_displays_helper_apply_crtc (XfceRRC ret = xfce_displays_helper_disable_crtc (helper, crtc->id); } else { xfce_displays_helper_apply_crtc_transform (crtc, helper); - - ret = XRRSetCrtcConfig (helper->xdisplay, helper->resources, crtc->id, + gint l = 5; + while (l--) { + ret = XRRSetCrtcConfig (helper->xdisplay, helper->resources, crtc->id, CurrentTime, crtc->x, crtc->y, crtc->mode, crtc->rotation, crtc->outputs, crtc->noutput); + if (ret != RRSetConfigSuccess) { + g_warning("XRRSetCrtcConfig()=%d, sleeping", ret); + g_usleep(1000); + } else + break; + } }
From a fresh boot and then in TTY console:
DISPLAY=:0 XFSETTINGSD_DEBUG=1 xfsettingsd --replace --no-daemon
Lid-close->suspend, Lid-open, tap key->resume, GUI password
On first cycle GUI comes back correctly. On Second cycle it doesn't, and I see:
xfce4-settings(displays): Configuring CRTC 79. xfce4-settings(displays): Applying changes to CRTC 79. xfce4-settings(displays): Applying CRTC 79 Transform: x=0.000000 y=0.000000, filter=bilinear.
(xfsettingsd:2485): xfsettingsd-WARNING **: 17:56:50.285: XRRSetCrtcConfig()=3, sleeping
(xfsettingsd:2485): xfsettingsd-WARNING **: 17:56:50.286: XRRSetCrtcConfig()=3, sleeping
(xfsettingsd:2485): xfsettingsd-WARNING **: 17:56:50.288: XRRSetCrtcConfig()=3, sleeping
(xfsettingsd:2485): xfsettingsd-WARNING **: 17:56:50.290: XRRSetCrtcConfig()=3, sleeping
(xfsettingsd:2485): xfsettingsd-WARNING **: 17:56:50.292: XRRSetCrtcConfig()=3, sleeping
(xfsettingsd:2485): xfsettingsd-WARNING **: 17:56:50.293: Failed to configure CRTC 79 XRRSetCrtcConfig()=3. xfce4-settings(displays): Configuring CRTC 80.
(xfsettingsd:2485): xfsettingsd-CRITICAL **: 17:56:50.294: Failed to apply display settings
So even with a 1000 u-second delay and retry, repeated 5 times, the issue remains. This looks like a problem with the underlying libraries.
The return value of 3 is RRSetConfigFailed from libxrandr::src/XrrCrtc.c::XRRSetCrtcConfig()
Tracking it back further looks to be extremely difficult.
I'm attaching the complete xfsettingd log for these successful + failed cycles in case someone with more insight than me can spot more clues.
Added:
Description: Loop delay on CRTc config failure
--- xfce4-settings- 4.13.4. orig/xfsettings d/displays. c 4.13.4/ xfsettingsd/ displays. c helper_ apply_crtc (XfceRRC helper_ disable_ crtc (helper, crtc->id);
xfce_ displays_ helper_ apply_crtc_ transform (crtc, helper);
CurrentTime, crtc->x, crtc->y, crtc->mode,
crtc- >rotation, crtc->outputs, crtc->noutput); "XRRSetCrtcConf ig()=%d, sleeping", ret);
+++ xfce4-settings-
@@ -1256,10 +1256,17 @@ xfce_displays_
ret = xfce_displays_
} else {
-
- ret = XRRSetCrtcConfig (helper->xdisplay, helper->resources, crtc->id,
+ gint l = 5;
+ while (l--) {
+ ret = XRRSetCrtcConfig (helper->xdisplay, helper->resources, crtc->id,
+ if (ret != RRSetConfigSuccess) {
+ g_warning(
+ g_usleep(1000);
+ } else
+ break;
+ }
}
From a fresh boot and then in TTY console:
DISPLAY=:0 XFSETTINGSD_DEBUG=1 xfsettingsd --replace --no-daemon
Lid-close->suspend, Lid-open, tap key->resume, GUI password
On first cycle GUI comes back correctly. On Second cycle it doesn't, and I see:
xfce4-settings( displays) : Configuring CRTC 79. displays) : Applying changes to CRTC 79. displays) : Applying CRTC 79 Transform: x=0.000000 y=0.000000, filter=bilinear.
xfce4-settings(
xfce4-settings(
(xfsettingsd:2485): xfsettingsd-WARNING **: 17:56:50.285: XRRSetCrtcConfi g()=3, sleeping
(xfsettingsd:2485): xfsettingsd-WARNING **: 17:56:50.286: XRRSetCrtcConfi g()=3, sleeping
(xfsettingsd:2485): xfsettingsd-WARNING **: 17:56:50.288: XRRSetCrtcConfi g()=3, sleeping
(xfsettingsd:2485): xfsettingsd-WARNING **: 17:56:50.290: XRRSetCrtcConfi g()=3, sleeping
(xfsettingsd:2485): xfsettingsd-WARNING **: 17:56:50.292: XRRSetCrtcConfi g()=3, sleeping
(xfsettingsd:2485): xfsettingsd-WARNING **: 17:56:50.293: Failed to configure CRTC 79 XRRSetCrtcConfi g()=3. displays) : Configuring CRTC 80.
xfce4-settings(
(xfsettingsd:2485): xfsettingsd- CRITICAL **: 17:56:50.294: Failed to apply display settings
So even with a 1000 u-second delay and retry, repeated 5 times, the issue remains. This looks like a problem with the underlying libraries.
The return value of 3 is RRSetConfigFailed from libxrandr: :src/XrrCrtc. c::XRRSetCrtcCo nfig()
Tracking it back further looks to be extremely difficult.
I'm attaching the complete xfsettingd log for these successful + failed cycles in case someone with more insight than me can spot more clues.