Linux on the IBM ThinkPad

Introduction

You will be pleased to know that Linux works quite happily on most of IBM's ThinkPad series of notebook and sub-notebook computers, including all modern ones. Most mainstream distributions (Debian, SuSE, RedHat) install from the box. Consequently, this web page isn't really necessary any more; but it remains here partly as a record of the efforts we went to in the mid-1990s to get Linux running, and partly in case anyone acquires a really old ThinkPad and wants to get Linux up on it.

The author still has his working 750C, based around a 33MHz 486 processor! However, he no longer uses it seriously and won't answer any questions you may send him now. (His current laptop? An Apple PowerBook.)

This document is available on the World-Wide Web via the URL

http://peipa.essex.ac.uk/tp-linux/

Caveat Emptor

This document is, to the best of the author's knowledge, correct. He does not take any responsibility if you trash your machine on the basis of this information; nor do any of the people who supplied it! Please notify him of any corrections or additions. General comments are also welcomed.

Contents

The ThinkPad models
Docking stations
PCMCIA support
Preparing to install Linux
Installing Slackware Linux
ThinkPad support in Linux
Using lilo
Configuring X
Other goodies
In conclusion
Contributors
WWW pages describing linux on other laptops


The ThinkPad Models

There are several ThinkPad models, each of which has a slightly different architecture. Several of the models are not suited for running Linux. The ones you are most likely to meet are:

ThinkPad 340
Monochrome-only machine with a 486SLC processor clocked at 50 MHz (i.e., non-Intel). It comes with disks of 200-360 Mb capacity, depending on the precise model. David N Turner reports a successful installation of Slackware 2.3.0 on a 340CSE with 12 Mb memory and 200 Mb hard disk. He also warns us that it has the same floppy disk change problem as the 750 series machines (see below). Specifying
ramdisk floppy=thinkpad
at the bootdisk prompt gets around the problem.

Ps/Note E35
Jerome Kaidor reports that he has made Linux 1.2.0 run on his Ps/Note E35, which he thinks is essentially a ThinkPad 350 (whatever that may be) without PCMCIA slots. He managed to squeeze everything he needed into 21 Mb, even with X installed!

ThinkPad 360
This model has options based around the 486DX2 at 50 MHz. There are disk options between 340 and 810 Mb, and dual-scan colour and active-matrix colour screens. The "mouse" is IBM's Trackpoint device, located amongst the G, H and B keys. Linux is happy on this model (reported by Richard Soderberg, for example).

ThinkPad 370
Anders Odgaard reports a successful installation on the 370C, which seems to be the same as the old 755 model. In particular:

ThinkPad 500
This is a sub-notebook based on a 50 MHz 486SLC with a PCMCIA type II slow and a detachable 1.44 Mb floppy drive. It has a 170 Mb disk which appears to be IDE. David Gerstl and Peter T. Breuer both tell me that Slackware 2.0 loads from the box using the bare boot disk and the tty144 root disk. Michael Lachmann also reports that Slackware 2.1 loads from the box "if you turn off the floppy AUTO detection option in the power managment setup, and set it to ON instead." Peter T. Breuer tells me: "I also use the APM kernel patch. There is a further correction required to the latter patch (available from the author) in order to allow one to use the CONFIG_APM option when compiling the PCMCIA drivers. Basically, he forgot to export some function declarations to ksyms.c. Otherwise, the driver needs no patching for the 500." Peter also says that he chooses the IDE/RLL option when compiling the kernel (he was up to 1.1.88 when he said this). It needs no patches for the floppy or hard disk drives, and does not require the disk geometry to be specified in the Lilo configuration file. Bobby Fleming reports the screen driver is a WD 90C26A/LV, which is not accelerated, and that he uses the normal VGA16 X server, which works for both the LCD and an external display.

ThinkPad 700
The model 700 is reputed to have a micro-channel architecture (MCA) bus. Linux does not support the MCA bus, so don't try to install Linux on this model. This model appears to be obsolete.

