How to Fix Wireless on 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.
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.
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.