Search site

Add to Google

Featured Articles
Feisty Fawn, a renaissance back
Previous article: Ubuntu, the real alternative ? view
Next article: From Feisty to Hardy in one pass view

Ubuntu-logo


Following up from my previous articles regarding the upgrade from Windows XP to Ubuntu Edgy Eft 6.10, I still have not changed my mind that it was the correct decision to make over the alternatives such as Windows Vista or OS X. I have been happily using my solid Thinkpad laptop and loving the stability of it every minute of the way.

Then the big day came along, Feisty Fawn 7.04, the new version of Ubuntu was released. I read through the list of improvements and thought it was definitely worth taking the plunge. So on the day it was made available, I eagerly downloaded the ISO image, burned the CD and proceeded with the installation. With hindsight, this was not the best path to take. It would have been better to wait for the Update Manager to notify you of the 7.04 upgrade and proceed from there. The advantage of the upgrade path is you preserve your home directory and all the settings. When installing from the CD, Ubuntu by default installs itself into a new partition, so it will be a pain to migrate your old settings across. Immediately, I notice the following visible improvements:

  • Applications start up much quicker. With Edgy, there is a visible lag between the time you click on a launch applet and the time the main window appears (you know it is coming because there is a new task button appearing in the taskbar).
  • Resume from standby is much more seamless now. Before, it used to freeze once in a while
  • Evolution no longer hiccups when you type. In fact, I have switched back from Thunderbird to using Evolution again
So no earth shattering changes yet, but this is surely what an upgrade is supposed to be, seamless. Or is it ?? I have delayed writing up this article until now because of one thing about Feisty Fawn which is mightily broken compared to Edgy, namely the support for wireless networking. I noticed immediately after the upgrade that all my Wifi network cards stopped working. Over the following few weeks, I managed to get them to work again, but it was a very painful experience. Also, none of these cards managed to wake up at all after a standby/resume cycle (I have a DLink DWL-610 PCMCIA card, a Linksys WPC54GS PCMCIA, and a Belkin F5D7050 USB stick). So, be warned when you are thinking of upgrading, Wifi will not necessarily work out of the box as in Edgy ! You might think this sucks, as it will make Ubuntu irrelevant for the new generation of wifi enabled laptops, but this not a true reflection of the problem, as I hope to convince you of this by the end of the article (although needless to say, I was so peeved off about this in the last few weeks that at certain points I was ready to abandon the Ubuntu experience altogether !).

Out with the old

So, if you notice that Wifi works without any problem on a Windows installation, then what is so difficult about getting it to work on Ubuntu ? You have to take into account the fact that a Wifi card usually comes to you with a CD which contains a fully tested Windows driver. This means the Linux community is already at a disadvantage. There are open source driver alternatives for the above network cards. The Dlink DWL-610 uses Realtek RTL8180 chipset, while the Belkin F5D7050 uses Realtek 2500, the Linksys WPC54GS uses Betacom BCM43XX chipset, and drivers for these can be found on Sourceforge, but you will have to fiddle around a bit to get them to compile, deployed, and recognising your card correctly. In fact, I filed a bug report with Ubuntu for the DWL-610, and have even uploaded the tweaked source code for the RTL8180 (I had to tweak it because the original source code is for a 2.4 kernel), which should get it going under Feisty Fawn.

Not so fast, the above solutions will deter most new comers to Ubuntu. In fact, even a seasoned professional like me was put off by the experience. The solution, even when working, still had the following shortcomings:
  • If you suspend the laptop, then resume, the DWL-610 will come back with just the ACT light flashing, but without the LINK light coming on. This means, in OSI speak, that the physical layer is ready, but the Link layer is kaput. Once the laptop is in this state, stopping and restarting the networking layer manually, or removing and re-inserting the network card, will not work. There are only two ways of getting your networking to work again once you get into this state:
    1. Rebooting
    2. Run "sudo ifdown wlan0", then "sudo ifup wlan0", if you do not want to reboot. In fact, this is how I have been surviving for the last few weeks, and what a menial, bronze age existence it was
  • The DWL-610 does not support the new, more secure WPA-PSK wifi encryption algorithm. As a result, the Ubuntu Network Manager fails to wrap the data stream into a wpa_supplicant envelope. You will have to drop back to using the less secure WEP instead.
  • The new 2.6.20.16 kernel used by Feisty must have left something behind, as I am no longer able to connect to my wireless access point if it is switched to the mode where the SSID is not broadcast. In terms of security, hiding your SSID does not achieve much, as it will not prevent someone with basic wifi hacking knowledge from getting in. Having said that, it is annoying to not be able to do this as an option.
  • The Belkin F5D7050 USB stick is incorrectly recognised if you just simply plug it into the laptop. By default, Feisty will attempt to load the driver for a RT73 chipset for this stick. In order to prevent this happening and to get Feisty to load the correct driver, namely RT2500, you need to add the following lines into your /etc/modprobe.d/blacklist file to prevent the incorrect drivers from being loaded by modprobe:
    • blacklist rt73usb
      blacklist rt2570
      blacklist rt2x00lib

    Even with all these measures in place, I still found connection is not very reliable. It will work for half an hour then suddenly the LINK light goes off. After that, short of a reboot, you can not get the USB stick to be listed in the "lsusb" command again. I am not sure if this is due to the driver, or maybe it is just the USB hub in the Thinkpad which has given up. The same thing happens if you suspend and resume the Thinkpad.

