FS#8307 - SUspend renders networkmanager inoperable
Attached to Project:
Arch Linux
Opened by name withheld (Gullible Jones) - Sunday, 14 October 2007, 23:32 GMT
Last edited by Jan de Groot (JGC) - Friday, 09 May 2008, 13:27 GMT
Opened by name withheld (Gullible Jones) - Sunday, 14 October 2007, 23:32 GMT
Last edited by Jan de Groot (JGC) - Friday, 09 May 2008, 13:27 GMT
|
Details
Description:
After resuming from software suspend, the network manager applet often shows no connection, and its right-click menu shows no available wired or wireless networks. This remains the case when pm-utils is configured to unload and reload the modules needed for networking (via /etc/pm/config.d/config or /etc/pm/config.d/modules, using SUSPEND_MODULES="[modules]"). At first I thought that pm-utils wasn't reloading the modules properly, but reloading ndiswrapper and sky2 did not fix the situation. Furthermore, attempts to restart the networkmanager rc.d script always fail; restarting dhcdbd first is successful, but will not impact the later failure of networkmanager to restart. (Notably, the rc.d script always shows *stopping* networkmanager as successful, even after a previous restart attempt has failed; it's pretty obvious that networkmanager is not running and cannot be started, so this is probably a minor bug in the script.) Additional info: * pm-utils 0.99.3-2; networkmanager 0.6.5-3 * using ndiswrapper for wireless, sky2 for wired connection Steps to reproduce: 1. With networkmanager handling your connection, suspend with pm-utils, using the Gnome power management menu, hotkeys, the CLI, etc. 2. Resume from suspend. The network applet's menu will show no connections and nothing to connect to. 3. Open a terminal and restart the networkmanager rc.d script. No matter how many times you do this, it will always claim that stopping networkmanager was successful and starting it failed. |
This task depends upon
(BTW, is there a way to specify to pm-utils which rc.d scripts to unload on suspend and reload on resume, as with modules (SUSPEND_MODULES="")?)
#!/bin/bash
. /usr/lib/pm-utils/functions
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
;;
*)
;;
esac
exit $?
Maybe there's some kind of problem with networkmanager and dbus --send?
then I do:
$ sudo /etc/rc.d/networkmanager restart
:: Stopping NetworkManager [FAIL]
:: Starting NetworkManager [DONE]
and it comes back.
for now I'll use a pm hook to restart it
my pm hook is now:
if [ "$1" == "resume" ] || [ "$1" == "thaw" ]; then
killall -9 NetworkManager
/etc/rc.d/networkmanager restart
fi
A new version of Networkmanager is out : 0.6.6-1
Is this problem still valid ?
Thank you very much !