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 a relatively quick encounter with Mandrake 9.x.
Mandrake works out of the box on the R40, but getting it to work the way you'd expect it to work may consume some of your time... but it's all a learning experience.
Computer hardware
The computer is a IBM ThinkPad R40, model 2722-3YU. The following hardware is installed:
- Processor: Intel Pentium M 1.3GHz
- Memory: 256 MB
- HD: 40 GB
- Drive: CD-RW/DVD-ROM (HL-DT-ST RW/DVD GCC-4240N)
- Screen: 14.1 XGA (1024x768) TFT LCD
- Graphics: ATI Radeon 7500
- WiFi: Cisco Aironet 350 Mini PCI
- Modem
- Ethernet
- IEEE 1394
- USB 2.0
- Audio chipset: SoundMAX
- Pre-installed OS: Windows XP Home
What works and not
My current kernel is: 2.6.3-7mdk.
- Ethernet: yes
- WiFi: yes
- Modem: not tested
- USB 2.0: yes
- IEEE 1394: not tested
- PCMCIA: not tested
- Audio: yes
- APM: yes
- ACPI: yes
- Suspend: yes (APM) / no (ACPI)
- Hibernation: not tested
- CD-R/CD-RW burning: yes
- DVD playback: yes
- Advanced mouse features: not tested
- Printer: not tested
- 3D acceleration: yes
- S-Video: not tested
- External monitor: not tested
- Special keys: not fully tested
Linux installation
I already had Mandrake 9.2 on my laptop, so I skipped steps 1 and 2 this time. I also did not re-partition my drive, nor did I re-format /home... Here are the installation details to get the system up and running. Additional tweaks are discussed later.
- The computer comes with Windows XP pre-loaded. When you first boot, XP is installed and configured.
- 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...
- Install Mandrake 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
- Do not select ACPI
- Keep the hidden IBM partition (with factory installation) and the XP partition. Partition rest of the drive as:
- Do the first boot to Linux
- Use the Mandrake Update to get the latest security and bug fixes, 645+ MB
- 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.
- Turn off the following services from starting at boot:
- acpi (apm works better) (this will also be addressed in Power management)
- Reboot
- Configure the work area as needed...
Power management
ACPI: Don't use ACPI right now. ACPI works better in the 2.6 kernel than the 2.4 kernel, I get battery indicator etc. However, one major problem is that the computer won't wake up after a suspend... The only way to restart the computer is to remove the battery. Therefore, I disable in the kernel ACPI and use APM instead.
APM: APM works. I have had major problems getting KDE to
resume without crashing (I get rolling restarts of KDE/XFree86), and I'm still
investigating the problem...
Temporary solution: Log out from KDE so that you get the Display Manager,
then hit Fn+F4 to suspend. After resuming you'll have to log back in to KDE...
Not perfect, but will have to do for now.
This is what I have done to make the power management work:
- In Mandrake Control Center, turn off the pcmcia service on boot (not sure if this really helps, but I don't have any PCMCIA devices so...)
- In BIOS, turn off suspend when LCD is closed - I want to use my own script
- The kernel has to be recompiled. The following things are adjusted:
- Set CONFIG_APM_ALLOW_INTS to yes (by default it is not set), all other APM settings may keep their default settings
- Disable ACPI in the kernel
- Enable the Enhanced Speedstep feature (CONFIG_X86_SPEEDSTEP_CENTRINO) to better control the CPU frequency
- Disable APIC so that the computer completely turn off when powering down
- These are the related settings from my .config file:
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
- Use visudo (as root) to edit the file /etc/sudoers and add:
your_user_name ALL= /usr/bin/apm, /usr/bin/chvt
- Add a link on the desktop to the simple script below. The script changes to virtual terminal 1 and then suspends. When resuming the computer automatically goes back to the graphical terminal (7).
#!/bin/bash
sudo /usr/bin/chvt 1
sudo /usr/bin/apm --suspend
WiFi
I haven't tested WiFi with version 10.0 yet. In the meantime, check out my 9.2 experiences.
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):
- gears: 142 fps
- reflect: 41 fps
At the moment, these numbers are good enough for me. I do my gaming on my PS2...
One bug with current version of MDK 10.0 Community is that the harddrake service tends to comment out the Load "glx" in /etc/X11/XF86Config-4 file. I think this is a bug that will be fixed in later versions of MDK 10.0 Community, and for sure in MDK 10.0 Official. In the meantime I turn off the harddrake service (which means that hotplugging devices doesn't work...)
Special keys
All keys haven't been tested, but these work:
- Volume/mute keys
- Fn-F3 to turn off LCD screen. APIC may have to be disabled (see power management)
- Fn-F4 to suspend. See power management for limitations when suspending.
- Fn-Home/End to change screen brightness
- Fn-PgUp to turn on/off the slick keyboard light
To do
These are things next on my list that I need to work on. Roughly ordered in priority.
- Get suspend to work in KDE once and for all
- Implement different power schemes (battery vs. power-chord) and CPU/fan throttling
- Install libdvdcss for playing encrypted DVDs
- Make WiFi operation smoother
- Get all Thinkpad keys to work
- Investigate to see if this ATI Radeon driver works better than the standard
- Modem
- S-Video
- Hibernation
- Other stuff...
Change log
- 04/12/04: Update of power management.
- 04/01/04: Updated power management and special keys.
- 03/27/04: Initial page.
Links
Here are some links I have found to be helpful or generally informative...
- Mandrake Linux
- TuxMobil
- Linux-Thinkpad mailing list
- Allin Cottrell's R40
- Eric Gourgoulhon's R40
- Robos' R31
- Richard O'Neill's A22p
- Stephan Fuhrmann's R31
- Bellet's T40
- Mandrake Linux Tips
- Garrick's Little Mandrake FAQ
Continue to my Linux FAQ.