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/
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.
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
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:
ramdisk floppy=thinkpadat the bootdisk prompt gets around the problem.
mount floppy=thinkpad
/dev/hda1 1 521 262552 6 DOS 16-bit >=32M /dev/hda2 522 826 153720 83 Linux native /dev/hda3 827 859 16632 82 Linux swap /dev/hda4 860 1047 94752 83 Linux native
loadlin c:\loadlin\vmlinuz floppy=thinkpad root=/dev/hda2 roboots Linux and allows normal usage of the floppy drive. The other disk series were then installed to /dev/hda2.
"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
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:
Please let the author know of any other cards that work.
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.
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=thinkpadon 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.
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!
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
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"
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:
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/hdasince 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.
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
# $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 theserver 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
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
(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.
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 theserver 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
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; } }
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.
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
There are WWW pages concerned with bringing up Linux on a few other laptops:
alien@essex.ac.uk
>