Fix Ubuntu Dropping Wireless on Suspend/Hibernate Resume
I am doing what I wanted to do in the post below but I think in the midst of this I have solved this problem. I have an Intel 2100B card (crappy but it works well in Linux, didn’t on Windows though where it was useless) and this may also fix this problem on the 2200BG and other wifi cards too.
Problem
You put the machine to sleep (suspend) or hibernate it. Arbitrarily sometimes the wireless connection picks up where it left off and you can carry on. Other times it doesn’t and the only easy way to get back your wifi is to reboot. Sucky huh? This was the case for me on Ubuntu 7.04 and 7.10. Sometimes as I say it picked it all up again fine, others–no.
Problem two, on resume from suspend and hibernate, Fn+F5 to toggle the Wifi radio on and off no longer works. The wifi just stays on. And on. And on.
Solutions
To problem one, I’ve not tested this long enough but it seems to have done the trick. Yes it’s yet another bloody text configuration file. (Why does Linux need so much tweaking for heaven’s sakes, I still love the OS but it gets annoying after a while. Drop in replacement for Windows it isn’t yet…) In /etc/default/acpi-support there is a lot of things you can tweak. Notably what services are killed and restarted on suspend/hibernate.
Find the following line after opening this file (e.g. Alt+F2, and enter gksudo gedit /etc/default/acpi-support):
# Add services to this list to stop them before suspend and restart them in
# the resume process.
STOP_SERVICES=""
Change STOP_SERVICES to read:
STOP_SERVICES="networking"
Save the changes and close. With any luck this will fix the problem. What this will do is kill the networking service when you suspend/hibernate but also restart it afresh when you resume; hence there may be a few funny flickers from the Gnome Network-Applet on the panel. Certainly this seems to have worked as my Wireless interface is configured by default on my T40 with the 2100B as eth1 which when I run ifconfig when the wireless has screwed up on resume was not present. Even doing a sudo ifconfig eth1 up which brought it back in would not yield a result.
Try that and feedback your experiences.
Problem two is that on resuming it appears that a bad value is ‘poked’ into the ACPI hotkey configuration which on Gutsy defaults to a setting of 0xffffff, yes it’s hexadecimal. Don’t be scared! On resuming this gets set to 0xffff8f subtle but presently it disables Fn+F5 from working.
So I tracked it down to this file: /etc/modprobe.d/thinkpad_acpi.modprobe so open the file for editing (e.g.: gksudo gedit /etc/modprobe.d/thinkpad_acpi.modprobe) and where you have a line that says:
options thinkpad_acpi hotkey=enable,0xffff8f experimental=1
Change it to:
options thinkpad_acpi hotkey=enable,0xffffff experimental=1
Save and now Fn+F5 will work fine on first boot, and resuming from suspend/hibernate. One things for sure, Apple’s hardware (a PowerBook G4 and PowerMac G4 being my benchmarks here) resume from standby so much quicker than Windows and Linux does. Almost instant it is. Kudos to Apple there.
Conclusion
One side of me loves the fact that when there is a problem with your hardware not working as it should, Linux allows you to fiddle with these settings to get them right, whereas a broken Wifi radio on/off toggle would require a vendor to fix the bug on a proprietary OS. Which of course they may never do. This is one such problem with the Windows driver for the Intel 2100B, the later versions fail to power on the wifi radio, but the older versions are shockingly bad at keeping a connection alive (about 30 seconds and then it disconnects and connects, 30 seconds… disconnects…)
The other side of me says this stinks. If Linux is to truly get anywhere near any real desktop market penetration; then it needs these things to work easily. For me in Gutsy there has been a lot of editing behind the scenes configuration files though in fairness; I would have had to do this on Feisty. Even so; this is a problem we shouldn’t have to fix because the T40 contains almost five year old hardware, the laptop is five years old next March and that’s hardly cutting edge immature driver’s and hardware specs… C’est la vie.



