Setting up Fedora Core 4 on a ThinkPad Z60m

From Nearline Storage
Jump to: navigation, search

Here is the process I went through to get the Fedora Core 4 Linux installed and working on a Lenovo Thinkpad Z60m (2529-E8U.) Hardware Configuration

There is a switch on the front edge of the Z60m which toggles both the wireless and Bluetooth radios. Be sure that it is turned on before trying to use these devices.

Basic Installation

I attempted to archive the pre-installed Windows disk image onto 2 DVDs using Symantec's Norton Ghost utility but I was subsequently unable to successfully restore this image. After restoring the image the system reported a "signature error" when I tried to reboot.

I installed from a DVD that I downloaded via BitTorrent. I use the workstation install and customized the package list to suit my own needs.

I ran "yum upgrade" as root to update the installed packages. 94 packages were updated/installed.

Display Configuration

The basic installation configures the "radeon" driver which doesn't work well for me. It does not set the display to it's maximum resolution and screen projection via the VGA port doesn't work properly, the screen is chopped off even at lower resolutions.

Modifying the /etc/X11/xorg.conf to use the proprietary ATI display driver and to add a ModeLine specification for the maximum resolution fixes these problems. I use the livna.org repository process to install this driver.

Fn-F7 screen switching does not work. This is a known problem with the ATI display drivers and I have found no way to fix it. The external port is always on, although it can be turned off manually using the "radeontool" command. Projection works, however. With the proprietary ATI driver in place I can toggle to an appropriate resolution using the krandr taskbar resolution selector and the full screen will be output to the projector. This does not work with the open source radeon driver.

Getting the external display adapter to work with older display projectors

Some older projectors wouldn't work with the Z60m. I don't have regular access to a projector that has this problem to play with it, I keep running into them at customer locations, but so far a change I've made to /etc/X11/xorg.conf appears to have solved the problem. I added the following line to the "Device" section of the file:

Option      "ForceMonitors" "lvds, crt1"

Here's my /etc/X11/xorg.conf which includes the necessary changes for the ATI driver, the Modeline for the maximum screen resolution and the change for those older projectors:

# XFree86 4 configuration created by pyxf86config

Section "ServerLayout"
 Identifier     "Default Layout"
 Screen      0  "Screen0" 0 0
 InputDevice    "Mouse0" "CorePointer"
 InputDevice    "Keyboard0" "CoreKeyboard"
EndSection
Section "Files"

# RgbPath is the location of the RGB database.  Note, this is the name of the
# file minus the extension (like ".txt" or ".db").  There is normally
# no need to change the default.
# Multiple FontPath entries are allowed (they are concatenated together)
# By default, Red Hat 6.0 and later now use a font server independent of
# the X server to render fonts.
 RgbPath      "/usr/X11R6/lib/X11/rgb"
 FontPath     "unix/:7100"
EndSection

Section "Module"
 Load  "dbe"
 Load  "extmod"
 Load  "fbdevhw"
 Load  "glx"
 Load  "record"
 Load  "freetype"
 Load  "type1"
 Load  "dri"
EndSection

Section "InputDevice"

# Specify which keyboard LEDs can be user-controlled (eg, with xset(1))
# Option "Xleds"  "1 2 3"
# To disable the XKEYBOARD extension, uncomment XkbDisable.
# Option "XkbDisable"
# To customise the XKB settings to suit your keyboard, modify the
# lines below (which are the defaults).  For example, for a non-U.S.
# keyboard, you will probably want to use:
# Option "XkbModel" "pc102"
# If you have a US Microsoft Natural keyboard, you can use:
# Option "XkbModel" "microsoft"
#
# Then to change the language, change the Layout setting.
# For example, a german layout can be obtained with:
# Option "XkbLayout" "de"
# or:
# Option "XkbLayout" "de"
# Option "XkbVariant" "nodeadkeys"
#
# If you'd like to switch the positions of your capslock and
# control keys, use:
# Option "XkbOptions" "ctrl:swapcaps"
# Or if you just want both to be control, use:
# Option "XkbOptions" "ctrl:nocaps"
#
 Identifier  "Keyboard0"
 Driver      "kbd"
 Option     "XkbModel" "pc105"
 Option     "XkbLayout" "us"
