id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc,mlocked 982,DPMS for X11 is inefficient,kcodyjr@…,skamithi,"I'm seeing the same snippet of code in several places that detects the existence of DPMS extensions, and decides either whether to issue a powerup signal, or whether to dis/enable automatic powerdown. 1) It never checks to see if the hardware is actually DPMS capable, 2) It never checks to see if the user actually wants DPMS at all, 3) The code repetition is horrible, especially calls to the DPMS API. The patch I'm about to upload does the following: 1) Finds out separately if DPMS is supported, available, and enabled, 2) Issues informative VERBOSE messages about the DPMS startup state, 3) Implements a proper state machine to minimize conditional tests, 4) Adds bool Asleep() to ScreenSaverControl to export state checking. The copious qt_xdisplay() calls were left alone based on the assumption that something just -MIGHT- change displays, like from :0 to :0.1, etc. It is, however, reasonable to assume that DPMS preferences will not change during the life of the program. Although nothing wants to know about the monitor DPMS state right now, something easily might, for example an option to block the keypress that wakes up the monitor. ",patch,closed,minor,0.20,mythtv,head,medium,fixed,,,0