FS#17349 - [networkmanager] If suspend/resume fails networkmanager 0.7.2 disables itself.

Attached to Project: Arch Linux
Opened by torkjel hongve (torkjel) - Wednesday, 02 December 2009, 10:04 GMT
Last edited by Ionut Biru (wonder) - Sunday, 03 January 2010, 20:22 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

I have a Thinkpad x301 where suspend/resume doesn't really work. Closing the lid simply results in some kind of unclean
shutdown. This in itself isn't a very big deal for me, so I haven't looked mush into it. The funny thing is that if I suspend by accident and reboot, the network manager applet will simply report "Networking disabled" and show no other options. I found that /var/lib/NetworkManager/NetworkManager.state contains the following:

NetworkingEnabled=false

Changing this back to true and restarting network manager fixes the problem.

The previous version of network manager did not show this behavior.

Package versions:
networkmanager 0.7.2-1
network-manager-applet 0.7.2-1

This task depends upon

Closed by  Ionut Biru (wonder)
Sunday, 03 January 2010, 20:22 GMT
Reason for closing:  Not a bug
Additional comments about closing:  user error
Comment by Jan de Groot (JGC) - Wednesday, 02 December 2009, 11:19 GMT
This is a side-effect of an upstream change:
http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?h=NETWORKMANAGER_0_7&id=4d3b67a949d49eacc9e28ccdf6330c80938df668

Basically it means that if you disabled networking, it will stay disabled. This is something you would want usually, as you don't want to disable networking or interfaces everytime.

When you suspend your system, pm-utils executes the 55NetworkManager hook that suspends networkmanager and disables all networking. This is needed to make sure networkmanager rescans for wireless networks on resume. Because your system did not resume from standby correctly, the hook that enables networking support is not executed.

Instead of fixing this side-effect, I think it's better to fix suspend/resume on your laptop, as that can also cause serious loss of work if you suspend by accident.
Comment by torkjel hongve (torkjel) - Wednesday, 02 December 2009, 13:05 GMT
I accept that fixing suspend/resume is the Right Thing to do :) However I think this behavior is weird and not very robust, given how common suspend/resume problems are. If nm-applet would simply gave the option of enabling networking again it wouldn't be a problem, but it only shows "Networking disabled", with no indication of how to fix the problem. Note that normally the "Enable networking" toggle in nm-applet works as expected (can turn network on and off), and unchecking this seems to have the same effect on NetworkManager.state as my suspend-crash scenario. Why can I re-enable networking in that case, but not the other?

Feel free to blow me off with "rtfc" (read the fine code) or something :) I'm not too bothered anymore as I know how to fix it.
Comment by Jan de Groot (JGC) - Wednesday, 02 December 2009, 13:16 GMT
I was actually assuming you had the option to enable networking from the applet again. I'm not the developer of networkmanager and I don't have suspend problems, so I have to read the code to understand what actually happens.
Comment by torkjel hongve (torkjel) - Wednesday, 02 December 2009, 23:07 GMT
Bah! I'm an idiot. I can enable networking again in both cases. It's right there in the right-click menu... I'm sorry for the noise. This is embarrassing. :(
Comment by Jan de Groot (JGC) - Wednesday, 02 December 2009, 23:25 GMT
Hehe, it just proves the GUI for that option really sucks. I always have to click several times on this applet to make it do what I want. Maybe Apple was right about having only one mouse button ;)

Loading...