Bug 638640 - REGRESSION: NetworkManager disables networking everytime i suspend to RAM and won't re-enable
REGRESSION: NetworkManager disables networking everytime i suspend to RAM and...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: NetworkManager (Show other bugs)
12
All Linux
low Severity urgent
: ---
: ---
Assigned To: Dan Williams
Fedora Extras Quality Assurance
: Regression
: 633874 635055 636400 644990 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-09-29 10:50 EDT by Josef Bacik
Modified: 2010-11-01 23:18 EDT (History)
10 users (show)

See Also:
Fixed In Version: NetworkManager-0.8.1-9.git20100831.fc12
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-10-19 05:08:24 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
/var/log/messages after resume (8.50 KB, text/plain)
2010-10-04 09:00 EDT, Josef Bacik
no flags Details
dbus-monitor --profile --system output from around suspend/resume (21.78 KB, text/plain)
2010-10-13 07:41 EDT, Stefan Becker
no flags Details

  None (edit)
Description Josef Bacik 2010-09-29 10:50:34 EDT
Description of problem:
Everytime I close my netbook and then open it back up later on my network is disabled.  I right click on the NM applet and click enable network and nothing happens, it just sits there, I have to run service NetworkManager restart to get my networking back.

THIS IS A REGRESSION

I hadn't run a yum update on this box in about a month and everything was working fine, it wasn't until I updated everything that this started happening.

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

How reproducible:
Every miserable time.

Steps to Reproduce:
1. Boot up, connect to the network
2. Suspend to ram
3. Unsuspend
  
Actual results:
Disabled network

Expected results:
Not disabled network
Comment 1 Jirka Klimes 2010-10-04 04:40:20 EDT
Would you please attach /var/log/messages after the netbook resumes and you click on "Enable networking"?
Comment 2 Josef Bacik 2010-10-04 09:00:07 EDT
Created attachment 451393 [details]
/var/log/messages after resume

I closed the netbook at 8:56:10 and resumed it at 8:56:28 and clicked enable networking after I had typed my password and such.  I had looked here before but there didn't seem to be any useful messages.
Comment 3 Jirka Klimes 2010-10-04 09:47:36 EDT
Hmm, it looks NM didn't get wake up. The log should contain something like this:
Oct  4 15:25:55 gromit NetworkManager[1286]: <info> wake requested (sleeping: yes  enabled: yes)
Oct  4 15:25:55 gromit NetworkManager[1286]: <info> waking up and re-enabling...

There was a fix specifically for that:
https://bugzilla.redhat.com/show_bug.cgi?id=627279#c13

But it seems that the signal is either not issued by upower or NM doesn't catch it. Will debug further.

To wake NM manually run as root:
dbus-send --system --print-reply --dest=org.freedesktop.NetworkManager /org/freedesktop/NetworkManager org.freedesktop.NetworkManager.wake

You can add --print-reply to /usr/lib64/pm-utils/sleep.d/55NetworkManager as a workaround:
https://bugzilla.redhat.com/show_bug.cgi?id=552506#c4
Comment 4 Dan Williams 2010-10-07 00:10:45 EDT
One more question; is "upowerd" running?
Comment 5 Dan Williams 2010-10-07 00:21:35 EDT
*** Bug 636400 has been marked as a duplicate of this bug. ***
Comment 6 Jirka Klimes 2010-10-07 03:39:27 EDT
That's probably caused by the fact PowerDevil (KDE power manager) uses HAL as its backend and not UPower. Thus Sleeping/Resuming signals are not issued. See https://bugzilla.redhat.com/show_bug.cgi?id=632910#c7

Could you confirm that suspend/resume works fine under Gnome and only KDE causes the issue?
You can also try to suspend with:
dbus-send --system --print-reply --dest=org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.Suspend
which should work as it emits both Sleeping and Resuming signals.
Comment 7 Stefan Becker 2010-10-07 07:28:07 EDT
From my Lenovo T60 with F14Beta :

  - I'm using KDE desktop

  - upowerd is running:

