ipw2200 needs to be reloaded after suspend

Bug #162654 reported by Luke12
86
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Undecided
Unassigned
network-manager (Ubuntu)
Invalid
Undecided
Unassigned
pm-utils (Ubuntu)
Won't Fix
Medium
Unassigned

Bug Description

As specified in the title. If I do use acpi, after resume NetworkManager will gladly reactivate and connect. If I use pm-utils I need to restart NetworkManager manually. As pm-utils, if I am not mistaken, is to be included in Hardy main, this bug IMHO should receive quite a high ranking - it could very much annoy laptop users.

My wireless card uses the ipw3945 driver. I had to add "ieee80210 iwp3945" to the Modules section in acpi-support for it to avoid occasionally rebooting instead of resuming, and I did the same for pm-utils adding a config file in /etc/pm/config.d. Fixed the rebooting bug, but it did not solve the network-manager one.

I think that obviously the bug should be or in network-manager or in pm-utils; can't be sure of which one though.

Related branches

Revision history for this message
Alexander Sack (asac) wrote :

Hi,

this is not a network-manager bug. Lets find a new home :) ...

 - Alexander

Changed in network-manager:
status: New → Incomplete
Paul Dufresne (paulduf)
Changed in network-manager:
status: Incomplete → Invalid
Revision history for this message
xhienne (xhienne) wrote :

The problem may be because the ipw3945 module needs to be reloaded in order for network-manager to reestablish the WiFi connection after a resume. I had a similar problem and adding ipw3945 in the SUSPEND_MODULES list in /usr/lib/pm-utils/defaults fixed it.

BTW, if /usr/lib/pm-utils/defaults is intended to be changed by users, shouldn't it be called /etc/default/pm-utils instead ?

Xavier

Revision history for this message
vlowther (victor-lowther) wrote :

xhienne: because /usr/lib/pm-utils/defaults is not intended to be changed by end users, it is inteded to be changed by distribution maintainers.

End users should drop config files in /etc/pm/config.d -- any changes made in these files will override ones made in /usr/lib/pm-utils/defaults

Martin Pitt (pitti)
Changed in pm-utils:
assignee: nobody → pitti
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pm-utils - 0.99.2-3ubuntu6

