Suspend and NetworkManager

David Zeuthen david at fubar.dk
Tue Jan 10 08:25:39 PST 2006


On Tue, 2006-01-10 at 16:22 +0000, Richard Hughes wrote:
> Well, I'm thinking some of this at least should be handled with
> gnome-session, or maybe gnome-power-manager. The implementation
> difficulty with NetworkManager is that it's on the system bus, not
> per-session.

It indeed runs in your session as nm-applet (which also provides the
icon in the notification area) - the thinking is simply to enhance
nm-applet such that on startup it does 

 gpm_session_interface.Register (about_to_suspend_handler);

with

 void about_to_suspend_handler (...)
 {
     nm_system_interface.shutdown(); // this blocks until NM has
                                     // shutdown all networking - it
                                     // might take several seconds..

     // Now well g-p-m that it's OK to suspend
     gpm_session_interface.okToSuspend();
 }

or something. Don't you think this is much cleaner?

    David




More information about the hal mailing list