Sunday, September 28, 2008

EEEPC: Going back to Xandros

So I have been living on the bleeding edge for a while, running the latest and greatest code that Ubuntu has to offer. That being said there are some nasty problems trying to run Ubuntu Intrepid on the eee PC 701 series. Here are the problems I had.
  • No hotkeys - None of my hotkeys worked. That means that I couldn't use the Fn+Key combos to enable/disable wireless, control volume, or suspend. Brightness hotkeys worked fine.
  • No suspend feature - What I thought was a hotkey problem was actually a suspend to disk issue. It seems that owners of the 900/901/1000 series of eee PC are not complaining. The new eeepc_laptop driver works just fine for them. But for a 701 owner, you are out of luck. From what I see, only one or two coders are looking at this under the Red Hat Linux team. Will the change make it into the Ubuntu branch any time soon? Probably not.
  • New wireless driver - The good news is that Intrepid provides the new Ath5k driver for wireless. This will replace the madwifi driver which Ubuntu use. But upon loading the OS my wireless didn't work because it was using ... an old madwifi driver. What the hell? After disabling the "vendor specific" driver and rebooting the ath5k came to life. It worked FAR better than the madwifi drivers I had been using. Now I was able to pick up distant networks, but the strength or quality was still not accurate.

Rather than continue to bitch about how this new stuff doesn't work I thought I could try the OS that this laptop shipped with. I only gave it about 10 minutes of my time when I unboxed it, and it worked just fine if I remember right. So I drug out the restore DVD and created a restore USB drive installer. Then just minutes later I was running the default OS ... an outdated copy of Xandros Linux.

There's a lot to like with this OS. It's very small providing you with lots of free space when the installation is complete. It comes with everything you need (or almost everything). The wireless driver works VERY well. Of course, all of the hotkeys work so you can suspend it and bring it out of sleep easily. It boots on a dime!

Now the complaints: it took FOREVER to update. And after I bricked it for the third time in a single day trying to install Firefox I decided to find a work-around. The eee PC (like any other Debian Linux install) stores it's downloaded .deb packages in /var/cache/apt/archives/. So I ran through the process of installing all the updates and then copied everything in /var/cache/apt/archives/ to a directory on my SD card. Then, the next time I reinstalled I just linked all those deb packages to the directory where the OS looks for them. It looked like this: ln -s /media/D:/updates/*.deb /var/cache/apt/archives/. The result is when you install an update, it's instantaneous.

Then I went to install the overclock module that I love so dearly which gives you a full 100Mhz of power on your FSB. But there was a problem ... nobody has compiled it for the Xandros installation. Long story short I found that a French fellow had provided a patch to make the code compile cleanly. I was able to compile it, and I have made it available. So if you are running Xandros, and you want the eeepc-linux module you can grab it here ...

I should note that I have not needed that module too much, as the Xandros install runs pretty well without it!

My only other chief complaint is that the version of Firefox which comes with Xandros is really old 2.0.1). I have found several different threads on installing Firefox on your Xandros install, the most notable being one written back when version 3 was in BETA. Typically you can just download Firefox and extract it to a directory. But that doesn't work for the eee PC because Xandros is using GTK 2.8 and Firefox 3 requres version 2.10. One solution was to install the newer GTK 2.10 library and a slew of other packages that went with it. I was a little uneasy about mixing and matching new and old libraries together. But I tried it anyway. The result was an inoperable browser and an unstable operating system. Reload!

Then I found that another user had been successful in downloading the newer libraries but not installing them. Instead he had extracted them to a directory and then modified the Firefox startup script to point to that directory. This makes far more sense to me, and I gave it a shot. In no time I was running Firefox 3.0.1 without any problems. But I was all ready out of date. The newest is 3.0.3. Good news, that worked too. I decided I would write a script to quicken the process of installation which I will share with you now:

mkdir /home/user/firefox303
cd /home/user/firefox303
dpkg-deb -x libgtk2.0-0_2.10.13-2~bpo.1_i386.deb gtk2-10
wget ""
tar -xjf firefox-3.0.3.tar.bz2
cd /home/user/firefox303/firefox/
sed "2i\\
export LD_LIBRARY_PATH="/home/user/firefox303/gtk2-10/usr/lib"" /home/user/firefox303/firefox/firefox > /home/user/firefox303/firefox/eeefirefox
cp /home/user/firefox303/firefox/firefox-bin /home/user/firefox303/firefox/eeefirefox-bin
ln -s /home/user/firefox303/firefox/eeefirefox /home/user/runfirefox303
chmod 755 /home/user/firefox303/firefox/firefox-bin /home/user/firefox303/firefox/eeefirefox-bin /home/user/runfirefox303
wget ""
tar -xzf install_flash_player_9_linux.tar.gz -C /home/user/firefox303/
ln -s /home/user/firefox303/install_flash_player_9_linux/ /home/user/firefox303/firefox/plugins/