---------------
pm-utils (0.99.2-3ubuntu6) hardy; urgency=low

  * Add debian/patches/97_fix_ppc_suspend_test.patch: Fix suspend test on
    PowerPC, thanks to Matthew Garrett (see patch header for details).
  * debian/patches/70-remove-pm-pmu.patch: Change the patch to not entirely
    drop pm-pmu, but use hal-system-power-pmu instead. This brings back
    suspend to PowerPC. (LP: #189851)
  * Add debian/patches/98-unload_network_modules.patch: Unload/reload network
    modules during suspend. Thanks to Matthew Garrett! (LP: #162654)

 -- Martin Pitt <email address hidden> Thu, 27 Mar 2008 16:26:43 +0100

Changed in pm-utils:
status: In Progress → Fix Released
Revision history for this message
Daniel Hahler (blueyed) wrote :

Reloading the network modules on my desktop system causes the network to being down after resuming.
This is what /var/run/pm-suspend looks like:
export ibm_bluetooth_STATE=missing
export RESUME_MODULES="forcedeth $RESUME_MODULES"
export RESUME_MODULES="sky2 $RESUME_MODULES"
export cpu0_governor_STATE=ondemand

This triggered a bug with udev: bug 208103.
After fixing 70-persistent-net.rules however, I still have to "sudo invoke-rc.d restart networking" to make it work again.

/etc/network/interfaces:
--------------
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
    address 192.168.178.20
    netmask 255.255.255.0
        network 192.168.178.0
        broadcast 192.168.178.255
        gateway 192.168.178.1
--------------

I'm not using NetworkManager.

Revision history for this message
Florian Hackenberger (f-hackenberger) wrote :

pm-utils - 0.99.2-3ubuntu6 does not fix the bug. While it unloads/reloads the module correctly, it does not reenable the interface (wlan0_rename). For one reason or the other bringing up wlan0_rename does however not solve the problem. NM still does not connect.I have to restart hal.

Revision history for this message
Daniel Hahler (blueyed) wrote :

Florian, the "wlan0_rename" is probably caused by bug 208103. A workaround is mentioned there.

However, I'm re-opening this bug, because it seems like this change also needs to restart the "networking" service, at least with my system.

Changed in pm-utils:
status: Fix Released → Triaged
Revision history for this message
emil.s (emil.s) wrote :

I can confirm this to. Works again after "/etc/init.d/networking restart". But i have the problem on the wired card, so it's not only a wireless problem...

Martin Pitt (pitti)
Changed in pm-utils:
status: Triaged → In Progress
Revision history for this message
Chris Jones (cmsj) wrote :

not restarting networking breaks manual network setups as Daniel Hahler says. Either we should do that, or revert the patch and people with broken modules will need to use SUSPEND_MODULES. I'm not sure if either is great, restarting networking could have bad effects for some people and obviously the correct solution is to have kernel modules suspend hardware properly so this isn't necessary, but that's not realistic for hardy.

Revision history for this message
Luke12 (luca-venturini) wrote :

Currently however I can state that I am not experiencing this bug anymore. Switching to hardy and the new iwlwifi drivers in 2.6.24 did it for me. In any case, if I am not mistaken, ipw3945 drivers should have been ditched, am I wrong?

Revision history for this message
Rob M (dmrlook) wrote :

I am still seeing this issue. I have pm-utils version 0.99.2-3ubuntu8, so version 0.99.2-3ubuntu6 does not fix this as stated above. I have a wired card, not wireless. I've attached my output from dmesg (log was cleared just before I suspended). Had to do a sudo ifdown eth0 and sudo ifup eth0 to get things going. I will also try doing a "/etc/init.d/networking restart" to see if that does the same thing.

Revision history for this message
Rob M (dmrlook) wrote :

Looks like ""/etc/init.d/networking restart" basically does what I was doing (ifdown/ifup) in one step rather than two. So that works as well. Note that the ifdown command returns the following after the resume:
RTNETLINK answers: No such process
SIOCDELRT: No such process

Let me know what other info I can provide. I'd be happy to help fix this if I can.

Revision history for this message
Daniel Hahler (blueyed) wrote :

This debdiff fixes debian/patches/98-unload_network_modules.patch to restart networking on thaw or resume.

Revision history for this message
Martin Pitt (pitti) wrote :

Regression from previous releases, and earlier releases restarted the network as well. Milestoning.

Changed in pm-utils:
importance: Undecided → High
milestone: none → ubuntu-8.04
Revision history for this message
Martin Pitt (pitti) wrote :

Oh, unfortunately the fix does not actually cure the keyboard/mouse problem, but at least it avoids the beeping and the error messages. I'll upload a fix soon (it will hang in the release-management queue a bit until it gets accepted).

Changed in pm-utils:
importance: High → Medium
milestone: ubuntu-8.04 → none
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pm-utils - 0.99.2-3ubuntu9

---------------
pm-utils (0.99.2-3ubuntu9) hardy; urgency=low

  * debian/patches/70-remove-pm-pmu.patch: Check for /dev/pmu before calling
    /usr/lib/hal/hal-system-power-pmu. Not doing so causes error messages and
    g-p-m error beeps on non-powerpc systems. (LP: #210832)
  * debian/patches/98-unload_network_modules.patch: Restart network after
    resuming, since this unloads/reloads network modules during suspend. This
    unbreaks static network configuration after suspend, and mimics
    acpi-support's behaviour of previous releases. (LP: #162654)

 -- Martin Pitt <email address hidden> Fri, 11 Apr 2008 08:21:13 -0500

Changed in pm-utils:
status: Fix Committed → Fix Released
Revision history for this message
ddumanis (dave-davedumanis) wrote :

Still a problem for me after the fix.

Using Hardy with pm-utils 0.99.2-3ubuntu10.

Can't get ethernet nor wireless after resume from suspend--network config still totally static.

Thanks for looking into this.

Revision history for this message
Tim Lunn (darkxst) wrote :

This bug seems to have re-appeared in intrepid.

I am using a static network config and networking does not work after resume from suspend until I either restart networking or run dhclient

Revision history for this message
Martin Pitt (pitti) wrote :

Tim, the unloading of network modules was removed from the pm-utils script in intrepid, since that was actually a kernel bug. Thus the restarting of /etc/init.d/networking was dropped, too, since this is evil and just a workaround.

What kind of network device do you have in your config, ethernet or wifi? Can you please attach /var/log/kern.log after resuming?

Revision history for this message
Tim Lunn (darkxst) wrote :

I have an Intel PRO/Wireless 2915ABG (which uses ipw2200 driver)

I am using a manual configuration through /etc/network/interfaces and using wpa-supplicant.

Have attached a copy of kern.log after resuming, (without using pm-utils to unload the wifi driver during suspend)

Revision history for this message
Martin Pitt (pitti) wrote :

This problem is now specific to ipw2200, reopening the bug for this. It's really a kernel bug, but we can work around it in pm-utils.

Changed in pm-utils:
status: Fix Released → In Progress
Revision history for this message
Daniel Hahler (blueyed) wrote :

This affects forcedeth in the same way: see bug 288281

Revision history for this message
Daniel Hahler (blueyed) wrote :

Please note that the "hack" to make this work (debian/patches/98-unload_network_modules.patch) has been removed in pm-utils (1.1.0-1ubuntu1) during Intrepid development.
More info at my original bug report about this (bug 283462, duplicated to the one mentioned in my comment above).

Revision history for this message
William Grant (wgrant) wrote :

ipw2200 normally works fine after suspend for me, but occasionally in the WPA Enterprise environment at uni it will need reloading upon resume.

Revision history for this message
Tim Lunn (darkxst) wrote :

I have tried both the workarounds from the above mentioned bugs (288281 and 283462)

with the SUSPEND_MODULES workaround, wifi always gets associated with the AP but never gets an IP from DHCP server.

with the RESUME_MODULES workaround, things seem to work however sometimes, can take several minutes before wifi associates with the AP. although once it finally associates it does have an IP. Sometimes, maybe 1 in 4 resumes it will connect straight away.

I have also now discovered that without either of these workarounds, wifi does eventually connect to the AP after 3 or so minutes, but never gets IP address.

Revision history for this message
Alexander Sack (asac) wrote : Re: [Bug 162654] Re: networkmanager (0.6.5-0ubuntu16.7.10.0) needs to be restarted manually after suspend using pm-utils, while functioning correctly using acpi

Tim wrote:
> I have an Intel PRO/Wireless 2915ABG (which uses ipw2200 driver)
>
> I am using a manual configuration through /etc/network/interfaces and
> using wpa-supplicant.
>
> Have attached a copy of kern.log after resuming, (without using pm-utils
> to unload the wifi driver during suspend)
>
>
Can you fix this by running sudo killall wpa_supplicant after resume?

Revision history for this message
Alexander Sack (asac) wrote : Re: [Bug 162654] Re: ipw2200 needs to be reloaded after suspend

William Grant wrote:
> ipw2200 normally works fine after suspend for me, but occasionally in
> the WPA Enterprise environment at uni it will need reloading upon
> resume.
>
>
maybe doing a sudo killall wpa_supplicant is enough to cure you in that
case?

Revision history for this message
William Grant (wgrant) wrote :

Alexander Sack wrote:
> William Grant wrote:
>> ipw2200 normally works fine after suspend for me, but occasionally in
>> the WPA Enterprise environment at uni it will need reloading upon
>> resume.
>>
> maybe doing a sudo killall wpa_supplicant is enough to cure you in that
> case?

Restarting NM doesn't help, and IIRC that restarts wpa_supplicant.

Revision history for this message
Alexander Sack (asac) wrote :

William Grant wrote:
> Alexander Sack wrote:
>
>> William Grant wrote:
>>
>>> ipw2200 normally works fine after suspend for me, but occasionally in
>>> the WPA Enterprise environment at uni it will need reloading upon
>>> resume.
>>>
>>>
>> maybe doing a sudo killall wpa_supplicant is enough to cure you in that
>> case?
>>
>
> Restarting NM doesn't help, and IIRC that restarts wpa_supplicant.
>
>
it doesnt restart wpa supplicant. so my question is still valid.

Revision history for this message
Tim Lunn (darkxst) wrote : Re: [Bug 162654] Re: networkmanager (0.6.5-0ubuntu16.7.10.0) needs to be restarted manually after suspend using pm-utils, while functioning correctly using acpi

no that doesnt seem to help.

wpa_supplicant does not even restart after I kill it.

On 12/29/2008 12:54 AM, Alexander Sack wrote:
> Tim wrote:
>
>> I have an Intel PRO/Wireless 2915ABG (which uses ipw2200 driver)
>>
>> I am using a manual configuration through /etc/network/interfaces and
>> using wpa-supplicant.
>>
>> Have attached a copy of kern.log after resuming, (without using pm-utils
>> to unload the wifi driver during suspend)
>>
>>
>>
> Can you fix this by running sudo killall wpa_supplicant after resume?
>
>

Revision history for this message
Martin Pitt (pitti) wrote :

With the latest comments I am now confused: what *actually* needs to happen to make ipw2200 survive a suspend? Remove/load the module? restart wpa_supplicant? Both? None? Something else?

Changed in pm-utils:
status: In Progress → Incomplete
Revision history for this message
Tim Lunn (darkxst) wrote :

as best as I can tell 3 steps are needed

1. remove/reload the module (or use RESUME_MODULES workaround)
2. restart wpa_supplicant (needs to be done manually since it doesn't restart after running killall)

The above leaves wifi successfully connected to the AP, but the routing table is missing the default route,

3. Add default route

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 162654] Re: ipw2200 needs to be reloaded after suspend

Tim [2009-01-27 20:42 -0000]:
> 1. remove/reload the module (or use RESUME_MODULES workaround)

That would be SUSPEND_MODULES then.

> 2. restart wpa_supplicant (needs to be done manually since it doesn't restart after running killall)

That doesn't need any arguments?

> 3. Add default route

That means we need to capture the default route as it was before.
However, at that point it really becomes hackish. Maybe there is a
D-Bus signal that we can send to NetworkManager that asks it to
restart the connection?

Revision history for this message
Martin Pitt (pitti) wrote :

I still don't know what to do here; needs questions from previous comment resolved at least.

Revision history for this message
Tim Lunn (darkxst) wrote :

> That would be SUSPEND_MODULES then.

RESUME_MODULES does work fine to reload modules, not sure about SUSPEND MODULES

> That doesn't need any arguments?

yeh, starting wpa-supplicant manually requires atleast -c, -i and prob -D arguments to be specified

Revision history for this message
Chow Loong Jin (hyperair) wrote :

On Mon, 2009-03-02 at 20:34 +0000, Tim wrote:
> RESUME_MODULES does work fine to reload modules, not sure about
> SUSPEND_MODULES
On the contrary. SUSPEND_MODULES is honoured by pm-utils, but
RESUME_MODULES is not. Do a grep for it in /usr/lib/pm-utils and you'll
see what I mean.
--
Chow Loong Jin

Revision history for this message
Graeme Pietersz (fgpietersz) wrote :

I have the same problem with iwl3945, but worse as it hangs altogether on resume.

I did not notice it earlier because I do not often user wireless, and have the kill switch on (in which case there is no problem).

Unloading on suspend appears to fix this, but I have not yet tested it while actually connected to a network so I do not know if that would still cause a problem.

Revision history for this message
Martin Pitt (pitti) wrote :

Graeme, this bug is about ipw2200. iwl3945 suspends/resumes just fine in general without any magic (I do that all the time). Please report a separate bug report against the kernel with "ubuntu-bug linux" (in Ubuntu 9.04) after reproducing the hang.

Revision history for this message
Brad Figg (brad-figg) wrote :

I think I've only seen Hardy mentioned in the above discussion. Does this same issue exist in the most recent Jaunty Jackalope 9.04 release - http://www.ubuntu.com/news/ubuntu-9.04-desktop .

Please let us know your results. Thanks.

Revision history for this message
Kurt Wood (mojo-jojo) wrote :

I have a thinkpad T42 with the 2915ABG card (IPW2200 driver).every since upgrading to 8.10 then directly to 9.04, I am getting constant disconnects/reconnects. I have tried with and without the network manager, tried wicd, tried everything. This card worked flawlessly in 8.04....

Even now, iwconfig reports 18 mbit/sec. I've seen as low as 5.5 with this release.

I am pleased - NOT!

Revision history for this message
Martin Pitt (pitti) wrote :

Kurt, your problem is not related to a suspend problem. Can you please report it separately? (ubuntu-bug linux).

Revision history for this message
Martin Pitt (pitti) wrote :

There is too little information about doing a workaround in pm-utils, and it should be fixed properly in the kernel. Unloading modules is evil and often not even possible.

Changed in pm-utils (Ubuntu):
status: Incomplete → Won't Fix
assignee: Martin Pitt (pitti) → nobody
Revision history for this message
kernel-janitor (kernel-janitor) wrote :

Hi luca-venturini,

Please be sure to confirm this issue exists with the latest development release of Ubuntu. ISO CD images are available from http://cdimage.ubuntu.com/releases/ . However, note you can only test Suspend, not Hibernate, when using a LiveCD. If you could run the following command from a Terminal (Applications->Accessories->Terminal) it will automatically gather and attach updated debug information to this report.

apport-collect -p linux-image-`uname -r` 162654

Also, please be sure to take a look at https://wiki.ubuntu.com/DebuggingKernelSuspendHibernateResume . If you can provide any additional information outlined there it would be much appreciated.

Additionally, if you could try to reproduce this with the upstream mainline kernel that would be great. It will allow additional upstream developers to examine the issue. Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Once you've tested the upstream kernel, please remove the 'needs-upstream-testing' tag. This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the 'needs-upstream-testing' text. Thanks in advance.

[This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: kernel-suspend
tags: added: needs-kernel-logs
tags: added: needs-upstream-testing
tags: added: kj-triage
Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
technicalguy (technicalguy) wrote :

I can confirm that I no longer have this problem after upgrading to Ubuntu 9.04.

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Marking Fix Released per last comment #45.

Changed in linux (Ubuntu):
status: Incomplete → Fix Released
Revision history for this message
Wandy Lau (xdragon007) wrote :

Wow I don't whether can see this and help me. Every time when I relog in from the hibernation or hang ,the network just collapse. I now use the 11.04 and before upgrading , the 10.10 has the same problems .Is is a bug? Some one can help me handle this ?Thank you in advance.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.