Bug 3254 - Ridiculous Values to ServerFlags Render X Useless
Summary: Ridiculous Values to ServerFlags Render X Useless
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/DDX/Xorg (show other bugs)
Version: 6.8.2
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Xorg Project Team
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-09 23:36 UTC by Zachary J. Slater
Modified: 2005-10-08 23:54 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Zachary J. Slater 2005-05-09 23:36:35 UTC
I set some ridiculous values to quickly as such:
Section "ServerFlags"
    Option      "blank time"    "999999999"
    Option      "standby time"  "999999999"
    Option      "suspend time"  "999999999"
   Option      "off time"      "999999999"
EndSection

to quickly disable such things.

X.org promptly took nearly all CPU and refused to do normalish things.

This may be related to the ATi hardware inside:
0000:01:00.0 VGA compatible controller: ATI Technologies Inc Rage Mobility P/M
AGP 2x (rev 64)

X.org should handle ridiculous values reasonably, even if the user hasn't made
the brightest setting.
Comment 1 Alan Coopersmith 2005-10-09 16:54:49 UTC
The timeouts you specify are multiplied by MILLI_PER_MIN (1000 * 60)
to convert from minutes to milliseconds.   The results overflow a 
32-bit integer and the DPMSStandbyTime ends up being set to -693185120, 
which causes the WaitForSomething loop to go into a tight loop trying 
to wait for 0 time, waking up and repeating.

I've checked in a fix to CVS to prevent setting values which overflow like
this, and will mark this bug as fixed, but some more in-depth thinking about 
overflows in the timer system needs to be done, so I opened bug #4728 for that.

CVSROOT:	/cvs/xorg
Module name:	xc
Changes by:	alanc@gabe.freedesktop.org	05/10/09 16:47:53

Log message:
  2005-10-09  Alan Coopersmith  <alan.coopersmith@sun.com>
  
  	* programs/Xserver/hw/xfree86/common/xf86Config.c (configServerFlags):
  	Bug #3254 <https://bugs.freedesktop.org/show_bug.cgi?id=3254>
  	Make sure screensaver & DPMS timeouts don't overflow when multiplied
  	by MILLI_PER_MIN.  (Reported by Zachary J. Slater)

Modified files:
      ./:
        ChangeLog 
      xc/programs/Xserver/hw/xfree86/common/:
        xf86Config.c 
  
  Revision      Changes    Path
  1.1414        +7 -0      xc/ChangeLog
  http://cvs.freedesktop.org/xorg/xc/ChangeLog
  1.15          +20 -5     xc/programs/Xserver/hw/xfree86/common/xf86Config.c
  http://cvs.freedesktop.org/xorg/xc/programs/Xserver/hw/xfree86/common/xf86Config.c


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.