Bug 13962 - dpms stops working after disabling and re-enabling it
Summary: dpms stops working after disabling and re-enabling it
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: 7.3 (2007.09)
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
: 11922 (view as bug list)
Depends on:
Blocks: xorg-7.4
  Show dependency treegraph
 
Reported: 2008-01-07 23:26 UTC by Gilles Hamel
Modified: 2008-03-24 09:24 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Gilles Hamel 2008-01-07 23:26:13 UTC
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.
Comment 1 Gilles Hamel 2008-01-10 13:00:07 UTC
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();
     }

Comment 2 Michel Dänzer 2008-01-19 01:44:31 UTC
*** Bug 11922 has been marked as a duplicate of this bug. ***
Comment 3 Michel Dänzer 2008-01-19 01:48:53 UTC
Can somebody review this patch and push it if it looks good?
Comment 4 Alex Deucher 2008-01-19 07:56:28 UTC
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.
Comment 5 Erik 2008-02-27 00:38:05 UTC
This is the bug that has annoyed me for a long time!
Comment 6 Alex Deucher 2008-02-27 07:08:38 UTC
making a 7.4 blocker
Comment 7 Adam Jackson 2008-03-24 09:24:24 UTC
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.