Installing Mandriva Linux on a ThinkPad T20
Mandriva 2007
Power Management
Suspend works perfectly under the following conditions.
1. An older 2.6.12 Mandriva kernel is used. This may already be present if you are upgrading, but should be possible to install after the fact for a fresh install.
2. The sound-restart tweaks to /etc/sysconfig/suspend
described below are preserved. For reference,
a complete copy of this file that is known to work is here:
# -*- Mode: shell-script -*- # Some broken BIOSes, like those found in early Gericom 3xC notebooks, # won't wake up harddisks from suspend to disk unless they're set to PIO mode # and 16-bit. # Don't activate the following two lines unless you're getting # "hda: lost interrupt" after returning from a suspend to disk. #SUSPEND_DISK="-q -X0 -q -c0 -q -d0 -q -u0 -q -S0" #SUSPEND_RESUME="-q -X66 -q -c1 -q -d1 -q -u1 -q -S30" # If RESTART_NFS is set to yes, NFS filesystems will be unmounted at # suspend, and remounted at resume (if possible). RESTART_NFS="no" # If NET_RESTART is set to yes, the network will be shut down at suspend and # restarted at resume. # This is especially useful if you're using DHCP, but usually won't hurt. RESTART_NETWORK="yes" # I got frequent problems mainly with scsi-pcmcia-cards on the cardbus. Use # RESTART_PCMCIA="yes" to stop the whole pcmcia-subsystem on a suspend and # to start it again after a resume. This can slow down your suspend and resume # process. # Use PCMCIA_TIMEOUT in order to set up the PCMCIA timeout. # Some BIOSes are too buggy to handle cardctl suspend and cardctl resume # properly, in these cases cardctl eject and cardctl insert can be used instead. # However, this actually ejects the card on hardware supporting it, so if # the BIOS isn't buggy, it shouldn't be used. Set PCMCIA_BIOS_BUG to yes if # you are experiencing problems with PCMCIA cards after a resume. # Since buggy BIOSes seem to be far more common than hardware that can eject # PCMCIA cards (and it doesn't make a difference on systems that don't have # either), it is enabled by default. RESTART_PCMCIA="yes" PCMCIA_BIOS_BUG="yes" PCMCIA_WAIT="yes" PCMCIA_TIMEOUT="10" # if you have problems with your X display after returning from suspend mode # give CHANGE_VT the number of the virtual terminal your X-Server runs on CHANGE_VT="7" # Set LOCK_XFREE to yes if you want to lock all your X displays at suspend LOCK_XFREE="no" # If you set this to yes, the clock will be synced with the hardware clock # when the computer returns from suspend mode. CLOCK_SYNC="yes" # if your sound sometimes doesn't work after a resume set RESTORESOUND to "yes"; # this will kill all sound applications, remove and start the $SOUNDMODULES # again RESTORE_SOUND="yes" #SOUND_MODULES="sb uart401 sound soundcore maestro cs4281" SOUND_MODULES="sb uart401 sound soundcore maestro cs4281 snd-cs46xx" # Sometime USB doen't support well the suspending, specially for mouse # you may want to activate USBMOUSE_RESTART to make sure that your # mouse will work, if you want to restart the whole usb system set the # variable USB_RESTART # changed from no to yes and back again on 12/16/2006 by mls USB_RESTART="no" # the error-beep of your terminal might be set to the default values after a # resume so set TERMINAL_BEEP to "yes" to restore the values in # /etc/sysconfig/keyboard TERMINAL_BEEP="no" BEEP_LENGTH=2 # List here the Services to Restart between Suspend/Resume RESTART_SERVICES="haldaemon postfix ntpd xinetd nfs gpm pcmcia irda alsa anacron cpufreq cpufreqd mDNSResponder athcool mysqld" ## APM Specific config # make an entry in the logfiles whenever the percentage of # battery power changes below the value specified here LOGPERCENTCHANGE=10 # warn on specified remainig battery percentage, use negative values # to disable this feature WARNPERCENT=5 # use -W to warn all users in a critical power state ADDPARAMS="-W" ## SWSUSP Specific config # Use SWSUSP_FORCE_SUSPEND_MODE to force use the SWSUSP feature # suspension. If empty, this let the suspension # behaviour unchanged. "0" will force shut off after # suspension. "1" will force reboot. You can add an optional # second parameter to tune the suspension display (see swsusp # documentation for more information). # p1 = 0 for halt + eatmem p1 = 2 for halt + freemem # p2 = 2 for progress bar # p3, p4 are optional debugging options for hackers (see swsusp kernel patch documentation). # Default: "0 2", i.e. halt, eatmem, progress bar #SWSUSP_FORCE_SUSPEND_MODE="0 2" ## Automatic waking up config #Use AUTOWAKE to resume from a suspend to ram after a given amount of time #and automatically launch a command. #Useful to have an automatic suspend to disk after some time in #suspend to ram. #AUTOWAKE: enable/disable this functionnality AUTOWAKE="no" #AUTOWAKE_DELAY: Set delay before automatic resume, in minutes. AUTOWAKE_DELAY=20 #AUTOWAKE_COMMAND: command to run after automatic resume. #Use "/usr/bin/pmsuspend disk" if you want to trigger a suspend to disk AUTOWAKE_COMMAND="/usr/bin/pmsuspend disk"
NOTE: This solution conflicts PCMCIA improvements in the newer kernel, causing wireless cards not tobe recognized. details here. The solution is to replace the newer pcmciautils package with the older pcmcia-cs package from the 2006 distribution.
urpme pcmciautils && urpmi pcmcia-cs
You may temporarily to have to add a 2006 repository source so that the 'pcmcia-cs' package can be found.
Power Management alternative: use APM
- noacpi acpi=off apm=on
- Once booted, edit Template:/etc/sysconfig/suspend. Change RESTORE_SOUND to 'yes', and add Template:Snd-cs46xx to the list of SOUND_MODULES.
- In a terminal:
su # allow users to run apm chmod +s /usr/bin/apm exit apm --suspend
With that setup, you can just run "apm --suspend" in the future, and suspend/resume should work, including sound after the suspend/resume cycle.
Power Management Options which failed with the Live CD
Booting with the default ACPI support, trying Fn-F4 to suspend on this CD or selecting "Suspend" from the battery icon resulted in an error like "INIT PANIC: segmentation violation at 0x804e21d! sleeping for 30 sec."
Even following the steps to enable APM above, Fn-F4 just puts the computer in standby, but does not suspend. Selecting "Suspend" from the battery icon caused the laptop to suspend, but immediately resumed.
Power Management Options which failed with a hard disk install
Trying Fn-F4 with the default kernel would suspend and resume the first time, the moon icon never stops blinking after resume, and further attempts to suspend or shutdown do not complete. Suspend attempts resume immediately and shutting down hangs at a blitzed-out screen at the end, after the hard drive has spun down.
Mandriva 2006
Basic Installation
The basic install of Mandriva Linux 2006 works smoothly on a ThinkPad T20. Read on for things that need tweaking.
DVD Notes
With appropriate software installed, the combination of Mandriva and the T20 plays DVDS fine.
However, the frame rate will be noticeably reduced if the DVD is hotswapped in place of a battery, or if the laptop is suspended and resumed. This DMA-related phenomenon is explained more on the UltraBay page in the Hotswapping section. The issue is discussed more in a this bug report which seems to suggest that removing /etc/sysconfig/suspend-scripts/suspend.d/ultrabay
could help, at the risk of causing the computer to freeze if the CD/DVD drive is ever removed while the system is running.
Upgrading from 2005 LE to 2006
Although the installer ran without incident, look out for several issues to address:
- Several things quit working until I switched to the 2.6.11 kernel that was installed. Notably, sound didn't work and the TrackPoint didn't work. You can use drakboot to change the default corner, or command line jockeys can edit /etc/lilo.conf
- The DVD drive could not be located. It was being sought at /mnt/cdrom but really existed at /mnt/cdrom2. Rebooting seemed to fix this.
- My Orinico wireless card quit working. It was being recognized at "eth0" now instead of "eth1". Copying my settings from the eth1 configuration to the eth0 configuration fixed that.
- Using the TrackPoint in combination with the middle mouse button as a scroll wheel quit working. I got it working by using this bit in my /etc/X11/xorg.conf file.
Section "InputDevice" Identifier "Mouse1" Driver "mouse" Option "Protocol" "ExplorerPS/2" Option "Device" "/dev/mouse" Option "Emulate3Buttons" "true" Option "XAxisMapping" "4 5" Option "YAxisMapping" "6 7" Option "EmulateWheel" "true" Option "EmulateWheelButton" "2" EndSection
If you haven't editted this file before, select "Run" from the start menu and then run a text editor (such as "kate") as root. Be sure to create an extra copy of the file before you change it in case there is a problem! To make the changes take effect you'll need to restart X. Rebooting is one way to do that, or you could hold Control-Alt-Backspace to restart the X server.
- The "Suspend" option had disappeared from the KLaptop menu. It was necessary to go into the "Configure KLaptop" dialog and re-setup the "helper applications".
- Selecting "ondemand" as a Performance Profile seems to have no effect, through KLaptop or on the command line. It would be nice to solve this for better life.
- While suspending worked great with Mandriva LE, trying to suspend with APM, now resulted in a reboot upon resuming. What finally worked me was:
- Upgraded to 2.6.12 kernel (not sure if this mattered)
- Make sure acpi and acpid are installed and apmd is not
- Use the built-in suspend key to suspend (Fn-F4). (Using KLaptop instead resulted in no sound upon resume).
- My USB card reader quit working. My fix was to make sure the USB service was started at boot time, and to explicitly load the USB mass storage module at boot time.
# ln -s /etc/init.d/usb /etc/rc5.d/S50usb
- Edit /etc/sysconfig/usb and set STORAGE=yes
Getting the modem to work
The modem is not accessible through one of the default serial interfaces. It can, however, be queried through /dev/tty13.
For further information, see Installing_Ltmodem_driver_for_Mandriva.
Support for the Thinkpad buttons with Kmilo
Kmilo is software that provides on screen feedback and some extra configuration when using the Thinkpad-specific buttons such as the volume and brightness keys. It is provided by Mandriva as part of KDE 3.5 bundle for Mandriva 2006. The package name is 'libkmilo1'. It works after installing that package and rebooting. Now when visting settings:/Peripherals/ you'll see a new icon for "IBM Thinkpad", with a few option to configure it.
Mandriva 2005 LE
Suspend/Resume
Mandriva controls suspend/resume preferences through the file /etc/sysconfig/suspend. It is a well-commented text file. Here are two options I set that seemed to help make sound continue working after a suspend on the T20:
RESTORE_SOUND="yes" SOUND_MODULES="sb uart401 sound soundcore maestro cs4281 snd-cs46xx"
I'm not sure if all the sound modules in this list are necessary. I added snd-cs46xx to the list because I knew it was the one I was using.
From the Mandrake Control Center, I configured one specific Thinkpad-specific option for the sound driver. I entered the "Hardware" area and then selected the sound card and clicked "Configure Module". One of the options is labeled simply "thinkpad". I set it to "1".
Screen Locking after Suspend
My screen always came back locked after I suspended, and I couldn't figure out how to turn that off at first. That preference is also in /etc/sysconfig/suspend and is named LOCK_XFREE.
I set it to "no", but can still lock the screen if I want by using the Klaptop "Lock & Suspend..." option