Installing Ubuntu 6.06 on a ThinkPad R60

From ThinkWiki
Jump to: navigation, search

Overview

Ubuntu 6.06 (Dapper Drake) works very well with the R60, needing very little or no configuration at all to get things working.

The following text is based on a dualboot win/linux installation with the Ubuntu 6.06 CD, on a R60 with Core Duo T2400, 512MB, 15", SXGA+, ATI X1400 128MB, DVD±R. Other configurations should be very similar, as long as the newest version of Ubuntu is used.

Needs tweaking (se below):

Untested:

  • Modem (probably works)
  • Card slots (probably depends on the card inserted only)

Everything else just works, atleast after the very simple process of getting the drivers (explained below). Everything pretty much means everything, but if anyone want a list: USB, FireWire, CD/DVD (also burner), UltraNav (mouse), dual cores, graphics card, sound card, network (cable and wifi), hibernation.


Before you start

Normally the machines come preinstalled with Windows XP. Also note that there is a somewhat hidden 5GB FAT32 partition that contains the recovery files used to reinstall Windows. If you only wants Linux, then all this can just be deleted. If you wants too keep Windows for dualboot, you have to decide if you also want to keep the recovery partition.

If you want to keep windows, it's wise to make recovery CDs. You can both make a backup-cd/dvd, and make disks that contain what's on the recovery partition (these disks can only be made once, and require 2 DVDs or 6 CDs). Start Windows, and run the ThinkVantage-programs for this.

Partition and boot

Now boot with the Ubuntu-CD, start the installer and follow the simple guide until you reach the partition-question. If you want to keep Windows, select the option to do it manually. Now you will see the two Lenovo-created partitions. Resize the big partition with Windows on to the size you want. Then make a new partition for Ubuntu and a small swap partition. Complete the installer, and reboot into Windows. Chkdsk will start to scan C:\. It will probably correct some stuff, but hopefully Windows will start nicely afterwards.

Ubuntu will install the GRUB bootloader. At startup this will give you the choice of Linux and Windows, unless you got rid of the latter. It will also display a line with "Windows NT/2000/XP" if you kept the service partition. This is some sort of Windows based environiment where you can restore stuff. Find a GRUB-howto and edit /boot/grub/menu.lst to hide it in the list, if you want to. You probably also want to edit /etc/fstab and remove the line that mounts the service partition.

If you only want Linux, you can safely remove all the existing partitions before creating partitions for Linux.

System update

When Ubuntu is up and running, you should first run a complete system update. A note will pop up telling you to do so, or you can run Synaptic or $ sudo apt-get update && sudo apt-get upgrade. Since it downloads a new kernel and some ACPI-stuff, among other things, this might resolve problems before you even notice they exist. So do this first! :)

CPU/Kernel

The R60 has a Dual Core CPU, and the default kernel is only using one of the cores. Start Synaptic and find the most recent 686-kernel (either linux-image-2.6.xx-xx-686 or the linux-686-smp metapackage). Download and install it, then reboot. You will now get another choice on the bootmenu for the 686-kernel. Boot with that one, and make sure $ cat /proc/cpuinfo lists two processors. Make sure you get the linux-restricted-modules-2.6.xx-xx-686 package too, it's needed for some of the drivers below.

The CPU frequencies gets clocked up and down as needed automaticly (to save power and generate less heat when not in use). You can add an applet to the Gnome panel to monitor this (two applets really, one for each core).

Note: In Ubuntu 6.10 Edgy Eft (and maybe in 6.06 too now?), the multiprocessor kernels are called -generic instead of -686.

Network

The gigabit network card and wifi card work out of the box.

Note: Wifi needs the package linux-restricted-modules-2.6.xx-xx-xxx to work. This package is installed by default.

Also note: There is a bug in the wifi-driver that might cause one or both of the cpu cores to work on 100% for no reason.

This bug seems to only happen when the hardware wireless switch is in the "off" position when booting. The switch can be used without problems after booting. As long as the swtich looks as below upon boot, all should be fine.

Wireless-switch.png

If you need any wifi validation other than standard WEP you will need to install wpasupplicant. The following is the way that I did it with the ipw3945 driver. I assume that this will work the same on all R60s.

sudo apt-get install wpasupplicant
sudo apt-get install network-manager-gnome network-manager
sudo gedit /etc/network/interfaces
  • Comment out everything othen than “lo” entries in that file and save the file using #'s infront of the line
  • Create a file called /etc/default/wpasupplicant, add entry ENABLED=0 and save the file
sudo touch /etc/default/wpasupplicant

Reboot your system or use the following command

sudo /etc/init.d/dbus restart

Once this is done, click on the computer icon in corner. Input the needed password, and the program will ask you for a password for a new keyring. Once this is done everything should work fine.

Modem

Untested.

Graphics

The R60 can either come with some onboard Intel graphics, or a X-series ATI-card. Atleast for the latter, you need to install drivers. ATI delivers proprietary binary-only drivers called fglrx, that you can install with apt/Synaptic. See this guide for that, or just try:

sudo apt-get install xorg-driver-fglrx fglrx-control
sudo depmod -a
sudo aticonfig --initial
sudo aticonfig --overlay-type=Xv

Then reboot, and run $ fglrxinfo to see that everything is fine. You can also try running $ glxgears to see if 3d-acceleration works as it should. When the drivers are in place, you can also select a higher resolution if you have a model with that. You can do that with the System->Settings->Resolution GUI.

