ksmserver and powerdevil are closely intertwined. One possible way forward is for ksmserver to take ownership of the state of the session, notifying powerdevil (and applications?) when the session becomes idle after a timeout. Ksmserver can also mark the session as idle when the screen is locked. Powerdevil can then take certain actions (optionally after a further idle period). Inhibitions would then block the session from being marked as idle rather than block powerdevil actions directly - in practice inhibitions only block idle actions and (optionally) lid-triggered actions in the current design. Lid handling would work differently inside ksmserver/powerdevil but should behave more or less the same as far as the user is concerned. See related bugs for some bugs/features this might help us address. I'm fairly sure every feature and configuration option in powerdevil will still have the same behaviour/same meaning in the new design: they're shouldn't be any regressions from this. Reproducible: Always
We have logind nowadays and make more and more use of it, especially when it comes to power management and lockscreen.