david at fubar.dk
Thu Mar 29 13:06:28 PDT 2007
On Thu, 2007-03-29 at 21:58 +0200, Holger Macht wrote:
> > Please at least _try_ to keep the interface simple and come up with use
> > cases before adding useless API like "time to wake up after suspend":
> > Holger did for Suspend() (a mythical VCR app) and I think that's fine
> > although it's a bit far fetched / academic in some way,
> Ok, after thinking a little bit more about this, I think we should not add
> the wakeup argument. And this for one reason: I think it is useful and I
> think we should express it in the spec somehow, but not as an argument. In
> regard to the rare amount of systems where it is supported, by using an
> argument, we actually have no way to check if the system actually supports
> it properly. We would just advertise that applications can use it, but
> have no clue if it will do its job. So we should add an additional method
> (TimedSleep whatever) in a future version as Richard already proposed.
Perhaps that's a better idea. The morale could be that we want to make
strong guarantees to apps using these methods. At least stronger
guarantees than HAL (the mechanism) makes to the power management
daemon. And I think that's fine.
> > What's the point? Just state that apps simply must be able to cope with
> > either a) no session bus; or b) no org.fd.P service. There's nothing new
> > in that; apps need to cope with errors.
> The point is that you still might want to provide clever Shutdown() and
> Reboot() methods for applications without the need to expose all the other
> power management methods.
But keep in mind that many hard code users will never use it anyway and
few distros will ship it for their "twm / failsafe" session. They would
probably just use kpowersave, g-p-m or whatever the distro wants.
Anyway, I think it's a great idea to ship, along with the spec, the
80-line reference implementation in Python that Richard talked about. It
wouldn't have any HAL deps at all and would just halt(8) directly. Of
course it could have a dependency on HAL but if you did that people
would send patches to turn it into a real PM daemon :-). Shrug.
More information about the xdg