Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 157501 - Screensaver preferences does not accept 0 as a value for Power Management settings
Summary: Screensaver preferences does not accept 0 as a value for Power Management set...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: xscreensaver
Version: 4
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Ray Strode [halfline]
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-05-12 03:06 UTC by Adam Gibson
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-09-28 14:20:04 UTC


Attachments (Terms of Use)
Allow zero value for suspend, off in prefs (deleted)
2005-09-28 05:58 UTC, Mamoru TASAKA
no flags Details | Diff

Description Adam Gibson 2005-05-12 03:06:07 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.7) Gecko/20050509 Fedora/1.0.3-5 Firefox/1.0.3

Description of problem:
The Screensaver preferences (xscreensaver-demo) does not allow a 0 value for any of the Power Management Standby, Suspend, Off settings on the Advanced tab.  If you set one of those settings to 0 even though the others have valid non 0 values, when you exit the screensaver preferences and start it up again the Power Management is totally disabled(unchecked) and all values are set to 0.  This behavior did not happen in Fedora Core 3.  It would keep a setting at 0 if you set it to that because 0 is a valid value which means that specific Power Management feature should be disabled while others could still be used.

All the LCD monitors(Samsung SyncMaster 712N, Samsung SyncManster 770TFT) that I have do not support the 'Off After' setting.  The monitor does not turn off... it just flashes an led light but it appears that the screen is still on(just blank).

I would setup Fedora Core 3 (xscreensaver 4.18) for a Standby of 45 minutes, Suspend After 60 minutes, and Off After of 0 so that the first two were enabled but the Off setting was disabled(set to 0).  0 is a valid value for any of those settings to disable that specific Power Management setting.

With FC4 it appears that all 3 settings have to be non zero or it disables all power management features.

Version-Release number of selected component (if applicable):
xscreensaver-base-4.21-3

How reproducible:
Always

Steps to Reproduce:
1. Run Screensaver preferences
2. Click on Advanced tab
3. Check Power Management Enabled
4. Set the Standby After setting to 15
5. Set the Suspend After setting to 20
6. Set the Off After setting to 0
7. Quit Screensaver preferences.
8. Run Screensaver preferences.
9. Go to the Advanced tab
10. Now Display Power Management feature is unchecked.

  

Actual Results:  Power Management is unchecked(disabled fully) when you try to set one of the Power management settings to 0(disable that one setting).

Expected Results:  Power Management should stay enabled and leave standby at 15, suspend at 20, and Off at 0 which means That standby and suspend is enabled but Off is disabled.  0 is a valid setting for xset command.

Additional info:

xset information from the man page of xset showing that 0 is a valid setting.

+dpms   The +dpms option enables DPMS (Energy Star) features.

       dpms flags...
               The dpms option allows the DPMS (Energy Star) parameters to  be
               set.   The option can take up to three numerical values, or the
               force flag followed by  a  DPMS  state.   The  force  flags
               forces the server to immediately switch to the DPMS state spec-
               ified.  The DPMS state can  be  one  of  standby,  suspend,
               off,  or on.  When numerical values are given, they set the
               inactivity period (in units of seconds) before the three  modes
               are  activated.   The  first  value  given is for the standby
               mode, the second is for the suspend mode, and  the  third  is
               for  the  off  mode.  Setting these values implicitly enables
               the DPMS features.  A value of zero disables a particular mode.

Comment 1 Mamoru TASAKA 2005-09-28 05:58:58 UTC
Created attachment 119343 [details]
Allow zero value for suspend, off in prefs

Hello.

According to the DPMSLib.PS.gz (in xorg-x11-doc-6.8.2-52), the function
"DPMSSetTimeouts" (mainly called in sync_server_dpms_settings in
driver/dpms.c) behaves in the following way:
A: zero value is accepted for standby, suspend, off values
B: Aside for zero value, the order of 3 values should be:
   standby <= suspend <= off; otherwise a "BadValue" error will result.
( These behavior can be checked by the return value of "xset dpms a b c ).

To follow B, driver/prefs.c is changed during xscreensaver version
4.18 and 4.21 so that for invarid values prefs.c corrects the values to
follow B; but prefs.c of 4.21 ( also 4.22 ) ignores the case A.
For now, if suspend is set as 0, standby is also set as 0 , and if
off is set as 0, both stanby and suspend is set as 0, which is the behavior
what Adam reported.

The patch attached is for prefs.c to accept zero value for suspend and off.

Comment 2 Ray Strode [halfline] 2005-09-28 14:20:04 UTC
Thanks Mamoru,
It should be applied in tomorrow's rawhide.


Note You need to log in before you can comment on or make changes to this bug.