














   XX DDiissppllaayy PPoowweerr MMaannaaggeemmeenntt SSiiggnnaalliinngg ((DDPPMMSS)) EExxtteennssiioonn

                   PPrroottooccooll SSppeecciiffiiccaattiioonn



                    Version 0.5 (DRAFT)






                        Rob Lembree
                    _l_e_m_b_r_e_e_@_z_k_3_._d_e_c_._c_o_m
               Digital Equipment Corporation
                       24 April 1996








































Copyright (C) Digital Equipment Corporation, 1996

Permission  to  use, copy, modify, distribute, and sell this
documentation for any purpose is hereby granted without fee,
provided that the above copyright notice and this permission
notice appear in all copies.  Digital Equipment  Corporation
makes  no representations about the suitability for any pur-
pose of the information in this document.   This  documenta-
tion  is  provided ``as is'' without express or implied war-
ranty.
























































11..  OOvveerrvviieeww

This extension provides X Protocol  control  over  the  VESA
Display Power Management Signaling (DPMS) characteristics of
video boards under control of the X Window System.

Traditionally,  the  X  Window  System has provided for both
blanking and non-blanking screen savers.   Timeouts  associ-
ated with these built-in screen saver mechanisms are limited
to idle (dwell) time, and a change  timeout  that  specifies
the change interval for non-blanking screen savers.

The  United  States'  Environmental  Protection Agency (EPA)
Energy Star program requires that monitors power down  after
some  idle  time by default.  While it is possible to simply
overload the existing screen saver timeouts,  this  solution
leaves the non-privileged user little to no control over the
DPMS characteristics of his or  her  system.   For  example,
disabling  DPMS would require some unintended side effect in
the core screen saver, such as disabling the changing  of  a
non-blanking screen saver.  Providing clients with this con-
trol requires an extension to the core X Window System  Pro-
tocol, and this extension seeks to fill this gap.

The  design  goal  of  the DPMS extension is to be a logical
extension to the traditional screen saver.  The protocol and
sample implementation is designed to use the same date types
and time units as the screen saver.  The sample  implementa-
tion  works independently from the screen saver so that pol-
icy as it pertains to the interaction between  screen  saver
and  DPMS can be deferred to the user or screen saver appli-
cation. The extension has been tested with and shown to work
correctly  with  both the internal blanking and non-blanking
screen savers,  as  well  as  with  screen  saver  extension
clients.

The DPMS extension is designed to be simple, yet export suf-
ficient  VESA  DPMS  information  to  enable  full  function
clients  to  be  written.   Included is the ability to sense
DPMS capability, set and get DPMS timeouts, enable and  dis-
able individual DPMS modes, enable and disable DPMS (without
destroying timeout values), and sense  current  DPMS  on/off
state and power level.

There are four power levels specified by the Video Electron-
ics Standards Association (VESA)  Display  Power  Management
Signaling (DPMS) standard.  These are:

  0            DPMSModeOn          In                    use
  1            DPMSModeStandby     Blanked,    low     power
  2            DPMSModeSuspend     Blanked,    lower   power
-----------
1. _X _W_i_n_d_o_w _S_y_s_t_e_m is a trademark of X Consortium,
Inc.



                              11





DDiissppllaayy PPoowweerr MMaannaaggeemmeenntt SSiiggnnaalliinngg ((DDPPMMSS)) EExxtteennssiioonn    DDRRAAFFTT


  3            DPMSModeOff         Shut off, awaiting activ-
ity


It  is  logical  to  assume  that  successive  DPMS modes be
chronologically at the same time or later than one  another,
and the protocol is designed to enforce this rule.

Note  however  that  a concious decision is made to decouple
the timeouts associated with  screen  saver  from  the  DPMS
timeouts.   While  it might be considered logical to require
that the first non-zero DPMS  timeout  be  greater  than  or
equal  to  the  screen  saver timeout, this is intentionally
omitted, leaving this policy decision to  the  user  or  the
screen  saver  application.   In  the case of a laptop where
power may be scarce, the importance of power savings  should
supersede  the  screen  saver.  If the laptop user plugs the
unit in and power is no longer a scarce commodity, it may be
decided  to  make  DPMS  less aggressive, or disable it com-
pletely.


22..  RReeqquueessttss



     _c_l_i_e_n_t___m_a_j_o_r___v_e_r_s_i_o_n: CARD16
     _c_l_i_e_n_t___m_i_n_o_r___v_e_r_s_i_o_n: CARD16

   =>

     _s_e_r_v_e_r___m_a_j_o_r___v_e_r_s_i_o_n: CARD16
     _s_e_r_v_e_r___m_i_n_o_r___v_e_r_s_i_o_n: CARD16

