Wireless Problems Upgrading Ubuntu to Gutsy

I ran into trouble this week while installing Ubuntu Gutsy on some older hardware for my five year old son Kadin. He'd been using a prism2 based wireless card with success under older releases of Ubuntu for over a year, so I knew that the card was supported. But after completing the fresh install, network manager couldn't find my home network.

Matt Hartley suggested that the problem was with Network Manager in this post, but I followed his recipe, winstalling wicd as a replacement, and it didn't help my situation. Wicd had the same problems detecting my home network.

ifconfig reported two interfaces for my wireless card---wifi0 and wlan0. Some suggested blacklisting hostap_pci (and others) to remove conflicting drivers which might be confusing network manager. The best suggestion I found early on---which didn't work for me at the time---was to install the linux-wlan-ng package. This was the right thing to do (the needed prism2 driver is installed), but unfortunately, this didn't work either. Perhaps some additional configuration was needed?

Since, according to some, the real problem was with Network Manager, and since it was working well for us under Feisty, I decided to pin back those packages using apt.

I added the following to /etc/apt/preferences:

Package: *
Pin: release a=gutsy
Pin-Priority: 700

Package: network-manager
Pin: release a=feisty
Pin-Priority: 800

Package: network-manager-gnome
Pin: release a=feisty
Pin-Priority: 800

Then I duped all of the repository entries in /etc/apt/sources.list and changed each "gutsy" to "feisty" so that apt can find modules in both repositories. Then I ran:

sudo apt-get install network-manager network-manager-gnome

This successfully downgraded and pinned the two Network Manager packages to the versions that are available in Feisty Fawn.

I was really pleased that the downgrade went so smoothly, as I've gotten trapped in dependency hell attempting similar feats in the past. Sadly, though, my problem remained! Perhaps Network Manager was not at fault after all.

linux-wlan-ng seemed to be the right solution for my card, so I decided to build from source from the trunk.

svn co svn://svn.shaftnet.org/linux-wlan-ng/trunk

Then I built and installed it and followed the directions in the README to setup, which included setting values in /etc/wlan/wlan.conf. I added my home network's SSID and changed the following entry:

# for some reason, this value was set to N --- seemed wrong to me
WLAN_SCAN=y

I also added the suggested values to /etc/rc.local (for modprobing the correct driver---prism2_pci in my case).

I remembered seeing wlan0 aliases under /etc/modprobe.d, so I grepped for matches and found this file:
/etc/modprobe.d/linux-wlan-ng

The contents are shown below. The "alias wlan0 prism2_pci" line was commented so I removed the comment.

# Aliases to tell insmod/modprobe which module to use when bringing up the
# wlan0 interface.

# Uncomment the line corresponding to the type of prism2 device you have.
alias wlan0 prism2_pci
#alias wlan0 prism2_usb
#alias wlan0 prism2_cs
#alias wlan0 prism2_plx

# this allows network manager to manipulate the device
options p80211 wlan_wext_write=1

I rebooted and network manager was able to find my home network, as well as a number of my neighbors wireless network. In hindsight, I wonder if, after installing linux-wlan-ng as a package, I had just removed the comment from this file and WLAN_SCAN=Y, my troubles would have washed away? If you are having similar problems, I would try that first before compiling the latest driver from source.

Comments

Vasan said…
I had similar problems as yours (the only difference being my son is 11 years old ;-).

The only thing that you did not have to do was the NetworkManager back to Fiesty re-installation. I tried everything else. Fundamentally:

1. prism2_pci is missing in Ubuntu Gutsy. Eariler Ubuntus had it, which is why for most people it worked.

2. hostap_pci (which the kernel auto-detects and assigns to my Intersil Prism2.4 Wavelan card) doesn't seem to work. The two interfaces, wifi0 and wlan0 is really weird.

3. prism2_pci must be installed by compiling the required modules using linux-wlan-ng.tar.gz FROM THE SVN TRUNK as of the day of writing this (0.2.8 did not compile).

This is different from the linux-wlan-ng package in Ubuntu, which is just a bunch of tools, but does not contain the prism2_pci driver. Yes, linux-wlan-ng package must be installed too, in addition to the prism2_pci kernel module that you must compile from source.

4. Make sure libc6-dev and linux-libc-dev packages are installed (these are not installed by default in Ubunty), otherwise you will not be able to compile linux-wlan-ng modules.

5. Make entries in /etc/wlan/wlan.conf etc. NetworkManager is now able to detect the wireless network.

In any case, thanks for your note. I found it useful. Especially the svn way of getting the modules' source code (the conventional download-the-latest-source did not compile, as 2.6.22 has changed since then.)

Popular Posts