screensaver and power manager dbus interfaces
William Jon McCann
mccann at jhu.edu
Fri Jun 2 18:07:07 EEST 2006
Danny Kukawka wrote:
> On Friday 02 June 2006 15:30, Rodrigo Moya wrote:
>>>> Name: setDpmsMode
>>>> Args: STRING
>>>> value: on 100%
>>>> standby <80%
>>>> suspend <30W
>>>> off <8W
>>>> Returns: (nothing)
>>>> Description: DPMS is a standard from the VESA consortium for
>>>> managing the power supply of monitors.
>>>> This call requests a change in the state of DPMS for
>>>> the current screen.
>>>> Name: getDpmsMode
>>>> Args: (none)
>>>> Returns: STRING
>>>> Descriptions: Returns the DPMS mode state.
>>>> See setDpmsMode().
>>>Do we really need them? We have the X extensions/functions for that.
>>for the same reason I think we should add the Reboot and keep Shutdown
>>methods, I think it's better if apps use only a standard interface for
>>all power management-related tasks than having to use dbus for some
>>operations, X libs for another, etc. Of course, as you say, this is just
>>a convencience wrapper, but that would make it easier for the developer,
> But then you need to reimplement (nearly) the complete DPMS Extension from the
> X-Server (see www.xfree86.org/current/DPMSLib.pdf: DPMSCapable,
> DPMSSetTimeouts, DPMSGetTimeouts, DPMSEnable/-Disable ...) if you would make
> it easier for the developer and this is simply: "reinvent the wheel".
> Do we really need this? IMO not, there is already a library for this issues
> and we don't need one more proxy which call at the end a function of this lib
> (which is also more expensive than use the lib directly).
The xorg DPMS API suffers nearly the same problem that the various
screensaver extension APIs do. It doesn't cooperate well with desktop
policy decisions. It contains a very simplistic policy: turn back on
when X input is detected (not necessarily all forms of input just the
type that xorg recognizes). xorg is and should be ignorant of
everything else that is going on in the desktop environment and so has a
pretty hard time getting these types of policy decisions right.
Another big problem is that there doesn't seem to be any form of
notification when the DPMS mode changes. So if polling must be done
then the polling can be done in one place: the desktop PowerManager.
It should really just provide the mechanism for DPMS to an external
Similarly, xorg should provide event information (via XEVIE for multiple
clients?) to an external screensaver.
Also, it is not inconceivable that xorg may not exist on a system. Or
that an application does not want or can't have an X connection.
More information about the xdg