[mythtv-users] How I got my frontend to wake from DPMS sleep

Yeechang Lee ylee at pobox.com
Tue Jun 2 07:29:44 UTC 2009

My frontend is set to a) run xscreensaver after 10 minutes, and b)
trigger DPMS sleep on the flat panel after two hours of
inactivity. Pushing any button on my lirc/irxevent-powered remote
control would turn the screensaver off and wake the display up.

A few months back, after installing an Nvidia 8400GS video card in the
frontend for VDPAU, I found that a) I could no longer wake thedisplay
from DPMS sleep via the remote, and b) if I forced a wake via 'xset
dpms force on' from a ssh session, the screen remained blank. (I
mention the issue in my first VDPAU writeup at
I figured this was some peculiarity of the combination of the video
card and the then-current 180.22 drivers (the issue did not exist with
180.22 and the previous 7300LE card) and duly disabled DPMS in
.xscreensaver. As new Nvidia drivers came along (currently 180.51) I'd
retry DPMS without success.

My frontend is only used as a frontend; its keyboard/integrated mouse
normally sits under the sofa. By accident I discovered today that the
keyboard does wake the display from DPMS and with an unblanked
screen. So, the real issue was that the 8400GS caused the frontend to
no longer treat irxexec-generated keyevents as equivalent to "real"
keystrokes (or mouse movements or buttons) from a DPMS-unblanking
perspective. How could I generate real keystrokes without needing the
real keyboard?

I saw mention in my research of an 'acpi_fakekey' script that
simulates keystrokes by talking directly to ACPI (the script is
normally used to enable notebooks' dedicated power and other hardware
buttons within Linux), but CentOS doesn't come with any such
thing. Instead, I compiled xdotool
(<URL:http://www.semicomplete.com/projects/xdotool/>). Now, the On
button on my remote triggers the following in ~/.lircrc:

    config = xdotool key shift; xset dpms force on

xdotool sends the shift key to X, which cancels the DPMS blank (and
xscreensaver); it could be any key, of course, but I wanted one that
mythfrontend itself would not respond to. The display itself stays
asleep (since what xdotool does is still not a "real" hardware event
from a BIOS/ACPI perspective, I guess), so I still need to manually
wake it.

While this solution works quite nicely, the following questions

* Why would a different videocard cause this change in behavior?
  Besides the 7300LE I previously used a 6200 and a 5200 in the
* What makes xdotool's simulated X keystrokes different from
* Why does the screen blank when DPMS sleep is triggered, anyway?
  (It's not xscreensaver.) Seems redundant. And if it's the DPMS
  circuitry, shouldn't 'xset dpms force off' undo the blanking, too?
* I'm still curious about how to generate a real hardware event
  through software. I suspect ACPI is the key but don't know anything
  about it.

Yeechang Lee <ylee at pobox.com> | San Francisco CA US

More information about the mythtv-users mailing list