EndSection

Section "InputDevice"
 Identifier  "Mouse0"
 Driver      "mouse"
 Option     "Protocol" "IMPS/2"
 Option     "Device" "/dev/input/mice"
 Option     "ZAxisMapping" "4 5"
 Option     "Emulate3Buttons" "yes"
EndSection

Section "Monitor"
 Identifier   "Monitor0"
 VendorName   "IBM"
 ModelName    "IBM 2887"
 HorizSync    30.0 - 69.0
 VertRefresh  55.0 - 76.0
 Option     "dpms"
 ModeLine     "1680x1050" 318.99 1680 1816 2000 2320  1050 1051 1054 1127 -hsync +vsync
EndSection

Section "Device"

# ### generic DRI settings ###
# === disable PnP Monitor  ===
    #Option                              "NoDDC"
# === disable/enable XAA/DRI ===
# ### FireGL DDX driver module specific settings ###
# === Screen Management ===
# Note: When OpenGL Overlay is enabled, Video Overlay
#       will be disabled automatically
    # vendor=1002, device=5460
 Identifier  "Videocard0"
 Driver      "fglrx"
 Option     "no_accel" "no"
 Option     "no_dri" "no"
# === misc DRI settings ===
 Option     "mtrr" "off" # disable DRI mtrr mapper, driver has its own code for mtrr
 Option     "DesktopSetup" "(null)"
 Option     "ScreenOverlap" "0"
    Option "GammaCorrectionI"           "0x06419064"
    Option "GammaCorrectionII"          "0x06419064"
# === OpenGL specific profiles/settings ===
 Option     "Capabilities" "0x00000000"
 Option     "CapabilitiesEx" "0x00000000"
# === Video Overlay for the Xv extension ===
 Option     "VideoOverlay" "on"
# === OpenGL Overlay ===
 Option     "OpenGLOverlay" "off"
# === Center Mode (Laptops only) ===
 Option     "CenterMode" "off"
# === Pseudo Color Visuals (8-bit visuals) ===
 Option     "PseudoColorVisuals" "off"
# === QBS Management ===
 Option     "Stereo" "off"
 Option     "StereoSyncEnable" "1"
# === FSAA Management ===
 Option     "FSAAEnable" "no"
 Option     "FSAAScale" "1"
 Option     "FSAADisableGamma" "no"
 Option     "FSAACustomizeMSPos" "no"
 Option     "FSAAMSPosX0" "0.000000"
 Option     "FSAAMSPosY0" "0.000000"
 Option     "FSAAMSPosX1" "0.000000"
 Option     "FSAAMSPosY1" "0.000000"
 Option     "FSAAMSPosX2" "0.000000"
 Option     "FSAAMSPosY2" "0.000000"
 Option     "FSAAMSPosX3" "0.000000"
 Option     "FSAAMSPosY3" "0.000000"
 Option     "FSAAMSPosX4" "0.000000"
 Option     "FSAAMSPosY4" "0.000000"
 Option     "FSAAMSPosX5" "0.000000"
 Option     "FSAAMSPosY5" "0.000000"
# === Misc Options ===
 Option     "UseFastTLS" "0"
 Option     "BlockSignalsOnLock" "on"
 Option     "UseInternalAGPGART" "yes"
 Option     "ForceGenericCPU" "no"
 BusID       "PCI:1:0:0"
# dlk added to make projectors work
 Option      "ForceMonitors" "lvds, crt1"
EndSection

Section "Screen"
 Identifier "Screen0"
 Device     "Videocard0"
 Monitor    "Monitor0"
 DefaultDepth     24
 SubSection "Display"
  Viewport   0 0
  Depth     16
  Modes    "1680x1050" "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x480"
 EndSubSection
 SubSection "Display"
  Viewport   0 0
  Depth     24
  Modes    "1680x1050" "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x480"
 EndSubSection
EndSection

Section "DRI"
 Group        0
 Mode         0666