If there’s already something on the STOP_SERVICES? What’s the separator if you need to stop more than one thing?
smoore
November 14, 2007 at 6:56 pm
Smoore,
You know, I’m not sure. I would guess it would either be a space, comma or semi-colon. I would try a comma first. Sorry I can’t be exact.
Vicky
lilserenity
November 15, 2007 at 10:41 pm
> If there’s already something on the STOP_SERVICES? What’s the separator
Space. Simple as that. Just put a space between the things there.
scorp123
November 17, 2007 at 10:15 pm
Thanks – giving it a go!
Jon Collins
November 18, 2007 at 8:29 am
I tried everything here but nothing seems to work. Funny thing is I thought it had worked but was surprised the other day when, after resuming from a suspend, my wireless didn’t work. My Fn-F2 (Dell Inspiron 6400) continued to work (which was new). The wireless light turned on and off, but still no wireless. ifconfig’ing didn’t work either.
I really would like to be able to do this but I can’t find out any other suggestions on the net except what you have here offered (which were well written and quite clear).
Thanks
b–
Brian Pribis
November 19, 2007 at 1:05 am
Me again.:
I came across this site:
http://boulderjams.wordpress.com/2007/02/20/ubuntu-dell-suspend-fix/
And the suggestion was to put: “nm-applet” in the STOP_SERVICES list. Believe it or not, it work…at least I think it did. I will have to try it a few more times to make sure. But the nm-applet does get restarted on resume and that seems to get things working again.
So, to recap, in my /etc/default/acpi-support file I have this line:
STOP_SERVICES=”networking nm-applet”
Brian Pribis
November 19, 2007 at 1:22 am
Brian,
This was written specifically with Thinkpads in mind although the top section was a ’stab’ at something more generic including Dell machines. I’m not sure what Fn+F2 does on a Dell laptop but assume wireless on/off toggling. Let me know how you get on with restarting nm-applet as I have an issue still where Network Manager (nm-applet) loses its ability to unlock the keychain after a long hibernate, necessitating a reboot to restore wifi connectivity–Which is a pain in the bum. Network Manager 0.7 which should be in Hardy should solve a lot of our woes.
The latter part of this guide is very much ThinkPad specific so I would be surprised if changing the value in /proc/acpi/ibm/hotkeys helped on a Dell machine
I seem to recall restarting nm-applet on my ThinkPad broke hibernation/suspend but I’ll give it a shot anyway,
Thanks again and let me know how you get on,
Vicky
lilserenity
November 19, 2007 at 1:27 pm
Thanks for the tip! Worked for me (at least so far!) on my Lenovo ThinkPad T60.
Chris
December 3, 2007 at 1:29 am
Thanks for the tip! Worked on my Thinkpad X31.
Greets. Grimsrud
grimsrud
December 5, 2007 at 6:46 pm
Just a follow up from last year (yeah, just making my rounds now). The fix I listed above worked fine. I haven’t had a single problem since. So a combination of what Vicky wrote and the last thing I posted did the trick on the Dell.
Thanks again, Vicky
Brian
Brian Pribis
April 16, 2008 at 6:14 pm
Thanks. This worked great for me. I’ m using a D-Link DWA -110 usb with ndiswraper and this fix works every time I suspend my laptop.
Thanks again, Victoria.
Juan
Juan Ignacio
June 25, 2008 at 3:25 am
[...] courtesy of Brian Pibris, who in turn found it here [...]
fix for broken wireless after suspend/resume at Musings
September 24, 2008 at 11:19 pm
Using this fix (with the Brian variation) fixed the problem on my Inspiron 6000. It’s been the most frustrating thing about Ubuntu for me for ages, so thanks a lot for the fix. Too bad you have to scour the internet for these things though…
tom s.
October 4, 2008 at 12:11 am
Thank you very much! This issue was extremely annoying and a little embarrassing to explain to my Windows-based friends at parties that involved intermittently dragging out laptops to run Youtube videos….
Dirk
January 15, 2009 at 7:26 am
First of all, thanks Vicky & Brian for the fix.
Though in my case (Ubuntu 8.10 on a desktop with a Linksys WMP54 adapter) I also had to add my adapter’s driver to /etc/pm/config.d/00sleep_module as described in http://ubuntuforums.org/showpost.php?p=6264243&postcount=8
I’d also like to say, Vicki, I couldn’t agree with you more on your conclusion. I’ve been running linux exclusively for several years now, and I love it for many reasons, but things like this drive me nuts. Most friends of mine can’t even handle basic configuration on a Windows machine when nothing is wrong (ie. no bugs or hardware support issues). How the hell are they going to deal with commonly required config issues in linux? Mention command line to a standard human and watch their head implode. If only the people behind more distributions would unite their efforts, I bet we could have something that could not only rival, but BEAT windows in every meaningful way. Shame there are too many elitists in the linux development community that refuse to understand or accept this.
frEEk
January 29, 2009 at 8:45 pm
Thanks for the “broken wireless after suspend/resume” fix. It certainly worked on my Acer Aspire 5100 laptop with Broadcom Wireless chip.
Aditya Pratap V.
February 2, 2009 at 2:57 am
many thanks Brian and Vicky, the nm-applet was the fix for my mini laptop, worked in the asus eeepc 701 with (easy peasy)ubuntu-eee
carlo
February 4, 2009 at 6:52 pm
[...] [...]
Ubuntu users? - Home Brew Forums
February 21, 2009 at 2:37 am
Wow–thanks! I finally got my dad’s laptop to act like a laptop!
And yes, it’s shameful how the open-source world seems to suffer from some kind of perpetual fragmentation and config-file obsession. The kind of collaboration it took to create the original kernel doesn’t seem to exist anymore. If you’d asked me 10 years ago, I’d say that by 2009, Linux would have passed even the Mac in smooth user-friendliness, but even today’s best-supported distributions are clunky and clannish, still geeky, and bloated to boot.
Thanks again for your lifesaving post.
evan magers
June 12, 2009 at 8:52 am