Showing posts with label Atheros. AR5007. Show all posts
Showing posts with label Atheros. AR5007. Show all posts

Thursday, April 2, 2009

Acer Aspire One, Ath5k, and Ubuntu 9.04



In my last post about the Acer Aspire One (AA1) and Ubuntu 9.04, I mentioned that everything was working in Ath5k land. In retrospect, that post did gloss over a few details, so I thought I'd put up a special AA1 / Ubuntu 9.04 / Ath5k post to clarify a few things.

First off, in a fresh install, it probably just works. Maybe. Maybe not. I have not tried it yet. The AA1 I have started as Alpha 6, and has been doing near daily dist-upgrades to pick up new service along the way. As it pertains to the Ath5k module, new kernels and kernel modules. 2.6.28.11.14 is where I am at right now on the AA1. I saw a new kernel come down on a different test box earlier today, so I need to update again.

Previously on the AA1, under Mint, I was using ndiswrapper to get the wireless going, and when I first got the Ath5k stuff going there were a few tricks to it. First, I had to turn *off* ndiswrapper of course. That was easy: I have installed ndisgtk, so in the GUI, I just removed the driver. Same thing as 'sudo ndiswrapper -r net5416' at at command line

At that point, I could *not* see the wireless any more. This is because of the module 'acer_wmi'. The only problem acer_wmi causes on the AA1 is in the ability of Linux to see the Ath5k... but that is bad enough. A netbook without WIFI is not doing what it is supposed to be doing.

If you read through that bug, it says that the very latest kernel has the patch required to fix this rfkill issue. Will try and update this in a bit.

In the meantime: Simple solution is to blacklist it in /etc/modprobe.d. One line file:

steve@kara:/etc/modprobe.d$ more blacklist-acer-wmi
blacklist acer_wmi

You could also just rmmod acer_wmi, and then 'modprobe ath5k' but blacklisting makes acer_wmi stay out between boots.

Ubuntu 9.04 with ath5k on the AA1 is a lovely thing. Wifi recovers from standby without any issues so far. Under Mint/ndiswrapper about 1 out of every 10 time the WIFI would go away some place, and require severe measures to get it back. It also seems to be faster finding and syncing with WAP's now.

Update


It's working. Mostly

I did an 'sudo apt-get update | sudo apt-get -y dist-upgrade' and a new kernel came down: 2.6.28-11.39. if you were to look with 'uname -a' you'd think this was the same kernel, since uname drops the '.39'. Have to do a 'dpkg -l | grep -i 2.6.28-11' or something similar to see what is installed. I then erased my blacklist of the acer_wmi in /etc/modprobe.d (see above)

After the service I rebooted, and it still did not work. I manually did a 'modprobe ath5k', and it started working. puzzled, I looked in /etc/modprobe.d and wondered if the ndiswrapper file there was interfering. I did not put it there: Pretty sure it was created when I installed ndiswrapper. I deleted it (sudo delete /etc/modprobe.d/ndiswrapper) and rebooted.

Instant success. Even see the hidden wireless where I am right now.

The wireless blinking LED is not lit though. Not sure why, and don't really care right now. That is a problem for another day. I am just happy to have the Acer_wmi loading so I can see if that makes a difference in how much the fan runs.

Thursday, January 1, 2009

Ubuntu 8.10, DOSBOX, and the single HP dv9000.

It would be fair to say that my dad is an intimidating person. Not because he is 6'3", an athlete, or any of those things. Because (to my way of thinking) he is brilliant. Rachel Maddow Brilliant, but without the liberal side. He is technically intimidating. He has 22 patents, and has filed for another 10. Normally I could care less about such a thing, but his are non-obvious patents, and deserve the protection of a patent and the patent system. His are the reason that there even is a patent system. He is not trying patent goofy things like mouse clicks on menu items but very technical stuff, like how much microwave energy, and what kind of antenna (size, shape, power) is required to fuse moon dust to a particular depth.

