Re: Trouble waking from sleep


thanks, for pointing me into the right direction, the 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/

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"

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.

3. None of the current git repositores uses the --print-reply as suggested in 
the above bug report.


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 

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_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.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]