Python bindings to DPMS X11 extension
C Python
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



This is python bindings to the DPMS X11 extension module for controlling
your monitor power savings state.

The DPMS interface lets you control the power level of your monitor
(On, Standby, Suspend, or Off).  It is a simple interface that lets
you get/set timeouts of inactivity to enter these states or you can
force it to enter any of the states.

See on how to use it. This file should be sufficient on how
to use it. It first shows how to query all the different settings and
then shows how to set them.

See also 'man xset' for a program that lets you modify the DPMS state
from the command line.

These are bindings to the DPMS X11 extension module and as such only
work from within an X11 session. They do not work from a console
outside of X11.


Install libXext and python development packages installed. For
example, on RedHat/Fedora:

    yum install libXext-devel python-devel

On Ubuntu:

    apt-get install libxext6-dev python-dev

Then run:

    python build

Then as root, run:

    python install

That's it. Now run:


to test it out. Also try the script:


It should turn off your monitor after a 1 second wait. Press any key
to wake it back up.