EndSection

Wireless Networking

I had to install IPW2200 firmward version 2.4 /lib/firmware to get the wireless NIC working. See ipw2200.sourceforge.net for instructions and the downloads. (Once Fedora Core 4 included the 2.6.17 kernel, version 3.0 of the IPW2200 firware was required. The download site and installation of this firmware remains unchanged.)

The Z60m provides a "Wireless WAN Device" for use with the Verizon EV-DO cellular broadband network. Some time ago IBM provided me with a Sprint PCS Connection card which I use for EV-DO broadband access. I have disabled the built in Wireless WAN Device in CMOS.

Sleep/Hibernate/Suspend

I've used the Suspend2 project's hibernate scripts to do sleep as well as suspend to disk on other laptops. I downloaded and installed the scripts.

I have customized the suspend process to my own requirements. I want the laptop to suspend when I close the lid and it is not plugged into AC power. To that end I created a /etc/acpi/events/lid.conf that points to my own personal action script, /etc/acpi/actions/lid.sh.

/etc/acpi/event/lid.conf:

event=button/lid
action=/etc/acpi/actions/lid.sh

/etc/acpi/actions/lid.sh:

#!/bin/sh

lid=`/bin/cat /proc/acpi/button/lid/LID/state | awk {'print $2'}`
ac=`/bin/cat /proc/acpi/ac_adapter/AC/state | awk {'print $2'}`

# Don't do anything if the ac adapter is plugged in
if [ "${lid}" = "closed" ] && [ "${ac}" != "on-line" ]; then
        # Give me a 30 second grace period
        /bin/sleep 30
        # If lid is still closed, suspend to RAM
        lid=`/bin/cat /proc/acpi/button/lid/LID/state | awk {'print $2'}`
        if [ "${lid}" = "closed" ]; then
                /usr/local/sbin/hibernate -F /etc/hibernate/ram.conf
        fi
fi

I also set up Fn-F4 event to suspend to ram.

/etc/acpi/event/suspend.conf:

event=button/sleep
action=/usr/local/sbin/hibernate -F /etc/hibernate/ram.conf

Here is my /etc/hibernate/ram.conf. You'll need to modify this, at least removing the call to "evdo off" unless you have that script on your system.

# Example ram.conf file for suspending to RAM. Adapt to your own tastes.
# Options are not case sensitive.
#
# Run "hibernate -h" for help on the configuration items.

### sysfs_power_state
UseSysfsPowerState mem

##############################################################################
### Some global settings
##############################################################################

Verbosity 0
LogFile /var/log/hibernate.log
LogVerbosity 1
# AlwaysForce yes
# AlwaysKill yes
# HibernateVT 15
# Distribution debian (or fedora/gentoo/mandrake/redhat/slackware/suse)
# XDisplay :0

##############################################################################
### Scriptlets
###   Scriptlets provide support for doing all sorts of things before and after
###   suspending. The defaults settings here should work for most people, but
###   you may wish to edit these to taste. Consult "hibernate -h" for help on
###   the configuration settings.
##############################################################################

### bootsplash
## If you use bootsplash, also enabling SwitchToTextMode is recommended if
## you use X, otherwise you may end up with a garbled X display.
# Bootsplash on
# BootsplashConfig /etc/bootsplash/default/config/bootsplash-1024x768.cfg

### clock
SaveClock restore-only

### devices
# IncompatibleDevices /dev/dsp /dev/video*

### diskcache
# DisableWriteCacheOn /dev/hda

### fbsplash (enable ~SwitchToTextMode if you use this)
# FBSplash on
# FBSplashTheme suspend2

### filesystems
# Unmount /nfsshare /windows /mnt/sambaserver
# UnmountFSTypes smbfs nfs
# UnmountGraceTime 1
# Mount /windows

### grub
# ChangeGrubMenu yes
# GrubMenuFile /boot/grub/menu.lst
# AlternateGrubMenuFile /boot/grub/menu-suspended.lst
# BackupGrubMenuFile /boot/grub/menu.lst.hibernate.bak

