Opened 20 years ago

Last modified 19 years ago

#982 closed patch

DPMS for X11 is inefficient — at Version 1

Reported by: kcodyjr@… Owned by: Isaac Richards
Priority: minor Milestone: 0.20
Component: mythtv Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description (last modified by danielk)

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.

Change History (5)

by kcodyjr@…, 20 years ago

Attachment: myth-dpms-fixes.patch added

by kcodyjr@…, 20 years ago

Attachment: myth-dpms-fixes.2.patch added

Fixed typo.

by kcodyjr@…, 20 years ago

Attachment: myth-no-hot-wakeup.patch added

Allow any keypress to safely wake up (blocks command)

by kcodyjr@…, 20 years ago

Attachment: myth-dpms-fixes.3.patch added

Incorporating #991 and removes DPMSCapable test.

comment:1 by danielk, 20 years ago

Description: modified (diff)
Milestone: 0.20
Type: defectpatch
Version: head
Note: See TracTickets for help on using tickets.