GNOME Bugzilla – Bug 324979
network manager does not work well with suspend/hibernate
Last modified: 2006-01-04 15:21:21 UTC
gnome power manager contains specific code to put n-m to sleep before hibernation and suspend and to wake it up again after resume. Since not everybody will use gnome power manager but maybe a script or so n-m should be fixed
NM responds to dbus messages for 'sleep' and 'wake'. The dbus interface is likely what g-p-m uses, and it's what all other applications should also use to tell NM to suspend/hibernate. It's not g-p-m specific and can be done from a shell script too (see the dbus-send utility included with dbus).
Thanks for your response. I have a couple of questions on how to implement this in gpm. 1. Is this sleep and wake generic?. I.e. all applications that should be aware of suspend/hibernate should listen to these signal? 2. HAL contains methods for hibernation/suspend. Should we not implement the the sending of "sleep" and "wake" in those methods. Otherwise everybody needs to implement this themselves
No problem; addressed by point: 1) No, AFAIK there is no standard dbus method call for hibernate/suspend. Possibly there should be. 2) If HAL sends signals that notify applications to sleep/wake, then we should make NM should listen to those signals from HAL, correct. I wasn't aware of this when I added the sleep support. Are these signals documented somewhere? If not, what are the specifics?
Dan, I´m confused now With 1)I was referring to the wake and sleep signals that NM is listening to and not hibernate / suspend. I understood from your first reply that these signals are generic i.e. not specific to NM. Is this so? 2) You can call hibernate and suspend methods on hal but these don´t generate AFAIK no signals. I guess we are thinking along the same lines for the best solution I.e.: Let the hibernate and suspend methods in HAL generate the DBUS sleep and wake signal. All applications who need to be aware of suspending/hibernating should just listen to these signals Is this also your thinking? I´m not really familiar with HAL but Richard Hughes (cc on this bug) or David Zuethen should be able to help us out here
1) NM has "sleep" and "wake" method calls, yes, but they are not generic. They are specific to NM. 2) Correct. Yes, my thinking was that it would be neat for HAL (or something) to generate signals that applications should go to sleep and should now wake up. I'm not entirely sure what Davidz or Richard think of this (David is still on vacation at least today, he should be back quite soon). I'll see if I can talk to David about this.