### hardware_tweaks
# IbmAcpi yes
# RadeonTool yes

### lilo
# EnsureLILOResumes yes

### lock (generally you only want one of the following options)
# LockConsoleAs root
# LockXScreenSaver yes
# LockKDE yes
# LockXLock yes
# LockXAutoLock yes

### misclaunch
# OnSuspend 20 echo "Good night!"
# OnResume 20 echo "Good morning!"
OnSuspend 00 /usr/local/bin/evdo off
OnResume 10 /opt/bioapi/bin/set_fingerprint_perms

### modules
# UnloadModules snd_via82cxxx usb-ohci
UnloadModules ipw2200 usb-ohci
# UnloadAllModules yes
UnloadBlacklistedModules yes
LoadModules auto
# LoadModulesFromFile /etc/modules

### modules-gentoo
# GentooModulesAutoload yes

### network
# DownInterfaces eth0
# UpInterfaces auto

### pcmcia
# EjectCards yes

### programs
# IncompatiblePrograms xmms

### services
# RestartServices postfix
RestartServices ibm-wclient nfs smb nifd mDNSResponder vmware
# StopServices alsasound
# StartServices aumix

### vbetool
EnableVbetool yes
# RestoreVbeStateFrom /var/lib/vbetool/vbestate
VbetoolPost yes
# RestoreVCSAData yes

### xhacks
SwitchToTextMode yes
# UseDummyXServer yes

### xstatus
## This can be set to gnome, kde or x:
# XStatus gnome
XStatus kde
# XSuspendText Preparing to suspend...
# XResumeText Resuming from suspend...
## When using XStatus x, and you have xosd installed:
# XosdSettings --font -misc-fixed-medium-r-semicondensed--*-120-*-*-c-*-*-* --colour=Green --shadow 1 --pos bottom --align center --offset 50

Docking

Since I do use a docking station with my Z60m I configured ACPI to react to the eject button on the dock:

/etc/acpi/event/docking.conf:

event=ibm/dock GDCK 00000003 00000001
action=/etc/acpi/actions/dock.sh eject
event=ibm/dock GDCK 00000003 00000003
action=/etc/acpi/actions/dock.sh docked

/etc/acpi/actions/dock.sh:

#!/bin/sh

#  Handle ACPI docking events

case "${1}" in
  eject)
    echo undock >/proc/acpi/ibm/dock
    ;;
  docked)
    echo dock >/proc/acpi/ibm/dock
    ;;
  *)
    echo $"Unknown event: ${*}"
    exit 1
esac

exit $?

Due to limitations in the ibm-acpi module, inserting the laptop into the dock doesn't work properly. USB ports aren't recognized unless the system boots in the dock and an external keyboard/mouse won't be detected either.

Palm Sync

My Palm Z22 would not sync with Evolution because it was too new to be recognized by gpilotd. I had to add it to /usr/share/gnome-pilot/devices.xml:

<-- Palm Z22 (dlk added) -->
<device vendor_id="0830" product_id="0061" />

I added a udev rule that causes udev to create a /dev/pilot symbolic link to the /dev/ttyUSBn port that the Palm device is connected to when the HotSync button is pressed.

/etc/udev/rules.d/10-pilot.rules:

BUS="usb", SYSFS{product}="Palm Handheld", KERNEL="ttyUSB[13579]", SYMLINK="pilot"

I also tested syncing via the IR port and while it does work, it was much slower than using the USB cable.

PalmPilot Sync Via IrDA

First, check the BIOS setting to be enable the IR port. Take the default settings. Make sure that the irda-utils package is installed. It isn't necessary but I modified the /etc/rc.d/init.d/irda script so that it does not load irtty-sir or irnet because I don't plan on using those. I edited /etc/sysconfig/irda and set "DEVICE=irda0". I removed the 10-pilot.rules file mentioned above and added three lines to /etc/rc.local to set permissions and to create the link that gpilotd needs:

chmod 666 /dev/ircomm0
rm -f /dev/pilot
ln -s /dev/ircomm0 /dev/pilot

