﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc	mlocked
10789	Keyboard-triggered system events and DPMS un-blanks triggered in indeterminate order	Josh Triplett <josh@…>	stuartm	"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.)"	Bug Report - General	closed	minor	0.28.2	MythTV - General	Unspecified	medium	Won't Fix			0