# ps -efw | fgrep upow
root      1427     1  0 00:04 ?        00:00:01 /usr/libexec/upowerd

  - it seems that NetworkManager rarely receives (or logs?) those wakeup events:

# head /var/log/messages
Oct  4 12:33:02 l3f1199 rsyslogd: [origin software="rsyslogd" swVersion="4.6.3" x-pid="1061" x-info="http://www.rsyslog.com"] rsyslogd was HUPed, type 'lightweight'.

# fgrep -e "wake requested" -e "waking up" /var/log/messages
Oct  5 09:45:02 l3f1199 NetworkManager[1296]: <info> wake requested (sleeping: yes  enabled: yes)
Oct  5 09:45:02 l3f1199 NetworkManager[1296]: <info> waking up and re-enabling...
Oct  5 10:00:29 l3f1199 NetworkManager[1296]: <info> wake requested (sleeping: yes  enabled: yes)
Oct  5 10:00:29 l3f1199 NetworkManager[1296]: <info> waking up and re-enabling...

# date
Thu Oct  7 14:26:43 EEST 2010

The occurrence of the problem is rare now, maybe once a week.
Comment 8 Josef Bacik 2010-10-07 08:04:49 EDT
I don't use KDE, this is Gnome.  And upower isn't running.

So it looks like one of two things happens, either NetworkManager fails to wake up, and that handy dbus command definitely wakes it up, or NetworkManager doesn't seem to go to sleep, but still doesn't work when my box comes back up and then it has to be restarted.  The second case happens maybe 20% of the time, I open the box back up and NetworkManager seems to already be connected, but it really isn't, I can't connect to things and such, so I have to do a service NetworkManager restart.
Comment 9 Jirka Klimes 2010-10-07 09:26:53 EDT
Okay, it would be useful to have messages log for the both cases to analyze them separately.
It looks like the sleep/wake requests are not always delivered to NM.

> I don't use KDE, this is Gnome.  And upower isn't running.
upowerd is D-Bus activated deamon. So it should be started when g-p-m calls Suspend D-Bus method of org.freedesktop.UPower service.

First of all check that you have latest upower and gnome-power-manager packages.
upower-0.9.5-1.fc13.x86_64
gnome-power-manager-2.30.1-1.fc13.x86_64
I think there were some issues with suspend in older upower.

Second, log D-Bus signals during suspend/resume:
dbus-monitor --system > dbus.log
There should be UPower's Sleeping and Resuming signals.

If suspend is done by other means that doesn't involve UPower, Nm should be poked by calling it's sleep and wake methods. This is done e.g. by pm-util hooks in 55NetworkManager as mentioned in comment #3. Here adding --print-reply could prevent loosing the D-Bus messages.
Comment 10 Reartes Guillermo 2010-10-07 14:25:38 EDT
In my case, sometimes when resuming, the wireless network does not work.
Disabling and re-enabling it in the NM applet does nothing.

Workaround:
# service NetworkManager restart


My setup:
F13 i386, Netbook [Asus 1005HA]. 
I am Using KDE.

Installed Packages
NetworkManager.i686        1:0.8.1-6.git20100831.fc13    @updates
NetworkManager-glib.i686   1:0.8.1-6.git20100831.fc13    @updates
knetworkmanager.i686       1:0.9-0.20.20100603.fc13      @updates
knetworkmanager-libs.i686  1:0.9-0.20.20100603.fc13      @updates

My netbook only suspends on battey power.

Linux xxxx.xx 2.6.34.7-56.fc13.i686 #1 SMP Wed Sep 15 03:33:58 UTC 2010 i686 i686 i386 GNU/Linux

Most of the time it does not occur. (at least with a single suspend event).
Comment 11 Josef Bacik 2010-10-07 21:47:11 EDT
This bug is against F12.
Comment 12 Josef Bacik 2010-10-08 12:19:50 EDT
And I don't have upower installed at all on this machine either btw.
Comment 13 Stefan Becker 2010-10-13 07:41:30 EDT
Created attachment 453195 [details]
dbus-monitor --profile --system output from around suspend/resume

