[Pm-utils] Trouble waking from sleep
Dan Williams
dcbw at redhat.com
Fri May 15 16:34:58 PDT 2009
On Fri, 2009-05-15 at 16:25 +0200, Christopher Lang wrote:
> Dan,
>
> thanks, for pointing me into the right direction, the
> https://bugzilla.redhat.com/show_bug.cgi?id=477964 has it all.
>
>
> However I would like to point out a few inconsistencies, that are still
> present in git repositories:
>
> 1. git repo from today, NetworkManager:
> file NetworkManager/initscript/Arch/networkmanager.in
>
> This one is using --type=method_call \ in the dbus-send, which is
> non-blocking, but makes dbus-send use "dbus_message_new_method_call" to set
> up the message, rather than "dbus_message_new_signal"
I wasn't aware arch had that functionality actually; that should be
fixed.
> 2. git repo from today, pm-utils:
> file pm-utils/pm/sleep.d/55NetworkManager
>
> This one still has the dbus-send without anything, no --print-reply and
> no --type=method_call.
right, I believe upstream pm-utils was leaning towards fixing dbus
rather than this hack, but given that I don't believe upstream dbus will
fix the issue soon, we may have to go back to pm-utils upstream and
convince them to take the fix.
The other thing I was going to do was just to ship the pm-utils files in
NetworkManager, thus we can do what we want with them.
Dan
> 3. None of the current git repositores uses the --print-reply as suggested in
> the above bug report.
>
>
> Conclusion:
>
> Using dbus-send to send "sleep" or "wake" to NM is causing problems, due to
> dbus sometimes loosing messages of short lived processes - this is known and
> confirmed.
>
> Using --print-reply in NM related dbus-send calls is confirmed to work, but is
> highly questionable in my eyes, because it is blocking, worst case this will
> block for the default dbus timeout value (is that 2 sec. or so?).
>
>
> Using --type=method_call (which is in the NM initscript, but not yet in
> pm-utils git) might or might not fix the sleep/wake issue that is caused by
> dbus loosing messages of short lived processes. It forces dbus-send to use:
>
> dbus_message_new_method_call
> dbus_connection_send (connection, message, NULL);
> dbus_connection_flush (connection);
>
> where the "flush" according to dbus docs blocks until the message queue is
> empty and so far *should* ensure our "sleep" or "wake " to go through. So it
> should be used in pm-utils too. It is in NM git already.
>
> Chris
>
> http://www.acurana.de/
>
> _______________________________________________
> NetworkManager-list mailing list
> NetworkManager-list at gnome.org
> http://mail.gnome.org/mailman/listinfo/networkmanager-list
More information about the Pm-utils
mailing list