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.

2008-04-26

Hardy is here!

Oh, joy!

As Linux enthusiasts may already know, Ubuntu 8.04 LTS (code name Hardy Heron) was released this week. I've already earlier installed the development version on several normal desktop machines without any major issues. Now that it has been released officially, I'll also be upgrading my Acer 2920Z laptop shortly. I'll write about the results here later.

2008-02-13

Nokia 9500, MMC-cards and Canon Smartbase MCP190

Since my last post I've had a chance to test a couple of pieces of hardware with my Acer 2920Z laptop and Ubuntu 7.10. Here are my notes.

First of all, the Nokia 9500 Communicator, which I tried connecting with the Nokia USB cable. Nothing happened. I also tried Wammu and KMobiletools, which did not recognise the phone. The phone shows up on lsusb listing, though. Apparently some have had better luck with Bluetooth or infra red connection.

Then, the 128 MB MMC card which was from the Nokia phone and which I inserted in the internal card reader in my laptop. Nothing happened. A "Generic- Multi-Card" listing which shows up in Gnome file manager apparently means nothing.

And finally, the Canon Smartbase MPC190 printer with an internal scanner. The printer is broken but the scanner works with Windows. I was eager to see if I was able to scan something in Linux. I plugged it in and tried various things I found from the Internet. Nothing happened.

So, there you go. 0 out of 3.

I obtained these machines for free, so I didn't pay for anything I didn't want. Therefore I'm not too annoyed. But still it is sad to see how poor the driver support from big corporations still is. Canon is notorious for it's poor Linux support. I wouldn't buy anything from them, when at the same time HP is making open drivers and even some other cool Open Source contributions. Way to go HP, I know where I'll be spending my money next time I need a printer!

But Nokia... makes me really sad. I've been buying Nokia phones solely for several years. And what I'm about to say is almost considered treason in my home country. Nokia isn't doing so great, not at least on the Open Source front. Surely it is not too much to ask that their phone would be accessible from other OS's. But even their closed source Windows connectivity suite is pretty horrible. Sure, they have done some cool stuff with open tablet software, for example. Still, (unfortunately) I'm really rooting for Google's Android nowadays. Google seems to be showing Nokia how things should be done. At the same time, Nokia keeps shunning open formats on many fronts. Nokia's recent acquisition of Trolltech raisesy questions about Nokia's motives with not enough answers. And all this might mean that my days of buying Nokia phones only are over.

And, as far as the internal card reader in my laptop is concerned, I hope i get it working sooner or later. If anyone reading this has any suggestions I would be happy to hear them.

2007-12-30

Update on sound and power saving

In an earlier post I wrote about the problems I had with sound in Ubuntu on my laptop. Well, "Henning" commented on it and suggested installing latest development snapshot of Alsa drivers, which I did. I then modified the option line I had added earlier to /etc/modprobe.d/alsa-base to "options snd-hda-intel model=acer". Now jack sensing and recording via the microphone jack work fine! No luck with the internal microphone, though. I'm not sure if I haven't just found the right settings or if it's not supported yet.

Henning also suggested this nice website lesswatts.org and the program powertop, which I promptly installed from Synaptic. I'll have a closer look at it when I get the time.

PS. I would like to thank those who have commented on my earlier post. If you have anything to add I hope I hear from you. Especially if you have any suggestions on how to get suspend to work.

Update 2008-04-26: ChrisSavery wrote a couple of interesting comments to this post about the built-in mic. I was unable to get it working, but perhaps someone else can give further advice?

2007-12-19

My sound just died

I just installed an official kernel security update vie Ubuntu update feature, rebooted and when my system was back up I had no sound. Nice.

This may have been due to the fact that I have manually installed newer Alsa to get the sound working. Well, I recompiled the drivers and rebooted. Now I have sound again. I know it isn't easy to support hardware, especially when it's new or you have to reverse-engineer it. And I certainly don't now what is the case with my sound drivers. Still, it would be nice if the end user didn't have to recompile drivers, ever.

2007-12-13

Ubuntu Hardy: what I want to see

The next Ubuntu edition, codenamed "Hardy Heron" is coming out next spring. It is a so called Long Term Support edition. From my point of view, when I evaluate my experiences with my new Acer laptop, this is what I'm hoping to see. This is mainly stuff that isn't up to the developers of Ubuntu but to the developers upstream who make the drivers and such. I'm just hoping new versions make it to Hardy.
  • Working suspend. ACPI-support is a mess. I think there are at least some improvements planned, I really hope they fix the issues I'm having.
  • Updated sound drivers. I have actually already tried some updated ALSA drivers, which did fix some of my problems. The rest, maybe later.
  • Compiz and graphics drivers. There will be a new version of X11 in Hardy and with that some new graphics drivers from Intel. This may or may not fix some of the issues I had with Compiz.
It seems that my problems are common so there is at least some hope of getting them (partially) addressed. As it is often the case, Linux support for new hardware improves gradually in time. It can sometimes be hard to support hardware when the manufacturer releases only Windows binary drivers. So I'm waiting patiently.