If your R60 has an X1400, the fglrx driver provided, 8.25.18, will work for your system. The above steps will make your computer hang when X loads. The driver is known to be buggy. The process for getting the 8.29.6 version driver to work is described on the unofficial ATI Linux Driver Wiki and shown below. This will also work for those who want an upgraded driver. The process is repeated also for those that want an updated driver.

First we need to blacklist the original fglrx that ubuntu would like to install.

sudo gedit /etc/default/linux-restricted-modules-common

Add this line to the file:

DISABLED_MODULES="fglrx"

Download the ATI driver installer: ati-driver-installer-8.29.6.run (this installer will apparently work for both 32bit and 64bit although we only need 32bit support)

Change to the download directory. Make sure that you have the universe and multiverse repositories enabled in /etc/apt/sources.list before doing these steps.

Next install the tools needed for this operation:

sudo apt-get update
sudo apt-get install module-assistant build-essential 
sudo apt-get install fakeroot dh-make debconf libstdc++5 linux-headers-$(uname -r)

Package the files:

bash ati-driver-installer-8.29.6.run --buildpkg Ubuntu/dapper

Install the packages:

sudo dpkg -i xorg-driver-fglrx_8.29.6-1_i386.deb
sudo dpkg -i fglrx-kernel-source_8.29.6-1_i386.deb
sudo dpkg -i fglrx-control_8.29.6-1_i386.deb

Just to make sure, remove any fglrx packages left:

sudo rm /usr/src/fglrx-kernel*.deb

The kernel module must now be compiled.

sudo module-assistant prepare
sudo module-assistant update
sudo module-assistant build fglrx
sudo module-assistant install fglrx
sudo depmod -a

Important: you must perform the last two steps everytime you update the kernel.

Next, use the ati configure system to update the X server. Backups of xorg.conf will be made automatically.

sudo aticonfig --initial
sudo aticonfig --overlay-type=Xv

Restart the system:

sudo shutdown -r now

Installing the drivers from ati.com is also an option, however, it is untested on the R60. The process for this is also available online.

Hibernation

In Gnome this seems to work without any config. Both the choice in the shutdown dialog, and Fn+F12 makes the machine hibernate properly. 'Sleep'-mode can be enabled in power settings.

In KDE this does not work by default. (Look at kpowersave, for instance.)

Sound

Sound worked fine out of the box, also from multiple sources at once. The three volume keys work fine in Gnome, see fix for KDE below. Fn+Arrows for Play/Stop etc, does not work yet.

Bluetooth

Bluetooth works fine. In KDE there is a program called Bluetooth OBEX Client in the main menu, that you can use to transfer files to other devices. Confirmed working with a Nokia phone. For gnome there is a package called gnome-bluetooth you can install.

USB/FireWire

Works out of the box.

PCMCIA

Works fine. Tested with a wireless card. Functions correctly.

UltraNav (mouse)

Both the of the pointing devices works fine, except horizontal scolling on the touchpad does not work by default (vertical works). Also the middle mouse button works as a middle mouse button usually does in Linux, instead of being used to scroll like it does in Windows. Also look at How to configure the TrackPoint.

Fingerprint reader

Doesn't do anything by default. Look at How to enable the fingerprint reader.

Keys

Several of the keys do something special in combination with the Fn-key. Some work automagicly, some don't. To fix/change, look at How to get special keys to work.

Following keys should work regardless of desktop environment:

  • Fn+Home Monitor brightness up
  • Fn+End Monitor brightness down
  • Fn+PgUp Turn keyboard light on/off (ThinkLight)
  • Fn+F5 Toggle on/off wireless/bluetooth

Gnome

Here's a list of what works and what doesn't in Gnome.

Does something by default:

  • Volume keys (up/down/mute)
  • Fn+F2 Lock computer
  • Fn+F3 Shows battery info
  • Fn+F12 Hibernates the machine
  • Fn+Home

Needs to be enabled:

  • Fn+F4 Sleep-button. Must be enabled in Power Settings.

Doesn't do anything:

  • Fn+F7 Used to switch between monitors in Windows, but this isn't that easy in Linux
  • Fn+F8 Starts UltraNav-config in Windows
  • Fn+F9 Used before undocking from a dockingstation in Windows
  • Fn+Spacebar Zooms the screen in Windows
  • ThinkVantage
  • Media keys (Fn + Arrow-keys)
  • Windows key
  • The other Windows key

KDE

In KDE, nothing works by default. To get some of it to work, you need to set up nvram:

  • $ sudo addgroup nvram
  • $ sudo adduser [your username(s)] nvram
  • Add 'nvram' to /etc/modules on a new line.
  • Add/change the last section of /etc/udev/rules.d/40-permission.rules and add 'KERNEL=="nvram", GROUP="nvram", MODE="0660".
  • Reboot.
  • Open KDE System Settings -> Laptops and power -> IBM Thinkpad Laptop.
  • (If it still complains about nvram, do some googling and fix it.)
  • Tick the box to run KMilo.
  • Change the programs for the buttons if you want to.
  • Log out and in again.

The volume keys, thinkpad-key and Fn+Spacebar should now do something. You should also get a dialog when using the brightness keys and the thinklight.

Other tips

Add this to ~/.Xresources for much nicer fonts in KDE:

Xft.dpi:96

External Sources