Difference between revisions of "Installing Fedora Core 4 on a ThinkPad T42p (2373-HBU)"

From ThinkWiki
Jump to: navigation, search
(Modem/Swsups2 Kernel)
Line 1: Line 1:
 +
= Success Chart =
 +
 +
{| border="1" cellpadding="5" cellspacing="0"
 +
|-
 +
|colspan=2| '''Item''' || '''Working''' || '''Notes'''
 +
|-
 +
|rowspan=2|Installation
 +
| Network Installation ||class="diff-addedline"| Yes ||
 +
|-
 +
| USB Installation    ||class="diff-context"| Not Tested ||
 +
|-
 +
|rowspan=4|Display
 +
| Laptop Screen  ||class="diff-addedline"| Yes || both vesa driver, and i810 (with Intel 915 support)
 +
|-
 +
| CRT / Projector ||class="diff-addedline"| Yes || with i810 driver. (screen/crt are exclusive with vesa)
 +
|-
 +
| On-the-fly Screen Rotation ||class="diff-deletedline"| No ||
 +
|-
 +
| Stylus ||class="diff-addedline"| Yes || wacom serial driver.
 +
|-
 +
|rowspan=2|Power Management
 +
| Software Suspend (hibernate) ||class="diff-addedline"| Yes || [[Software Suspend 2]]
 +
|-
 +
| Suspend to Memory (ACPI sleep) ||class="diff-deletedline"| No || Tested on 2.6.12-1.1398
 +
|-
 +
|colspan=2| Audio ||class="diff-addedline"| Yes || ALSA intel8x0 driver
 +
|-
 +
|rowspan=2| Wireless || 802.11b/g ||class="diff-addedline"| Yes || ipw2200 driver
 +
|-
 +
| Bluetooth ||class="diff-context"| Not tested ||
 +
|-
 +
|rowspan=2|Extra Buttons || Keyboard Section ||class="diff-addedline"| Yes || ibm-acpi driver
 +
|-
 +
| Tablet buttons ||class="diff-addedline"| Yes || setkeycodes
 +
|-
 +
|colspan=2| Fingerprint Scanner ||class="diff-deletedline"| No || See [[Integrated Fingerprint Reader]].
 +
|-
 +
|colspan=2| Harddisk Active Protection ||class="diff-deletedline"| No || See  [[Active Protection System]].
 +
|}
 +
 
==Currently Working==
 
==Currently Working==
 
* kernel -- 2.6.14 (custom)
 
* kernel -- 2.6.14 (custom)

Revision as of 17:19, 16 December 2005

Success Chart

Item Working Notes
Installation Network Installation Yes
USB Installation Not Tested
Display Laptop Screen Yes both vesa driver, and i810 (with Intel 915 support)
CRT / Projector Yes with i810 driver. (screen/crt are exclusive with vesa)
On-the-fly Screen Rotation No
Stylus Yes wacom serial driver.
Power Management Software Suspend (hibernate) Yes Software Suspend 2
Suspend to Memory (ACPI sleep) No Tested on 2.6.12-1.1398
Audio Yes ALSA intel8x0 driver
Wireless 802.11b/g Yes ipw2200 driver
Bluetooth Not tested
Extra Buttons Keyboard Section Yes ibm-acpi driver
Tablet buttons Yes setkeycodes
Fingerprint Scanner No See Integrated Fingerprint Reader.
Harddisk Active Protection No See Active Protection System.

