Re: Preventing nm from disconneting network while going to suspend.



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.



Thomas

Attachment: signature.asc
Description: This is a digitally signed message part



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