If supplied, the _c_l_i_e_n_t___m_a_j_o_r___v_e_r_s_i_o_n and  _c_l_i_e_n_t___m_i_n_o_r___v_e_r_-
_s_i_o_n  indicate what version of the protocol the client wants
the  server  to  implement.   The  server  version   numbers
returned  indicate the protocol this extension actually sup-
ports.  This might not equal the version sent by the client.
An  implementation  can (but need not) support more than one
version simultaneously.  The  _s_e_r_v_e_r___m_a_j_o_r___v_e_r_s_i_o_n  and  the
_s_e_r_v_e_r___m_i_n_o_r___v_e_r_s_i_o_n are a mechanism to support future revi-
sions of the Display  Power  Management  Signaling  protocol
which may be necessary.  In general, the major version would
increment for incompatible changes, and  the  minor  version
would   increment   for  small,  upward-compatible  changes.
Servers that support the protocol defined in  this  document
will  return  a  _s_e_r_v_e_r___m_a_j_o_r___v_e_r_s_i_o_n  of  one  (1),  and  a
_s_e_r_v_e_r___m_i_n_o_r___v_e_r_s_i_o_n of one (1).


        =>





                              22





DDiissppllaayy PPoowweerr MMaannaaggeemmeenntt SSiiggnnaalliinngg ((DDPPMMSS)) EExxtteennssiioonn    DDRRAAFFTT


     _c_a_p_a_b_l_e: BOOL

This request is used to determine whether or  not  the  cur-
rently  running  server's devices are capable of DPMS opera-
tions.  The truth value of this  request  is  implementation
defined,  but  is generally based on the capabilities of the
graphic card and  monitor  combination.   Also,  the  return
value  in  the  case  of heterogeneous multi-head servers is
implementation defined.


   =>

     _s_t_a_n_d_b_y___t_i_m_e_o_u_t: CARD16
     _s_u_s_p_e_n_d___t_i_m_e_o_u_t: CARD16
     _o_f_f___t_i_m_e_o_u_t: CARD16

This request returns the current values of the DPMS  timeout
values.  All values are in units of seconds.

_s_t_a_n_d_b_y___t_i_m_e_o_u_t  is  the amount of time of inactivity before
standby mode is invoked. The actual effects of this mode are
implementation  defined,  but  in the case of DPMS compliant
hardware, it is implemented by shutting off  the  horizontal
sync  signal,  and pulsing the vertical sync signal. Standby
mode provides the quickest monitor recovery time.  Note also
that  many  monitors implement this mode identically to sus-
pend mode.  A value of zero indicates that this mode is dis-
abled.

_s_u_s_p_e_n_d___t_i_m_e_o_u_t  is  the amount of time of inactivity before
the second level of power savings is invoked. Suspend mode's
physical  and  electrical characteristics are implementation
defined, but in DPMS  compliant  hardware,  results  in  the
pulsing  of  the horizontal sync signal, and shutting off of
the vertical sync signal.  Suspend mode recovery is  consid-
ered  to  be  slower  than standby mode, but faster than off
mode, however this is monitor dependent.   As  noted  above,
many  monitors  implement  this  mode identically to standby
mode.  A value of zero indicates that this mode is disabled.

_o_f_f___t_i_m_e_o_u_t  is  the amount of time of inactivity before the
third and final level  of  power  savings  is  invoked.  Off
mode's physical and electrical characteristics are implemen-
tation defined, but in DPMS compliant  hardware,  is  imple-
mented  by  shutting  off  both horizontal and vertical sync
signals, resulting in the power-down of the monitor.  Recov-
ery time is implementation dependant, but frequently is sim-
ilar to the power-up time of the monitor. A  value  of  zero
indicates that this mode is disabled.


     _s_t_a_n_d_b_y___t_i_m_e_o_u_t: CARD16
     _s_u_s_p_e_n_d___t_i_m_e_o_u_t: CARD16



                              33





DDiissppllaayy PPoowweerr MMaannaaggeemmeenntt SSiiggnnaalliinngg ((DDPPMMSS)) EExxtteennssiioonn    DDRRAAFFTT


     _o_f_f___t_i_m_e_o_u_t: CARD16
        =>


All  values  are in units of seconds. _s_t_a_n_d_b_y___t_i_m_e_o_u_t is the
amount of time of inactivity before  standby  mode  will  be
invoked.  This  is  the lightest level of power savings, and
the monitor is generally immediately ready upon detection of
user  activity.   This is most often implemented by shutting
off the horizontal sync signal to the monitor.  A  value  of
zero disables this mode.

The _s_u_s_p_e_n_d___t_i_m_e_o_u_t specifies the amount of time of inactiv-
ity before the screen is placed into suspend mode.   Suspend
mode  is  the  middle level of power savings, resulting in a
slightly longer recovery upon detection of  activity.   Sus-
pend  mode is most often implemented by pulsing the horizon-
tal sync signal, and removing the vertical  sync  signal.  A
value of zero disables this mode.

