Skip to content
joystick-aware screen waker
Branch: master
Clone or download
foresto Update xset dpms command. Bump Standards-Version.
The built-in xset command "xset dpms s reset" worked on Xubuntu 16.04 (xenial),
but stopped waking the monitor from power saving modes in 16.10 (yakkety).
We now use a command that conforms to the xset man page, and works for both the
X screen blanker and DPMS:

xset dpms force on s reset

Also updated the debian/control Standards-Version.
Latest commit 8b86fc9 Feb 9, 2017



A joystick-aware screen waker

Manual section:1
Date: 2017-02-09


joystickwake -h|--help

joystickwake [--command cmd] [--interval seconds] [--loglevel level]


Linux gamers often find themselves unexpectedly staring at a blank screen, because their display server fails to recognize game controllers as input devices and allows the screen blanker to activate during gameplay. This program attempts to work around the problem by periodically delaying screen blankers when it detects joystick activity.

Once installed, joystickwake launches automatically when a user logs in to any modern linux desktop environment. It can also be run manually, either from a command prompt or from a user-created menu entry. It then monitors udev to find joystick devices (including those that are plugged in later) and reacts to activity from any of them.


In many desktop environments, no configuration is required. Joystickwake comes pre-configured with commands that are known to wake the screen from DPMS power-off and several common screen savers. Those commands are:

xset dpms force on s reset
xscreensaver-command -deactivate
gnome-screensaver-command --deactivate
mate-screensaver-command --poke

If one of those commands fails, it will be skipped when the screen is next due to be awakened.

When the built-in commands are not sufficient, a custom command can be defined in either of the following configuration files:


This example illustrates the file format and available settings:

command = xdg-screensaver reset # This might work on some desktops.
interval = 30                   # Number of seconds between wakes.
loglevel = warning              # Also: debug, info, error, critical.


Command line options --command, --interval, and --loglevel are available, and will override their corresponding config file settings.


If all the screen-waking commands fail, joystickwake will quit.

If the python3 Xlib package is installed, joystickwake will quit when the desktop session ends. Otherwise, it will quit when its parent process exits. This avoids leaving old instances running after the user logs out.

Log messages go to standard error, which is normally captured by the desktop environment in a file such as $HOME/.xsession-errors or $HOME/.cache/upstart/startxfce4.log. At the default loglevel setting, very few messages will be produced, if any.

If none of the built-in commands work with a particular desktop environment, finding one that does can require some experimentation. Running joystickwake from a terminal window makes this relatively easy. For example:

joystickwake --loglevel debug --interval 5 --command "test command"

Once a working command is discovered, it can be saved in the configuration file for use in future login sessions.

See Also

You can’t perform that action at this time.