On Tue, 2015-01-06 at 17:45 +0100, Thomas Haller wrote:
> On Mon, 2015-01-05 at 22:16 +0200, Ahmet Gereklioğlu wrote:
> > Is there a way to prevent nm from disconneting network while the
> > computer goes to suspend?
> > As far as I searched I found solutions like putting this command line
> > to a script under pm-utils such as "/etc/pm/sleep.d/55NetworkManager"
> > The command line is:"nmcli nm sleep false"
> > 
> > However in the version 0.9.10 it is not applicable due to syntax
> > change.
> > Is there a way in version 0.9.10
> > Thanks
> > 
> 
> I only find http://askubuntu.com/a/367056/354040  , which however calls
> `nmcli nm sleep false` to achieve something different then "prevent nm
> from disconneting network".
> 
> Can you explain why you want that in first place, and how that worked
> for you pre-0.9.10 ?
> 
> 
> 
> I think in old times, pm-utils actively called `nmcli nm sleep false|
> true` to notify hibernation/resume.
> 
> This nmcli command is no longer present, but the DBUS function is still
> there... so, you could directly call the DBUS function...
> 
> 
> *BUT*
> 
> 
> `nmcli nm sleep false` does not what you seemingly think it does. It
> would not prevent NM from sleeping. It just sends an event to NM "you
> just woke up".
> 
> NM now listens to events from systemd/upower which also brings it to
> sleep. Hence, NM will receive a notification from upower/systemd and
> disconnect the network.
> You cannot easily suppress those events AFAIS.
> 
> Sending an event "you just woke up" together with upower saying "system
> going to hibernate" will not solve your problem.

Note that with NM 0.9.10 and later, devices that meet these criteria are
*not* disconnected on suspend:

1) software/virtual interfaces (bridge, bond, vlan, etc)
2) Wake-on-LAN enabled via ethtool

So if your intention is to get wake-on-LAN working, it should already
work if you have set it up with ethtool for the interface.  If not, what
is the scenario you're trying to achieve?  Perhaps knowing that can help
us figure out how to achieve it :)

Dan

_______________________________________________
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list

Reply via email to