Created attachment 39281 [details] [review]
add '--print-reply' and use Sleep() method
The patch adds '--print-reply' to 55NetworkManager hook. This works around a bug that D-Bus loses messages for short-lived processes.
In reality this means that without '--print-reply' the message is not delivered to NetworkManager and it's not woken up on resume.
You can see these bugs for reference:
https://bugs.freedesktop.org/show_bug.cgi?id=896 (the core D-Bus bug)
Moreover the patch uses Sleep() method instead of deprecated sleep() and wake()
I've also met this issue in openSUSE, could you let it in upstream. Thanks!
*** Bug 42500 has been marked as a duplicate of this bug. ***
The patch fixes two issues with the NetworkManager hook, whereas the interface is by now not only deprecated, but not available any more.
This is a currently unfixed issue in Debian/Ubuntu.
I am setting the bug status to NEW, in case the bug is just not being handled because of its NEEDINFO state.
(In reply to comment #4)
> The patch fixes two issues with the NetworkManager hook, whereas the interface
> is by now not only deprecated, but not available any more.
> This is a currently unfixed issue in Debian/Ubuntu.
What interface do you mean, whole pm-utils?
Then yes, there are other ways how to handle sleep/resume now, e.g. UPower daemon.
NetworkManager listen to UPower's Sleeping and Resuming D-Bus signals too. So, the patch for pm-utils is not vital for NM. But still it would be nice to fix the script as it is broken, and some can use it.
> What interface do you mean, whole pm-utils?
I am referring to the NetworkManager DBUS interface, where pm-utils uses a non-existent interface method: see bug 42500.
(In reply to comment #6)
> > What interface do you mean, whole pm-utils?
> I am referring to the NetworkManager DBUS interface, where pm-utils uses a
> non-existent interface method: see bug 42500.
But, the patch fixes that too - e.g. uses Sleep() instead of sleep() and wake() (it's written in the Description :).
Would be great to get this fixed; the patch already attached still applies cleanly to git master and fixes the problem for me in Ubuntu. Without this, the network is lost on resume when using pm-utils.
Can someone tell me how to apply this patch - I have the log errors mentioned so I figured I'd try it to see if it fixed my crashing on suspend/resume. I can't get the patched code in without encountering a syntax error in the logs.
Can we get a comment from the maintainer whether this patch is or will (not) be applied and explanation as to why not if not?
This bug is percolating to many downstream consumers of this package. It's not really reasonable to ignore it here and expect them all to fix it themselves.
ping - are there any specific issues blocking merging this?
pm-utils hasn't been touched in eight years, none of this is likely to get addressed. Closing bugs and disabling the bz product.