Mandrake 9.2 on IBM ThinkPad R40

Introduction

On this page I have tried to document my experiences in running Linux (Mandrake) on an IBM ThinkPad R40. I dual-boot with Windows XP. My previous Linux experience is close to non-existent. I installed Mandrake 9.1 on my desktop but never really played around with the OS.

Mandrake works out of the box on the R40, but getting it to work the way you'd expect it to work consumes a fair amount of your time... I did not expect it to be a walk in the park - it has been, and continues to be, a great learning experience.

Computer hardware

The computer is a IBM ThinkPad R40, model 2722-3YU. The following hardware is installed:

What works and not

My current kernel is: 2.4.22-28mdk.

Linux installation

Originally, I started out with Mandrake 9.1. But I had problems getting DMA to work on the HD. Mandrake 9.2 was just released, so here are the installation details to get the system up and running. Additional tweaks are discussed later.

  1. The computer comes with Windows XP pre-loaded. When you first boot, XP is installed and configured.
  2. After the first boot:
    • Disable Virtual Memory (Page File)
    • Disable System Recovery
    • Run Scandisk (My Computer, right-click on drive, Properties, Tools, Check Now..., check the boxes)
    • Run Disk Defragmenter
    • Resize NTFS (XP) partition with Partition Magic, I used 8 GB for the partition
    • Convert NTFS to FAT32, this will help hibernation in Linux
    • Do whatever Windows tweaks needed...
  3. Install Mandrake 9.2 from CD
    • Keep the hidden IBM partition (with factory installation) and the XP partition. Partition rest of the drive as:
      • / : 10 GB
      • swap : 500 MB
      • /home : 15 GB
    • Select all the options for Workstation, plus KDE and Gnome. Add whatever packets needed...
    • Enable firewall
    • Select LILO and ACPI
  4. Do the first boot to Linux
  5. In the LILO entry, append "acpi=off apm=on". Run LILO.
  6. Use the Mandrake Update to get the latest security and bug fixes, 170+ MB
  7. Make sure you download the source rpm for the kernel version you want (the one that comes with mandrake 9.2 is too old). http://www2.linuxforum.net/RPM/index.html is a good place to find the rpm you're looking for.
  8. Turn off the following services from starting at boot:
    • acpi (apm works better) (this will also be addressed in Power management)
    • pcmcia (otherwise KDE might crash after suspend)
    • postfix
  9. Reboot
  10. Configure the work area as needed...

Power management

ACPI doesn't really work in the 2.4 kernel, so I'm using APM only. I experienced KDE crashes and computer lock-ups when resuming from suspend. After numerous experiments, it appears as if PCMCIA may have something to with it. To customize my suspend operations, this is what I did:

CONFIG_APM=y
# CONFIG_APM_IGNORE_USER_SUSPED is not set
# CONFIG_APM_DO_ENABLE is not set
# CONFIG_APM_CPU_IDLE is not set
# CONFIG_APM_DISPLAY_BLANK is not set
CONFIG_APM_RTC_IS_GMT=y
CONFIG_APM_ALLOW_INTS=y
# CONFIG_APM_REAL_MODE_POWER_OFF is not set

# CONFIG_HOTPLUG_PCI_ACPI is not set
# CONFIG_ACPI is not set
CONFIG_ACPI_INITRD=y

CONFIG_X86_SPEEDSTEP_CENTRINO=y

# CONFIG_X86_UP_APIC is not set
your_user_name ALL= /usr/bin/apm, /sbin/ifconfig
#!/bin/bash
sudo /sbin/ifconfig eth1 down
sudo /usr/bin/apm --suspend

WiFi

To get WiFi to work required some experimenting... I also had problem with the firewall - for some reason it wouldn't allow my WiFi connection to reach the internet. This is what I did to get the WiFi-card to work:

Then I decided to not use DrakFirewall to set the rules for the firewall (it didn't work as I expected it to work...), instead I use my own script. After the card was working, this is what I did to get the connection up and running:

#!/bin/bash
# Delete existing rules
iptables --flush
iptables --delete-chain
# Create new rules
iptables -N netwk
iptables -A netwk -i eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A netwk -i eth1 -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P INPUT DROP
iptables -A INPUT -j netwk
# Needed for KDE/Gnome
iptables -A INPUT -j ACCEPT -i lo
iptables -A OUTPUT -j ACCEPT -o lo
#!/bin/bash
# Create the firewall
./create_iptables
# Bring up the device, eth0 for LAN
ifconfig eth1 up
# Select the network (not needed for LAN)
iwconfig eth1 essid 'your_network_id'
# Get and IP address
dhclient
# Show the information...
ifconfig

With this setup I can choose when to establish the connection, wireless or LAN.

Graphics

3D acceleration works "out of the box". I have installed the Mesa demos (gears, a.k.a. glxgears, is included in the regular installation) and I get the following results running the applications in full screen (1024x768):

At the moment, these numbers are good enough for me. I do my gaming on my PS2...

KDE tweaks

Change log

Links

Here are some links I have found to be helpful or generally informative...

Continue to my Linux FAQ.