Wireless on Linux is a perennial embarrassment.  Although the situation has improved immensely since a few years ago, the inability to get wireless cards working acceptably often tops the list of user frustrations. Here’s an outline of what’s wrong with Ubuntu’s approach to wireless drivers, and how to fix it.

Until a few weeks ago, I had the luxury of a wired network connection to plug my computer into.  It was great–no passphrases to keep track of, no interference from the neighbors’ networks and no crashing wireless drivers.  Then I moved, and now have to use my wireless card to get online.  Although I have a chipset manufactured by Atheros, one of the most Linux-friendly vendors around, my connection is a mess, tending to drop under heavy load and requiring several minutes to negotiate a WPA handshake.

To be fair, Ubuntu, and Linux more generally, have come a long way on the wireless front in the last few years.  More and more wireless cards are now truly plug-and-play, and ndiswrapper is becoming a thing of the past.  But there’s a lot of room left for improvement.

Find stable code and stick with it

Perhaps the greatest problem with Ubuntu’s approach to wireless is the ever-changing code of its wireless stack.  With compat-wireless, from which most of Ubuntu’s drivers come, in constant development, users receive different drivers each time the kernel is updated.  Although the updates sometimes fix problems, they also tend to cause regressions on systems that already work.

Rather than striving to deliver the latest and greatest upstream code, Ubuntu packagers should focus on finding snapshots of the wireless stack that work the best, and stick with them.  This might make the Ubuntu kernel team’s job a little more complicated, since it would mean diverging more from the upstream kernel, but it would be well worth the effort.

Put stability first

Advanced wireless features, like AP-mode and injection support, are nice, but they should take a back seat to normal managed-mode connections, which are what 99% of Ubuntu users are interested in.  The blame here lies with upstream developers more than Ubuntu’s packagers, but someone needs to make sure the ability to connect reliably to normal wireless routers isn’t compromised in the interests of geeks who need fancy features to crack their neighbors’ WEP keys.

My ath5k driver can inject hundreds of packets per second without breaking a sweat, yet it can’t hold a managed-mode connection for more than a few hours before it begins spewing cryptic error messages into the system log and eventually crashes.  Clearly, priorities need to be rearranged.

Simplify wireless infrastructure

Ubuntu’s wireless infrastucture needs to be cleaned up.  For some chipsets, Ubuntu ships more than one driver–ath5k/ath9k vs. ath_pci, for example–and telling the system which one to use is complicated even for advanced users.  Similarly, the module dependencies related to some parts of the wireless subsystem are a mess–the inability to use b44-based ethernet cards without also having the b43 wireless driver loaded is a prominent example.

Wireless networking is complicated by nature, but that doesn’t mean Ubuntu shouldn’t try to simplify it for end users.  Making Jockey (a.k.a. “Hardware Drivers”) work reliably would be a good first step.  Avoiding redundancy in wireless modules and cleaning up the dirty hacks that work around driver dependencies would be a great addition.

Giving up

After recompiling drivers and kernels, replacing NetworkManager with wicd and managing my connection from the command line, all to no effect, I remained so dissatisfied with my Ubuntu wireless experience that I decided it would be easier to buy a cheap router to place next to my computer, flash it with DD-WRT and configure it as a repeater so I can use Ethernet to get online without dealing with my wireless card.  Problem solved, but at considerable expense in time and money.  If my Ubuntu wireless drivers had just worked to begin with, I’d have been a much happier user.

If Ubuntu wants to attract and keep the masses, it needs to continue to devote resources to smoothing over wireless issues.  It may have come far in the last few years, but there’s a long way yet to go.

Follow WorksWithU via Identi.ca, Twitter and RSS (available now) and our newsletter (coming soon).

Read More About This Topic

  • Related posts are coming soon

Share This Post

Posted In: Ubuntu
Interact: Add a Comment | Trackback Link | Permalink
Subscribe: RSS Feed

