Bug 589108
Summary: | Networking is disabled by state file after power loss drained laptop battery | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Jerry Amundson <jamundso> | ||||||
Component: | NetworkManager | Assignee: | Dan Williams <dcbw> | ||||||
Status: | CLOSED UPSTREAM | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | low | ||||||||
Version: | 13 | CC: | dcbw, eqisow, jklimes, joel_rees, oded, orion, plug.gulp, rbh00 | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | |||||||||
: | 598765 (view as bug list) | Environment: | |||||||
Last Closed: | 2010-06-07 10:37:53 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Description
Jerry Amundson
2010-05-05 12:26:11 UTC
I have the same problem after trying to recover from a failed suspend. Removing the state file at /var/lib/NetworkManager and restarting NetworkManager solved the problem for me. Same issue here on a Dell Studio 1558, 03:00.0 Network controller: Intel Corporation Centrino Advanced-N 6200 (rev 35), NetworkManager-0.8.0-13.git20100509.fc13 Additional evidence: I had this happen to me, apparently when my daughter accidentally hit the sleep button on the keyboard or selected hibernate instead of shutdown from the shutdown menu. The file mentioned above, /var/lib/NetworkManager/NetworkManager.state shows the wired network disabled and the wireless enabled. The box is a desktop, by the way, not a laptop. No battery. No wireless hardware of any sort. 32 bit, single CPU Sempron. (Should I attach a dmesg?) Oh, and it's running Fedora 12. Editing the file instead of deleting it also seems to unclog the networking stuff. *** Bug 592505 has been marked as a duplicate of this bug. *** *** Bug 552233 has been marked as a duplicate of this bug. *** When this symptom has happened to me, the following command instantly fixes it: nmcli nm wakeup The circumstances seem to be that NM sets NetworkingEnabled to false in the /var/lib/NetworkManager/NetworkManager.state file but the situation can arise where NM cannot reset it. My guess is that this flag is set at suspend time (and of course at 'nmcli nm sleep' time as well). Further, I guess that NM expects a 'suspend' to be followed by a 'resume', which should reset this flag to be NetworkingEnabled=true. But if the latter fails, as it stands manual intervention is reqired. The failure can occur in at least these two ways: the hardware's suspend function is broken and a power-on reboot is required, and the battery discharges and a power-on reboot is required. The NetworkingEnabled=false flag remains set in these cases, and manual intervention is required. But a naïve user is at a complete loss what to do. Even sophisticated users, e.g., helpers on the #fedora channel of freenode, are at a loss, as I've seen. NM should perhaps set the flag to true when freshly started? What are the exact and complete semantics of this NetworkingEnabled=false flag? Is there a valid case where a freshly started NetworkManager service can expect NetworkingEnabled=false to be the proper setting? If there is, could a freshly started NM pop up a graphic window asking the user if enabling was okay? (In reply to comment #6) > When this symptom has happened to me, the following command instantly fixes it: > nmcli nm wakeup Yeah, this pokes NM to wake up via D-BUS. The same effect can be reached by: 1. right clicking nm-applet and checking "Enable Networking" 2. directly via D-Bus call, e.g. with dbus-send: dbus-send --system --dest=org.freedesktop.NetworkManager /org/freedesktop/NetworkManager org.freedesktop.NetworkManager.Sleep boolean:false > > The circumstances seem to be that NM sets NetworkingEnabled to false in the > /var/lib/NetworkManager/NetworkManager.state file but the situation can arise > where NM cannot reset it. > > My guess is that this flag is set at suspend time (and of course at 'nmcli nm > sleep' time as well). Further, I guess that NM expects a 'suspend' to be > followed by a 'resume', which should reset this flag to be > NetworkingEnabled=true. But if the latter fails, as it stands manual > intervention is reqired. > The flag is set by /usr/lib64/pm-utils/sleep.d/55NetworkManager script when suspending. The same script is responsible for waking NM up on resume. But when resume fails, of course, the flag is not set to true again. The whole problem is that suspend/resume should not reuse NetworkingEnabled flag, but it does at present. It's planned to change that in the future, though (see the duped bugs and some others on the issue). > The failure can occur in at least these two ways: the hardware's suspend > function is broken and a power-on reboot is required, and the battery > discharges and a power-on reboot is required. The NetworkingEnabled=false flag > remains set in these cases, and manual intervention is required. But a naïve > user is at a complete loss what to do. Even sophisticated users, e.g., helpers > on the #fedora channel of freenode, are at a loss, as I've seen. NM should > perhaps set the flag to true when freshly started? > > What are the exact and complete semantics of this NetworkingEnabled=false flag? > The state file was introduced to retain setting during restarts. So that you can set the flags and see the same stuff over reboots. > Is there a valid case where a freshly started NetworkManager service can expect > NetworkingEnabled=false to be the proper setting? If there is, could a freshly > started NM pop up a graphic window asking the user if enabling was okay? There are valid cases. You may manually disable wireless or whole networking (e.g via right-clicking nm-applet). And you want to have the same state after reboot, of course. I am sure about a pop-up. I think that disabled state is already indicated via nm-applet icon. See attachment. Created attachment 415400 [details]
nm-applet: NetworkManager in sleep state
The main problem with using nm-applet for waking up NetworkManager, is that if you use KDE then you don't have nm-applet, you have knetworkmanager which doesn't have that features. When NetworkManager is sleeping, knetworkmanager shows a disabled menu entry saying "networking is disabled" and there is no way to enable it. This is actually a deficiency of knetworkmanager. I've submitted a patch for knetworkmanager to fix that: https://bugs.kde.org/show_bug.cgi?id=238325 Btw, you can use nm-applet in KDE without any problem (I do that myself). Created attachment 415484 [details]
knetworkmanager with added "Enable networking" checkbox
knetworkmanager with enable check boxes when NetworkManager is sleeping.
Upstream NetworkManager commits that fix this bug: ee3ece9dac985034c5c1f81a6769b40fd7856579 (0.8.1) fa70542c618665cf203a2b71fa0e504f759f7902 (master) still need to hook the applet's Enable checkbox up to the new bits in a separate commit. 5ca1a9d546be81b54e57d525b54ff92597de6115 (0.7.x) (In reply to comment #12) > Upstream NetworkManager commits that fix this bug: > > ee3ece9dac985034c5c1f81a6769b40fd7856579 (0.8.1) > fa70542c618665cf203a2b71fa0e504f759f7902 (master) This is in my list of bugs to "Retest", but I see no way to do so. Please update accordingly. Thanks! (In reply to comment #10) > This is actually a deficiency of knetworkmanager. > I've submitted a patch for knetworkmanager to fix that: > https://bugs.kde.org/show_bug.cgi?id=238325 > > Btw, you can use nm-applet in KDE without any problem (I do that myself). That is a different problem, and solution, so I've cloned this as Bug #598765. NetworkManager-0.7.2.997-2.git20100609.fc11 has been submitted as an update for Fedora 11. http://admin.fedoraproject.org/updates/NetworkManager-0.7.2.997-2.git20100609.fc11 *** Bug 573799 has been marked as a duplicate of this bug. *** |