ThinkPad 701
This model has the cute fold-out keyboard as well as the updated TrackPoint `joystick.' The processor is either the 50 MHz Intel 486DX2 or the 75 MHz 486DX4, and there are dual-scan passive and active matrix screen options. Disk capacity is in the range 360-720 Mb.

ThinkPad 720
Like the model 700, this is an MCA-bus machine, so Linux will again not work on it. This model seems to be obsolete too.

ThinkPad 750
This model (now obsolete) is based around a 33 MHz Intel 486SL and has accelerated graphics. It came with 170 or 340 Mb disks, and had options for monochrome, passive-matrix colour, active-matrix colour, or dual-scan screens. The author's machine is a 750C with the larger disk and IBM's 8 Mb memory expansion card. Linux definitely works on the 750 series, though there are some quirks, particularly in driving the dual-scan screen from X. All machines in the range have a sound capability (based on the AD1848 or compatible, not that I can get it to work under Linxu) and the trackpoint "mouse."

ThinkPad 755
This model, the replacement for the 750, again has several processor, disk and screen options. The processors supported are the 486DX2 at 50 or 75 MHz, or the 486DX4 at 75 or 100 MHz. IBM advertize 170, 340, 540, and 810 Mb disks on machines in the range, and there are several models: The sound capability on these machines is based on a different chip to the sound on the 750 series. The CD and CE models may have built-in fax modem cards (I'd advise you to check this.) Linux runs on these machines too. Gregory Wright has found a quirk for the 755CD: "In Linux versions before 1.3.0, there is a bug in the IDE ATAPI CD-ROM driver that causes errors with the ThinkPad 755CD's CD-ROM. The errors show up as `buffer botch' messages in /var/adm/messages, but the most prominent symptoms are read errors and directory listings that have files missing. I built and installed 1.3.3 and the problem went away." Note that there is a separate WWW page dedicated to this machine.


The Docking Stations

There are docking stations ("Dock 1" and "Dock 2") for at least the 360, 750, and 755 machines. Gerard A. Robinson informs us
"I have had success in building a 1.2.1 linux kernel (from the InfoMagic Mar. '95 CD-ROM) that boots from a floppy with root set to a SCSI drive attached to the Dock I. The SCSI controller is a TMC-950 chip. One can build a kernel by defining an OVERRIDE address, the CONTROLLER as FD, and the IRQ as whatever is set, plus making the change recommened in 4.12.1.6 of the v2.15 SCSI-HOWTO file. The controller will be recognized if you put the ID string into seagate.c for the Dock I, which is "IBM F1 BIOS V1.2009/23/93" (I'm typing this from work, so the 23/93 part is a little suspect). It still needs the "Common Problems" #6 fix, mentioned above, to work successfully. Now if I could just get it to recognize the floppy after I boot! This is with a TP360E."

Chris Hanson says:

"I have patched the aha152x driver to recognize the Dock II, and I thought you might like to include the patch on your page. I've submitted it to the developers, so hopefully it will be available in newer kernels."
The patch is:
*** /usr/src/linux-1.2.9/drivers/scsi/aha152x.c. 1      Tue May  2 00:31:26 1995
--- /usr/src/linux-1.2.9/drivers/scsi/aha152x.c Mon Jun 12 03:03:44 1995
***************
*** 396,401 ****
--- 396,402 ----
    { "Adaptec BIOS:AIC-6360",         0xc, 21 },  /* on-board controller */
    { "ScsiPro SP-360 BIOS",        0x2873, 19 },  /* ScsiPro-Controller with AIC-6360 */
    { "GA-400 LOCAL BUS SCSI BIOS", 0x102e, 26 },  /* Gigabyte Local-Bus-SCSI */
+   { "Adaptec BIOS:AHA-1532P",       0x1c, 22 },  /* IBM ThinkPad Dock II */
  };
  #define SIGNATURE_COUNT (sizeof( signatures ) / sizeof( struct signature ))
  #endif


PCMCIA Support

Several PCMCIA cards are known to work on the ThinkPads, generally via David Hinds' excellent card services driver. This driver has the advantage that it is loaded into the kernel at boot-time, rather than being permanently linked in, and that it supports hot-swapping of cards.

Specific combinations that have been reported are:

Combinations using drivers other than David Hinds' are:

Please let the author know of any other cards that work.


Preparing to Install Linux

The general advice given in documents describing Linux installation obviously apply to the ThinkPad too -- for example, be sure to back up files you have created under DOS and Windows, as well as DOS and Windows themselves. It is unfortunate that IBM don't supply distributions for these on floppies, as backing them up can take as long as the Linux installation!

The first step in installing Linux is to partition the hard disk, usually by adding two new primary partitions for Linux and its swap file. If you are lucky, you may be able to use the FIPS utility to re-partition the disk non-destructively; FIPS is available from the usual Linux archives. If you are unlucky --- for example, because you have been running DOS and Windows on the machine for a while --- the disk is probably too badly fragmented and you will have to do a complete backup of the system, re-initialize it, and then set about installing Linux. This is covered well in the standard Linux installation guides.


