There's currently a discussion on the firstname.lastname@example.org list started by Richard Hughes about a common org.freedesktop.PowerManagement interface (first draft available) which will hopefully become cross desktop. Currently it includes methods like:
Well, this all sounds very good, no? Of course it does, and it is! There's already a lot agreemennt on the most of those methods from both sides, KDE and GNOME which is really great.
But there's one problem I'm currently seeing. In my opinion, it would be better to define two methods Shutdown() and Reboot() somewhere in the desktop base (something like org.freedesktop.Desktop) in the future (KDE4, GNOME 3.0, etc…). I indeed think that they are in the scope of power management, but still have some kind of exceptional position. Having them tied to the o.f.PM interface, and more important, the methods being compulsory, would force the desktop to always implement all methods of the interface. Do you get the idea?
So if you don't have a power management application such as kpowersave or gnome-power-manager the desktop itself would have to implement all the other methods like Suspend() or Hibernate(), which seems strange to me, especially in regard to usual desktop systems. You sometimes just don't need them. To rephrase it a little bit, some people might just not want them for whatever reasons. Having the Shutdown() and Reboot() methods methods compulsory will make it very hard to split them out in future.
Indeed, in current implementations, both kpowersave and gnome power manager just call the logout mechanism of "their" desktop, which involved saving the session etc. Applications could just call the logout mechanisms themselves instead of handing them over to a interface which then again hands them over to someone else, no?
Currently gnome-power-manager is very well integrated into GNOME. For instance, if there's not battery or other laptop specific capabilities, the icon just disappears. So one could argue that g-p-m is a direct part of the desktop base. Not so for KDE. KDE currently doesn't have a clever power management application by default. However, I really like to see kpowersave in KDE default in the near future, but that's another story.
Ideally, IMHO, it should look as follows in the future:
Having a base interface org.freedesktop.Desktop which carries out methods like Shutdown(), Reboot(), Logout() or Session.Save(). And on top of it there should be something like org.freedesktop.Desktop.PowerManagement.Suspend() and the like:
One could of course just let the word "Desktop" slip, that's an implementation detail.
The first four methods get served by the desktop base, the last two by a power management application if one available.
It seems that this proposal already got some agreement from a some people both from the KDE and GNOME community. Intefaces might be called org.freedesktop.SessionManagement.Shutdown() (same for Reboot()) and org.freedesktop.PowerManagement.*. But that is still to be defined.
Comments and opinions would be welcome!
blog comments powered by Disqus