I knew growing up that I was never going to equal my dad in technical accomplishment. It was not something that made me sad or anything. I was always too much a mix of my parents (Mom being a Nurse, and very brilliant as well) to ever be one or the other. Mix the two and you get a Linux / Open Source person, more or less.

Over the holidays I was at Dad's house and I came to ask him about some programs he had written and how they were backed up. It turned out that the following was true:

  1. Dad had a series of engineering programs
  2. The programs were in VBDOS
  3. VBDOS barely worked in Windows 2000, less well in Windows XP, and not at all in Vista.
Visual Basic has left DOS way behind, but VBDOS did everything Dad needed it to do. Why waste time learning the new program, and all its goofy new things. VBDOS worked. VBDOS was a tool. A means to an end. Visual Basic 6 offers nothing that VBDOS did not, at least as far as Dads programs are concerned. Dad needs to know that then X amount of power is applied via an antenna of a particular design, how deep is the moonrock melted? Nothing in VB 6 adds to that. Taking time to learn the new programming paradigms of GUI based VB is time taken away from pursueing the knowledge.

Enter DOSBOX. http://www.dosbox.com/

With DOSBOX (and probably but not tested, DOSEMU), VBDOS lives on.

The Acer Apsire One

While at my dads house over the holidays, I asked him how the project to keep VBDOS running was going, and how he backed up his programs. The answer was that his program directory from his Windows 2000 computer was copied to a Windows XP computer, and a new Windows Vista HP laptop, and a USB fob. With XP the VBDOS programs ran but did not print. With Vista, they were just dead.

I asked for the fob. I copied them to my Acer Aspire One (because, is not the point of having the AAO that you always have it with you?). I then installed DOSBOX, and read the install info for it quickly. Mounting Dads programs in DOSBOX, they ran at once, without issue, and were printable. Editable screen shots via GIMP even.

I have never tried to convert my Dad to Linux. He has always run Windows, and while I have rebuilt his computers a few times when they were infected with things, in general it seemed wrong to try and get Dad to convert. He is much smarter than me, and an engineer par excellence. If MS Windows works for him, then there is no need to convert him.

I had watched the VBDOS stuff over the years and had wondered is MS was going to maintain their compatibility... and while I doubted it, there was no need to talk about it as long as it worked.

The HP dv9000 changed all that.

Dad bought the dv9000 with Vista Home Premium. He had no choice in that matter, or at least he thought. Vista worked for email, and Flock worked for browsing (Dad knows better than to use IE) but his VBDOS programs were busted. Dead flat broken. VBDOS had left the building. It was an Ex-programming language. 20,000 volts would would not revive it.

Dad saw the Acer running the programs. He asked if his HP dv9000 laptop could do the same. 20,000 volts: No. Linux / DOSBOX? Yes.

The DV9000 was new: less than 3 months old. It had a AMD Turion 2.1 Ghz dual core 64 bit processor, and an Atheros 5007 chipset for wireless. The latter bit was the same as the Acer Aspire One. I said it probably would work and was put to the test two days later when I came back over to install it.

dv9000

The HP dv9000 has a 1440x1024 screen, a ton of USB slots, an NVIDIA graphics card, and other fun things. I looked it over and decided to try Ubuntu 8.10 as my first pass. All Dad needed was DOSBOX, but I wanted it all to work. I was going to set it up as dual boot Ubuntu 8.10 / Vista, but I wanted Ubuntu to be all Dad ever needed. Mint 6 was also an option, but I was worried that it might barf on the recent hardware. In my recent experience, Ubuntu had done better than Mint on new hardware.

According to things I found on the Internet, the dv9000 used to have, in older configurations, Broadcom wireless cards. HP has recently embraced Linux though, and it appears that part of that is using Linux friendly gear like Atheros. Or maybe it just worked out that way. Maybe Atheros was just the less expensive card at the time this dv9000 was built. Worked for me either way. Broadcom cards can be made to work under Linux, but Atheros had open sourced their HAL, and I like to support companies that support Linux / Open Source.

