GNOME Bugzilla – Bug 748531
StateChanged signal NM_STATE_DISCONNECTING not emitted on suspend
Last modified: 2016-05-13 12:47:33 UTC
NetworkManager doesn't seem to emitted the StateChanged NM_STATE_DISCONNECTING signal when the system is put to suspend. Instead it just sends the NM_STATE_ASLEEP signal after disconnecting all network devices. This causes troubles for programs like Pidgin, because they depend on the NM_STATE_DISCONNECTING signal to cleanly disconnect themselves from remote servers. Also dispatcher scripts in pre-down.d aren't run when suspending the computer. I am sure if that is a bug, but I think NetworkManager should emit the NM_STATE_DISCONNECTING signal to give programs and the dispatcher a chance to react on the changing network situation. --- how to reproduce ---- # Debian 8.0 Jessie $ NetworkManager -V 0.9.10.0 # Normal disconnect $ nmcli device disconnect wlan0 ## Listen for StateChanged Signals $ dbus-monitor --system 'type='signal',sender=org.freedesktop.NetworkManager,path=/org/freedesktop/NetworkManager, member=StateChanged' signal sender=:1.5 -> dest=(null destination) serial=1335 path=/org/freedesktop/NetworkManager; interface=org.freedesktop.NetworkManager; member=StateChanged uint32 30 signal sender=:1.5 -> dest=(null destination) serial=1368 path=/org/freedesktop/NetworkManager; interface=org.freedesktop.NetworkManager; member=StateChanged uint32 20 # NM_STATE_DISCONNECTING, NM_STATE_DISCONNECTED are emitted # Suspend $ systemctl suspend $ dbus-monitor --system 'type='signal',sender=org.freedesktop.NetworkManager,path=/org/freedesktop/NetworkManager, member=StateChanged' signal sender=:1.5 -> dest=(null destination) serial=1573 path=/org/freedesktop/NetworkManager; interface=org.freedesktop.NetworkManager; member=StateChanged uint32 10 # only NM_STATE_ASLEEP emitted References: Pidgin doesn't disconnect on suspend Debian bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=765892
Tested it again same for: # Debian Testing $ NetworkManager -V 1.0.0
This is a critical issue for me as well - we need to unmount NFS filesystems before going to sleep via pre-down scripts.
Other downstream reports: F22: https://bugzilla.redhat.com/show_bug.cgi?id=1238865 RHEL7: https://bugzilla.redhat.com/show_bug.cgi?id=1330694
Branch bg/disconnect-on-suspend-rh1330694-v2 merged to master: https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=3fdffab9550bf7e55815d7a4453854057de55f0a (see also https://bugzilla.redhat.com/show_bug.cgi?id=1330694 )