= Weston Display Control Subsystem = == terms and assumptions == - "DPMS" is for power management only, i.e. to turn displays on/off entirely. - "backlight" is for power management mainly, through brightness control of the display. - "screensaver" is for entertainment and rudimentary security (e.g. let the user unlock the desktop) == modus operandi == - when Weston is initialized, backlight is adjusted and DPMS is set to DPMSModeOn. Then, we need a couple of timers: 1. idle timer for dim the display 2. idle timer for screen saver (or just fade to blank) start 3. timer from start of screen saver to DPMS off (DPMSModeStandby, DPMSModeSuspend or DPMSModeOff? So eventually at this point other DPMS timers will be needed as well to switch on its four (VESA) states) - any user input or hotplug resets all the timers, backlight is adjusted and DPMSModeOn is set. If timer was in 2. or 3., desktop shell unlock is raised up. - Client video playback, games, presentation need a request on the screensaver interface to inhibit it. - in the first implementation, configuration will happen via weston-desktop-shell.ini - Something monitoring a light sensor could also adjust the backlight, but might be out of scope for the compositor. == implementation == - we can keep libbacklight alive and use it. mjg59 is okay on accepting patches; the lib got stalled cause he never bothered to port X drivers on it. - DPMS routines are fairly simple with drm; just a per-output property in drm to be set. - http://cgit.freedesktop.org/~vignatti/libbacklight/commit - DPMS and backlight are meant for compositor-drm only; screensaver has to work for others backend == testing == - ./client/screenshot and compare if pixels are all black? glReadPixels gets correct framebuffer when DPMS is off at least. - check the sysfs backlight values and DPMS state for each output to test whether the compositor is doing the right thing. On intel, check the register state to make sure we're shutting down as much as possible when we go into a DPMS off state. -- 22 Feb 2011 - Tiago Vignatti