Sample Header Ad - 728x90

Why does X11 stop putting my screen to sleep after several standby/resume cycles?

7 votes
1 answer
1686 views
For several years (~2012-2020) and over multiple computers (AMD/Intel of various vintages, S3/AMD/Intel graphics), I've observed what appears to be a curious, DDX-independent bug in X11. Occasionally, after several sleep (echo mem > /sys/power/state) and wakeup cycles, X11 will "forget" my display's DPMS settings, and leave the screen on indefinitely. In this state, xset dpms force suspend (or -standby) works perfectly; I wonder if the bug is in activity detection or timeout management. Sometimes the issue takes weeks to surface; sometimes it occurs extremely quickly. I happened to need to reboot a couple days ago, and the problem's already cropped up. Prior to that, I think I've experienced the issue on this machine (which I've been using for about a year) only once before. Hmm, maybe it's actually a race condition. Yayyyy. As an acid test, I changed all the values I could from the default 600 (10 minutes) to 5 seconds. Right now, xset q is showing me:
Screen Saver:
...
  timeout:  5    cycle:  5
...
DPMS (Energy Star):
  Standby: 5    Suspend: 5    Off: 5
  DPMS is Enabled
  Monitor is On
My screen is neither being blanked by the X screensaver OR put into DPMS standby/suspend.

Where might I start debugging this?

I'm guessing I'm going to need to build my own copy of X, add as many printfs as I can think, and try to remember to always use my X instead of the system X... but before I go *there*, I was wondering if anyone had any interesting insightful tidbits for me to try first. Thanks :) NB. My system is exhibiting the issue ***right now***, and I'll see if I can hold off rebooting for a couple days. This is a bit of a "month with a Z in it" kind of thing after all.
Asked by i336_ (1077 rep)
Sep 9, 2020, 01:04 PM
Last activity: Jun 24, 2022, 09:18 PM