Archive for May, 2007

Installing Ubuntu 7.04 on a HP 510 laptop computer

May 26, 2007

I’ve just finished installing Ubuntu on the HP 510 laptop. It’s a very cheap machine – I got it for 4000 NOK (I believe it’s priced around 400$ in the US).

Installing off the Live CD, I was a bit annoyed that Ubuntu couldn’t resize the existing XP partitions, but considering that they are NTFS I shouldn’t be surprised, I guess. Being able to dualboot isn’t that important for this machine, so I used the entire disk for Ubuntu.

The out of the box-install has a few problems, namely:

– The display runs at 1024×768 and not 1280×800
– The trackpad doesn’t work
– The WiFi apparently doesn’t work

I found this solution at this website: Alik’s site on how to fix the issue with Ubuntu 6.10 and a HP 500 laptop. I found that I could skip a step from his howto, so that I only needed to do the following on the command line:

Update the software:

sudo aptitude update

Install 915resolution utility:

sudo aptitude install 915resolution

after installation is finished, you need to set 915resolution tool:

sudo gedit /etc/default/915resolution

Change the following values in the file:


Save the file, close the program and reboot the computer. The resolution should be the correct one.

These instructions are also from Alik’s site on how to fix the issue with Ubuntu 6.10 and a HP 500 laptop (well done, mate!).
To fix this, we have to download the latest kernel source code, make a tiny change in it, and compile a new kernel. (This sounds scary, but is actually easy, although more time-consuming than I would have thought.)

First, get the kernel source:
sudo aptitude install linux-source-[you get latest source code using TAB key]

The version I got was 2.6.20.
Now, we want to unzip (untar) it.

cd /usr/src/
sudo tar -xvjf linux-source-[your kernel version]

After this command you will have source codes in /usr/src/linux-source-[your kernel version] directory. We will now make a small change in the source code of the keyboard/mouse driver.

sudo gedit linux-source-2.6.17/drivers/input/serio/i8042.c

In the 2.6.20 source, the line you will add is at line 576. If you get a newer kernel, the function we are changing might have moved/changed slightly. Search the file for i8042_check_aux(void) if you can’t see it. Make an empty line and write

return 0;

See the screenshot if you are uncertain:

Screenshot of the kernel function

Now we have to get all the software we need to compile a kernel. Run the following commands:

sudo aptitude install build-essential
sudo aptitude install bin86
sudo aptitude install kernel-package
sudo aptitude install gcc
sudo aptitude install gcc-3.4
sudo aptitude install libncurses5
sudo aptitude install libncurses5-dev
sudo aptitude install libqt3-headers
sudo aptitude install libqt3-mt-dev

Now, we want to move into the directory where the kernel is untar/unzipped to, and start making it.

cd linux-source-[your kernel version]

sudo make xconfig

Alik has some suggestions to changes you can make in the QCONF graphical tool. These can be found in the Processor type and features section, and are:

disable Symmetric multi-processor support
select Pentium M processor family
disable Generic x86 support
enable Local APIC support on uniprocessors
enable IO-APIC suport on uniprocessor
disable Toshiba + Dell laptop support
disable Enable X86 board specific fixups for reboot
disable /dev/cpu/microcode – Intel IA32 CPU
Hight memory support – set to OFF
set Timer frequency to 1000Hz
disable kexec system call

Select Save from the File menu and quit QCONF.
Now we can make the kernel:

sudo make-kpkg clean
sudo make-kpkg --initrd --stem linux --revision=hp510.1.0 kernel_image

This will take quite a while. I didn’t pay too much attention while it compiled, but I think it took at least 10 -15 minutes.
Then, we have to decompress the kernel, so that it will be found at boot (the linux-image name below will vary depending on the kernel version you are using):

cd ..
sudo dpkg -i linux-image-
sudo reboot

When rebooting and entering the GRUB boot menu, you will notice that you have a new choice, ending with -ubuntu1. This was automatically selected for me. The trackpad should now work.

Note: Fixing this by modifying the kernel obviously means that a new kernel might re-introduce the problem. Unless the new kernel fixes the underlying issue (which we are merely avoiding by exiting this function), we will have to modify the kernel again. Thus, this is not an ideal solution. Béranger pointed this out and suggested to pass the i8042.noaux parameter to the kernel instead; unfortunately, I wasn’t able to make this work.

There are two different issues causing WiFi problems. First, the DHCP appears to be not working, so the IP address must be set manually. This can be done in the System -> Administration -> Network window. Double-click on the WiFi connection, enter the password and add an appropriate IP address (ie, if the IP address of your router is, you could use and set as the gateway address).

The second is that after creating a new kernel (above), the new kernel cannot find the firmware required by the WiFi card. The kernel goes looking for it in /lib/firmware/[kernel-name]. Thus, we create a symlink from the new kernel name to the firmware we already have (in the old kernel’s FW directory).

cd /lib/firmware
ln -s 2.6.20-8-generic 2.6.20-ubuntu1hp510

The second part of the last command must correspond to your kernel name and version. If you have kernel 2.6.21, that should be reflected.

A big, big, big thank you to Alki and his website on the HP 500 and Ubuntu 6.10 as well as the people on this thread on the trackpad, wifi and resolution issues over at the Ubuntu forums. Also, thanks to Hexen for the extra googleability. It is a pity that we still do not have complete out of the box functionality, but thanks to the community, it is possible to get pretty close to 100% when you put in some work :)

PS: Here is a short review of the HP 510.


Why I am dumping Windows Vista in favour of Windows XP on my gaming PC

May 24, 2007

(Just to get that out of the way – the only reason I use Windows on my gaming PC is that most of the games I play are only fully compatible with Windows.)

