box.matto.nl
[tux]

This page: Home » Articles » Linux on the Thinkpad R31

Linux on the Thinkpad R31

On this webpage you find some information about the adventure of using GNU/Linux on my IBM Thinkpad R31.
Maybe this is usefull for you. In any way, have fun!

picture of tpr31

Description of the R31

The notebook comes with a 1.13 GHz Intel Celeron processor, Intel chips for video and sound, 128 Mb memory of which 8 Mb is used for the display, a 14.1" TFT-display (1024x768 @ 60 Hz). The harddisk is 10 Gb, devided in a so-called "hidden" partition of about 2 Gb from which the Microsoft XP Home Edition Windows can be re-installed and a 8 Gb partition where this XP Home Edition is supposed to live. The machines comes without a floppydrive, it hosts a CD-ROM-player instead.

In the Netherlands this model comes with a so-called Dutch keyboard layout, which really is a great mistake.

The keyboard works fine (although working a couple of month only only on the laptop resulted in some pain in the upper arms), but the white ink on the keys wear quite fast.
Also the temperature-management seems to be fine. I have had several times uptimes over a week with high cpu-loads (0% idle) without any problems or disturbing fan-noises (yes, I should not have run those programs on a laptop, but the R31 is the fastest machine I have available :-).

The machine can playback divx-movies, but when going to full-screen mode mplayers complains about lack of computingpower and I have to add the framedrop switch. The result is fine though (even when hooked up to a beamer :-)

Making room for GNU/Linux

Because I haven't decided yet if I want to keep the XP that comes with the laptop, I choose to go for a dual boot. I put a Linux installation-CD in the CD-ROM-drive, booted from that CD and choose for rescue. Using fdisk I repartitioned the 8 Gb XP-partition into a smaller primary partition (2.9 Gb) and an extended partition, in which I set up a Linux-partition and a Linux swap space.
Then I rebooted and hit <F11> in order to let the IBM-installed rescuer do it's work. When the XP was back up and running on it's new smaller partition, I installed Debian (sid) on the new created space.

Update: XP is removed completely. I didn't use it at all.

Framebuffer

When in text-mode, I had to use a framebuffer in order to get a proper display. This is what I added in my lilo.conf:

vga=0x305

/proc

Below some interresting stuff copied from the /proc directory.

/proc/cpuinfo

processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 11
model name  : Intel(R) Celeron(TM) CPU                1133MHz
stepping    : 1
cpu MHz     : 1133.216
cache size  : 256 KB
fdiv_bug    : no
hlt_bug     : no
f00f_bug    : no
coma_bug    : no
fpu     : yes
fpu_exception   : yes
cpuid level : 2
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat pse36 mmx fxsr sse
bogomips    : 2260.99

lspci -vv

00:00.0 Host bridge: Intel Corp. 82830 830 Chipset Host Bridge (rev 04)
    Subsystem: IBM: Unknown device 1017
    Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
    Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort+ >SERR- <PERR-
    Latency: 0
    Region 0: Memory at <unassigned> (32-bit, prefetchable)
    Capabilities: <available only to root>

00:02.0 VGA compatible controller: Intel Corp. 82830 CGC [Chipset Graphics Controller] (rev 04) (prog-if 00 [VGA])
    Subsystem: IBM: Unknown device 0505
    Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
    Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR-
    Latency: 0
    Interrupt: pin A routed to IRQ 11
    Region 0: Memory at 98000000 (32-bit, prefetchable) [size=128M]
    Region 1: Memory at 90100000 (32-bit, non-prefetchable) [size=512K]
    Capabilities: <available only to root>

00:02.1 Display controller: Intel Corp. 82830 CGC [Chipset Graphics Controller]
    Subsystem: IBM: Unknown device 0505
    Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
    Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR-
    Latency: 0 (2750ns max)
    Region 0: Memory at 88000000 (32-bit, prefetchable) [size=128M]
    Region 1: Memory at 80200000 (32-bit, non-prefetchable) [size=512K]
    Capabilities: <available only to root>