Here is the play-by-play. A directory is created in your home directory called firefox303. Then we download GTK version 2.10 and extract it there (NOT install it). Then we download Firefox 3.0.3 and extract it to /home/user/firefox303/firefox. Next we use 'sed' to insert a line into the script which starts Firefox. This line tells Firefox where to find the GTK library files and will prevent the error you would otherwise get. Notice that we call the new file eeefirefox. Because that file name becomes a working variable, we also need to habe "eeefirefox-bin" file which I created through a copy process (a symbolic link would have probably worked too). Next I created a symbolic link so that the user ends up with an executable script in the root of their home directory called "runfirefox303". Lastly the script grabs the latest version of Adobe Flash Player and installs it for you (because everybody needs it).

I also shared this script with the eee PC community here:

Now you would think I would get some kudo's for my work on this project, but I've got nothing but crap from the user base. I'm not going to troll my own threads, but I will use my Blog to vent a little bit here.

Well, the other method worked fine for me! - Oh good. Because I spent several hours trying to make it and ended up reloading four times. Which is why I took the time to put this new method together. By the way, to "make it work" you totally tainted your system when you *INSTALLED* the newer GTK libraries to Xandros.
I didn't taint my system - Yes you did. When you start downloading packages that were built for a different version of Debian Linux you have tainted your install. You are driving full speed into dependency hell. Especially when you want to compile something new and you need those dev libraries.
I didn't taint anything, it still works - You tainted it. See the above.
No I didn't - Yes you did! Get out of my head!
I get a message telling me that GTK has to be 2.10 - You have to run the link that was left conveniently in your home directory. It's called runfirefox303. Vote Palin/McCain in 2008!
I have to start this from a terminal every time? - You could link a button to the startup script. It's not that difficult. Like foreign policy. Simple stuff.
Why didn't you make a package? - Because these all ready are packages, which I am hacking together to make work. I'm not going to re-package other peoples packages. I'm pretty sure that violates the terms of use from Mozilla any way.
Firefox 3.0.3 locks up! - What do I look like, the application developer? Report that shit to Mozilla. I have found some bugs too and I'm not talking about this hacked-together crap I'm pulling. It crashes in Windows too. That just gives us something to look forward to in Firefox 3.0.4! :-)

Okay, okay. That's enough user abuse for one day.

Saturday, September 13, 2008

EEE PC: Speed boost with modern kernels

If you are at all like me, you are probably not satisfied with the 70mhz "front side bus" speed of your eee PC 701 (2G/4G Surf). These has long been a module available which you can install to control the fsb speed and crank it from the default 70mhz to the full 100mhz. The difference is noticeable *immediately*. Especially of you are running Firefox with a streaming video (like YouTube clips).

Lately there has been a lot of talk about Ubuntu Intrepid. This is the next generation of Ubuntu, still currently in development. A week or so go I installed Intrepid and took it for a spin. While it seems to "work" on the eee PC there were still a few glitchy items. Such as, the Atheros WiFi nick is supported "out of the box". But for it to work, you have to disable the vendor specific driver that it chooses as a default. The new WiFi driver of choice is "ath5k". This is replacing what will soon be the deprecated madwifi driver. I must say, this new WiFi drive alone was worth the upgrade. But what about that eee.ko module for my higher bus speeds?

First, know that the code for the FSB speed boost is completely experimental. The author of the code warns that overclocking can cause undesired performance (such as freezing) and could also overheat your system. For that matter, the same code can be used to control the speed of the one and only system fan. Bottom line: do not slow it down!

You can get the code here:

If you are running the 2.6.27-2 kernel aka the 2.6.27-2-generic you will have issues. I did some digging and found this discussion taking place in a bug report. It seems that you can compile the module by changing all occurences of "&proc_root" with "NULL". I went through these steps and was able to compile the driver cleanly. If you would like to just download my module for the 2.6.27-2 kernel, you can grab it here. Or, to read the conversation I had with other folks in the eee User forums, you can check this out.

