[Bug 1759950] Re: Lid-close suspend: blank screen when switching to user session
TJ
ubuntu at iam.tj
Tue Jun 18 17:13:11 UTC 2019
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.
** Attachment added: "xfsettingsd debug log for successful and failed cycles"
https://bugs.launchpad.net/ubuntu/+source/xfce4-settings/+bug/1759950/+attachment/5271422/+files/xfsettingsd.5.log
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1759950
Title:
Lid-close suspend: blank screen when switching to user session
Status in Light-Locker:
New
Status in Xfce4 Power Manager:
Confirmed
Status in light-locker package in Ubuntu:
Incomplete
Status in systemd package in Ubuntu:
New
Status in xfce4-power-manager package in Ubuntu:
Confirmed
Status in xfce4-settings package in Ubuntu:
New
Status in xubuntu-default-settings package in Ubuntu:
New
Bug description:
I'm currently testing Xubuntu 18.04 after a do-release-upgrade from
16.04.
I discovered a very weird issue. When doing S3 sleep via closing the
lid, on resume the lock screen appears, I authenticate, but as soon as
it switches to the user session the screen goes blank - not even a
backlight.
Switching to other ttys works and they display correctly but the GUI
user session remains blank.
If the system is manually suspended (not using the lid), then resumed
either by opening the lid or pressing the power button, the GUI user
session is fine.
I narrowed it down to xfce4-power-manager and discovered disabling the
lock-screen cured the issue.
I cloned the repository and reviewed commits between 1.7 and 1.8.
Fortunately there aren't many. Looking at 6365683 "Proper exit status
for light-locker-command" I suspected the change in the SetActive
return value, and reverted it.
After a build/install cycle I've found the system now behaves
correctly so I think the change should be reverted.
I've created an issue upstream for this at
https://github.com/the-cavalry/light-locker/issues/108
To manage notifications about this bug go to:
https://bugs.launchpad.net/light-locker/+bug/1759950/+subscriptions
More information about the foundations-bugs
mailing list