33 Comments on “How to Fix Wireless on Ubuntu”

  1. bigbrovar Says:

    I think its unfair to blame ubuntu for your wireless weos .. the fault lies with the wireless hardware makers who have refused to work with the kernel drivers, we are not even saying they should opensource their drivers or even write good drivers for Linux. Just release the specs of your hardware and the community would write a good driver for you. this doesn’t happen and we have to resort to reverse engineering which can be tricky at times. This is why as a user i vote with my money and only buy Hardwares with Intel wireless chipset since they are the only one i can guarantee would work OOTB on Linux.

    Even then from experience (and i work as a tech support for both windows and Linux) its easier to trouble shoot a driver problem on Linux than on windows especially when the windows machine was formatted without the driver / recovery cd available. in such situ you wont even have an idea what your are looking for.

  2. Bognár András (bognarandras) ‘s status on Thursday, 27-Aug-09 18:19:26 UTC – Identi.ca Says:

    [...] http://www.workswithu.com/2009/08/27/how-to-fix-wireless-on-ubuntu/ [...]

  3. Christopher Tozzi Says:

    bigrovar: in some cases, lack of cooperation on the part of hardware vendors with Linux developers is certainly to blame. But in my case I have an Atheros chipset. Atheros has been extremely supportive of the Linux community, with native drivers available for its devices for years. About a year ago it opened up its code entirely. This is why I was so disappointed with my card’s performance. The drivers are 100% open-source, the specifications for these chips are 100% available to developers, so there’s no reason the device shouldn’t be 100% functional in Ubuntu.

    In other cases, like Broadcom-based chips where reverse engineering was needed, I would be more tolerant of poor performance. But ironically, the Broadcom 4306 wireless card in my laptop has worked flawlessly out-of-the-box since Ubuntu 8.04 using the reverse-engineering b43 driver, while I’m still struggling with the Atheros chip in my desktop.

    I think the problem comes down to Ubuntu’s policies on wireless drivers, which should be revised to ensure that the most stable and reliable code gets shipped.

    I do agree that Linux’s approach to drivers in general–including them in the kernel rather than expecting users to find them later–is preferable to Windows, but that’s a different issue.

  4. Jef Spaleta Says:

    Chris:
    Didn’t you just this month write an article where you specifically noted Ubuntu’s wireless stability is why you switch from Fedora?

    http://www.workswithu.com/2009/08/05/rethinking-ubuntus-update-policyor-not/

    “One of the factors that drove me to Ubuntu from Fedora a few years ago was the latter’s comparatively aggressive policy on updates. More than once, I found that updating my system resulted in broken wireless or X. This isn’t to say such problems don’t occur in Ubuntu–they occassionally do, if posts on the Ubuntu forums are any indicator–and maybe I was just a particularly unlucky Fedora user. But I’ve yet to suffer a show-stopping regression when installing updates in Ubuntu.”

    Chris, I’m confused. Within one month’s time you’ve seem to have had a drastic change of opinion with regard to Ubuntu’s ability to keep hardware working. Maybe its time you went distro shopping again?

    And more to the point…you make conflicting suggestions. You want Canonical to both simultaneously work to clean up the module stack exposed to user and you want them to slow down the rate of change exposed to users and focus on stability. You can’t have both…and certainly not when Canonical isn’t staffing developer hours to work fixing the wireless stack upstream. The more Canonical is asked to diverge from upstream the messier its going to be for Ubuntu users.

    -jef

  5. Christopher Tozzi Says:

    Jef: I don’t think that cleaning up the wireless stack is incompatible with a conservative policy on change; on the contrary, if Ubuntu focused on finding reliable snapshots of the wireless stack and sticking with them, rather than pushing out the newest code along with each new kernel, I think wireless stability would be a lot better.

    This doesn’t require Canonical to be involved in upstream wireless development; it just requires modifying the Ubuntu kernel source to replace the wireless stack from upstream with better tested, slightly older code.

    The problem with wireless on Fedora that I mentioned in the post you quote came down to Fedora pushing out the b43 driver to replace bcm43xx as soon as that change was made upstream, even though b43 was still very new and didn’t work well with my hardware at the time. This is the sort of aggressive change that needs to be avoided. Stick with what’s already known to work, not what’s newest and shiniest.

  6. Jef Spaleta Says:

    Chris:
    Among other things, I think you grossly underestimate the amount of effort required to do the sort of cherry-picking you want to see. You do acknowledge that what you want will require more work. Okay who is going to do that work? Do you think Canonical staffers are just sitting on their hands with nothing to do? You think Canonical has the manpower flexibility on hand to do what you want in terms of hardware stability? Do you know what the priorities are for Canonical’s kernel team at the moment? Do you know how those prioritizes would be impacted if people were reassigned to do the sort of wireless stack cherry-picking you think is possible?

    I don’t think Canonical has that manpower. I think that’s evidenced by their lack of involvement in upstream kernel development already. If they did have the manpower they’d already be working upstream to clean up the wireless stack to reduce their own maintenance burden. Not happening, I think they are hanging on for dear life trying to keep their head above water while kernel development rate of change is accelerating…and hoping that the people who are doing the upstream work…are doing work that is adequate for their interests.

    Working against the priorities of the upstream project at the distribution level requires a significant manpower investment.
    Are willing to pay for a Canonical support contract specifically to see a more stable wireless stack to offset the cost of that manpower expenditure?

    -jef

  7. bob dobbs Says:

    “My ath5k driver can inject hundreds of packets per second without breaking a sweat, yet it can’t hold a managed-mode connection for more than a few hours before it begins spewing cryptic error messages into the system log and eventually crashes.”

    You must just have a funky connection to have problems like you describe. Don’t blame the driver b/c you have alot of airwave noise.:) Ath5k with 2.6.31-rc7 is actually very nice except for no jumbo frame support still. No one uses ndiswrapper anymore.

    There isn’t any need to install Wicd anymore since say Ubu 8.10. Gnome(2.6 version) NetworkManager has been rock solid in 9.04 and beyond. Yes it even does my WEP/WPA automatically! Woohoo!

    Now if you were using Ubu 8.04 I’d say you’d have a real complaint b/c Wireless/Gnome NetworkManager was a complete horror to deal with and set-up.

  8. MK Says:

    Atheros is Linux friendly, are you kidding? From others experience it seems whenever there is a wireless problem, the chipset is almost always by Atheros or Broadcom. I’ve been fortunate enough to stick to intel, and use wireless (wpa/wpa2) since Edgy.
    Anyway, sorry for your trouble.

  9. LVS Says:

    well..I don’t know..my Vostro didn’t have any problems with wireless connections per se. I had a problem with NetworkManager not detecting automatically (in Jaunty) that I’ve turned off the wi-fi switch on my laptop – like it did in Intrepid

  10. Zero Path (zeropath) ‘s status on Friday, 28-Aug-09 05:18:15 UTC – Identi.ca Says:

    [...] http://www.workswithu.com/2009/08/27/how-to-fix-wireless-on-ubuntu/ [...]

  11. Adam Williamson Says:

    “Similarly, the module dependencies related to some parts of the wireless subsystem are a mess–the inability to use b44-based ethernet cards without also having the b43 wireless driver loaded is a prominent example.”

    That’s not quite right. Both b43 and b44 depend on a single underlying module, ssb. You don’t need b43 loaded to use b44 – you need ssb. The ‘problem’ is that loading ssb takes over both wired and wireless chipsets, so if you have ssb loaded for b44 to work, you can’t use a different wireless driver – ndiswrapper or wl – with the wireless chipset.

    I suspect it would work if you loaded the ‘foreign’ wireless driver first, then ssb, then b44, but I’ve never bothered to hack that up on a Broadcom-equipped system to test. It shouldn’t be too hard to do, though.

  12. Danny Says:

    I only buy Linux-friendly hardware too, so I haven’t had many issues, except with one USB dongle that actually WAS supported just fine (the company who made the chipset actually wrote a GPLed driver for it), but Ubuntu decided they needed a “better” one and totally broke it from Gutsy until Jaunty.

  13. rajesh Says:

    Well good or bad wireless on ubuntu works for me. Both on laptop (Broadcom 4306) and desktop ( WG311v3).

    Windows on desktop failed pathetically to connect to the wireless modem. So I loaded linux mint and configuration was piece of cake.

  14. What’s Wrong With Wireless On Ubuntu | WorksWithU « Karl Eriks Blog Says:

    [...] What’s Wrong With Wireless On Ubuntu | WorksWithU. [...]

  15. Raseel Says:

    I resent the first statement of the blog. The state of wireless stack in Linux is something to be proud of rather than embarassed.
    The Linux guys have to work their way back with drivers. They have to reverse engineer the driver from windows or use external tools like ndiswrappers to get them to work.

    And all this NOT because Linux or Ubuntu have stability issues. It’s because the Hardware vendors have not opened their specs for Linux drivers. The Linux Kernel driver maintainers have offered to develop the drivers for the devices FREE of cost and still the hardware vendors have not opened up.

    Imagine not having a driver CD for windows. I’d like to see you make the Driver work then. In the case of Windows, the hardware vendors are the ones who write the drivers, package them into stupid installers and make it available to the public for a price… and this is just for the binary.
    With most of the Laptops and PCs I have used, I’ve had to do minimal effort to get wireless working. Not to mention, I usually have access to the full source code AND I do not have to buy it for every (or any) device I own.

    And

  16. Volker Hett Says:

    As an owner of an Asus EEE 901 I can feel your pain.
    Every now and then the problem is marked solved in Ubuntus bugtracker, I try it and it isn’t solved.
    I can live with 54MBit/s Wifi instead of the 100+ I get with Windows on this machine, but I can’t live with an inability to connect to mixed WPA/WPA2 mode routers.

    It should have been solved in 8.10, then in 9.04 and now in 9.10, that would be more than one year after I bought that thing with the intention to put Ubuntu on it.

    The funny thing is, a look at array.org shows that it’s the newer atheros driver which doesn’t work well with network manager.

    I have UNR 9.04 with a homegrown 2.6.30 kernel and the 1.7.x.x driver now and don’t read the bugtracker anymore.

  17. Eugene Markow Says:

    I run Arch Linux on my Presario CQ50 laptop. It uses the Ethernet controller, Atheros Communications Inc. AR5001 Wireless Network Adapter (rev 01).

    I’m having a ton of problems with the ath5k driver that loads automatically when booting up Arch. It randomly crashes (screen freezes with blank black screen, and loading process is halted) my laptop right after the ‘loading modules’ phase during boot up. It doesn’t always crash, but only at random intervals. It’s quite enough to be annoying though. If I disable ath5k from loading at all, my laptop never crashes. Obviously, ath5k is the culprit. So, wireless doesn’t work at all and the ath5k crashes my laptop if I allow it to load.

    Does anyone have a suggestion for me, how to get wireless working and prevent my laptop from crashing when the ath5k driver loads? I filed a bug report with Arch in addition to one that was there prior to mine, and Arch developers provided us with the temporary solution to block ath5k from loading which avoids the crash (freeze). They also indicated its an upstream issue. Help! Any tips would be much appreciated. Thanks.

  18. Ikis Says:

    My experience is the opposite. I’m running Ubuntu 9.04 (dual boot with winXP) and I can stay connected via my onboard intel wireless card all day. When I have the need to use winXP (to connect to my employer’s VPN) I’d better sit next the router and get the cable plugged in. My wife’s laptop also disconnects very often (she uses winXP). When I need to use it, I prefer to run Ubuntu from flash drive to get the wireless stable.

  19. Atheros is the problem… Says:

    not Ubuntu in my case. I have two different brand laptops with different Atheros WIFI cards (OK, one is my wife’s). Both have problems connecting to a couple different access points that we visit. When selecting a laptop for someone, I deliberately chose one that had an Intel WIFI card and it works great without any configuration or other changes at the sites we use regularly.

  20. lefty.crupps Says:

    > I think its unfair to blame ubuntu for your wireless weos
    Its no different as when the good parts of Linux are constantly described as Ubuntu features, or articles are written about how great an Ubuntu application is, when really its a Linux application.

    If fanbois want to give Ubuntu all of the credit for Linux’ good, they can take the credit for the bad in Linux also :)

  21. Mike Says:

    Ubuntu (and possibly several linux distros) need an approach like this for sound. Make one architecture really work and stick with it.

  22. mord Says:

    The problems detailed are all to do with the rapidly evolving atheros drivers. Atheros until very recently was a closed source binary vendor driver, very unfriendly to Linux. About a year ago that changed, but it takes time for a new wireless driver to mature, and the 6-month old one you’re toying with is an example of that.

    Just about any other type of wireless chipset will work “out of the box” well and reliably with Linux. You simply chose unwisely.

    As for the b44 driver requiring the b43.. nonsense. Our notebooks here have b44 wired lan, and the b43 driver/module is nowhere in sight.

    Cheers

  23. Joel Says:

    I can’t identify with your problem. I have an Intel 4695agn card and network manager just works. I also have a Verison 3g dongle that just works on network manager. I would also dispute your assertion that Atheros is one of the most linux friendly chipsets available. See ubuntu forums. Wireless on Ubuntu is not rocket science.

  24. slumbergod Says:

    For me, wireless under linux improved drastically from about Hardy onwards. In particular, the default wireless setup in Intrepid was flawless.

    That said, I have never liked network-manager. I found it would never reconnect properly when the network signal dropped (unfortunately a frequent occurence in the office). When I switched to wicd I found wireless worked perfectly.

    The first thing I do after doing a clean install of Ubuntu is getting rid of network manager and replacing it with wicd.

  25. aikiwolfie Says:

    Could I just point out that getting wireless networks setup in Windows isn’t exactly intuitive either. And hardware developers actively support Windows.

    I’ve lost count of the number of people who’ve asked for my help to get their WiFi working. Mostly it’s because they can’t navigate the control panel or they don’t know they need to press an actual physical button to turn the WiFi on first.

    However even after SP3 is installed in XP, support is almost non-existent and Vista is just a nightmare to navigate.

    So all things considered. I think Linux is doing pretty well. When hardware developers write the drivers and make them available to Linux distributions as Dell did, it just works. I’ve never had an issue with wireless on my Ubuntu driven M1330n.

    At least Linux has the excuse of spotty support.

  26. therealdavidfield Says:

    I have to say, as soon as i read the line “Although I have a chipset manufactured by Atheros, one of the most Linux-friendly vendors around, my connection is a mess” I knew this would be a cherry picker of a post. Surpassingly what was one of the worst supported Linux Wifi cards out there the Broadcom, has become one of the better comparatively speaking, because so many people knew it was a useless sack of **** they wrote and coded round it. Again, while ubuntu does tent to stick to the, lets say, more active end of the Wireless driver coding schedule, its definatly one of the better distros out there for getting such cards to work out of the box, and i do understand how you say that Wireless has improved, the problem is you’ve writen an article telling people how bad the wifi on ubuntu is, and its not, its just that its been bad for you,. I install Ubuntu daily, dom a USB stick onto many different PC’s and have to say the Atheros Chipset is by far the worst i’ve ever come across, so maybe the issue isn’t the OS or the Chipset, its that you didn’t buy a Linux compatible PC, you bought a Windows compatible PC.

    Also i concur, try setting the same thing up out of the box on Vanilla windows.. not pretty.

  27. Jason Says:

    With Ubuntu (9.04) Netbook Remix running on an Acer Aspire One AOA150 (Atheros wifi hardware) netbook, I need to compile a snapshot from

    http://snapshots.madwifi-project.org/

    in order to have a decent connection that doesn’t randomly drop, cause kernel panic on heavy data xfer traffic, and in order to connect to WPA2 networks. The default driver that came with UNR seriously limited what I could do on the net with this NETbook.

    Not a big deal to have to compile/load the MadWifi snapshot, except that it has to be done w/every kernel update. A minor PITA.

  28. Jef Spaleta Says:

    Jason:

    Can’t you setup dkms on UNR to rebuild the module as needed when a new kernel is installed or booted? I could have sworn Ubuntu includes it in its repository…yep dkms is in universe for Jaunty.

    -jef

  29. John M Says:

    Chris-

    I know I’m coming into this conversation way late, but I can surely sympathize. I also have Atheros wireless in my netbook, and it has certainly been a love/hate relationship from update to update in Jaunty. I eventually threw in the towel, blacklisted ath5k and ath_pci, installed the Windows driver downloaded from Asus’ support site with ndiswrapper and moved on without a problem ever since. Anyway, I have, however, been quite happy to note that through the Karmic Alphas which I’ve been dual booting that my wireless has always worked without any intervention on my part (so far). I’m crossing my fingers that it stays that way. It would appear that development in the upcoming release is at the point that things are getting more stable all the time, which one would reaonably expect as the Linux kernel continues to grow and mature. But before I started testing the Karmic pre-releases, I was actually contemplating replacing my wireless card with an Intel model since the components on my netbook are so easily accessible, and may still do so regardless, just to play it safe.

  30. Steve Says:

    I have a wireless N usb fob using the Ralink chipset. Ralink makes drivers for linux.
    The ndiswrapper accepts the windows drivers too.
    However it’s still nowhere near a plug-n-play experience. Trying to connect to a WPA2 AES ap in infrastructure mode? I’ve spent two days on this already. The forums are filled with people having the same problem, and it would be generous to say a third of them find some resolution. I’ll tell you this – it’s given me a greater appreciation for Windows. Plug it in, and it works.
    I can appreciate the hobbyist nature of the Linux experience and enjoy the Ubuntu environment on a wired connection, but until users are abstracted from having to compile a driver themselves, hack .conf files to get them to load at startup and negotiate a connection, and manually blacklist other drivers, Ubuntu will not be ready for prime time. It’s really that simple, regardless of the excuses.

  31. Mikoyan Says:

    :) So True… After asking my clients to switch to ubuntu for years, I now face the embarassing task of not being able to use my Wireless on a new Dell after upgrading from 8.10 to 9.10

    This may be anyone’s problem as many have mentioned above that its not ubuntu’s fault, but if the market for ubuntu has to grow as many of us would like, driver compatibility issues have to be fixed. And the folks at canonical must do what it takes to make it happen….

    Else Windows Vista with all its headaches will be doing better off than a rocking OS with poor wifi support…

  32. Thomas Says:

    I’ve recently moved to ubuntu from windows and love it, I’ve installed it on 2 of my computers and the wireless on my laptop worked immediately. On recommending it to a friend and installing his wusb54gc won’t do squat. Looking around for a solution I find download this and compile that and put this geek into these files. I’m a php and sql programmer and I’m intimidated by all of these steps, and practically every solution I see is different so I’m not even sure which what to compile, how in the world is ubuntu going to make a scratch in the windows world asking housewives and accountants to download source code and compile it? Download this kernal code, alter this source code, replace this header file with that one, sudo ps kp wtf/okey.dokey/aassff430943.tar that….isn’t going to happen. When it works it’s great, when you have to retrieve source code and compile your own software and drivers you’ve past the point of the everyday desktop user. Even if windows has a problem people would prefer being frustrated to being told to compile their own drivers, or worse their own operating system kernal. If Bill Gates had done that most people probably would not have computers in their homes today.

  33. Fix Wireless in Ubuntu | TurboLinux Blog Says:

    [...] Here is a good tutorial show you how to Fix Wireless in Ubuntu: Wireless on Linux is a perennial embarrassment.  Although the situation has improved immensely since a few years ago, the inability to get wireless cards working acceptably often tops the list of user frustrations. Here’s an outline of what’s wrong with Ubuntu’s approach to wireless drivers, and how to fix it. [...]

Leave a Comment

 

Blog-Powered Site By ContentRobot