Bug 30701 - [PATCH] Add '--print-reply' to dbus-send in 55NetworkManager and fix dbus interface/method being used
Summary: [PATCH] Add '--print-reply' to dbus-send in 55NetworkManager and fix dbus int...
Status: RESOLVED WONTFIX
Alias: None
Product: pm-utils
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Richard Hughes
QA Contact:
URL:
Whiteboard:
Keywords:
: 42500 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-10-08 02:11 UTC by Jiří Klimeš
Modified: 2018-06-29 19:57 UTC (History)
5 users (show)

See Also:
i915 platform:
i915 features:


Attachments
add '--print-reply' and use Sleep() method (1.31 KB, patch)
2010-10-08 02:11 UTC, Jiří Klimeš
Details | Splinter Review

Description Jiří Klimeš 2010-10-08 02:11:54 UTC
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)
https://bugzilla.redhat.com/show_bug.cgi?id=477964

Moreover the patch uses Sleep() method instead of deprecated sleep() and wake()
http://projects.gnome.org/NetworkManager/developers/spec-08.html
Comment 1 BinLi 2012-02-13 01:47:11 UTC
Victor,

 I've also met this issue in openSUSE, could you let it in upstream. Thanks!
Comment 2 BinLi 2012-02-13 01:52:00 UTC
*** Bug 42500 has been marked as a duplicate of this bug. ***
Comment 3 Daniel Hahler 2012-06-02 13:23:38 UTC
*** Bug 42500 has been marked as a duplicate of this bug. ***
Comment 4 Daniel Hahler 2012-06-02 13:27:11 UTC
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.
Comment 5 Jiří Klimeš 2012-06-04 00:26:11 UTC
(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.

http://projects.gnome.org/NetworkManager/developers/api/09/spec.html#org.freedesktop.NetworkManager
Comment 6 Daniel Hahler 2012-06-05 06:36:07 UTC
> 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.
Comment 7 Jiří Klimeš 2012-06-05 06:54:29 UTC
(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 :).
Comment 8 David Edwards 2012-09-20 18:07:06 UTC
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.
Comment 9 jonnybignote 2012-11-05 20:33:56 UTC
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.

Thanks
Comment 10 Brian J. Murrell 2013-02-10 19:16:29 UTC
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.
Comment 11 Catalin Patulea 2013-07-19 15:33:21 UTC
ping - are there any specific issues blocking merging this?
Comment 12 Adam Jackson 2018-06-29 19:57:08 UTC
pm-utils hasn't been touched in eight years, none of this is likely to get addressed. Closing bugs and disabling the bz product.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.