[mythtv-commits] Ticket #10789: Keyboard-triggered system events and DPMS un-blanks triggered in indeterminate order

MythTV noreply at mythtv.org
Sat Jun 2 08:49:54 UTC 2012


#10789: Keyboard-triggered system events and DPMS un-blanks triggered in
indeterminate order
------------------------------------+--------------------------------------
 Reporter:  Josh Triplett <josh@…>  |           Type:  Bug Report - General
   Status:  new                     |       Priority:  minor
Milestone:  unknown                 |      Component:  MythTV - General
  Version:  Unspecified             |       Severity:  medium
 Keywords:                          |  Ticket locked:  0
------------------------------------+--------------------------------------
 With previous versions of mythtv and Linux, I used irexec to run a DPMS
 screen-blanking script when I hit my remote's power button; my script
 detects the current DPMS state of the monitor, and toggles that state.  I
 now use a sufficiently new Linux kernel that handles the remote without
 LIRC, and I've tried to configure equivalent behavior using mythtv's
 keyboard-triggered system events ("Keystroke event #1", etc).  I've
 configured the power button on my remote to trigger keystroke event #1,
 and configured that event to run my script.  However, I discovered that
 this interacts badly with mythfrontend's own mechanisms to un-blank the
 screen on keypresses, in two different ways:

 - When I hit the power button to blank the screen, my script runs "xset
 dpms force suspend" to blank the screen, but then mythfrontend immediately
 un-blanks the screen.  I can work around that by sleeping for a moment
 before running xset, but I'd rather have a cleaner, race-free solution.

 - When I hit the power button to un-blank the screen, mythfrontend
 immediately wakes the screen back up itself, which causes my script to
 detect the screen as un-blanked, and thus re-blank it.

 I think a single simple change would address both problems: hitting a
 single key should either trigger a DPMS un-blank or trigger an action, but
 not both.  With the screen un-blanked, mythfrontend should observe the un-
 blanked screen, and then trigger the event.  With the screen blanked,
 mythfrontend should un-blank the screen but not trigger an event.

 (Alternatively, mythfrontend could have a keyboard-triggerable "toggle
 DPMS" event and implement the necessary logic itself.)

-- 
Ticket URL: <http://code.mythtv.org/trac/ticket/10789>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center


More information about the mythtv-commits mailing list