The good and the bad of the hardware support of Ubunti 8.10 for the HP dv9000 ultimately came down to the 802.11 card. Once installed, Ubuntu was not happy with the Atheros card. When I used the hardware managers and *disabled* Atheros support, all was well. I had to do the exact same thing on the Acer Aspire One.

I ran the Ubunut upgrades. The Atheros support crapped out. Same as the Acer Aspire One. It appears to me that it all worked out this way:

  1. Linux reverse engineered the HAL for Atheros cards, and they worked.
  2. Atheros released the specs for the HAL and the firmware of their cards.
  3. The MADWIFI project released a bad series of drivers for Atheros cards... based on the newly Opened drivers and HAL. Go figure.
It may be more complicated that that. That is just what it looked like out in end-user land. It matters not for this project: I have documented getting the Atheros cards going via NDIS in one post and via the new native drivers in another post.

Installing Ubuntu 8.10 was not hard, although it was confusing a bit at times. The dv9000 had two partitions as it arrived from HP: SDA1 was Vista, and SDA2 was the recovery partition. 52 GB and 10 GB used in total and respectively. 160 Gb hard drive. Plenty of room.

I had Ubuntu shrink SDA1 from about 148 GB down to 72 GB. With 52 GB in use, that left 20 GB for growth. I left SDA2 alone: 12 GB with 10 Gb in use. Here we hit an oddity of the installer. It looked stuck. Like nothing was happening during the resize. I popped open a terminal, and started 'top', and could see 'ntfsresize' was hopping all over the place. It was clearly doing things, and was not stuck. The on screen graphic progress bar just had no insight into what it was doing.

I inserted a new SDA2 and SDA3: SDA2 was '/' and was 10 GB. SDA3 was '/home' and was about 62 GB. SDA 2 of old became SDA4 of new, but was not re-sized or moved. SDA4 (The Vista recovery partition) lives at the end of the disk.

GRUB thought the SDA1 and SDA4 were both Vista partitions, so as a post-install step I went into /boot/grub/menu.1st and made SDA1 Vista and SDA4 Vista Recovery. Just labels, but important. I booted both to be sure that they still worked.

I booted Ubuntu and applied all the service, and installed a few more programs like Avahi, Macutils, HFS support, Sensors/hddtemp, and set up monitors in the Gnome taskbar for system speed and temp. I like to watch that kind of thing, and I was very interested in having it on this computer so I could watch it while the VBDOS programs were running.

This was the first computer I have ever set up without a swap partition. Another reason for having all the system status stuff enabled on the task bar was to watch memory usage. With 3GB of RAM, and the primary mission being to run 16 bit VBDOS programs, I did not think that it would ever have memory issues. It was just a theory though, and I wanted to be able to watch it. So far, so good.

DOSBOX

Once everything was up and running and all the service has been installed I installed DOSBOX using Synaptic. Nothing major or weird there. Then I copied Dad's programs into his home directory from the USB fob. They were put into a new subdirectory called 'vbdosprograms'. Next I started DOSBOX (from "Applications / Games"), and mounted the programs to the 'C' drive:

mount c ~/vbdosprograms
c:

'alt-enter' toggles DOSBOX to full screen and when running like that it looks just like a DOS computer of old.

The rest, as they say, is history. It all worked, and better than than it ever had under XP. Screen caps with Fn-PrtScrn worked like a champ. GIMP could edit those to whatever was required. They could be saved in whichever directory made sense from that point on.

From a technical point of view, this capability exceeds anything Dad has ever had before. He can now run on the latest, fastest hardware, and has far more control over the results. He now also has Linux support. It is not that I did not support him on MS Windows. It is just that for me MS Windows is just another computer platform and I often have to sit a mess with it to figure out why it is broken, whereas Linux is something I know fairly well.