From my F14 machine when NM failed to wake up after resume:

log start: 1286909001: Tue Oct 12 21:43:21 2010
suspend:   1286909255: Tue Oct 12 21:47:35 2010
resume:    1286969460: Wed Oct 13 14:31:00 2010

I'm going to try the --print-reply change to the pm-utils script.
Comment 14 Dan Williams 2010-10-15 11:37:19 EDT
I'll update NM to work around the pm-utils problem here:

8310593ce48a85aa82d4a2adf805662f2b019ef5 (master)
878f6c4074acfdee42c320680f5529e01b909ba2 (0.8.x)
Comment 15 Fedora Update System 2010-10-15 16:58:02 EDT
NetworkManager-0.8.1-9.git20100831.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/NetworkManager-0.8.1-9.git20100831.fc14
Comment 16 Dan Williams 2010-10-15 16:59:34 EDT
Updates for f12 & f13 here, let me know how they work too:

http://koji.fedoraproject.org/koji/taskinfo?taskID=2537299 (f12)
http://koji.fedoraproject.org/koji/taskinfo?taskID=2537294 (f13)
Comment 17 Josef Bacik 2010-10-15 19:17:46 EDT
Tested the F12 version, it fixes the problem.  Thanks.
Comment 18 Fedora Update System 2010-10-17 11:41:35 EDT
NetworkManager-0.8.1-9.git20100831.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update NetworkManager'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/NetworkManager-0.8.1-9.git20100831.fc14
Comment 19 Fedora Update System 2010-10-18 13:04:02 EDT
NetworkManager-0.8.1-9.git20100831.fc12 has been submitted as an update for Fedora 12.
https://admin.fedoraproject.org/updates/NetworkManager-0.8.1-9.git20100831.fc12
Comment 20 Dan Williams 2010-10-18 13:07:17 EDT
(In reply to comment #17)
> Tested the F12 version, it fixes the problem.  Thanks.

Can you karma bump https://admin.fedoraproject.org/updates/NetworkManager-0.8.1-9.git20100831.fc12 for me then?  Thanks!
Comment 21 Dan Williams 2010-10-18 13:18:22 EDT
*** Bug 610299 has been marked as a duplicate of this bug. ***
Comment 22 Dan Williams 2010-10-18 13:22:00 EDT
*** Bug 635055 has been marked as a duplicate of this bug. ***
Comment 23 Dan Williams 2010-10-18 13:57:29 EDT
*** Bug 633874 has been marked as a duplicate of this bug. ***
Comment 24 Fedora Update System 2010-10-19 05:08:18 EDT
NetworkManager-0.8.1-9.git20100831.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 25 Fedora Update System 2010-10-20 10:43:36 EDT
NetworkManager-0.8.1-9.git20100831.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/NetworkManager-0.8.1-9.git20100831.fc13
Comment 26 Thomas Spura 2010-10-20 12:33:14 EDT
(In reply to comment #0)
> Description of problem:
> Everytime I close my netbook and then open it back up later on my network is
> disabled.  I right click on the NM applet and click enable network and nothing
> happens, it just sits there, I have to run service NetworkManager restart to
> get my networking back.

Is it part of the regression, that if switching places, to still see the old networks (which are definetely not available anymore)?
Comment 27 Matthias Scheutz 2010-10-20 12:44:15 EDT
This happened sometimes on my system, F13 (e.g., for hidden networks).
Comment 28 Fedora Update System 2010-10-27 18:39:19 EDT
NetworkManager-0.8.1-9.git20100831.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 29 Fedora Update System 2010-10-29 16:42:22 EDT
NetworkManager-0.8.1-9.git20100831.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 30 Dan Williams 2010-11-01 23:18:56 EDT
*** Bug 644990 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.