The  _o_f_f___t_i_m_e_o_u_t  specifies the amount of time of inactivity
before the monitor is shut off.  Off  mode  is  the  deepest
level  of  power management, resulting in the greatest power
savings and the longest recovery time.   Off  mode  is  most
often implemented by removing both the horizontal and verti-
cal signals. A value of zero disables this mode.

The values of successive power levels must be  greater  than
or  equal  to the value of the previous (non-zero) level.  A
BadValue error is generated if  an  illegal  combination  is
detected.



        =>


This request enables the DPMS characteristics of the server,
using the server's currently stored timeouts.   If  DPMS  is
already enabled, no change is effected.



        =>


This  request  disables  the  DPMS  characteristics  of  the
server.  It does not affect the  core  or  extension  screen
savers.  If DPMS is already disabled, no change is effected.
This request is provided so that DPMS may be disabled  with-
out damaging the server's stored timeout values.






                              44





DDiissppllaayy PPoowweerr MMaannaaggeemmeenntt SSiiggnnaalliinngg ((DDPPMMSS)) EExxtteennssiioonn    DDRRAAFFTT


     _p_o_w_e_r___l_e_v_e_l: CARD16
        =>


This request forces a specific DPMS level on the server.  If
DPMS is disabled, a BadMatch  error  is  generated.   If  an
erroneous  power  level  is  specified,  a BadValue error is
returned, and the error value contains the  bad  value.   If
the  power  level specified is already in effect, no changes
occur.  Power Level must be  one  of  DPMSModeOn,  DPMSMode-
Standby, DPMSModeSuspend or DPMSModeOff.


        =>

     _p_o_w_e_r___l_e_v_e_l: CARD16
     _s_t_a_t_e: BOOL

This  request  returns  information  about  the current DPMS
state of the display.  _s_t_a_t_e is one of DPMSEnabled or  DPMS-
Disabled.   If _s_t_a_t_e is DPMSEnabled, _p_o_w_e_r___l_e_v_e_l is returned
as one of DPMSModeOn,  DPMSModeStandby,  DPMSModeSuspend  or
DPMSModeOff, otherwise it is undefined.


33..  EEvveennttss aanndd EErrrroorrss

No new events or errors are defined by this extension.

44..  EEnnccooddiinngg

Please  refer  to the X11 Protocol Encoding document as this
document uses conventions established there.

The name of this extension is "DPMS".

  1  CARD8               opcode
  1  0                   DPMS                         opcode
  2  2                   request                      length
  2  CARD16              client_major_version
  2  CARD16              client_minor_version
 =>
  1  1                   Reply
  1                      unused
  2  CARD16              sequence                     number
  4  0                   length
  2  CARD16              server_major_version
  2  CARD16              server_minor_version
  20                     unused
  1  CARD8               opcode
  1  1                   DPMS                         opcode
  2  1                   request length
 =>
  1  1                   Reply



                              55





DDiissppllaayy PPoowweerr MMaannaaggeemmeenntt SSiiggnnaalliinngg ((DDPPMMSS)) EExxtteennssiioonn    DDRRAAFFTT


  1                      unused
  2  CARD16              sequence                     number
  4  0                   length
  1  BOOL                capable
  23                     unused

  1  CARD8               opcode
  1  2                   DPMS                         opcode
  2  1                   request length
 =>
  1  1                   Reply
  1                      unused
  2  CARD16              sequence                     number
  4  0                   length
  2  CARD16              standby_timeout
  2  CARD16              suspend_timeout
  2  CARD16              off_timeout
  18                     unused

  1  CARD8               opcode
  1  3                   DPMS                         opcode
  2  3                   request                      length
  2  CARD16              standby_timeout
  2  CARD16              suspend_timeout
  2  CARD16              off_timeout
  2                      unused
 =>

  1  CARD8               opcode
  1  4                   DPMS                         opcode
  2  1                   request length
 =>

  1  CARD8               opcode
  1  5                   DPMS                         opcode
  2  1                   request length
 =>

  1  CARD8               opcode
  1  6                   DPMS                         opcode
  2  2                   request                      length
  2                      power_level      0         DPMSMod-
eOn       1         DPMSModeStandby       2         DPMSMod-
eSuspend                               3         DPMSModeOff
  2                      unused
 =>

  1  CARD8               opcode
  1  7                   DPMS                         opcode
  2  1                   request length
 =>
  1  1                   Reply
  1                      unused
  2  CARD16              sequence                     number



                              66





DDiissppllaayy PPoowweerr MMaannaaggeemmeenntt SSiiggnnaalliinngg ((DDPPMMSS)) EExxtteennssiioonn    DDRRAAFFTT


  4  0                   length
  2                      power_level      0         DPMSMod-
eOn       1         DPMSModeStandby       2         DPMSMod-
eSuspend                               3         DPMSModeOff
  1  BOOL                state
  21                     unused



















































                              77


