HomeHome

Thinkpad Patches

In some of my spare time, I do quick-n-messy fixes for some software. This is because I own a rather old laptop with some strange bits of hardware in it. I leave these patches here in case anyone else running linux on an IBM Thinkpad may want to fix things in the same way.

I make no promises about what these patches may be able to do. They are unlikely to work on even a slightly different platform. For the record, mine's a Thinkpad 760ED, 133MHz, 72Mb, with Trident Cyber 9385 graphics card and ESS Audiodrive (was evil MWave) soundcard. I'm running Debian 3.0 Woody (although the patches worked for 2.2 potato as well), hand-rolled 2.4.20 kernel (worked on 2.2.x too). If you have success with any other platforms, do let me know.


So far, there's just two: Firstly, for SVGAlib: Versions 1.9.11 onwards of svgalib support the cyber9382/5 chips properly, (also have a look at XFree86 version 4.2+, and the tridentfb device included in kernel 2.4.19+). However, if a package requires an earlier version such as 1.4.3, then svgalib mistakes the card for a tvga9680 and hangs the kernel. Applying this patch to the source before building will get most of the modes to work (there is a memory problem with 1024x768 16bit), possibly with the additional aid of cy9382 to reposition the display for sizes larger than 640x480.


Next - a patch for ESD to make it run in mono mode.

If, like me, you are using an MWave Winmodem-and-soundcard device, then you're pretty screwed. You can only get the soundcard working in 8-bit mono mode, with the use of another hack involving warmbooting from DOS. Once you've done this, you'll realise that quite a bit of linux software doesn't actually cater for low-spec soundcards. A program called the Enlightened Sound Daemon offers a solution, though. It will allow multiple programs to use the soundcard at once, and can run a server for 8-bit soundcards. However, it doesn't yet support mono modes. So I've written this hack so that it does.

With the aid of this, you can use a few more things, like Realplay, with the MWave. The patch is essentially an extra i++ to drop half the sound samples in one of the internal loops, but there are a few other changes, namely fiddling the defaults so that it tries mono first, and adding the -m switch to the command-line arguments.

I've done a patch for versions 0.2.8, 0.2.17 and 0.2.23.

The way to work it, then:

Then fire up esd from the command line before you try to use an esd-enabled program.

I've found that this hack doesn't please esdmon much. Anything dumped from esdmon, with or without the -m flag, is still mono. I have an even less pleasant patch for this, that I might one day clear up and place here.

Again, if you're having problems with it, email me and I might be able to help, and if you get it to work on any other machine, let me know because I need the ego boost (and I can make a list of what machines it's good for).

I have done this hack for EsounD. This is not any kind of preferential treatment of GNOME over KDE, I did it because Realplayer will speak to it. When Realplayer provides Arts support, I might investigate that.


Update: 26th May 2003. I've installed a real sound card. The contents of this page are left up for anyone still using the vile MWave, but the best advice I can give is to do what I did:

  1. Buy a replacement soundcard - the ESS Audiodrive supplied with the 760EL will fit in the same slot as the MWave. (It doesn't have any telephony functions, but you probably couldn't use them anyway.) It's part number 46H5353. (www.ClonesUK.com can supply them to UK customers quite cheaply.)
  2. Read the Hardware Maintenance Manual. It can be downloaded from IBM, and you should really print it out (or at least, print the section for the 760). If you don't have another computer to hand, then you won't be able to read the electronic version when you're doing the changeover...
  3. Invalidate your warranty by servicing the parts yourself. You'll need a large work area, several screwdrivers and a couple of hours. (Static bracelets are probably a good idea too.) Very far down, you'll find the MWave card. Replace it with your new ESS card. Then carefully put the Thinkpad back together again, remembering to wire up the Mic and Speaker to the cables trailing off the new soundcard.
  4. Reboot. Provided you've reassembled everything right, the machine will actually turn on (although I found that the system clock and hardware settings had been reset). You will no longer need to boot via loadlin, just go straight in from Lilo/Grub. The kernel's bog-standard Soundblaster-compatible drivers will operate this card with no problems.

That's it. It really is worth the hassle.


If you have any suggestions for this site, let me know at glyn (at) ox.compsoc.net .