Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#11687 - pm-suspend not working - broken NetworkManager hook
Attached to Project:
Arch Linux
Opened by David Hájek (dante4d) - Wednesday, 08 October 2008, 17:46 GMT
Last edited by Thayer Williams (thayer) - Saturday, 18 October 2008, 18:27 GMT
Opened by David Hájek (dante4d) - Wednesday, 08 October 2008, 17:46 GMT
Last edited by Thayer Williams (thayer) - Saturday, 18 October 2008, 18:27 GMT
|
DetailsI can't suspend with pm-suspend, because NetworkManager hook fails. I easily fixed it like described here - http://wiki.archlinux.org/index.php/Pm-utils#Disabling_a_hook - but it should work out of the box if I don't have NetworkManager. So I see it as a bug.
|
This task depends upon
Closed by Thayer Williams (thayer)
Saturday, 18 October 2008, 18:27 GMT
Reason for closing: Upstream
Additional comments about closing: Bug to be reported upstream.
Saturday, 18 October 2008, 18:27 GMT
Reason for closing: Upstream
Additional comments about closing: Bug to be reported upstream.
pm-suspend.log
Thanks
I'm not sure that a downstream patch is the way to go either, especially since the pm-utils developers welcome bug reports about bad hooks: "If a hook is run which you do not like or which you think is not useful or even harmful, we'd appreciate a bugreport for that."
# If we are running NetworkManager, tell it we are going to sleep.
# TODO: Make NetworkManager smarter about how to handle sleep/resume
# If we are asleep for less time than it takes for TCP to reset a
# connection, and we are assigned the same IP on resume, we should
# not break established connections. Apple can do this, and it is
# rather nifty.
. "${PM_FUNCTIONS}"
command_exists dbus-send || exit $NA
suspend_nm()
{
# Tell NetworkManager to shut down networking
dbus-send --system \
--dest=org.freedesktop.NetworkManager \
/org/freedesktop/NetworkManager \
org.freedesktop.NetworkManager.sleep
}
resume_nm()
{
# Wake up NetworkManager and make it do a new connection
dbus-send --system \
--dest=org.freedesktop.NetworkManager \
/org/freedesktop/NetworkManager \
org.freedesktop.NetworkManager.wake
}
case "$1" in
hibernate|suspend)
suspend_nm
;;
thaw|resume)
resume_nm
;;
*) exit $NA
;;
esac
There's missing a check for the networkmanager itself. "command_exists networkmanager || exit $NA" added before the dbus check and all works (maybe it needs to be /etc/rc.d/networkmanager, but I don't care as long as the command isn't present :P).