Monday, February 12, 2007

Ubuntu & wireless on a Vaio V505BX

I recently installed Ubuntu 6.10 (Edgy) on my Sony Vaio V505BX. The install went smooth and was done in less than an hour -- almost everything worked 'out-of-the-box' including the function keys for volume and brightness. However wifi/wireless wasn't working by default and required some digging. This post details how I was able to get it running.

What Didn't Work
Ubuntu recognizes the built-in card as an Intersil Prism 2.5 chipset; these details were found by using the lspci command.

Ubuntu ships with the hostap driver, the ornioco driver, and the prism2 driver, all of which should theoretically be capable of operating this card -- though despite my best efforts I could get none to work. The modules would all successfully load and the card could see access points; however association with an access point would either fail or be short-lived before the connection was dropped.

Something seemed amiss with these kernel drivers (hostap, prism2, orinoco), and some time spent web searching revealed others with similar Vaios were also having problems when running Ubuntu 6.10. The most common 'fix' appeared to be blacklisting the prism2 modules, which I also tried but without success.

I managed to get wireless working by instead using the ndiswrapper kernel module in conjunction with the WinXP drivers:

1.) Add these modules to the modules blacklist file (/etc/modprobe.d/blacklist):

  • hostap
  • hostap_pci
  • prism2_pci
  • orinoco
  • orinoco_pci
This will insure that none of the default modules will load and interfere with the workaround. Reboot to clear any of the above modules which may be currently loaded. (You could also try modprobe -r modulename though rebooting is just easier.)

2.) Locate the WinXP drivers.

When I installed Ubuntu, I already had WinXP installed and so I configured it as a dual-boot system. I booted into WinXP and checked the device manager to see the wireless card's details as well as the driver it uses.

XP lists the card as an Ambit LANExpress ieee802.11b miniPCI adapter. I noted the location of the drivers it uses (c:\Program Files\Ambit\...) and then rebooted into Ubuntu. Write down this location or copy the files to a thumb drive as you'll need access to them from within Ubuntu.

(Caveat - Sony provides the V505BX wireless drivers here:

However (!) these drivers are packaged into a Windows installer which won't extract under Wine as it fails to detect an XP system. So if you don't have an Ubuntu/WinXP dual-boot you'll need to find a WinXP system on which run the installer and copy the installed drivers or another method by which to extract the necessary files.)

3.) Install the ndiswrapper-utils package:
sudo apt-get install ndiswrapper-utils

4.) Load the WinXP drivers as well as the ndiswrapper module.

This guide covers these steps quite well:

When loading the WinXP drivers, reference the location of the Ambit drivers found previously. (On my system I mounted the WinXP partition and loaded the XP drivers (inf, sys) directly from the NTFS drive.)

5.) You should now be able to associate with an access point using iwconfig.

Test everything out. If its not working, retrace the above steps to insure everything was followed correctly. If/when it's working, continue to the next step.

6.) Once wireless is operating satisfactorily, you will need to make the ndiswrapper modules load during startup so that your wireless card is automatically enabled (rather than follow the steps here every time you reboot).

The following command stores the current configuration of the ndiswrapper modules into a config file so that the WinXP drivers will be loaded automatically when the ndiswrapper kernel module is loaded:
 sudo ndiswrapper -m
Next you will need to insure that the ndiswrapper kernel module gets loaded during boot. I added the following line at the end of /etc/rc.local to accomplish this:
 modprobe ndiswrapper
Ndiswrapper should now load the WinXP drivers the next time you reboot, enabling your wireless card automatically.

7.) I highly recommend following this guide to get Gnome network manager up-and-running as it makes using wireless much more convenient:

1 comment:

oysterguy said...

Thank you for the detailed walk through. Were you able to configure your prism card for WPA?