In with the new

What a lot of pain, and why does this happen in the newest, shiniest version of Ubuntu ? Well, having got this far, it has suddenly dawned on me why the above way of doing things have been consigned to oblivion, and a new alternative has been devised (which incidentally is the cause of all my woes in the first place). It is my fault for not reading up on the documentations, although I think Canonical (Ubuntu's owner) shares the blame for not making the experience more seamless. Before I go into the alternative, let's explore the problems with the old ways.

As I touched upon the topic briefly above, Linux driver development always lags behind those of Windows, and this is purely down to market share and return of investment. So the network card manufacturers are guilty of creating this unleveled playing field, but you can understand why they do what they do. Anyway, thanks to the ingenuity of the open source community, they have come up with the prefect answer: creating a wrapper which allows Windows drivers to be run natively under Linux. This is where ndiswrapper comes in (sudo apt-get install ndiswrapper, as is known in Ubuntu speak). All you need is the original CD distributed with the network card, and then point ndiswrapper at the directory which contains the .inf file, and hey presto, the drivers are loaded into Linux as loadable modules, ready for use. I must also note here that you should only use ndiswrapper if your embedded wifi hardware  is not recognised by Ubuntu by default, which unfortunately includes all the ones I have access to ). There is a new generic wifi driver called wext, which is used by the WPA-PSK wrapper wpa_supplicant, when all else fails. The other well supported one is the Atheros chipset, so if you have to get yourself a new Wifi network card, go for the ones using Atheros.

The Network Manager

I mentioned briefly the Ubuntu Network manager above. What is this beast ? Well, it is essentially Ubuntu's new standardised way of making the networking layer a seamless experience to you (like in, ehm, Windows or OS X). The Network Manager appears as an icon in your System Tray, like the Network connection icon in Windows. If you click on this icon, you are presented with all the possible networking options you machine is capable of supporting, like wired ethernet, and all the other wireless networking technologies available to your machine (and this, unfortunately, excludes all the network cards above when they run in native driver mode). When I say available, I mean:
  • the card is recognised correctly when running "dmesg",
  • the driver is loaded correctly (i.e. it shows up when running "ndiswrapper -i" and/or "lsmod")
  • the driver can communicate with the Network Manager correctly. This means that when you click on the Network Manager applet in your System tray, you will see the wireless network connection corresponding to your Wifi card and it is not grayed out)
The only other prerequisite to a functional Network Manager is a wpa_supplicant layer which is configured to support your access point. This means you need to do "sudo apt-get install wpa_supplicant" (or install it from the Synaptics Package Manager), then leave it to the Network manager to prompt you for the passphrase when you access your access point for the first time, or configure it manually by editing the /etc/wpa_supplicant.conf.

The cool thing is Ubuntu will automatically switch between the best available connections to ensure you are connected to cyberspace at all time (say when you pull out the network cable at the back). It also shows you the signal strength of the current connection in the System tray (as in your mobile phone). You can of course override the current established connection and switch to the one of your choice too. Needless to say, this can only be achieved if the Network Manager had the unconditional cooperation of the underlying hardware and driver. This means your card has to be either wext, ndiswrapped, or Atheros, and support WPA-PSK encryption scheme. For modern cards and those embedded in new laptops, this should not be a problem.

