Resetting DPMS idle timeout

Greg Kennedy kennedy.greg at
Wed Feb 10 00:13:02 CET 2016

Is there a "proper" Xlib API call to reset the DPMS timeout?

I am working on a game in C which takes joystick input.  After ~10 minutes
of gameplay, the screen shuts off - this is because I haven't hit any keys
or moved the mouse, so X doesn't see any of the events that I'm actually
reading from /dev/input/js0.

I'm looking for a function that I can call myself on every joystick event,
which will signal to the server "yes, user is still active" and reset the
timeout to 10mins again or whatever is configured in xorg.conf.

I don't want to globally disable DPMS, because my kids have a tendency to
just walk away from the game without shutting it off first, and it'll burn
the screen : )

-Greg Kennedy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the xorg mailing list