How to squeeze the most of your ancient Thinkpad T20, T21, and T22 on Linux
If you’re like me, you just can’t bring yourself to get rid of a perfectly usable computer, particularly an old Thinkpad workhorse. However, in the case of my Thinkpad T21, even in Linux it is being forced into obsolescence, primarily by the graphics card (01:00.0 VGA compatible controller: S3 Graphics Ltd. 86C270-294 [SavageIX-MV] (rev 13)). I hope my tips in this article help others like me squeeze every last drop out of their machines.
Distro Choice
First and foremost… you’re going to need to use Gentoo. There is just no way around this, so if you’re a Linux newbie you’re just going to have to take the plunge. The reasons for this are several fold. Firstly … you can build the entire software stack with -Os which is the GCC flag for optimize for size. The Pentium III Coppermine chip on these old Thinkpads has a very small on-die cache, and doesn’t support much SDRAM either. Optimizing for size for help keep as much as possible in cache and RAM, at the sacrifice of slightly slower execution rates. Secondly, with Gentoo you can remove absolutely everything unnecessary for your machine. You can make your kernel and software stack as lightweight as possible. Thirdly and most importantly, you can build older no longer supported software against recent stuff. This is important because MESA removed support for DRI (rendering acceleration) for the Savage chips to greatly simply their codebase as they migrated to DRI2. In any binary distro, huge parts of the graphic stack are binary tied at the hip to MESA. You will find yourself unable to update huge swaths of the software stack, and certainly won’t ever be able to upgrade to a new release of a binary distro. I have found keeping around older MESA to make for a dramatically better graphics experience. It is the difference in 7 FPS in glxgears using software GL and 150 FPS using hardware acceleration.
So, with the distro choice in hand … here are the important bits for configuration as you install Gentoo:
Configuration Files
Kernel Config (Note: you’ll want to tweak this if you have add-on hardware … but I have enabled many of the generic USB/PCMCIA wifi card drivers here. This kernel is VERY stripped down.)
http://www.jeremysands.com/linux/thinkpadt21/crow-kernel.txt
/etc/make.conf (NOTE: -pipe is disabled as 256 MB of RAM simply isn’t enough to build more complicated packages like qtwebkit.)
http://www.jeremysands.com/linux/thinkpadt21/crow-make-conf.txt
/etc/portage/package.mask (IMPORTANT … this keeps older MESA and its immediate dependencies in place. Also new versions of Flash require SSE2 … which the Pentium 3 Coppermine CPU does not have.)
http://www.jeremysands.com/linux/thinkpadt21/crow-package-mask.txt
/etc/X11/xorg.conf (Yes, you need to manually config X for this. For starters, the Savage IX only has 8MB of VRAM. This is NOT enough to run OpenGL and 1024×768 and 24-bit color at the same time. I chose to drop down to 16-bit color to keep the fairly usable resolution and acceleration. There are also some really anal options to squeeze every drop out of that Savage in here. If you feel frisky, you can try using EXA acceleration as it should be faster, but it resulted in a hard lockup for me.)
http://www.jeremysands.com/linux/thinkpadt21/crow-xorg-conf.txt
Be sure to make your swap at least 512 MB large if you have 256 MB of SDRAM. If you have less SDRAM, make swap 1024 MB. The reason for this is mentioned below.
Software Stack Tips
For using YouTube … I strongly recommend whitey … originally conceived for Raspberry Pi users to able to use YouTube in a similarly limited hardware environment, it is super useful for this ancient Thinkpad too. You’ll want to use the –bandwidth parameter to choose a lower (360p 480p) quality video if possible. The ancient Savage just can’t handle 720p and up in the formats YouTube encodes to. Whitey: https://pypi.python.org/pypi/whitey
I have created an alias for mplayer called mplayer-slow which uses the CPU’s maximum power to assist the GPU in viewing intensive videos. Add this to your ~/.bashrc file or simply enter this in a shell you want to use for video playback.
alias mplayer-slow=”mplayer -framedrop -lavdopts lowres=0:fast:skiploopfilter=all”
I’ve found with the alias I can playback (just barely) 480p H.264 high bitrate video. With a less demanding video format (XviD, Theora, etc) I think you would just be able to get away with 720p. Not bad for a 15 year old piece of hardware manufactured long before 1080p HD meant anything to most people.
Forget about using a typical RAM hoggy browser. Don’t bother with Chromium, Chrome, or Firefox. Try Opera and Midori.
Forget about using a typical RAM hoggy GUI. Don’t bother with Gnome or KDE. Try LXDE or (my preference) XFCE.
If you use XScreenSaver, for heaven’s sake don’t let it choose one at random. If it pulls something OpenGL and intensive, you may never get the laptop to respond without a hard reboot.
If you are compiling something truly massive like, say, qtwebkit … you’ll want to drop out of X and compile it from a terminal without X (or anything else really) running. Some packages when compiling can push my T21, with 256 MB of RAM and 512 MB of swap … to the absolute limit in memory. I find I will hit a memory limit error if X is running a few things … but the 256+512 hasn’t hit any walls if nothing else is running.
And that is all she wrote. If you have problems or questions or suggestions … leave a comment.
thx for your great article…
this is my 2nd try to install gentoo…
i got one stupid question so far: wich kernel modules do i need?