|
Photos-> |
Linux on a Dell Latitude CPx LaptopLast updated June 10, 2006Update: Kubuntu Dapper (6.06)When the Dapper release came out in June, 2006, I did an upgrade by changing the word "breezy" to "dapper" in /etc/apt/sources.lst, then doing "apt-get update" and "apt-get dist-upgrade". This worked well. Suspend-to-ram usually works. I haven't yet figured out why it occasionally fails. Touchpad works fine, even after a resume. And no kernel patches were required at all.BackgroundTo while away the Christmas (2005) vacation time, I decided to install Kubuntu Linux 5.1 ("Breezy Badger") on my work laptop. The goal was to dual-boot Windows and Linux on this thing. Now, installing Linux on a laptop is an iffy proposition in 2005, unfortunately. Will my wireless card work? Will my CDROM work? Will I be able to suspend/resume? Will my touchpad work?The LaptopThe Dell Latitude CPx is a 500 MHz PIII machine, with a 10GB hard drive and 384 MB of RAM. It has modular CD-ROM and batteries. It's using a Dell PCMCIA Ethernet card and a Cisco wireless card. It's not a bad machine, but it's 6 years old, and has been toted to far-flung places in the globe. So far I've replaced the battery, the hard drive and the keyboard, all under the Dell service agreement with my company. I mostly use this laptop to carry to meetings and do work from home. It's been running Win2K for the last 6 years and it's about time for a change.This laptop will never be a 100% Linux machine, mainly because of the Nortel Contivity VPN client I need to use to get into our corporate network. Nortel does have a Linux driver for this VPN, but I spent many hours trying to get it to work and failing, mostly with kernel panics. This was on earlier kernel versions, so I should probably try it again with 2.6.12. One more VPN note: I've also set up a ppp/ssh tunnel from my office to my home server in the basement. This allows a fair bit of connectivity from any OS. About KubuntuKubuntu Linux is really just Ubuntu Linux with a KDE desktop installed by default instead of the Gnome desktop. It's based on Debian, so you get the excellent Debian package management tools. And the software repository for Ubuntu is kept up to date with just about everything you would want. It's a fairly friendly distribution without being condescending.PreppingThe 10GB hard drive was fairly full, so I scraped off all unnecessary Windows stuff, booted it up with a Knoppix live CD, and ran kparted. I resized the current NTFS partition to 5GB, added a 500MB FAT32 partition for shared data (safer than trying to use NTFS from Linux), a 500 MB swap partition, and filled the rest of the disk with an EXT3 partition for Linux. In the process of doing this, I discovered a fundamental property of disk partitions that I never really grasped before. You can have no more than 4 primary disk partitions. At this point I had 5 primary partitions (due to a tiny existing FAT16 partition that came with the drive) and couldn't format the EXT3 partition. The trick is the make the 4th partition an extended one, then you can add sub-partitions under the extended partition.I also found a trick for resizing EXT3 partitions. First, you need to use the 'tune2fs' utility to turn off journaling, effectively turning the EXT3 into an EXT2 partition. Use: tune2fs -O^has_journal <device>to turn journaling off. Then resize the EXT2 parition with Knoppix and kparted, and turn journaling back on with: tune2fs -Ohas_journal <device> InstallationThe Kubuntu install went smoothly. GRUB installed on the Master Boot Record, which Windows seems OK with.
Suspend/ResumeA laptop without some sort of suspend capability is worth little to me. In a pinch, hibernate-to-disk may be useful, but suspend-to-ram is clearly the best choice. It's sad that Windows and Mac users are almost guaranteed to have a working suspend right out of the box, and it's almost an afterthought in Linux. I used the KDE control panel to enable suspend when the laptop lid was closed. Now suspend/resume would generally work, but the touchpad wouldn't work after the resume. Very annoying. After a little Googling, I found a kernel patch for the ALPS touchpad to fix just this problem. The kernel patch didn't apply cleanly for some reason, so it required a little hand editingKernel rebuildsI reconfigured the kernel before building, starting with whatever .config was in the source tree. Ubuntu 5.10 comes with the 2.6.12 kernel. I grabbed the kernel source from the Ubuntu archives and then built and the kernel using:make-kpkg --config menuconfig --initrd kernel_imageand installed it with: dpkg -i kernelXXX.debwhere XXX is the kernel version. The kernel build took about 1.5 hours. After the install I rebooted and discovered a bunch of stuff was broken, most importantly the display! So I went back to the kernel config and looked a little more closely. Indeed, there was an option for the Dell LCD display that was turned off. I turned in on, rebuilt again (1.5 more hours). Rebooted. Sound card doesn't work now. Harrumph. At this point, I decided to bite the bullet and start with the standard Ubuntu .config, which is basically a "kitchen sink" kernel configuration. This can be found in the /boot directory, and can simply be copied over to /usr/src/linux as .config. So I started a build with the Ubuntu configuration. It took 5 hours. I installed and lo and behold, most things work.
More suspend/resume problemsSuspend-to-RAM doesn't work consistently right now. It's definitely related to the Cisco wireless PCMCIA card, but I haven't determined more than that. Hibernate-to-disk seems to work correctly every time, but it's slower, of course. I'll stick with that in the meantime.Remaining ProblemsHaving both a wired and a wireless card installed seems to confuse the wireless network. I can live with this for now.The wireless card sometimes shows up as eth1 and sometimes as eth0 after a resume. Then there is this "phantom" device that sometimes shows up in ifconfig with "Link encap:UNSPEC" and a much too long MAC address, which matches the real wireless address in the first 48 bits, with zeroes in the remainder. This will require some investigation. After a resume the wireless device doesn't come right up. I need to do a reconfigure with kwifimanager, followed by "dhclient eth0". At some point I'll put these into resume scripts or find some other way to automate this. After a resume, even after the reconfiguration with kwifimanager, the routing table sometimes needs to be cleaned up if the device moved. Final ConfigurationAt this point most things work, and it's time for the normal Linux tweaks. First, grab a bunch of Windows fonts from the Windows partition, and install them with the KDE control panel. Then rebuilt the font library libXft.so with TrueType hinting turned on. This is a little complicated, but is covered in detail here as well as many other places. This change enables much better TrueType font rendering, but doing this voilates an Apple patent, so Linux distributions leave it off by default.With the proper TrueType font rendering now enabled, we can change all our fonts to Arial, and turn off that annoying anti-aliasing crap, which hurts my eyes. I leave anti-aliasing on for large fonts only. Next, I moved Lotus Notes to the shared FAT32 partition, and installed wine. (Thank IBM for keeping Lotus Notes running under Wine!). Now if I just had a few more GB of hard disk space...
|