Opened 18 years ago
Closed 18 years ago
#982 closed patch (fixed)
DPMS for X11 is inefficient
Reported by: | Owned by: | skamithi | |
---|---|---|---|
Priority: | minor | Milestone: | 0.20 |
Component: | mythtv | Version: | head |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description (last modified by )
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.
Attachments (5)
Change History (8)
Changed 18 years ago by
Attachment: | myth-dpms-fixes.patch added |
---|
Changed 18 years ago by
Attachment: | myth-dpms-fixes.2.patch added |
---|
Changed 18 years ago by
Attachment: | myth-no-hot-wakeup.patch added |
---|
Allow any keypress to safely wake up (blocks command)
Changed 18 years ago by
Attachment: | myth-dpms-fixes.3.patch added |
---|
Incorporating #991 and removes DPMSCapable test.
comment:1 Changed 18 years ago by
Description: | modified (diff) |
---|---|
Milestone: | → 0.20 |
Type: | defect → patch |
Version: | → head |
comment:2 Changed 18 years ago by
Owner: | changed from Isaac Richards to skamithi |
---|
Fixed typo.