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
FIXING THE SCREEN RESOLUTION
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.
FIXING THE TRACKPAD
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.
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
See the screenshot if you are uncertain:
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):
sudo dpkg -i linux-image-18.104.22.168-ubuntu1_hp510.1.0_i386.deb
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.
FIXING THE WIFI
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 192.168.0.1, you could use 192.168.0.123 and set 192.168.0.1 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).
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 :)