Here is how to reproduce : 1. Change dpms setup to a very short delay, say 10s : xset dpms 0 0 10 ; sleep 11 2. Wait 10s, the display switches off 3. Disable dpms : xset -dpms ; sleep 11 4. Wait 10s, the display remains on 5. Re-enable dpms : xset +dpms ; sleep 11 6. Here, the display stays on, dpms should turns off the display, but it don't. Dpms stops working. This behavior is not related to a specific driver. It is identical on my desktop with mga_drv and on my laptop with ati_drv.
Bug found ! If the timeout occurs when dpms is disabled, ScreenSaverTimeoutExpire() is called and return nextTimeout=0. When you re-enable dpms, ScreenSaverTimeoutExpire() is no more called and dpms stops working until you force or change settings. To fix that, I have modified ProcDPMSEnable() in Xext/dpms.c. replace : if (DPMSCapableFlag) DPMSEnabled = TRUE; by : if (DPMSCapableFlag) { DPMSEnabled = TRUE; // Reset Timer SetScreenSaverTimer(); }
*** Bug 11922 has been marked as a duplicate of this bug. ***
Can somebody review this patch and push it if it looks good?
Looks ok to me, but I don't really know the server side dpms code at all. I'll apply it if no one has any objections over the next few days.
This is the bug that has annoyed me for a long time!
making a 7.4 blocker
Fixed in master with a slight tweak. We'll only re-arm the timer if we were disabled before entering ProcDPMSEnable(). Thanks!
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.