Currently Working

  • kernel -- 2.6.14 (custom)
  • Video (FireGL) - flrgx 8.20.8 - Accelered 3D working
  • Ethernet (10/1000) - e1000 - Working
  • Sound (AD1981B) - snd_8x0 - Working
  • Function Keys - ibm_acpi - Brightness,Keyboard light,Bluetooth on/off,Sound,Sus-Mem
  • Bluetooh (BMDC-2) - Untested (I do see the drivers loaded)
  • Modem (BMDC-2) - Linuxant HSF - Working see kernel notes.
  • Wireless (ipw2200) - iwp2200 1.0.8 Working + Monitor mode (aka Kismet)
  • DVD-RW - Working
  • Fingerprint reader - Working + Pam module
  • Suspend Memory - Working
  • Suspend Disk - swsusp2 - Not Tested (see kernel notes)
  • IBM Active Protection System (HDAPS) - now in 2.6.14 standard - Not tested

Basic Install

After loading the Fedora Core 4 i686 CD here is the basic lay of the land.

  • Video (FireGL) - Unaccelered default setup, but it worked
  • Ethernet (10/1000) - Working
  • Sound (AD1981B) - Working
  • Basic Function Keys - Brightness,Keyboard light,Bluetooth on/off
  • Bluetooh (BMDC-2) - Untested (I do see the drivers loaded)
  • Modem (BMDC-2) - Untested (I do not see drivers loaded)
  • Wireless (ipw2200) - Not Working
  • DVD-RW - Working
  • Fingerprint reader - Not Working
  • Suspend Memory - Not Working
  • Suspend Disk - Not Working
  • IBM Active Protection System (HDAPS) - Not working

Basic Hardware

Wireless

I really needed this first so I could have the easy freedom to work on the machine throughout my house. All you really need here is the firmware loaded in to the right spot. This is an old version of the driver and firmware and it will not run Kismet. Later, I will show how to get this working.

Goto http://ipw2200.sourceforge.net/firmware.php. Download and install the version 2.2 in /lib/firmware. Reboot and your wireless should work. Go here for some more tips: ipw2200

Updating

At this point I setup my system to get all of the current updates for Fedora Core 4. I just ran the up2date program and let it do it's thing.

Video

I am currently using the default raedon driver. I am looking a later loading the fglrx driver.

xorg driver

I read Additional options for the radeon driver page to come up with what I have. Here is the radeon device section from my xorg.conf

Section "Device"
        Identifier  "Videocard0"
        Driver      "radeon"
        VendorName  "Videocard vendor"
        BoardName   "ATI FireGL Mobility T2"
# accelration
        Option          "backingstore" "on"
        Option          "AGPFastWrite" "on"
        #may need to turn of enablepageflip
        Option          "EnablePageFlip" "on"
        Option          "AGPMode" "4"
        Option          "EnablePageFlip" "on"
        Option          "RenderAccel" "on"
        # enable PowerPlay features
        Option          "DynamicClocks" "on"
        # use bios hot keys on thinkpad (aka fn+f7)
        Option          "BIOSHotkeys" "on"
        #Xvmc
        Option          "XvMCSurfaces" "7"
EndSection

ATI driver