In January, I installed Windows Vista Business Edition on my AMD64 3200+ PC with 2 gigs of RAM, an Abit KN8-SLI motherboard and a Nvidia 7950 graphics card. Yesterday, I deleted it and installed XP instead. Why?

– XP is faster. In general operation, I sometimes found Vista to be sluggish. Not so with XP.

XP uses less system resources for itself. Meaning that games are faster on it.

– XP is more stable. I have experienced 5-10 bluescreens over the last months – before installing Vista, I hadn’t seen a bluescreen in a long time. Also, explorer.exe has been using 100% CPU from time to time, requiring me to kill it. Of course, the reason for this could be immature drivers, and not inherent flaws of Vista. That doesn’t make a difference to me, however.

– The interface feels less cluttered. I haven’t exactly been counting GUI elements – this is obviously a matter of opinion. I think the new control panel is a mess, I don’t like the Windows implementation of widgets, and I’m not very impressed by the search functionality. Having used Google Desktop Search on my Mac for a while, I’m inclined to believe that using that on XP will be just as effective.

– There’s no need to turn off as much annoying security, since there’s less of it in the first place. This might be less of an issue for Grandma, who might like the extra security, but then Grandma should run Linux or OS X, and not XP or Vista.

– Also, as mentioned in a previous post, I had issues making BF2 work under Vista. There could be a different explaination for this, for instance that I made some weird mistake during the patching process, but I doubt it. BF2 is even helpful enough to state in the installation that the game has only been tested on Win XP/32bit.

If you’re getting a new computer, I would seriously consider sticking with XP. Have a look at the new interface in Vista, and see if there are things there you cannot live without (I doubt it – and there are plenty of equivalent third-party addons, like Konfabulator and Google Desktop Search). If the main thing you do is gaming, and you have a DX10 compatible graphics card you want to fully exploit, Microsoft is forcing us to upgrade; there’s not much to do about that. I have a DX9 card, however, and that makes XP a superior choice for gaming.

And if you aren’t using your PC for gaming, you should try Linux or OS X instead of Windows. There are really no good reasons to stick with XP over OS X for everyday tasks, perhaps save one – if you are using your OS for computing-intensive tasks, like numbers crunching, and the software you need is not available on the Mac. You can easily run Windows software through virtualization solutions like Parallels, but the overhead might make it too painful if you really need every ounce of performance.

In conclusion, I feel Windows XP service pack 2 is the pinnacle of the Microsoft OS. It is pretty fast, stable, overall quite useable and secure if the user is really careful (which, of course, means that it is pretty unsafe ;) ). The shinier gloss Vista is introducing does not outweigh the negatives for me, especially when OS X Tiger is so much better-looking, more enjoyable to use and more stable.

“Your CD key is not valid” – Battlefield 2 woes! [updated]

May 20, 2007

Right now I am seriously pissed off about EA, DICE and Battlefield 2. I installed the game under Windows Vista a few months back, but when trying to join a server, I was informed that “Your CD key is not valid”.

Update 24/05/07: Guess what? I installed Windows XP, went through the exact same troubleshooting as described below, and now the game works. It could be that the cause is something else, but it looks like a real possibility to me that there is a problem with Vista compatability and BF2. EAs techie did not mention Vista as a possible problem factor, so apparently, if Vista is the problem they are not aware of it. It would be great if you can post your experience below if you too have this problem.

Update 27/04/09: Guess what?! A friend of mine had this exact same problem – then managed to get around it by right-clicking Battlefield 2.exe and choosing “Run as administrator”. Haha!

Today I took the time to go and have a look at EA’s support site. It has two search functions on the front page, one of which does not work at all. The other one lead me to a page of frequent BF2 issues, and I found a few pages relevant to my problem.

The page told me to reinstall BF2 – so I uninstalled the game, and started the installation. At the end, Vista had a blue screen – I don’t know why. I thought it might be related to the DirectX 9.0c update program, but when I tried the installation again, it went fine.

I was instructed to install first BF2, then Special Forces, and then the patch. The not-so-helpful EA installer told me I did not have enough space for Special Forces on the first go, although I had 2,5 gb free. It did not specify how much I needed, but freed up more space, and the installation got going.

Having completed it, I started installing the patch. Of course, EAs patch installer requires you to have 2400 mb free on the drive (I figure that means the C drive – I was installing on the D drive, but that doesn’t make a difference). Although I had 2,7 gb free, the installer refused to do its work – so I had to free up more space.

All this took quite some time, as you can imagine. So I became angry when I completed the procedure, logged in to my BF2 account, tried to join a server, and… “Your CD key is not valid”.

EA / DICE: I am staying away from your games from now on. Bugs and these patching problems is a big part of the reason why I didn’t get BF 2142 or the “booster packs” for BF2, and you’ll have quite a challenge getting me back as a customer ever again. As a start, I hope you’ll do whatever it takes to “validate” my CD key, so I can play BF2.

And, finally, as a software developer, I have to say you should be ashamed of the amateurish installers/patchers you force upon your customers. When it would be a lot easier if you just released every patch as a zip file and let users fix things themselves… that’s when you know you have problems.

Transmission: A fantastic Mac OS X torrenting application

May 10, 2007

I was actually trying to donate some money to the people behind Transmission, a fabulous BitTorrent client for OS X, but it seems they are not accepting donations.

Therefore, my respect and recommendations will have to suffice, at least until they start accepting donations. Transmission is very elegant, designed exactly like an OS X application should be – it is one of those applications that improves the aesthetics of your system. The interface is very, very clean. This is the first torrenting client I have tried where I have found every option I need without searching for it – where should the download go, which port is open and what are the download caps. And more.

On top of this, it uses a very small amount of system resources.

Bottom line – if you have a Mac, if you download stuff using the bittorrent protocol, you should try Transmission. Now!