I set the irda service to start on boot and rebooted. I configured gpilotd/evolution to sync via the /dev/pilot IrDA device. Sync worked but it was very slow and I had to retry over and over to get the sync started. I gave up on this and went back to the cable (I would have still had to carry the USB cable to charge the Palm Z22 anyway.)

Instant Messaging

I use gaim for instant messaging since it supports all of the networks that I need, IBM Sametime, AOL and MSN. Besides the base gaim packages there are three additional components that need to be added to make gaim work with Sametime:

  • meanwhile - a Sametime function library, which is available from Fedora Extras via a normal yum install
  • gaim-meanwhile - a library that integrates meanwhile into gaim, which is available from Fedora Extras via a normal yum install
  • gaim-meanwhile-ibm - a library that adds BluePages integration to gaim

Setting up a GDM autologon

To autologon a user during system start, set the autologon keys at the top of /etc/X11/gdm/gdm.conf:

[daemon]
# Automatic login, if true the first local screen will automatically logged
# in as user as set with AutomaticLogin key.
AutomaticLoginEnable=true
AutomaticLogin=dlk

Getting the fingerprint reader to work

I successfully set up the fingerprint reader using the instructions found here. The automated script described there works fine. I also went through the process of patching xscreensaver as described here and that worked too although geting the USB file permissions correct stumped me for a while. I needed to be sure to call /opt/bioapi/bin/set_fingerprint_perms, which I chose to put into /etc/rc.local. It needs to be included in the hibernate script as well.

Installing patched version of xscreensaver

I rebuilt the patched xscreensaver as an rpm package and installed it as a replacement for the distributed xscreensaver package. The process was:

  1. Obtain the latest xscreensaver source (the url is in the patch file below) and put it in my SOURCES directory
  2. Obtain the patch (the url is in the patch file below) and put it in my SOURCES directory
  3. Extract the xscreensaver.spec file from the source tar file and modify it. Here's a patch file with my changes:
  4. --- xscreensaver.spec   2006-05-24 12:54:18.000000000 -0400
    +++ xscreensaver-with-fingerprint-patch.spec    2006-05-21 14:06:50.000000000 -0400
    @@ -1,5 +1,5 @@
     %define        name xscreensaver
    -%define        version 4.23
    +%define        version 4.24
    
     Summary:       X screen saver and locker
     Name:          %{name}
    @@ -10,6 +10,7 @@
     Group:         Amusements/Graphics
     URL:           http://www.jwz.org/xscreensaver/
     Source0:       http://www.jwz.org/xscreensaver/xscreensaver-%{version}.tar.gz
    +Patch0:                http://zepan.org/files/xscreensaver-4.22_alternativeAuth.diff
     Vendor:                Jamie Zawinski <jwz@jwz.org>
     Buildroot:     %{_tmppath}/%{name}-root
    
    @@ -70,6 +71,7 @@
    
     %prep
     %setup -q
    +%patch -p1
    
     if [ -x %{_datadir}/libtool/config.guess ]; then
       # use system-wide copy
    
  5. Build the RPMs using the "rpmbuild -bb" command and then install them.

Enabling the SD/MMC reader

The Z60m includes an SD reader on its front edge. The drivers required are available in Fedora Core but the device was not automatically configured during the installation. These are the steps that I took to enable the device.

Add these two lines to /etc/modprobe.conf to load the SD/MMC drivers at boot:

install sdhci /sbin/modprobe mmc_core ; /sbin/modprobe mmc_block ; /sbin/modprobe --ignore-install sdhci
remove sdhci /sbin/modprobe -r --ignore-remove sdhci ; /sbin/modprobe -r mmc_block ; /sbin/modprobe -r mmc_core

Added a file called /etc/udev/rules.d/90-mmc.rules that causes a device and a symbolic link to be created automatically when an SD/MMC card is inserted:

KERNEL=="mmcblk*", NAME="mmc/%n", SYMLINK+="sandisk", MODE="0777"

Added a line to my autofs definitions file, /etc/autofs.mnt, to automatically mount this device when I access it:

sandisk   -fstype=vfat,sync,gid=floppy,umask=002  :/dev/sandisk