Installing the Slackware Linux

Providing you're using a version of Slackware later than 2.0, it should install "from the box" on the ThinkPad. The last version I installed personally was 2.3, and this certainly worked. The only thing to remember is to type

floppy=thinkpad
on the lilo prompt (in addition to any other things you have to type). If Linux doesn't auto-sense your hard disk geometry, you may also have to specify that to lilo. You can find the disk geometry from, for example, the DOS FDISK program.


ThinkPad Support in Linux: The details

This section contains details of the quirks people have discovered in the ThinkPads as they affect Linux. Most of the code presented in this section has now been merged in with the main Linux sources: they are retained here principally as a record of what was done and by whom. You are not expected to have to patch the kernel sources yourself in order to install Linux!

The floppy driver

Most ThinkPad models have a 2.88 Mb floppy drive with a quirky disk-changed sensor. Older Linux kernels did not support either the higher density or the inverted bit; however, the floppy driver underwent a major revision for Linux 1.1.72, these changes being carried out by Alain Knaff. To enable the support for the inverted bit, one must give the following option to lilo at the boot prompt:

floppy=thinkpad

The hard disk driver

Brad Pepers discovered that the oft-mentioned problem in locating the disk geometry of ThinkPad -- and, come to that, ValuePoint -- machines is not, as had previously been thought, due to a problem in the BIOS: what is actually failing is the code that determines the number of drives from the CMOS.

A one-line patch to routine hd_geninit of the hard disk driver corrects the problem. The hard disk driver is in the file: /usr/src/linux/drivers/block/hd.c and the modification simply increments the number of hard disks if the number of cylinders of a particular drive is non-zero. The region of code concerned is

  if (!NR_HD) {      
    for (drive=0 ; drive<2 ; drive++) {
      hd_info[drive].cyl = *(unsigned short *) BIOS;
      hd_info[drive].head = *(2+BIOS);
      hd_info[drive].wpcom = *(unsigned short *) (5+BIOS);
      hd_info[drive].ctl = *(8+BIOS);
      hd_info[drive].lzone = *(unsigned short *) (12+BIOS);
      hd_info[drive].sect = *(14+BIOS);
      if (hd_info[drive].cyl) NR_HD++;  /* ThinkPad mod */
      BIOS += 16;
   }
The additional line is clearly indicated by a comment. This modification is in the source code of more modern kernels, though one must
#define does_not_work_for_everybody_with_scsi_but_helps_ibm_vp
(say at the beginning of linux/drivers/block/hd.h) to enable it.

An alternative approach (which is what the author uses) is to specify the disk geometry via lilo. For example, on the author's machine, which has the 340 Mb hard disk, the line to add to the LILO configuration file would be:

  APPEND = "HD=914,15,49"


Using LILO

Perhaps the best way to show a possible LILO configuration for the ThinkPad is to describe my own. I have configured my machine to have three partitions:

/dev/hda1
This is an 80 Mbyte DOS partition which I never seem to use these days. :-)
/dev/hda2
This is a 16-Mbyte swap partition for Linux. (I do image processing on my ThinkPad, so I need lots of swap.)
/dev/hda3
The main Linux partition, about 250 Mbytes. My fairly de luxe system with \TeX, X, gcc, etc occupies about 90 Mbytes.

The LILO configuration file, /etc/lilo.conf, is as follows:

boot=/dev/hda
image = /zImage
  label = lin-hd
  ramdisk = 0
  root=/dev/hda3
  vga = normal
other = /dev/hda1
  label = dos
  table=/dev/hda
