2008-05-03

Revisiting Ndiswrapper and MadWifi

To recap: Acer 2920Z has Atheros AR2425 (AR5007EG) wireless chipset:
$ lspci | grep Wireless
04:00.0 Ethernet controller: Atheros Communications Inc. AR242x 802.11abg Wireless PCI Express Adapter (rev 01)


Support for this chipset with the official Madwifi-drivers is incomplete. So, you have two choices: either you use Windows drivers with Ndiswrapper or you try the Madwifi-drivers anyway. I have tried them both and both eventually worked for me. Now I'm using Madwifi, which is more native and hopefully a bit faster solution. Below are instructions for both

Ndiswrapper

Earlier, I wrote how I got my WLAN working using the instructions given at http://wiki.gadz.org/Linux/LaptopAcer. As that site has been down for quite a while now, as a public service, I'm posting the relevant commands given there here. This page has been reconstructed from my own notes, so it does not really resemble the original much, only the commands are the same.

To check for Madwifi driver compliance:
dmesg | grep -i wifi
lsmod | grep ath
sudo iwconfig


To remove madwifi driver:
sudo rmmod ath_pci

To blacklist it add a line
blacklist ath_pci

to /etc/modprobe.d/blacklist-common

To download ndiswrapper drivers that worked for me on 2920Z: drivers-32bits or drivers-64bits. (These seem to be still up, although the page itself is down.)

Using the driver:
sudo ndiswrapper -i net5211.inf

Launching the driver:
modprobe ndiswrapper

Testing to see that you have wlan interface:
sudo ndiswrapper -l
sudo iwconfig


To load module on boot add line
ndiswrapper

to /etc/modules. (This may be unnecessary on Ubuntu if ndiswrapper is already loaded.)

Finally reboot and setup your network. Alternatively you can use the graphical ndisgtk and network settings.

These are the links suggested by the page:


MadWifi

Update 2008-10-11: This information on installing MadWifi is somewhat outdated, see my post here and this MadWifi ticket.

I tried following the tutorial that was linked from the Google docs site listed above, but my machine froze when trying to do the modprobe. With some additional effort, however, I was able to get a newer version working and I'm using it right now. Here is a modifed version of the tutorial that worked for me.

If you've been using ndiswrapper earlier and have blacklisted the atheros driver, first remove the blacklisting. Also make sure that you are not using the currently installed atheros drivers from the restricted drivers manager (untick the boxes).

If you haven't built anything before, install build utilities
sudo apt-get update && sudo aptitude install build-essential

Get the latest madwifi snapshot with the patch from http://snapshots.madwifi.org/special/. For me it was madwifi-nr-r3366+ar5007.tar.gz. In terminal window untar it
tar xvzf madwifi-nr-r3366+ar5007.tar.gz

and cd in to the directory
cd madwifi-nr-r3366+ar5007/

Build (make clean is usually not absolutely required)
sudo make clean
sudo make
sudo make install

and add the driver
sudo modprobe ath_pci

You should now get a connection with devices wifi0 and wlan0
sudo iwconfig

You may have to reboot, though. You may also want to add ath_pci to /etc/modules, so that it is loaded automatically at boot. If at a later time, for example, a kernel update breaks something, rebuild and reinstall.

2008-05-02

Acer Aspire 2920Z and Ubuntu 8.04 LTS : upgrade notes

As promised, here are my notes on upgrading my Laptop to Ubuntu 8.04 LTS.

The download and installation took some four hours over my "broadband" connection. The installation asked a few questions about replacing old files. As it provided diffs, it was possible to see the changes and whether it was necessary to overwrite the files or not. The only file that I was unsure about was alsa-base, which I did overwrite but only after I had made sure I had a backup copy of the old file, as I wasn't sure if the changes were all OK.

Then it was time to reboot. After the first reboot, when I logged in, Gnome was very sluggish to load. I suspected this was due to wireless network being down, so I connected LAN cable and rebooted. Then I rebooted a couple of times again for various reasons like boot process freezing. Then I logged in.

For some reason, in Gnome, my keyboard now produced Greek symbols! I changed the keyboard layout from generic to Acer laptop, which fixed the issue.

Next I discovered sudo was not working anymore either. To fix it I followed instructions give by JP-NYC here.

The sound still worked but the volume slider had no effect anymore on the internal speakers, only on line out. This was easily fixed from settings. Jack sensing was working, though. I couldn't get internal mic working despite considerable effort.

Wifi stopped working, naturally. I uninstalled and reinstalled the wireless driver from ndisgtk. After that I fiddled around with network settings turning things on and off. Finally, after about two hours, I got the network wireless working again. During this episode I noticed that often the problem with the wireless seems to be with the encryption. If you can afford to leave your wireless network without encryption for a second it may be easier to get the wireless working that way first and then add encryption. I'm still not convinced, though, that the wireless is working completely. It seems a bit flaky and slow to connect after reboots. But I'm usually able to connect to the Internet at least after a while. I've switched to roaming mode for now, as it enables easier reconnection to the network.

Drivers for Intel graphics cards have been updated. I turned on desktop effects and they now work even when displaying video. Nice. The X server was also updated. I also tried to get the TV-out working, but I had no success. Of course I spent way too much time adjusting Compiz settings to get every glare and animation right. I also switched from Gdesklets to Screenlets and spent a lot of time configuring them the way I like. I prefer Screenlets to Gdesklets as they tend to look more polished. And now Screenlets can be found with Synaptic and you don't have to install it yourself anymore.

Speaking about the programs I use for a while, Ubuntu 8.04 comes with Firefox 3 Beta 5. I mostly enjoy the changes they have made apart from some minor peeves. All in all Firefox 3 is a pleasant step forward. Pidgin IM has been updated and I do not like it. (Apparently at least some agree with me.) Eclipse, on the other hand, is still version 3.2 Callisto and not 3.3 Europa. This is unfortunate. Well, at least Netbeans has been updated to version 6.0, which I think is a huge improvement.

Suspend or hibernation do not work at the moment. I'll have a closer look later, but I do not expect any meaningful progress.

After a few days I noticed that some things were working less perfectly than before the upgrade. It seems that the internal speakers now sometimes produce an odd "crackling" noise when playing a short loud sample like instant messaging notifications. Also it seems that some samples are left unplayed if I'm playing music at the same time. Also, now after reboot I have to login twice, as the first login always fails. (It goes something like this.) And of course the problems with WLAN annoy the living daylight out of me.

In my earlier post, which was a wish list for Hardy, I mentioned three things which I especially wanted to get working: suspend, sound and Compiz. The first one I didn't get, the second one I got only partially with some setbacks and the third one is working now very nicely. All in all I do not yet see enough benefits to justify this upgrade. Maybe later if they get the bugs sorted out. Next I will be still looking for that suspend fix and now also for better wireless drivers, as ndiswrapper is hardly ideal.