I just downloaded the driver from ATI (https://support.ati.com/ics/support/default.asp?deptID=894&task=knowledge&folderID=356) I downloaded the big 60MB installer and let it do a general install.

NOTE!
Do not setup the second monitor unless you use it. Programs that use the xv overlay will reboot X when the second screen is not available. (This means xine and mplayer will crash your machine.

I have not gotten fireglcontrolpanel to work yet. It needs libstdc++.so.5.

To fix this I had to do: yum install compat-libstdc++-33

This driver does seem really fast. I have not really tested the opengl parts, though using the opengl drivers for xine and mplayer where very slow.

Fingerprint Reader

I followed for the most part the instructions given at according HOWTO. the only thing that I changed was the /etc/pam.d/system-auth. Mine looks like:

#%PAM-1.0
# This file is auto-generated.
# User changes will be destroyed the next time authconfig is run.
auth        required      /lib/security/$ISA/pam_env.so
auth        sufficient    /lib/security/pam_bioapi.so {5550454b-2054-464d-2f45-535320425350} /etc/bioapi1.10/pam/
auth        sufficient    /lib/security/$ISA/pam_unix.so likeauth nullok
auth        required      /lib/security/$ISA/pam_deny.so
 
account     required      /lib/security/$ISA/pam_unix.so
account     sufficient    /lib/security/$ISA/pam_succeed_if.so uid < 100 quiet
account     required      /lib/security/$ISA/pam_permit.so
 
password    requisite     /lib/security/$ISA/pam_cracklib.so retry=3
password    sufficient    /lib/security/pam_bioapi.so {5550454b-2054-464d-2f45-535320425350} /etc/bioapi1.10/pam/
password    sufficient    /lib/security/$ISA/pam_unix.so nullok use_authtok md5 shadow
password    required      /lib/security/$ISA/pam_deny.so
 
session     required      /lib/security/$ISA/pam_limits.so
session     required      /lib/security/$ISA/pam_unix.so
 

I just try to find the correct place in the list for the pam_bioapi line. I am currently looking for ways to have the scan graphic come up faster. Also note that with the KDE screen saver that the fingerprint reader does not quite work correctly, and it also has some error when comming out of suspend. I will be working on this and hopefully creating a patch and submitting it.

IRDA

BIOS Setup

IRDA Service

OBEX Tool

Install BWidget
  • Download
  • Copy to tcl library location
    • cp -r BWidget /usr/share/tcl8.4/.

Modem/Swsups2 Kernel

Ok you are asking yourself why lump these two together? Well, it seems you can download a kernel for one or the other but not both. So I hacked a solution. There may be a more eloquent way, if so, help me out and edit this section.

The modem requires 16K program stacks. (If you don't want suspend to disk, just download the kernel from Lunixant and goto the modem section.) The Swsups2 requires kernel modifications. (If you don't want to use the modem, just download the kernel from http://mhensler.de/swsusp/download_en.php)

OK here is a quick outline of what I did, I hope to flesh it out later:

  1. Downloaded the two kernal sources.
  2. Found the patch requred to do 16k status
  3. unarchived the swsups2 into a directory
  4. copied the 16k stacks patch into the directory
  5. cleaned out my /usr/src/redhat/BUILD , SOURCES , SPEC
  6. moved all of the files that I have in the tmp dir to SOURCES
  7. copied the spec files to SPEC
  8. make a new 16K spec file
  9. edited it
    1. Added distags i686
    2. Added define at the top (need some more work here to really understand what is going on.)
    3. Added source line: Source3: kernel-2.6.14-1.1653_%{swsuspbuild}_16k.rhfc4.cubbi_swsusp2.spec
    4. Added patch line: Patch1000003: linux-2.6.14-16kstacks.patch
    5. Added section to set configs
    6. for 16KSTACKS
%if %{_with_16k}
for file in *i[56]86*.config; do
       grep -Ev 'CONFIG_4KSTACKS[= ]' $file > $file.tmp
       echo -e "CONFIG_4KSTACKS=n\nCONFIG_16KSTACKS=y\nCONFIG_IRQSTACKS=y" >> $file.tmp
       mv -f $file.tmp $file
 
       grep -Ev 'CONFIG_DEBUG_PREEMPT[= ]' $file > $file.tmp
       echo -e "CONFIG_DEBUG_PREEMPT=n\n" >> $file.tmp
       mv -f $file.tmp $file
 
       grep -Ev 'CONFIG_PREEMPT_NONE[= ]' $file > $file.tmp
       echo -e "CONFIG_PREEMPT=y\nCONFIG_PREEMPT_BKL=y\n" >> $file.tmp
       mv -f $file.tmp $file
done
%endif
  1. copied the spec files back to SOURCES
  2. Then ran rpmbuild -ba kernel-2.6.14-1.1653_1_16k.rhfc4.cubbi_swsusp2.spec --target i686 -vv
  3. Then downloaded and installed hibernate (see swsups website)
  4. Downloaded and installed swsusp2-mkinitrd-5.0.8-1.cubbi1.noarch.rpm
  5. Downloaded and installed swsusp2-userui-0.6.1-0.fc4.cubbi1.i386.rpm
  6. ran rpm -ivh on created kernel-2.6.14-1.1653_1_16k.i686.cubbi_swsusp2.i686.rpm
  7. see install instructions on swsups site to complete
    1. edit grub
    2. initrd
      1. I checked and this is aready taken care of in the version that I am using.
    3. Remeber to reinstall ipw2200

Ok, for the next step you need to edit your /etc/hibernate.conf file. Here is what mine looks like:

UseSuspend2 yes
Reboot no
EnableEscape yes
DefaultConsoleLevel 1
Compressor lzf
Encryptor none

Verbosity 0
LogFile /var/log/hibernate.log
LogVerbosity 1

### clock
SaveClock restore-only

### modules
UnloadModules usb-ohci hsfmc97ich hsfserial hsfengine hsfosspec hsfsoar ipw2200 e1000 button battery ibm_acpi
UnloadBlacklistedModules yes
LoadModules auto

### services
#I have create a service init.d file for wpa_supplicant.
StopServices wpa
StartServices wpa

### xhacks
SwitchToTextMode yes
UseDummyXServer yes

This file takes care if you run the hibernate to shutdown the system. {NOTE|For testing I set the system to runlevel 3 to do my basic testing (telinit 3). Then I worry about adding the complexity of X} I edited my /etc/acpi/actions/powerbtn.sh to:

#!/bin/sh
# Initiates a shutdown when the power putton has been
# pressed. 
/usr/sbin/hibernate --config-file=/etc/hibernate/hiberante.conf

OK you should have suspend to disk running. Now for suspend-to-RAM. Edit or create the file /etc/hibernate/ram.conf

### sysfs_power_state
UseSysfsPowerState mem

Verbosity 0
LogFile /var/log/hibernate.log
LogVerbosity 1

### clock
SaveClock restore-only
 
### modules
UnloadModules usb-ohci hsfmc97ich hsfserial hsfengine hsfosspec hsfsoar ipw2200 e1000 button battery ibm_acpi
UnloadBlacklistedModules yes
LoadModules auto

### xhacks
SwitchToTextMode yes
UseDummyXServer yes

Then I changed my /etc/acpi/actions/lm_lid.sh

#!/bin/bash
# lid button pressed/released event handler
/usr/sbin/hibernate --config-file=/etc/hibernate/ram.conf

Try it now. It should all be working.

Programs

Mplayer

Xine

Kismet

I got Kismet running with some ado. Their where some got'cha which I hope to document through them here.

IPW2200

NOTE!
You may want to backup your current modules and firmware so you can restore them if something goes wrong.
  • Get the module software
    • Download the lastest IPW200 source and firmware.
    • Download the lastest IEEE-80211
  • Build the modules
    • Build IEEE 80211
      • Untar IEEE
      • Run sh remove-old (as root)
      • make; make install
    • Build the IWP2200 modules
      • Untar IPW2200 source
      • Read in the instructions Goto throught section 5. KERNEL REQUIREMENTS - Configuration and check the things that can not be enabled.
      • Edit the Makefile
#ifndef CONFIG_IPW2200
EXTERNAL_BUILD=y
CONFIG_IPW2200=m
CONFIG_IPW_DEBUG=y
CONFIG_IPW_QOS=y
CONFIG_IPW2200_MONITOR=y
CONFIG_IEEE80211_RADIOTAP=y
#endif
NOTE!
I had to comment out the #ifndef and #endif to make mine compile right. I did infact remove the CONFIG_IP2200 from the .config file as suggested in the INSTALL file.
      • sh remove-old
      • make;makeinstall
  • Install the Firmware
    • make a new directory for the firmware, extract the firmware into that directory
    • Remove Old Firmware
      • Remove old firmware files from /lib/firmware (rm /lib/firmware/ipw*)
      • Remove links for firmware in /usr/lib/hotplug/firmware (rm /usr/lib/hotplug/firmware/ipw*)
    • Copy firmware and create links
      • From the directory that has the downloaded firmware
      • cp ipw* /lib/firmware/.
      • ln -s /lib/firmware/ipw* /usr/lib/hotplug/firmware/.

That sets up the new driver. Reboot and test that the driver works.

Kismet

I got the Kismet program from the dag site (http://dag.wieers.com/home-made/apt/) as source and did rpmbuild --rebuild <kismet.src.rpm> (as root). I then loaded the resulting rpm file.

There was only two things that I setup in the /etc/kismet.conf file.

  1. suiduser -- I set the to my normal login
  2. source=ipw2200,eth0,ipw2200 -- this worked for me.
NOTE!
Because I choise to use the suiduser I have to run kismet from a directory that my normal login can write to, aka like my home directory or you can create a directory for it. This, I believe is to limit any hack attempts through kismet itself.

wpa_supplicant

I needed to setup wpa_supplicant because some of the wireless AP I connect to use WPA. The standard stuff in Fedora does not handle that so here you go.

  • Download the current version of wpa_supplicant
  • Untar
  • Create a new .config file
CONFIG_CTRL_IFACE=y
CONFIG_DRIVER_HOSTAP=y
CONFIG_DRIVER_PRISM54=y
#CONFIG_DRIVER_HERMES=y
#CONFIG_DRIVER_MADWIFI=y
CONFIG_DRIVER_ATMEL=y
CONFIG_DRIVER_WEXT=y
CONFIG_DRIVER_NDISWRAPPER=y
#CONFIG_DRIVER_BROADCOM=y
CONFIG_DRIVER_IPW=y
#CONFIG_DRIVER_BSD=y
#CONFIG_DRIVER_NDIS=y
CONFIG_WIRELESS_EXTENSION=y
CONFIG_IEEE8021X_EAPOL=y
CONFIG_EAP_MD5=y
CONFIG_EAP_MSCHAPV2=y
CONFIG_EAP_TLS=y
CONFIG_EAP_PEAP=y
CONFIG_EAP_TTLS=y
CONFIG_EAP_GTC=y
CONFIG_EAP_OTP=y
CONFIG_EAP_SIM=y
CONFIG_EAP_AKA=y
CONFIG_EAP_PSK=y
CONFIG_EAP_LEAP=y
#CONFIG_PCSC=y
NOTE!
The got'chas here where adding the the CONFIG_WIRELESS_EXTENSION and CONFIG_CTRL_IFACE. CTRL_IFACE is need for the WPA_CLI and the WPA_GUI, which I use.
  • make;make install
  • make make_gui -- This make a nice GUI interface to use from X
  • Then copy wpa_gui to /usr/local/bin -- it must be run as root

I created the following file /sbin/wpa_actions.sh. This sets up the networks seen to use dhcp automatically. You can setup an embeded in using the SSID.

#!/bin/sh 

IFNAME=$1
CMD=$2 

if [ "$CMD" == "CONNECTED" ]; then
    SSID=`wpa_cli -i$IFNAME status | grep ^ssid= | cut -f2- -d=`
    # configure network, signal DHCP client, etc.
    /bin/sleep 2
    /sbin/dhclient $IFNAME
fi

if [ "$CMD" == "DISCONNECTED" ]; then
    # remove network configuration, if needed
    /sbin/dhclient -r $IFNAME
fi

Now to get the system to work I setup in /etc/rc.d/rc.local

/usr/local/sbin/wpa_supplicant -B -w -ieth0 -c/etc/wpa_supplicant.conf -Dwext
#It takes a moment for wpa_supplicant to come up.
/bin/sleep 2
/usr/local/sbin/wpa_cli -a/sbin/wpa_action.sh -B
NOTE!
The interface to use is west NOT iwp. This finally worked for me.

Links