DPMS and automatic sleep inhibit API
l.lunak at suse.cz
Fri Feb 26 05:54:46 PST 2010
On Friday 26 of February 2010, Rémi Denis-Courmont wrote:
> On Wed, 24 Feb 2010 00:06:18 +0100, Lubos Lunak <l.lunak at suse.cz> wrote:
> > On Thursday 18 of February 2010, Ali Abdallah wrote:
> >> InhibitDPMS
> > XResetScreenSaver() . There's no need to reinvent that wheel.
> There are several problems with that old API.
> First, it can only reset, not inhibit/uninhibit. This might not be a
> problem for a media player. It might just call XResetScreenSaver() every so
> often. It won't require any extra timer ot CPU wakeup because it's playing
> a movie anyway.
> But at the other hand, how do you expect the power manager to be notified
> of anything? As far as I can tell, it cannot, so it would have to poll all
> the time. And that's a counter-productive to power saving.
To be notified of anything what? And why should some power manager
application care? Moreover XResetScreenSaver() resets the internal idle
counter which is also exported as the X Sync IDLE counter, and the X Sync
extension seems to have support for notifying about changes in counters.
> Second, the inhibiting software needs to know the reset frequency. Either
> it has to make a pessimistic (i.e. short timeout) guess, which is
So the software is busy doing something that requires the screen to stay
active and one simple X request each let's say 10 seconds is inefficient?
> I would agree that X11 would be a more logical "carrier" for screen-saving
> and DPMS signaling than D-Bus or shell commands (xdg-utils). But the
> current X11 API is insufficient. Maybe you want to update the X11 spec and
> implementation. Otherwise, yes there *is* a need to invent the wheel,
> because the existing wheel is square-shaped.
It is not. Or do you still see anything missing?
openSUSE Boosters team, KDE developer
l.lunak at suse.cz , l.lunak at kde.org
More information about the xdg