This morning I decided to update to Oneric Ocelot, Ubuntu's newest version. Actually, everything went smooth and I was a happy man. Untill Chrome timed out on me. And XMPP services went down. And nagstamon gave me a sad smiley face. And IRC all but got to a halt. My Wifi was failing. Failing so bad that, in effect, it was non-existent.
A quick search learned me that I was not at all the only one. This is good and bad. Good because when a lot of people are encountering the same kind of problems, solutions tend to be in reach. It was also bad however, because there seem to be a set of different causes for the same symptom: no wifi. As the fragmentation of problems and solutions became clear I decided to blog about this, hoping to unite the problems and their causes in one place. If your wifi is not working I hope this will be of assistance in shortening your search.
As always when we're changing internals of our system, think, think, think and backup. I am not an expert, I am summarizing other experts possible solutions. I am not responsible for you breaking your system.
Possibility 1: a broadcom network controller
The link below is no longer working, I can only hope the issues with this particular driver are solved.
You have a broadcom network controller. To find out if this is the case, execute the following command:
lspci | grep Network
If the line with Network controller mentions broadcom, the solution probably lies in that direction. It seems that, although there are broadcom drivers installed, Ubuntu still wants to use its default drivers. It may also be that you don't have the broadcom drivers installed. Broadcom offers the solution here.
Possibility 2: An 802.11n incompatible driver (iwl4965)
It seems there are people who are using a driver which has issues with the 11n part of wifi. I don't really know what would cause this, but as a lot of people are reporting success with this I want it mentioned. To find out if it is likely you're bothered by this issue execute:
lsmod | grep iwl
If you see iwl4965 popping up in the result, you might have use for the next paragraph.
You can instruct the driver to ignore 11n as follows: Create /etc/modprobe.d/disable_11n.conf (handy for future reference) and then add the following:
options iwl4965 11n_disable=1
This issue is already reported as a bug and it seems that it is taken seriously.
Possibility 3: IPv6 issues
Again, I don't know whats causing this, I don't even to know how to check for the likelyness of this affecting you, but this too seemed to be a wide-spread issue. Apparently there are people who have a driver that handles IPv6 poorly, the solution to a faster wifi connection is in this case quite simple, disable IPv6. Basically the article I linked to says: add the following to /etc/sysctl.conf:
net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1
After a reboot your system should be as it used to be.
Possibility 4: Broken encryption (ath9k)
The next option is a strange one. Apparently there is a driver which doesn't go well with hardware encryption anymore. Check with lsmod and grep to see if this is a driver you have, if so create /etc/modprobe.d/disable-hardware-enc.conf and add the following to it:
options ath9k nohwcrypt=1
This tells our driver to use software instead of hardware encryption
Possibility 5: o dear, you're in trouble now
I haven't found any other causes, although 4 is way, way more than enough. I hope this post is of any help to anyone, good luck all of you :)
I checked all the possibilities you explained here, I just let to check the ipv6 problem to the end ... and ... It worked! :)
I did exactly what you wrote (changed /etc/sysctl.conf) and after restarted my pc.
Ps: my network controller is an "Intel Corporation PRO/Wireless 3945ABG [Golan] Network Connection (rev 02)".
Thank you guy!
Good to hear it worked out in the end at least :)
Looks like there is a possibility #5 after all! All of the steps above didn't work for me (Ubuntu 11.10 with an Atheros based USB wifi stick; internet worked fine right after a reboot, but after a period of time, could be an hour or could be a day, the connection froze which in turn would crash the entire system).
Some googling reveiled another option: installing 'wicd' and removing the default network-manager (apt-get install wicd, apt-get purge network-manager). Seemed like a long shot, but ever since I did so a week ago, the system has been running smoothly. :)
Just for the record. I have the same configuration as Derrik. And the same problem, too. Unfortunatelly wicd solution didn`t work for my system. My tp-link usb stick still hangs up randomly. I have to unplug and plug it again to make it work.
The link provided in possibility # 1 is not working.
Thanks, I updated the article. I just hope it isn't working anymore because that particular problem is solved.
@iwok I actually spoke too soon. It definitely makes a difference, because previously the problem would manifest within hours, while it is now a matter of days. But it did return, so I'm still stuck with a broken network connection. A solution #7, anyone? :(
I resemble Possibility #2, yet, none of the above worked. Hopefully, they'll have a solution soon!
Solution #7: iwconfig wlan0 power off (has to be reapplied on boot)
Going strong for two days so far :-)
Never mind that, it still died on its 3rd day. Guess I'm going to need to buy a new network card to get this fixed -_-
i m using 11.10 with windows 7 ... when i use w7 wifi is working but wheni use ubuntu ..wifi searching no connection ..asked for security key...entered it right still not working...
tell me hw can i make it possible
@anuj I also facing same problem, just one day ago till the time i didn't change my system-username, everything was working fine...but after then it stopped working. I am not sure is it because just change user name.
please suggest me if any one found answer.