00:1d.0 USB Controller: Intel Corp. 82801CA/CAM USB (Hub #1) (rev 02) (prog-if 00 [UHCI])
    Subsystem: IBM: Unknown device 1017
    Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
    Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
    Latency: 0
    Interrupt: pin A routed to IRQ 11
    Region 4: I/O ports at a4a0 [size=32]

00:1d.1 USB Controller: Intel Corp. 82801CA/CAM USB (Hub #2) (rev 02) (prog-if 00 [UHCI])
    Subsystem: IBM: Unknown device 1017
    Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
    Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
    Latency: 0
    Interrupt: pin B routed to IRQ 11
    Region 4: I/O ports at a4e0 [size=32]

00:1d.2 USB Controller: Intel Corp. 82801CA/CAM USB (Hub #3) (rev 02) (prog-if 00 [UHCI])
    Subsystem: IBM: Unknown device 1017
    Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
    Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
    Latency: 0
    Interrupt: pin C routed to IRQ 11
    Region 4: I/O ports at a800 [size=32]

00:1e.0 PCI bridge: Intel Corp. 82801BAM/CAM PCI Bridge (rev 42) (prog-if 00 [Normal decode])
    Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
    Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR-
    Latency: 0
    Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
    I/O behind bridge: 00007000-00007fff
    Memory behind bridge: 80100000-801fffff
    BridgeCtl: Parity- SERR- NoISA+ VGA- MAbort- >Reset- FastB2B-

00:1f.0 ISA bridge: Intel Corp. 82801CAM ISA Bridge (LPC) (rev 02)
    Control: I/O+ Mem+ BusMaster+ SpecCycle+ MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
    Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
    Latency: 0

00:1f.1 IDE interface: Intel Corp. 82801CAM IDE U100 (rev 02) (prog-if 8a [Master SecP PriP])
    Subsystem: IBM: Unknown device 1017
    Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
    Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
    Latency: 0
    Interrupt: pin A routed to IRQ 11
    Region 0: I/O ports at a830 [size=8]
    Region 1: I/O ports at a848 [size=4]
    Region 2: I/O ports at a860 [size=8]
    Region 3: I/O ports at a878 [size=4]
    Region 4: I/O ports at a890 [size=16]
    Region 5: Memory at 10000000 (32-bit, non-prefetchable) [size=1K]

00:1f.3 SMBus: Intel Corp. 82801CA/CAM SMBus (rev 02)
    Subsystem: IBM: Unknown device 1017
    Control: I/O+ Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
    Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
    Interrupt: pin B routed to IRQ 11
    Region 4: I/O ports at 8000 [size=32]

00:1f.5 Multimedia audio controller: Intel Corp. 82801CA/CAM AC'97 Audio (rev 02)
    Subsystem: IBM: Unknown device 0500
    Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
    Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
    Latency: 0
    Interrupt: pin B routed to IRQ 11
    Region 0: I/O ports at 9800 [size=256]
    Region 1: I/O ports at 9c00 [size=64]

00:1f.6 Modem: Intel Corp. 82801CA/CAM AC'97 Modem (rev 02) (prog-if 00 [Generic])
    Subsystem: IBM: Unknown device 0503
    Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
    Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
    Latency: 0
    Interrupt: pin B routed to IRQ 11
    Region 0: I/O ports at a000 [size=256]
    Region 1: I/O ports at a400 [size=128]

01:08.0 Ethernet controller: Intel Corp. 82801CAM (ICH3) Chipset Ethernet Controller (rev 42)
    Subsystem: IBM: Unknown device 1031
    Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr- Stepping- SERR+ FastB2B-
    Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
    Latency: 66 (2000ns min, 14000ns max), cache line size 08
    Interrupt: pin A routed to IRQ 11
    Region 0: Memory at 80100000 (32-bit, non-prefetchable) [size=4K]
    Region 1: I/O ports at 7000 [size=64]
    Capabilities: <available only to root>

01:09.0 CardBus bridge: Texas Instruments PCI1410 PC card Cardbus Controller (rev 02)
    Subsystem: IBM: Unknown device 1017
    Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
    Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
    Latency: 168, cache line size 08
    Interrupt: pin A routed to IRQ 11
    Region 0: Memory at 80101000 (32-bit, non-prefetchable) [size=4K]
    Bus: primary=01, secondary=02, subordinate=05, sec-latency=176
    I/O window 0: 00007400-000074ff
    I/O window 1: 00007800-000078ff
    BridgeCtl: Parity- SERR- ISA- VGA- MAbort- >Reset+ 16bInt+ PostWrite+
    16-bit legacy interface ports at 0001

/proc/interrupts

           CPU0       
  0:     281528          XT-PIC  timer
  1:       6256          XT-PIC  keyboard
  2:          0          XT-PIC  cascade
 11:      45491          XT-PIC  Texas Instruments PCI1410 PC card Cardbus Controller, usb-uhci, usb-uhci, usb-uhci, eth0, Intel ICH3
 12:      13557          XT-PIC  PS/2 Mouse
 14:       7463          XT-PIC  ide0
 15:          3          XT-PIC  ide1
NMI:          0 
LOC:     281170 
ERR:          0
MIS:          0

Kernel modules

/etc/modules.conf

alias sound-slot-0 i810_audio
pre-remove sound-slot-0 /bin/aumix-minimal -f /etc/.aumixrc -S >/dev/null 2>&1 || :
options sound dmabuf=1
alias synth0 opl3
options opl3 io=0x388
options cs4232 isapnp=1
alias eth0 eepro100
alias sound-slot-2 ad1848
post-install sound-slot-2 /bin/aumix-minimal -f /etc/.aumixrc -L >/dev/null 2>&1 || :
pre-remove sound-slot-2 /bin/aumix-minimal -f /etc/.aumixrc -S >/dev/null 2>&1 || :

alias char-major-10-134 apm
alias /dev/apm_bios     /dev/misc/apm_bios
alias /dev/misc/apm_bios    apm

alias tty-ldisc-11 irtty
alias char-major-161 ircomm-tty
alias char-major-60 ircomm_tty

alias /dev/ppp          ppp_generic
alias char-major-108    ppp_generic
alias tty-ldisc-3       ppp_async  
alias tty-ldisc-14      ppp_synctty
alias ppp-compress-21   bsd_comp   
alias ppp-compress-24   ppp_deflate
alias ppp-compress-26   ppp_deflate

alias /dev/tts          serial
alias /dev/tts/0        serial
alias /dev/tts/1        serial
alias /dev/tts/2        serial
alias /dev/tts/3        serial
post-install serial /etc/init.d/setserial modload > /dev/null 2> /dev/null
pre-remove serial /etc/init.d/setserial modsave  > /dev/null 2> /dev/null

### update-modules: start processing /etc/modutils/thinkpad
path[thinkpad]=/lib/modules/uname -r`/thinkpad
#options thinkpad enable_smapi=1 enable_superio=1 enable_rtcmosram=1 enable_thinkpadpm=1
alias char-major-10-170 thinkpad
alias /dev/thinkpad thinkpad
alias /dev/thinkpad/thinkpad thinkpad
alias /dev/thinkpad/smapi smapi
alias /dev/thinkpad/superio superio
alias /dev/thinkpad/rtcmosram rtcmosram
alias /dev/thinkpad/thinkpadpm thinkpadpm

alias parport_lowlevel parport_pc
alias char-major-10-144 nvram
alias binfmt-0064 binfmt_aout
alias char-major-10-135 rtc
There is here some cleaning up to do, Debian comes with quite a large modules.conf.
Sound is working, the grey IBM-soundvolume-keys don't seem to have any effect. Dont know yet if this could be solved.
Also the network-interface does it's work properly.

Update: Lukasz Walewski pointed me to the Thinkpad Buttons page (see "links", below), the keys can do their work (haven't tried that yet, but soon will).

I haven't have tried the modem nor the irda-stuff yet.

X-Configuration

In order to get X working on this laptop, XFree86 4.2.0 had to be installed as well as a 2.4 kernel.
I was happy to find testing packages for XFree 4.2 and put them in my sources.list.

By pressing <Fn-F7> the laptop-output can be switched between only TFT, only external VGA and both. This works as expected, which is great when doing presentations using a beamer :-)

I have not been able to get the S-VHS-connector in the back working. With XP this was possible, so the hardware is OK. If somebody can give me a hint on this matter, I would be very grateful.

/etc/X11/XF86Config-4

Section "ServerLayout"
        Identifier "XFree86 Configured"
        Screen      0  "Screen0" 0 0
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
        FontPath "unix/:7100"
EndSection

# Module loading section

Section "Module"
        Load  "dbe"             # Double-buffering
        Load  "type1"         # Adobe Type 1 font handler
EndSection

Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "keyboard"
        Option      "XkbLayout" "nl"
EndSection

Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Device" "/dev/psaux"
        Option      "Protocol" "PS/2"
        Option      "Emulate3Buttons" "off"
        Option      "ZAxisMapping" "4 5"
EndSection

Section "Monitor"
        Identifier "My Monitor"
        VendorName "Unknown"
        ModelName  "Unknown"
        HorizSync 31.5 - 48.5
        VertRefresh 50-70
        Option "dpms"
EndSection

Section "Device"
        Identifier "Intel Corp.|82830 CGC [Chipset Graphics "
        Driver "i810"
        BoardName "Unknown"
        VideoRam 0
EndSection

Section "Device"
        Identifier "Linux Frame Buffer"
        Driver "fbdev"
        BoardName "Unknown"
EndSection

Section "Screen"
        Identifier "Screen0"
        Device "Intel Corp.|82830 CGC [Chipset Graphics "
        Monitor "My Monitor"
        DefaultDepth 24
        Subsection "Display"
                Depth 24
                Modes "1024x768"
        EndSubSection
EndSection

PCMCIA

I was able to mount a CompactFlash-card through a PCMCIA-CompactFlash-card adapter.

USB

The daily use of the R31 led to some pain in the upperarms. Now I do most of the time work with an USB-keyboard (there is no "normal" keyboard-connector on the back of the laptop) and an USB-mouse (same reason). The keyboard is from HP, the mouse is a Logitech scroll-mouse.
The both work well. I load the following modules to use them:

For the keyboard, no extra configuration of XFree is nessecairy. For the mouse, the following lines are added to the /etc/X11/XF86Config-4 in the InputDevice-section:
        Option      "Device" "/dev/input/mice"
        Option      "Protocol" "IMPS/2"
        Option      "Buttons" "5"
        Option      "Emulate3Buttons" "off"
        Option      "ZAxisMapping" "4 5"

The keyboard

Using this laptop is quite a shocking experience, because of the descision of IBM to put a "Dutch" keyboard in it.
First of all I don't see why this keyboard should be more efficient to use then f.e. a standard US keyboard for typing Dutch language. What makes this keyboard layout really a pain in the behind is the fact that the following keys are moved to a very different position:

These are just a few examples.

In the XF86Config-4 you see a line

Option      "XkbLayout" "nl"

Unfortunately, this is not enough. In the modmap I also had to change the definition of some keys.

Mailing-list

Robos from Aachen created a IBM R31 mailinglist!

For more information, please see http://rnbhq.org/cgi-bin/mailman/listinfo/

Usefull links

There are some very informative R31-related pages out there:

Credits

The end

At this moment, I can't tell much more. Linux can run easely on this system, that is for sure.
There is a lot of work that needs to be done:

Any progress that is worth mentioning will be put in this page.
Walk through this site
← previous page next page →