ipw3945 wireless doesn't work after resume from suspend

Bug #94133 reported by 9johnny on 2007-03-20
12
Affects Status Importance Assigned to Milestone
powersave (Ubuntu)
Undecided
Unassigned

Bug Description

I have version0.14.0-6ubuntu1 of powersave, my system is up-to-date. This is a brand new install of feisty.
It's pretty simple: ipw3945 doesn't know how to suspend, so it needs to be unloaded. The problem is, that it has a userspace daemon running too (/sbin/ipw3945d-2.6.20-12-generic), so one needs to first kill that program, then unload the module. I did a google on this problem and it gave me this: http://<email address hidden>/msg01778.html .
The attached script fixes this.

It now works perfectly well.

Well, somehow it doesn't work after a while. It works 6 times out of 10 I guess.

Dana Goyette (danagoyette) wrote :

Hmm, well, /etc/modprobe.d/ipw3945 should already take care of stopping and starting the daemon, IF you modprobe -r the module first. Try this: make the script 'modprobe -r' and 'modprobe', but not 'killall' the daemon.

9johnny (s.j.) wrote :

it works, I have the new script attached.

description: updated
9johnny (s.j.) wrote :

this script doesn't seem to work somehow.
I'll try to check what the problem could be, maybe the script doesn't get called by powersaved?

9johnny (s.j.) wrote :

Okay, this script seems to work, just needed to read file:///usr/share/doc/powersaved/html/Scripts.html , the example script is a good starting point.

carlos (carlos-silva) wrote :

I'm also suffering from this problem.

Sorry, if this is lame, but where does one place this script ? The first link you gave is about Fedora I think and the folder there doesn't exist in Ubuntu.

9johnny (s.j.) wrote :

You should put it in /usr/lib/powersave/scripts/ , so it would be /usr/lib/powersave/scripts/ipw3945 , then you need to ' sudo chmod +x /usr/lib/powersave/scripts/ipw3945 ', hope it works, please confirm if it does.
Cheers!

9johnny (s.j.) wrote :

Well, this is still not reliably unloading ipw3945 somehow, anyone any ideas?!

9johnny (s.j.) wrote :

So, with the update of acpi and hal right now, I had to add SUSPAND2RAM_FORCE="yes" to /etc/powersave/sleep , and I had to look around in the logs, so I found out how the script needs to be added to /usr/lib/powersave/scripts/sleep_helper_functions somehow . Also, s2ram changed place, it now lives in /sbin/s2ram instead of /usr/sbin/s2ram, for now, I made a symlink, but this is kinda hackish. I'll check sleep_helper_functions when I get home.
Also, I'll mail the s2ram mailing list to tell them to add this laptop to the whitelist.
Thanks for any help you can give me!

9johnny (s.j.) wrote :

The strange behaviour is that the wifi resumes fine if the wireless kill switch is turned off (so wifi is turned on) before suspend, but not if the wifi is turned off.

9johnny (s.j.) wrote :

Okay, I now found out how to make the script exec'd by powersaved. It would be pretty easy to put a case statment for event type, and make one script out of the two I have here, but I am really not big at shellscripting, so here is what I did:
in /etc/powersave/events I added to these two lines:
EVENT_GLOBAL_SUSPEND2RAM="prepare_suspend_to_ram ipw3945-off screen_saver do_suspend_to_ram"
EVENT_GLOBAL_RESUME_SUSPEND2RAM="restore_after_suspend_to_ram ipw3945-on"
notice the ipw3945-on and ipw3945-off , these scripts are located in /usr/lib/powersave/scripts , and are attached here.

9johnny (s.j.) wrote :
9johnny (s.j.) wrote :

This is final, it works 99% of the time, just as suspend does. I hope you can use this for feisty, as a lot of laptops have this wireless chip in them. I understand, that on the long term, it would be nice to patch powersaved to use 'modprobe -r' instead of 'rmmod' , so one only needs to add ipw3945 ro the list of modules to be unloaded. This is yet not of my level of knowlege, hope this still helps someone.
Cheers

LarryGrover (lgrover) wrote :

There is additional discussion of this bug on Novell's bug tracker:
https://bugzilla.novell.com/show_bug.cgi?id=212696

Also a patch which fixes the script at /usr/lib/powersave/scripts/sleep_helper_functions to use modprobe -r instead of rmmod:
https://bugzilla.novell.com/attachment.cgi?id=101724&action=view

This patch fixed the problems I was having with wireless after resuming from suspend.

Luke12 (luca-venturini) wrote :

I had the same problem in Gutsy, I can confirm this as looking at /var/log/syslog I noticed a bunch of errors regarding the eth1 (wireless) device. Personally I did not apply any patches indicated in this page, I just added ipw3945 and ieee80201 as modules with forced removal and reinsertion. It worked! I now see no more error messages in the syslog, which is fine and good :)

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

Other bug subscribers