Bug 592505

Summary: Bad NetworkManager.state contents block wifi card from powering up
Product: [Fedora] Fedora Reporter: Richard Hitt <rbh00>
Component: NetworkManagerAssignee: Dan Williams <dcbw>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: low    
Version: 12CC: dcbw
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-05-17 23:55:41 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 Flags
Patch that demonstrates proof of concept described in Comment 6 none

Description Richard Hitt 2010-05-15 02:12:02 UTC
Description of problem:
Wifi card fails to operate on reboot from failed suspend/resume on laptop;
these two commands fix instantly:
    sudo rm /var/lib/NetworkManager/NetworkManager.state
    sudo service NetworkManager restart

Version-Release number of selected component (if applicable):
NetworkManager-0.8.0-6.git20100408.fc12.i686

How reproducible:
Reproducible every time

Steps to Reproduce:
1. With wifi card (pcmcia) up and connection established, close laptop lid
2. After ~30s open lid and observe computer does not resume
3. Reboot and observe that wifi card (pcmcia) lights do not light
  
Actual results:
Wifi card fails to operate

Expected results:
Wifi card lights and operates normally

Additional info:
The laptop is a HP ze5250.

The contents of the NetworkManager.state file before removal are:
-------- start of file

[main]
NetworkingEnabled=false
WirelessEnabled=true
-------- end of file

The contents after these two commands:
    rm /var/lib/NetworkManager/NetworkManager.state
    service NetworkManager restart
are:
-------- start of file

[main]
NetworkingEnabled=true
WirelessEnabled=true
WWANEnabled=true
-------- end of file

Comment 1 Richard Hitt 2010-05-15 02:31:15 UTC
The laptop's smolt ID is (taken without the wifi card):
http://www.smolts.org/client/show/pub_8c1095ea-3e1e-451f-bfd7-e8609fbd20d9

Comment 2 Richard Hitt 2010-05-15 02:49:46 UTC
Another report of what seems to be my exact problem, albeit on a ThinkPad, not a HP, and on Ubuntu, not Fedora, is at this URL:
http://osdir.com/ml/ubuntu-users/2010-05/msg00156.html

Comment 3 Richard Hitt 2010-05-15 03:15:06 UTC
Still another URL, https://bugs.launchpad.net/ubuntu/+bug/555571
This one shows a fix, exactly the fix I described above, and claims
that "This bug affects 24 people", I don't know how they arrived
at that number.

Comment 4 Richard Hitt 2010-05-15 18:32:02 UTC
Another smolt of the laptop I reproduced this problem on.  This one includes the Broadcom 4318 card:
Broadcom Corporation BCM4318 [AirForce One 54g] 802.11g Wireless LAN Controller
The smolt info is at:
http://www.smolts.org/client/show/pub_8c1095ea-3e1e-451f-bfd7-e8609fbd20d9

Comment 5 Richard Hitt 2010-05-15 23:17:44 UTC
Also see Bugid 589108 comment 1, exactly the same problem and circumvention as I described above.  And note from that bug report that an alternative way to encounter this problem is with battery drain.  This happened to me too, months ago.

Comment 6 Richard Hitt 2010-05-15 23:51:54 UTC
Created attachment 414302 [details]
Patch that demonstrates proof of concept described in Comment 6

See Comment 6.  The patch is to src/main.c and adds option --force-enabled.
When the option is used, parse_state_file() forces NetworkingEnabled to be true.

Comment 7 Dan Williams 2010-05-17 23:51:59 UTC
The real fix for this is to stop using sleep/wake as the "Networking Enabled" commands, which is how they are currently wired up.  That's planned.

Comment 8 Dan Williams 2010-05-17 23:55:41 UTC

*** This bug has been marked as a duplicate of bug 589108 ***