Of course, this defeats the object a bit in my opinion because a large number of people switch to Ubuntu because they want to squeeze the last drop of computing mileage out of their old laptops which no longer run Windows at any decent speed, and these laptops are the ones using old antiquated hardware which do not fall into the categories above for Wifi support. This might explain why Dell had no problem offering Ubuntu on their new lines of laptops. And it also explains the complaints so far on the Wifi Forums are more from people who have antiquated wireless hardware.

The upgrade path

So, in summary, these are the few options available to people who want to switch to Ubuntu:
  1. If you have a machine which is older than a year, or have older hardware, or Wifi hardware which do not support WPA-PSK, then it is much better to stay with Ubuntu 6.10 Edgy Eft. This version has extremely good support for older hardware and most things work out of the box.
  2. If you have a modern laptop with the embedded (or added) Wifi technology which is confirmed to support WPA-PSK encryption, have a CD with the Windows driver handy (as a fall back resource), then go ahead and upgrade to version 7.04 Feisty Fawn. After all, if you are running the latest version of any offering, be it Windows, OS X, or Ubuntu, you will tend to get better responses and support from the vendor and online forums
In the end, I settled for the best combination which worked for me: Ubuntu 7.04 Feisty Fawn on the IBM Thinkpad X30, using the Linksys WPC54GS Wifi card. I used the Windows driver coming in the accompanying CD, wrapped in ndiswrapper. The only additional step I had to do in order for the card to work was do install a Microcode cutter to grab the firmware for the device (the command is simply "sudo apt-get install bcm43xx-fwcutter". You do this if you ever get the error message bcm43xx: Error: Microcode "bcm43xx_microcode5.fw" not available or load failed. in the dmesg output upon inserting the card), and everything worked as expected, even after suspend/resume.

JPilot hotsync problem

One thing I noticed when I switched to Feisty was that my JPilot desktop application no longer connects to my Sony Clie in order to perform a sync. I finally got it working after doing the following steps:
  • add the module visor to /etc/modules (sudo echo "visor" >> /etc/modules)
  • change the Preferences->Settings->Serial Port value to /dev/ttyUSB0.

    For some reason, the new version of JPilot now communicates with the Palm handheld on the first of the pair of tty connections (/dev/ttyUSB0 and /dev/ttyUSB1) created when you press the HotSync button on the handheld, instead of the second. Although there is a /dev/pilot device created, it is symbolically linked to /dev/ttyUSB1, and this used to work in v6.10, it no longer does in v7.04.

    If you want to create a sensibly named connection to represent your Palm handheld (instead of the generic /dev/pilot), you can create an entry in the /etc/udev/rules.d/10-local.rules:

    BUS=="usb", SYSFS{product}=="Palm Handheld", KERNEL=="ttyUSB0", NAME="sonyclie", SYMLINK="usbdevices/sonyclie"

    run the command sudo /etc/init.d/udev restart, then simply change your Preferences->Settings->Serial Port value to /dev/sonyclie

The other footnote is I borrowed the rather nice looking logo image from here, so if the author is upset by this, let me know and I will switch back to the boring logo.

back
Previous article: Ubuntu, the real alternative ? view
Next article: From Feisty to Hardy in one pass view

discuss (1 comment)
 by by David at 10 Jun 2007 18:26:44
You mention using mandrake/mandriva. Well I don't know which version you're using as recent ones are easy to install, as easy as ubuntu. It also has everything you'd need for a laptop in general use. I'd recommend PClinuxOS though, it's based on mandrake but has IMHO a better choice of initial apps and uses symantic, like ubuntu, for installing new software - a much better way of doing things. Also you install from a live disc so you can check it out beforehand.

Anyhow that's by-the-by. I've just put ubuntu on my laptop and had the exact same wifi problem. I found this howto, http://ubuntuforums.org/showthread.php?t=400236 (its on page 1 in case you come in some other bit of the thread. It actually works!!! It even starts the network when I boot in. Took me around ten minutes to do.

Whoops, I re read your blog and see we didn't have exactly the same problem as you have a different driver. However there is a linux driver for the rt25 from the same people who did the rt73, http://rt2x00.serialmonkey.com/wiki/index.php?title=Main_Page, and I would imagine installation is pretty much identical.

Entertaining blog.
    Thanks
          simon
by Simon(simonDotrobertAtoldhouse-cottageDotcoDotuk) at 29 Jun 2007 14:59:53
Copyrights © Transcraft Trading Limited 2006.All rights reserved. Bots Rss-rss