signalling suspend/resume events (deviceKit-power)

Anders Lund anders at alweb.dk
Tue Dec 8 21:18:24 GMT 2009


Dan Williams skrev:
> On Tue, 2009-12-08 at 16:57 +0100, Anders Lund wrote:
> > Dan Nicholson skrev:
> > > Dan Williams really wanted the kernel to send a resume event so we
> > > could get rid of the broken NetworkManager dbus-send signaling from
> > > pm-utils. Maybe this would work.
> >
> > Why is that broken? And it is a (blocking) method call, or is that the
> > broken part? From a user perspective, it appears that networkmanager
> > disconnects before the suspend, and connects after the resume.
> >
> > In any case, the best/safest/most correct solution is of course
> > preferable :)
> 
> Not necessarily the /kernel/, but something like DK-power/upower that
> handles the policy.  The point was more to make NM aware of
> suspend/resume so that we can do more intelligent things with it,
> instead of having scripts somewhere else poke NM in response to random
> events.  The other issue was the dbus for a long time was broken and
> short-lived dbus-send invocations would get lost in the bus.  This has
> been fixed since July of this year in dbus though.
> 
> It just seems like a cleaner model if NM is the thing that listens for
> the event and responds to it, since NM knows what it needs to do for
> suspend/resume.  Instead of having all the scripts that handle
> suspend/resume "over there somewhere", disconnected from the thing
> that's actually performing the actions.
> 
> Dan
> 

But then, this IPC - what dbus is meant to do, iiutc :)

Of course if there was a message directly from devicekit-power, that would be 
cleaner and easier to use for developers.

Then there is also the quiestion of sync, mentioned earlier in this thread. It 
may be nessecary for some applications to do their preparations before 
suspend. 

For Network manager, it would be cool if, when I close the lid and move to 
another location, it would not try to recreate the old connection without 
looking for available ones first (I'm not sure about what actually happens 
with current nm, I do not move my laptop around much this time of the year)

I do know that when i resume after suspend I get a notification that the 
network was disabled, while the nm icon in systray shows that it is connecting 
;)

-- 
Venlig hilsen,
Anders




More information about the kde-core-devel mailing list