since I use a disk driver with the patch to recognize the hard disk geometry. Note that Linux is booted from the hard disk by default but, by holding the shift key down while booting, one can elect to boot DOS by typing `dos' at the resulting prompt.


Configuring X

X Config for the 370

The following configuration file was produced by Anders Odgaard when installing Linux on his ThinkPad 370.

        Section "Files"
          RgbPath "/usr/X11R6/lib/X11/rgb"
          FontPath "/usr/X11R6/lib/X11/fonts/misc/"
          FontPath "/usr/X11R6/lib/X11/fonts/Type1/"
          FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"
          FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"
          FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"
        EndSection
        Section "ServerFlags"
        EndSection
        Section "Keyboard"
          Protocol   "Standard"
          AutoRepeat 500 5
          LeftAlt    Meta
          RightAlt   ModeShift
          RightCtl   Compose
          ScrollLock ModeLock
        EndSection
        Section "Pointer"
          Protocol  "ps/2"
          Device    "/dev/psaux"
          Emulate3Buttons
        EndSection
        Section "Monitor"
          Identifier  "Generic Monitor"
          VendorName  "Unknown"
          ModelName   "370C"
          Bandwidth   80
          HorizSync   35.38  
          VertRefresh 67.38
          ModeLine   "640x480" 28.3 640 672 768 800 480 490 492 525
        EndSection
        Section "Device"
          Identifier  "Generic SVGA"
          VendorName  "IBM"
          BoardName   "Unknown"
          Chipset     "wd90c30"
        EndSection
        Section "Screen"
          Driver   "svga"
          Device   "Generic SVGA"
          Monitor  "Generic Monitor"
          Subsection "Display"
            Depth    8
            Modes    "640x480"
            ViewPort 0 0
            Virtual  800 600
          EndSubsection
        EndSection

X11R6 Configuration for the 500

Peter T. Breuer has passed on the following configuration file, which is what he uses on his TP500.
# $XFree86: xc/programs/Xserver/hw/xfree86/XF86Conf.cpp,v 3.6 1994/09/26 15:30:19 dawes Exp $
#
# Copyright (c) 1994 by The XFree86 Project, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
# 
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# 
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
# THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
# OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# 
# Except as contained in this notice, the name of the XFree86 Project shall
# not be used in advertising or otherwise to promote the sale, use or other
# dealings in this Software without prior written authorization from the
# XFree86 Project.
#
# **********************************************************************
# Refer to the XF86Config(4/5) man page for details about the format of 
# this file. This man page is installed as /usr/X11R6/man/man5/XF86Config.5x 
# **********************************************************************
# Modified by ptb@dit.upm.es for a thinkpad 500 monochrome VGA. Dec 1994.
# **********************************************************************
# Files section.  This allows default font and rgb paths to be set
# **********************************************************************
Section "Files"
    RgbPath     "/usr/X11R6/lib/X11/rgb"
# Multiple FontPath entries are allowed (which are concatenated together),
# as well as specifying multiple comma-separated entries in one FontPath
# command (or a combination of both methods)
    FontPath    "/usr/X11R6/lib/X11/fonts/misc/"
#    XCOMM    FontPath  "/usr/X11R6/lib/X11/fonts/Type1/"
#    XCOMM    FontPath  "/usr/X11R6/lib/X11/fonts/Speedo/"
#    XCOMM    FontPath  "/usr/X11R6/lib/X11/fonts/75dpi/"
#    XCOMM    FontPath  "/usr/X11R6/lib/X11/fonts/100dpi/"
EndSection
# **********************************************************************
# Server flags section.
# **********************************************************************
Section "ServerFlags"
# Uncomment this to cause a core dump at the spot where a signal is 
# received.  This may leave the console in an unusable state, but may
# provide a better stack trace in the core dump to aid in debugging
#    NoTrapSignals
# Uncomment this to disable the  server abort sequence
#    DontZap
EndSection
# **********************************************************************
# Input devices
# **********************************************************************
# **********************************************************************
# Keyboard section
# **********************************************************************
Section "Keyboard"
    Protocol    "Standard"
# when using XQUEUE, comment out the above line, and uncomment the
# following line
#    Protocol   "Xqueue"
    AutoRepeat  500 5
    ServerNumLock
# Specifiy which keyboard LEDs can be user-controlled (eg, with xset(1))
#    Xleds      1 2 3
# To set the LeftAlt to Meta, RightAlt key to ModeShift, 
# RightCtl key to Compose, and ScrollLock key to ModeLock:
#    LeftAlt     Meta
#    RightAlt    ModeShift
#    RightCtl    Compose
#    ScrollLock  ModeLock
EndSection
# **********************************************************************
# Pointer section
# **********************************************************************
Section "Pointer"
    Protocol    "PS/2"
    Device      "/dev/mouse"
# When using XQUEUE, comment out the above two lines, and uncomment
# the following line.
#    Protocol   "Xqueue"
# Baudrate and SampleRate are only for some Logitech mice
# NB: my X reports on startup that the PS/2 mouse has baudrate 1200
#    BaudRate   9600
#    SampleRate 150
# Emulate3Buttons is an option for 2-button Microsoft mice
    Emulate3Buttons
# ChordMiddle is an option for some 3-button Logitech mice
#    ChordMiddle
EndSection
# **********************************************************************
# Monitor section
# **********************************************************************
# Any number of monitor sections may be present
Section "Monitor"
    Identifier  "Generic Monitor"
    VendorName  "Unknown"
    ModelName   "Unknown"
# Bandwidth is in MHz unless units are specified
    Bandwidth   25.2
# HorizSync is in kHz unless units are specified.
# HorizSync may be a comma separated list of discrete values, or a
# comma separated list of ranges of values.
#
# NOTE: THE VALUES HERE ARE EXAMPLES ONLY.  REFER TO YOUR MONITOR'S
# USER MANUAL FOR THE CORRECT NUMBERS.
#    HorizSync  30-64         # multisync
#    HorizSync  31.5, 35.2    # multiple fixed sync frequencies
#    HorizSync  15-25, 30-50  # multiple ranges of sync frequencies
    HorizSync   35.40         # that's for real, folks
# VertRefresh is in Hz unless units are specified.
# VertRefresh may be a comma separated list of discrete values, or a
# comma separated list of ranges of values.
#
# NOTE: THE VALUES HERE ARE EXAMPLES ONLY.  REFER TO YOUR MONITOR'S
# USER MANUAL FOR THE CORRECT NUMBERS.
#    VertRefresh        50-100        # multisync
#    VertRefresh        60, 65        # multiple fixed sync frequencies
#    VertRefresh        40-50, 80-100 # multiple ranges of sync frequencies
    VertRefresh 61.57         # that's also for real
# Modes can be specified in two formats.  A compact one-line format, or
# a multi-line format.
# My VGA 640x480 mode (hsync = 35.4kHz, refresh = 60Hz)
# These two are equivalent
    ModeLine "640x480" 28.32 640 672 768 800 480 490 492 575
#    Mode "640x480"
#        DotClock       28.32
#        HTimings       640 672 768 800
#        VTimings       480 490 492 575
#    EndMode
# These two are equivalent
#    ModeLine "1024x768i" 45 1024 1048 1208 1264 768 776 784 817 Interlace
#    Mode "1024x768i"
#        DotClock       45
#        HTimings       1024 1048 1208 1264
#        VTimings       768 776 784 817
#        Flags          "Interlace"
#    EndMode
EndSection
# **********************************************************************
# Graphics device section
# **********************************************************************
# Any number of graphics device sections may be present
Section "Device"
    Identifier  "Generic VGA"
    VendorName  "Unknown"
    BoardName   "Unknown"
    Chipset     "generic"
    VideoRam    512
    Clocks      28.30 28.32
EndSection
Section "Device"
    # SVGA server auto-detected chipset
    Identifier  "Generic SVGA"
    VendorName  "Unknown"
    BoardName   "Unknown"
EndSection
# **********************************************************************
# Screen sections
# **********************************************************************
# The colour SVGA server
Section "Screen"
    Driver      "svga"
    Device      "Generic SVGA"
    Monitor     "Generic Monitor"
    Subsection "Display"
        Depth       8
        Modes       "640x480"
        ViewPort    0 0
        Virtual     800 600
    EndSubsection
EndSection
# The 16-colour VGA server
Section "Screen"
    Driver      "vga16"
    Device      "Generic VGA"
    Monitor     "Generic Monitor"
    Subsection "Display"
        Modes       "640x480"
        ViewPort    0 0
        Virtual     800 600
    EndSubsection
EndSection
# The Mono server
Section "Screen"
    Driver      "vga2"
    Device      "Generic VGA"
    Monitor     "Generic Monitor"
    Subsection "Display"
        Modes       "640x480"
        ViewPort    0 0
        Virtual     800 600
    EndSubsection
EndSection

XF86 Configuration for the 750C

The following X configuration file works fine on the LCD screen of the author's 750C running the X that comes with Slackware 2.3; he hasn't tried it on an external monitor. (Some of its content is due to Juha Heinanen.) It is said that, to be able to drive an external monitor via the VGA port on the back of the ThinkPad, you must switch to it from DOS before booting Linux. If this is done, it is said that the 1024x768 mode works; again, he hasn't tried it.

# Refer to the XF86Config(4/5) man page for a description of the format
Section "Files"
    FontPath "/usr/X11R6/lib/X11/fonts/misc/"
    FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"
    FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"
    FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"
    RGBPath "/usr/X11R6/lib/X11/rgb"
EndSection
Section "ServerFlags"
EndSection
Section "Keyboard"
    Protocol "Standard"
    AutoRepeat 500 5
    ServerNumLock
    LeftAlt     Meta
EndSection
Section "Pointer"
    Protocol "ps/2"
    Device "/dev/bmouseps2"
    Emulate3Buttons
EndSection
Section "Monitor"
    Identifier "TP Monitor"
    VendorName "IBM"
    ModelName "TP750C"
    BandWidth 80        # this may not be correct
    HorizSync 35.38
    VertRefresh 67.38
    ModeLine "640x480" 28.3 640 672 768 800 480 490 492 525
EndSection
Section "Device"
    Identifier "IBM Device"
    VendorName "Unknown"
    BoardName "Unknown"
    Chipset "wd90c30"
EndSection
Section "Screen"
    Driver "vga256"
    Device "IBM Device"
    Monitor "TP Monitor"
    Subsection "Display"
        Modes "640x480"
        ViewPort 0 0
        Virtual 800 600
    EndSubsection
EndSection

X for the 750Cs

(Note that the following refers to XFree version 2: things have probably changed for XFree 3.) Michael Steiner has done some work on getting X to work on the 750cs, with some success. The standard X86_SVGA X server does not work on the 750Cs: everything comes out double! He has found some of the reasons and fixed them; here are the patches. Note that DUAL_SCAN must also be defined, either via a #define in driver.c or via -DDUAL_SCAN in the Makefile.

*** lib/Server/drivers/vga256/pvga1/driver.c    Wed Jun 22 15:49:40 1994
--- lib/Server/drivers/vga256/pvga1/driver.c.orig       Tue Jun  7 23:03:36 1994
***************
*** 134,142 ****
  #define IS_WD90C3X(x) (((x) == WD90C30) || ((x) == WD90C31))
! /*!! commented by sti */
! /* #undef DO_WD90C20 */
! #define DO_WD90C20
  static unsigned PVGA1_ExtPorts[] = {            /* extra ports for WD90C31 */
               0x23C0, 0x23C1, 0x23C2, 0x23C3, 0x23C4, 0x23C5 };
--- 134,140 ----
  #define IS_WD90C3X(x) (((x) == WD90C30) || ((x) == WD90C31))
! #undef DO_WD90C20
  static unsigned PVGA1_ExtPorts[] = {            /* extra ports for WD90C31 */
               0x23C0, 0x23C1, 0x23C2, 0x23C3, 0x23C4, 0x23C5 };
***************
*** 383,400 ****
      if (!vga256InfoRec.videoRam) {
          unsigned char config;
! #ifdef DUAL_SCAN
!       /* check if we have a dual-scan LCD */
!       outb(vgaIOBase + 4, 0x31);
!       if ((inb(vgaIOBase + 5) & 0x3) == 0) {
!           /*  clear bit 6 to disable upper 512k The remaining 512Kbytes
!               of video memory are not disabled by clearing the bit, but it
!               is actually used as a shadow of first 512Kbyte */
!           outb(0x3CE, 0x0B); config = inb(0x3CF);
!           outb(0x3CE, 0x0B); outb(0x3CF, config & 0xAF);
!           outb(0x3CE, 0x0B); config = inb(0x3CF);
!       }
! #endif
          switch(config & 0xC0) {
          case 0x00:
          case 0x40:
--- 381,388 ----
      if (!vga256InfoRec.videoRam) {
          unsigned char config;
!         outb(0x3CE, 0x0B); config = inb(0x3CF);
!
          switch(config & 0xC0) {
          case 0x00:
          case 0x40:

However, some problems still remain: for example, when switching to or from other virtual terminals, the screen is occasionally messed up. Typing Fn-F7 (refresh screen) should fix it. The vanilla XF86_VGA16 driver apparently suffers from the same problem.

XF86Config for the 755C

Craig Vosburgh has donated his XF86Config file for XFree 3.1 for the model 755C.

  # **********************************************************************
  # Refer to the XF86Config(4/5) man page for details about the format of 
  # this file. This man page is installed as /usr/X11R6/man/man5/XF86Config.5x 
  # **********************************************************************
  # **********************************************************************
  # Files section.  This allows default font and rgb paths to be set
  # **********************************************************************
  Section "Files"
      RgbPath "/usr/X11R6/lib/X11/rgb"
  # Multiple FontPath entries are allowed (which are concatenated together),
  # as well as specifying multiple comma-separated entries in one FontPath
  # command (or a combination of both methods)
      FontPath        "/usr/X11R6/lib/X11/fonts/misc/"
  #    XCOMM    FontPath      "/usr/X11R6/lib/X11/fonts/Type1/"
  #    XCOMM    FontPath      "/usr/X11R6/lib/X11/fonts/Speedo/"
      FontPath    "/usr/X11R6/lib/X11/fonts/75dpi/"
      FontPath    "/usr/X11R6/lib/X11/fonts/100dpi/"
  #    XCOMM    FontPath      "/usr/X11R6/lib/X11/fonts/75dpi/"
  #    XCOMM    FontPath      "/usr/X11R6/lib/X11/fonts/100dpi/"
  EndSection
  # **********************************************************************
  # Server flags section.
  # **********************************************************************
  Section "ServerFlags"
  # Uncomment this to cause a core dump at the spot where a signal is 
  # received.  This may leave the console in an unusable state, but may
  # provide a better stack trace in the core dump to aid in debugging
  #    NoTrapSignals
  # Uncomment this to disable the  server abort sequence
  #    DontZap
  EndSection
  # **********************************************************************
  # Input devices
  # **********************************************************************
  # **********************************************************************
  # Keyboard section
  # **********************************************************************
  Section "Keyboard"
      Protocol        "Standard"
  # when using XQUEUE, comment out the above line, and uncomment the
  # following line
  #    Protocol       "Xqueue"
      AutoRepeat      500 5
      ServerNumLock
  # Specifiy which keyboard LEDs can be user-controlled (eg, with xset(1))
  #    Xleds      1 2 3
  # To set the LeftAlt to Meta, RightAlt key to ModeShift, 
  # RightCtl key to Compose, and ScrollLock key to ModeLock:
      LeftAlt     Meta
  #    RightAlt    ModeShift
  #    RightCtl    Compose
  #    ScrollLock  ModeLock
  EndSection
  # **********************************************************************
  # Pointer section
  # **********************************************************************
  Section "Pointer"
      Protocol        "PS/2"
      Device  "/dev/mouse"
  # When using XQUEUE, comment out the above two lines, and uncomment
  # the following line.
  #    Protocol       "Xqueue"
  # Baudrate and SampleRate are only for some Logitech mice
  #    BaudRate       9600
  #    SampleRate     150
  # Emulate3Buttons is an option for 2-button Microsoft mice
      Emulate3Buttons
  # ChordMiddle is an option for some 3-button Logitech mice
  #    ChordMiddle
  EndSection
  # **********************************************************************
  # Monitor section
  # **********************************************************************
  # Any number of monitor sections may be present
  Section "Monitor"
      Identifier "NEC 5FGe"
      VendorName "NEC"
      ModelName "5FGe"
      BandWidth 135.0
      HorizSync 27-79
      VertRefresh 55-90
      ModeLine "640x480"  28.322 640  680  720  864  480  488  491  521
      ModeLine "800x600"  36     800  824  896 1024  600  601  603  625
      ModeLine "1024x768" 65    1024 1032 1176 1344  768  771  777  806 
               -hsync -vsync
      ModeLine "1152x900" 90 1152 1176 1234 1464 900 906 914 943 -hsync -vsync
      ModeLine "1280x1024" 115 1280 1276 1372 1664 1024 1028 1035 1062
               -hsync -vsync
  EndSection
  # **********************************************************************
  # Graphics device section
  # **********************************************************************
  Section "Device"
      # SVGA server auto-detected chipset
      Identifier      "Generic SVGA"
      VendorName      "Unknown"
      BoardName       "Unknown"
  EndSection
  # **********************************************************************
  # Screen sections
  # **********************************************************************
  # The colour SVGA server
  Section "Screen"
      Driver  "svga"
      Device  "Generic SVGA"
      Monitor "NEC 5FGe"
      Subsection "Display"
          Depth           8
          Modes           "800x600"
          Modes           "640x480"
          Modes           "1024x768"
          ViewPort    0 0
          Virtual     1024 768
      EndSubsection
  EndSection


Other Goodies

APM Support for the 750

Michael Steiner reports that the APM package works "if you just ignore the reply." He also reports that the ThinkPad 750's built-in suspend/hibernate stuff works anyway (if you created a suitable file to hold the memory contents under DOS or OS/2).

Inevitably, the APM driver needs patching.

*** ../apmd.c   Wed Apr 13 17:52:17 1994
--- ../old/apmd.c       Tue Dec  7 18:37:54 1993
***************
*** 8,30 ****
  #include 
  #include "asmi.h"
- void apm_dettach() {
-   int retval;
-
-   retval = asmi(APM_INTERFACE_DISCONNECT, 0, 0, 0, 0, 0);
-   if (retval) {
-     printf("interface disconnect: %s\n", apm_error(retval));
-     exit(1);
-   }
- }
-
-
- /* !! inserted by sti */
  void signal_exit_handler()
  {
! /* !! moved to newly created function apm_dettach() by sti */
!       apm_dettach();
        exit(0);
  }
--- 8,22 ----
  #include 
  #include "asmi.h"
  void signal_exit_handler()
  {
!       int     retval;
+       retval = asmi(APM_INTERFACE_DISCONNECT, 0, 0, 0, 0, 0);
+       if (retval) {
+               printf("interface disconnect: %s\n", apm_error(retval));
+               exit(1);
+       }
        exit(0);
  }
***************
*** 42,48 ****
        int     retval;
        unsigned int    vers, check, flags;
        unsigned int    event;
!
        if (iopl (3) < 0) {
                perror ("iopl");
                return 1;
--- 34,40 ----
        int     retval;
        unsigned int    vers, check, flags;
        unsigned int    event;
!
        if (iopl (3) < 0) {
                perror ("iopl");
                return 1;
***************
*** 92,99 ****
                }
                if (retval) {
                        printf ("PM event fetch: %s\n", apm_error (retval));
- /* !! inserted by sti */
-                       apm_dettach(); /* try to dettach */
                        exit(1);
                }
  #if 0
--- 84,89 ----
***************
*** 105,112 ****
                        if (retval) {
                                printf("set system standby: %s\n",
                                       apm_error(retval));
- /* !! inserted by sti */
-                               apm_dettach(); /* try to dettach */
                                exit(1);
                        }
                case APM_EVENT_SUSPEND_REQUEST:
--- 95,100 ----
***************
*** 114,137 ****
                        if (retval) {
                                printf("set system suspend: %s\n",
                                       apm_error(retval));
! /* !! inserted by sti */
!                               printf("but it will work any way ...\n");
! /*                            apm_dettach(); /* try to dettach */
! /*                            exit(1);
! */                    }
                case APM_EVENT_NORMAL_RESUME:
                case APM_EVENT_CRITICAL_RESUME:
! /*                    system("/etc/clock -s"); */
!                       system("/sbin/clock -s");
                        break;
                case APM_EVENT_BATTERY_LOW:
! /*                    printf("\007\007\007BATTERY LOW\007\007\007\n"); */
!
! /* !! inserted by sti */
!                       /* try to give the information to all the user */
!                       retval = system("/bin/echo '\007\007\007BATTERY LOW\007\007\007' | /usr/bin/wall");
!                       if (retval != 0)
!                         printf("call of system to warn of low-bat condition failed with return-code %d \n", retval);
                        break;
                }
        }
--- 102,115 ----
                        if (retval) {
                                printf("set system suspend: %s\n",
                                       apm_error(retval));
!                               exit(1);
!                       }
                case APM_EVENT_NORMAL_RESUME:
                case APM_EVENT_CRITICAL_RESUME:
!                       system("/etc/clock -s");
                        break;
                case APM_EVENT_BATTERY_LOW:
!                       printf("\007\007\007BATTERY LOW\007\007\007\n");
                        break;
                }
        }


In Conclusion

Although Linux works perfectly on many of the ThinkPad range, and X is happy on at least some of the machines, there are some things that are tricky or not supported in software that is publically-available: for example, sound support on the 750. If you have solutions to --- or just further information concerning --- any of the ThinkPad quirks, please let the author know and he will incorporate details into this document.


The Good Guys

Many people have contributed to the information in this page. In particular, information from the following people has been used in the construction of this document:

Erol Basturk
Peter T. Breuer
Bobby Fleming
David Gerstl
Chris Hanson
Juha Heinanen
Jerome Kaidor
Michael Lachmann
Robb Masters
Anders Odgaard
Gerard A. Robinson
Richard Soderberg
Michael Steiner
Takao Moriyama
Akira Terao
David N Turner
Craig Vosburgh
Tim Wicinski
Gregory Wright
James Yee


Linux on Other Laptops

There are WWW pages concerned with bringing up Linux on a few other laptops:


Please feel free to comment on this page.
Creator: Adrian F. Clark <alien@essex.ac.uk>
Keywords: linux thinkpad
Date: 3 vii 1997