Implementing Debian GNU/Linux on a IBM Thinkpad 560E

Last updated: 9 October 2001





This page is intended to show my adventure of setting up Linux on a Laptop. I recently purchased a second user laptop from ebay.co.uk mainly as a toy so I could experiment with mobile computing. My OS of choice at home is Debian GNU/Linux 2.2 (potato) but seeing as this laptop was going to be more of an experiment I decided to install Debian woody instead.


Machine Specs

Intel MMX Pentium 166 MHz with L2 Cache
16MB (on the system board) expanded to 32MB
12.1-inch, 64K colors, 800x600 pixel TFT color LCD
2.11GB, 2.5-inch, IDE interface
I/O Ports - Headphone, Microphone, Port replicator 
Audio - ESS ES 1688  16-bit Audio, Internal speaker, Internal microphone, Mechanical volume 
Infrared Transfer - IrDA 1.1 
PCMCIA - One Type-III or two Type-II 

Installation

I was going to install woody directly but I also wanted to have my root partition as a reiserfs as I was going to have one big ~2Gb partition and wasn't looking forward to fsck's on it after unplanned shutdowns. I couldn't find any woody install disks with reiserfs support so I installed potato with reiserfs support using these marvelous disks from zoltan.

Seeing as the 560E has only a plug in floppy drive I did a network install so used the 5 disks (rescue, root and 4 drivers) from zoltan's site and had used a cheap ne2k pcmcia card (not a Cardbus as you might end up having to remove it with a pair of pliers :) to install the base tarball from my workstation using http. Once that bit is complete I installed the reset using my cable connection.

I partitioned the 2.1Gb disk like this:

hda1        /boot     ext2         7MB
hda5        /         reiserfs     2GB
hda6        -swap-                96MB

The installation went very smoothly including the pcmcia bits. There were no problems and at the end of the install I just picked minimum components and plan to add packages later as and when needed after. After the initial install had completed I went to /etc/apt/sources.list and did a global change on 'stable' to 'woody' and then did 'apt-get update && apt-get dist-upgrade'. This bit took a bit longer than expected with some packages needing help to install and several 'dist-upgrade's and 'upgrade's.

The update to woody finally finished so I had a working console only based woody system. At this stage I have only had pcmcia working as an 'extra' , I have no X , sound or apm configured.

UPDATE: Filesystem and disk layout 23 July 2001

After further investigation it seems that reiserfs might not be the best journaled filesystem to use on a laptop. The handy disk usage saving program noflushd will not work with reiserfs. So disk accesses cannot be cut down. So I decided to give XFS a whirl which noflushd seems to be ok with.

Details on what I did to convert from a reseirfs filesystem to a xfs file system are here .

My new disk layout looks like this:

hda1        /boot     ext2         7MB
hda5        /         xfs        1.9GB
hda5        -dos-     fat16       40MB
hda6        -swap-                96MB

The Fat16 filesystem is there for apm hibernation. See APM below.

X Setup

I decided to install Xfree86 4.x.x straight away and not try Xfree86 3.3.6 first. So I installed the debs xserver-common , xfree86-common and xfonts-base. They installed fine and asked lots of questions to setup my config file but when it had all finished I had no config file. I tried creating one with Xfree86 -config but it wouldn't work. In the end I did a dpkg-reconfigure xserver-common and it went through all the questions again (possibly a few more?) and this time it created an XF86Config-4 file.

Of course X didn't work straight away. I had chosen Trident as my driver as the docs listed the Trident chip in the 560e as supported. After some searching around the web I found a suggestion to use vesa instead. This works fine, there is a slight pause where the screen looks like crap but then flicks to the lovely grey of X.

I then installed a few other X packages, xbase-clients, some more xfonts-* and sawfish. I'm trying to keep from installing to much cruft so have decided not to install any gnome stuff yet. I installed xdm but I might change this for gdm just for the nice ' halt/reboot ' options unless I can find a way to add these easily to xdm.

UPDATE 08/10/01: After an automatic apt-get update with Debian Woody , Xfree4.1.0 got installed this stopped X working correctly on my 560e. The screen looks ok except about the top half inch of the screen is 'X grey' rather than my background colour of choice and any thing (pointer, window ..etc) that goes near that area gets corrupted and bits get scattered over the screen.

After a lot of searching/experimenting I decided to go back to Xfree3.3 and got a working X config from one of the other guys who have a TP560E web page.


Kernel

I decided to install the latest kernel (at present is 2.4.6) and roll my own. This all seemed to go fine. I tried to use modules as much as possible. I think the floppy drive needs to be a module to make sure that APM works.

Sound

This is my big problem. I have yet to get sound working. Reading other people's experiences on Linux on Laptops it seems to 'just work' using the standard sb.o module. I am beginning to wonder if the sound hardware was left out of my laptop!!!

UPDATE: Got sound working! Up to this far I have only run Linux on this laptop, decided to try the DOS PS2.exe program and found out that sound was disabled in the 'BIOS'. Doh! So enabled sound loaded sb module with irq=5,io=0x220,dma=1 (values given in the PS2 program) and the module loaded first time. Tried out XMMS with a mp3 and it played! Well it skipped a bit but I guess thats todo with the speed of the machine.

Guess I'd better keep this PS2.exe program handy.

I need to do some more checks still to make sure sound works after suspend/resumes.

APM

After just installing setting up APM in the kernel , as a module, the apm -s command works once and resumes fine but after that it won't suspend again.

UPDATE: I compiled the floppy drive as a module and now suspend seems to work better.

After looking into the suspend/hibernate issue with thinkpads it looks like I'm going to need a small DOS partition if I want to use hibernate. I will need to create a DOS file, with the PS2.exe program, which is slightly larger than my real memory.

UPDATE 8/10/01: I have now created a hibernation file on the small dos partition and I have installed the tpctl utility on Linux. Hibernation works but only under certain conditions. It only seems to work if I have my network connection up. It then hibernates and resumes quite happily but if I do not have my cable plugged in then the command fails. Also suspend doesn't seem to work anymore.

Infrared

I have yet to look into this. I have a Psion Series 5 and a Ericsson SH888 mobile phone with built in modem which both talk infrared so hope to have some luck with talking to these.

Performance

Still need to look into tuning Linux to use less power so battery performance is improved. Also to cut down unnecessary cronjobs.

Battery Life

I am forever looking out for tips to extend the battery life on my thinkpad. Here are some tips which I have 'collected' from various newsgroups and mailing lists:




Links

Some links that have been useful in my adventure:





Neil Cheshire - created - 17th July 2001

Last updated - 9th October 2001