[Pm-utils] Add --print-reply to dbus-send to avoid dropping the message

Victor Lowther victor.lowther at gmail.com
Fri Sep 19 08:34:41 PDT 2008


On Fri, 2008-09-19 at 16:08 +0100, Richard Hughes wrote:
> On Fri, 2008-09-19 at 09:57 -0500, Victor Lowther wrote:
> > On Fri, 2008-09-19 at 15:41 +0200, Stefan Seyfried wrote:
> > > On Fri, Sep 19, 2008 at 10:16:58AM +0100, Richard Hughes wrote:
> > > > Trivial patch attached to fix behaviour of dbus-send. Description and
> > > > solution in patch. Please review.
> > > 
> > > I think the --print-reply was removed, since it would slow down suspending
> > > considerably.
> 
> A single method to NetworkManager that's a NOP?

Well, a quick test on my system with and without --print-reply yields
the following results:

Without --print-reply, the command returns immediatly and NetworkManager
sleeps and wakes as appropriate.

With --print-reply, NetworkManager responds appropriatly (and
immediatly), but the command itself hangs until I kill it 30 seconds or
so later.

This is on debian sid fully updated as of last night.

This behaviour is arguably worse than failing to take down the
interfaces.  Sorry, your patch does not do the right thing here.

> > > Couldn't we - at least for the suspend case - just put the dbus-send
> > > into the background? NM should be set to offline by g-p-m or kpowersave
> > > already anyway before pm-utils come into play, shouldn't it?
> > 
> > g-p-m appears to have done so for the last 3 years.
> 
> Sure, but doing the second "down" after the first is super quick, and
> works in the case of computers without g-p-m or kpowersave.
> 
> > Does network manager have a d-bus method that we can use to query its
> > current state?  If so, might be better to see if network manager is
> > already asleep, and do nothing on suspend/resume if that is the case.
> 
> IIRC, that's what the method already does, if already down then exit
> straight back.
> 
> > Also, email referenced  in the patch was from last March -- has d-bus
> > been fixed since then?
> 
> No. It required lots of changes, and havoc didn't see it as a priority.
> 
> I guess the real question is that maybe we should just fix the kernel
> drivers rather than poke NM. I'll talk to Dan W.
> 
> Richard.
> 
> 
-- 
Victor Lowther
Ubuntu Certified Professional



More information about the Pm-utils mailing list