But then yesterday I ran an update check and saw that there was a new kernel released. I just had to have it since I am living on the bleeding edge of technology. Of course, I had some concerns about being able to compile my front side bus hack again. And as it turns out, I was justified in my paranoia. With the new kernel installed (and my 4G of flash practically gone) I was not able to compile the eee.ko module. Piss!

Now this kept me up a bit late last night, but I was able to get it to work. When compiling, I was being told that I was missing an include file called "bounds.h". It seems that this is only generated when you actually build a kernel. Now, this is usually included with your kernel-headers package because they know you need it to build a few things. Why was it left out? It must have been an oversight. After all, this is all experimental.

In an effort to generate that bounds.h file I downloaded the kernel source, ran a "make mrproper", a "make oldconfig" and then a "make". Then I made my way off to bed. When I woke up ... my build had failed because my drive was out of space. Piss! But then I found that the one file I needed had been generated. Woo-hoo!

Now, if you came here for the eee.ko module built against the 2.6.27-3 kernel, aka the 2.6.27-3-generic kernel, you can grab it here. That archive includes the bounds.h file which is only about 10 lines long. I don't think anyone else has been crazy enough to mess around in this realm, butI shared my findings with the masses here.

Links of interest on this topic:
An old but still very useful Blog post about this driver

Sunday, September 07, 2008

Sunday War-Sitting

You can't really call it War-Driving when you are sitting in a Lay-Z-Boy with your favorite drink (generic grape Gatorade, aka "DRANK"). So this Sunday, I bring you the first War-Driving story in many moons. Here's the setup ...

This past week I started reading about the new Ubuntu Intrepid alpha releases which among other cool improvements contains the "ath5k" driver which is built right into the latest kernel, 2.6.27 (still in development). The new breed of ath5k driver supports the Atheros card used for the Asus eee PC (horay). So I have installed the latest Xubuntu to my eee PC 2G surf and I have al ready noticed some grand improvements in my WiFi strength. While the "quality" is still not at all accurate, I am now able to connect to distant access points which wouldn't even show up in my list before. Thank you ath5k developers, for saving me from lacking madwifi support. Now on with the show.

This morning I sat down and connected to a nearby school which I had previously only explored from my bedside using "Audrey II" (my old iBook). Installing Wireshark (from their network, thank you) I revealed some interesting packets. Namely ... these right here ...

There were half a dozen packets every thirty seconds or so in broadcast form (hence the destination address ending in .255). In the data portion of the packet was "SynchronEyes". Not having any idea what this was, I did some Googling about it. It ends up that this is some software which teachers can use to set up live exams for their kids. How hard could it possibly be to find a copy of this to download and use? I Googled: intitle:"index of" synchroneyes. The to search result was someones accidental mirror of what I was after.

For this, I went back to my home network and downloaded the software. I also took a copy of that activation key text file. That will come in handy. And while I am at it, I should figure out how I am going to run Windows software on my eee PC running Xubuntu. So I went into terminal and did a "sudo apt-get install wine". Next, I ran wine against the installer.

I opted not to install the Internet Explorer toolbar, thankyouverymuch.

Hooray, ready to launch.

Uh oh, why do you need an e-mail address? I'm not giving you that.

It says that it can't connect to the Internet and my registration is no good. That's fine, because it still opens and runs. With the teacher console I made some ill attempts to start connecting to things. My first attempt was to connect to that address that I first came across sending out the broadcast packets. Still watching with Wireshark I could see that it told me to get lost in the form of a "RST" packet.

Oh wait. I think I understand it now. This is a student looking for a teacher. Let's see what my packets look like when I go searching for "a class to join".

Oops. We're all students waiting for a class I guess.

So I did the obvious thing. I made myself a class and waited for the student to join me. No dice. In Wireshark I could see that the student workstation recognized me as a teacher, but would not automatically join the class I had just created.

This little software package could be a lot of fun if I were to join it during school hours. Then I could create duplicate classes and derail students. Or perhaps I could join as a student, and begin asking insulting questions of the teacher. But then I will be at work while school is in session ruining the possibility of any fun like that.

There is still a lot of network to explore here, but I don't expect I will spend much more time on it. For one, when this particular private network ID looked familiar I did some research on what I was connecting to. It ends up that this school is managed by my old employer who performs network monitoring and security services. When I worked there, I had many conversations with the admin of this network. He is over-stretched, over-worked, and most definitely under-paid. It would be well of me to inform him that he has an unsecured wireless network here which I am sure he is not aware of.

But I will send that e-mail later. I still want to explore a bit.