Add hybrid suspend method to kde-workspace
Review Request #109352 - Created March 8, 2013 and discarded
This patch adds the implementation of hybrid suspend method, complementing https://git.reviewboard.kde.org/r/109351/. The hybrid suspend approach has the advantages of regular suspend (faster resuming than with hibernation) while being safer at the same time in case the battery runs out. More info: http://en.wikipedia.org/wiki/Sleep_mode#Hybrid_sleep Affected components: shutdown dialog (ksmserver), kickoff, battery monitor, lock_logout applet, powermanagement data engine, powerdevil & its runner Hybrid suspend becomes the preferred method to put the system into sleep thus greatly simplifying the user interface; if it's not available (because of system or kernel limitation), the current two options (suspend + hibernate) will be presented to the user. Technically, powerdevil has supported this approach since the beginning and both HAL and upower/systemd backends already implement it.
Review request changed
Update the patch according to the latest Solid Sprint discussions Moves the logic to PowerDevilCore
Overall, the patch looks fine. What I don't like is the huge mess of names we have among variables/methods/UI strings between Sleep/Suspend/etc... . To be honest, I'd like to see with this patch a unification of everything, where we decide how do we call what (Hibernate included) and be consistent among all of the code and the UI. I admit for a newcomer to the codebase all of this starts to be really really confusing, and exposing different messages in the UI is really bad.
I see no #endif here... am I missing something? (same below)
Watch out: this interface is meant for compatibility with fdo ( not that anyone uses it anymore, though... ) and so it should stay as it is. Although I think at some point we might just as well drop it, as we're the only ones to implement it I think.