Seeds for Change - support for Social Sector Organisations

Putting GNU/Linux on the IBM Thinkpad 600E (or 600) Laptop (Mandrake9.2)

 General Blurb
 Internal Modem on the 600E
 Internal Modem on the 600
 Sound
 Serial Port
 The /etc/modules.conf file
 Links to relevant GNU/Linux Thinkpad 600/600E sites

I have installed Mandrake 9.2 on both a 600E and a 600. These were set up for someone else, and I no longer have them in my posession - I therefore can't answer any questions on this - sorry. Everything I know I've put in this page.
If you have a laptop and want to know how other people got round problems then have a look at the Links section below.

Mandrake 9.2 installed easily (using the suggestions that the installation programme gave me) on the TP600E and the TP600, but sound, the internal modem and the serial port didn't work (I don't have a floppy drive, but you can get a plugin or an internal (swap with dvd-rom) floppy)...

After much googling and head scratching, I worked out that some of the hardware has to be turned on or off in DOS or Windows using a programme called PS2.exe (so if you still have Windows or DOS on your laptop, make sure your hardware is set correctly before you reformat your hard-drive!) There is a Linux version called tpctl. I found this iso image, which you can burn to cd, and boot off - this drops you into DOS, so you can use PS2.

To get information on PS2, type PS2 ?, or PS2 ? IMODEM to find out the settings for the internal modem. After some changes you are told to reboot - it's probably worth doing this before you put in the next command - I think this is one bit I did wrong, but I don't know.

The ThinkPad 600E has three built-in serial interfaces, but can only use two at once(!?!?!) - these seem to be the Infrared Device, the Internal Modem and the Serial Port. Use the PS2 to do the switching on or off.

Internal Modem on the 600E

I had to switch the modem on with PS2 - so I booted into DOS (using the CD burnt from the ps2.iso) and used PS2. First I switched off the Infrared device:
C> PS2 IR D
then switched on the modem:
C> IMODEM E or maybe:
C> IMODEM 1

This is an mwave modem. IBM released a GPL driver, and the kernel modules are now integrated into standard kernels. So if you have a later 2.4 kernel, it should be in there already.

You still need to get the mwave RPM package or the mwave tarball to execute in userland. At time of writing the orignals were no longer available, but Sourceforge were hosting a few versions - so do check there for newer versions (source, RPM and FreeBSD packages are available). The RPM worked fine with Mandrake9.2. Just install it - urpmi whatever-directory-you-saved-it-to/mwavem*.rpm
(or in other worlds: rpm -i whatever-directory-you-saved-it-to/mwavem*.rpm; or do that tarball thing - instructions in the tarball).

Now edit /etc/mwavem.conf - the first section should be [WORLDTRADE]. Change the Country=1 to whatever your number is - look further down that file for a list of countries and their numbers - GB is 44.

You need to set up the serial port: setserial /dev/ttyS1 auto_irq autoconfig
Test the settings assigned with setserial /dev/ttyS1 and compare them with what's in your /etc/modules.conf and your syslog: cat /var/log/syslog | grep mwave
Hopefully the irq and io numbers will all match up :-)

That should be it. Try your favourite dialler, setting it to look in /dev/ttyS1.

Troubleshooting Internal Modem on the 600E

The things that got me were the PS2 thing to set the hardware up, and missing off auto_irq in the setserial command...

After rebooting, kppp (or whatever you are using to dial) found the modem but couldn't initialise it. I found that restarting the mwavem service helped - sometimes had to stop it several times before it managed it:
service mwavem stop and watch for the OK - if it says failed then stop it again.
service mwavem start
(or in other worlds: /etc/init.d/mwavem start)

I tried making the service switch on later on in the startup process, but that didn't help. The only way to get it working again seemed to be to restart the mwavem service after the computer had booted up. Since root needs to restart the service, I had to either set up sudo or suid on a script. Suid has its own security problems, so I stuck with sudo. I've called the following script kppp so that it can be started using the normal kde menus etc, and moved kppp to another location. Make sure you do this before you save this script as kppp.
mv /usr/bin/kppp /usr/bin/kppp1
then make this script as /usr/bin/kppp: vi /usr/bin/kppp
#!/bin/sh
sudo /etc/init.d/mwavem stop
sudo /etc/init.d/mwavem start
      #stop then start rather than restart since it seems to work better here
kppp1&

You'll need to make sure that the users can run this - so edit the sudoers file using: visudo
and add this to the bottom:
%users localhost = NOPASSWD:/etc/init.d/mwavem
and make sure your users are in the users group, that kppp is executable (chmod +x /usr/bin/kppp), and make sure mwavem doesn't turn on at boot (doesn't matter so much, but why not tidy up?)

Internal Modem on the 600

I don't understand why this was different when I set up the 600 - maybe I didn't need to do all the above the first time round :-)

This time I just installed the mwave RPM, edited the Country=x bit in /etc/mwavem.conf, and rebooted. KPPP found the modem, and it all worked perfectly :-)

Sound

Couldn't get sound working on the 600, but it was (relatively) straightforward on the 600E: draksound and Mandrake Control Centre couldn't sort out the sound - it found the right driver, but it just didn't work.

I tried to set things manually in /etc/modules.conf, but failed...

So installed sndconfig, and ran that: urpmi sndconfig
to install, then type:
sndconfig
in a terminal to run it.
It failed a couple of times, but it kept trying, and eventually offered to let me try my own settings:
io=0x220
irq=5
dma=1

and that just worked :-)
If it doesn't work just try it again a couple of times before you give up!

Serial Port

Once again: boot into dos and use PS2 (use this ps2.iso bootup cd image):
C> PS2 IR D to switch off the Infrared device.
Then "power on" and "enable" the serial cable interface. To power on the serial cable interface:
C> PS2 SER ON
C> PS2 SERA ENABLE

Boot into Linux, and as root do:
setserial /dev/ttyS0 auto_irq autoconfig
(in Mandrake you'll need to go hunting for setserial - it may not be installed, or even on the installation cds! This version works with Mandrake 9.2)

The /etc/modules.conf

Here's the /etc/modules.conf file from the Thinkpad 600E.

probeall usb-interface usb-uhci
options opi3 io=0x388
options cs46xx io=0x220 irq=5 dma=1 dma2=0 mpuio=0x388
alias sound-slot-0 sb
options sound dmabuf=1
alias synth0 opl3
options opl3 io=0x388
options sb io=0x220 irq=5 dma=1
alias char-major-10-219 mwave
mwave_3780i_io=0x130 mwave_debug=0x00

Links to relevant GNU/Linux Thinkpad 600/600E sites

 ThinkWiki, the Wiki Web for ThinkPad users (lots of info here - not just installation issues)
 TuxMobil's list of documentation for installing Linux on IBM laptops
 Linux On Laptops' list of documentation for installing Linux on IBM laptops

back to Linux - what and how?








Seeds for Change: a non-profit activist training co-op