Skip to content.

plope

Personal tools
You are here: Home » Members » chrism's Home » Thinkpad Install Notes
 
 

Thinkpad Install Notes

Some notes I took while configuring a Thinkpad T42p (DYU 2378) with both Fedora and Ubuntu Linuxen. The notes are very raw but might be useful for somebody. I did a bunch of pre-research and then compared what I actually did to what my research told me to do so a lot of the below is in the form of "do this", "nope didn't need to do that".

Resources

http://modular.fas.harvard.edu/t42/

http://www.stanford.edu/~sanjiv/thinkpad/thinkpad.html

http://pmw.org/~gardnerj/Thinkpad/Install.html

Configure Kernel (done in /home/chrism/bus/t42p/linux-2.6.8.1/config-chris)

  • I actually ended up not using any of this because I'm settled on Ubuntu and didn't need to change the stock kernel to get most things working. I still haven't changed the Ubuntu default kernel. As a result I cannot do software suspend, but suspend to RAM works ok. The rest of this section is from research I did before actually getting the laptop.
  • Config 2.6.8.1 files available at http://modular.fas.harvard.edu/t42/config-2.6.8.1 and http://www.stanford.edu/~sanjiv/thinkpad/config-2.6.8.1-sinha

    Using sanjiv's. Differences:

        CONFIG_MODVERSIONS: off
        CONFIG_BLK_DEV_IDECD: kernel instead of module
        E1000: kernel instead of module
        E1000_NAPI: on
        Networking support -> Bluetooth subsystem support: kernel
        BT_L2CAP: kernel
        BT_SCO: kernel
        BT_RFCOMM: kernel
        BT_RFCOMM_TTY: kernel
        BT_BNEP: kernel
        BT_HIDP: kernel
        BT_HCIUSB: module (should be kernel)
        BT_HCIUSB_SCO: module (should be kernel)
        BT_HCIBT3C: module
        PHONE: module
        FB_VESA: off
        FB_RADEON: on (as per sanjiv's addendum)
        VIDEO_DEV: on (Video for Linux)
        USB_OV511: on (Phillips webcam)
        USB_PWC: on (Phillips Cameras)
        REISERFS_FS: module
        NFS_FS: module
        NFS_V3: on
        NFSD: module
        NFSD_v3: on
        NFSD_TCP: on
        SMB_FS: module
        CIFS: module
    

  • Need to set swsusp2 partition to your own swap partition.

    NOT DONE (need to know partition number)

  • 2.6.9-rc2+ has speedstep-centrino support for the Dothan 1.8Ghz.

    Not using this, usin 2.6.8.1, due to ease of sanjiv's patches

  • CONFIG_MODVERSIONS no? Madwifi FAQ recommends.

    This was enabled

  • ACPI Processor P-States driver on (and stuff beneath it that is relevant).

    Part of Sanjiv's stuff.

  • paches necessary for 2.6.81: speedstep-centrino, bk-cpufreq, acpi, bootsplash (at http://www.stanford.edu/~sanjiv/thinkpad/patch-2.6.8.1.tar.bz2)

    Applied.

  • Compile filesystem and ide into kernel in order for initrd to work properly.

    Done.

  • Enable RAM disk under block devices.

    Done.

  • Disable "Local APIC support on uniprocessors" under "Processor type and features" (CONFIG_X86_UP_APIC) (system poweroff on halt).

    Turned off.

  • REGPARM off (resume from hibernate needs it, according to William Stein)

    Turned off.

  • Turn ACPI on.

    On.

  • Turn APM off.

    Off.

  • Configure in IDE_CD (CONFIG_BLK_DEV_IDECD) (to kernel?)

    In kernel

  • Configure e1000 module into the kernel (to prevent resume failures) also CONFIG_E1000_NAPI=y

    Done.

  • Ensure kernel has proper iteration of centrino speedstep (http://modular.fas.harvard.edu/t42/).. Apparently 2.6.9 already has this but 2.6.8.1 needs a patch.

    Done via Sanjiv's patches.

  • Configure kernel to not have a special graphics support (frame buffer device), makes ATI nonfree drivers more robust according to WS.

    NOT DONE (try with fb enabled RADEON first)

  • "nvram module" (sanjiv claims this exists, needed for tpb)

    CONFIG_NVRAM is a module

Buy

  • Blank DVDs and CDs

Prep

  • Burn CDs using Access IBM

    Done (in red case)

  • Install RAM.

    Done

  • Copy C:\186, C:\DRIVERS, C:\VALUEADD to a bootable CD (BartPE downloaded to VMWare desktop on athlon, needs Windows XP CDs)

    Didn't do this

  • Copy C:\IBMTOOLS to DVD-RAM

    Didn't do this

  • Print device info

    Couldn't do this (no printer)

  • Defrag the NTFS partition.

    Yup. Although it was not necessary.

  • Use PM 7 to resize NTFS partition (dont delete IBM_SERVICE partition unless necessary).

    Yup. Although I bought PM8 in the process (didn't try PM7).

  • Turn on speedstepping in Windows (XP->System->Energy->Extended->CPU->Automatic)

    Yup.

  • Firmware/BIOS updates as necessary ( http://www-1.ibm.com/support/docview.wss?rs=0&q1=t42p&uid=psg1MIGR-55386&loc=en_US&cs=utf-8&cc=us&lang=en )

    Done.

  • My Athlon's config:
         Device Boot      Start         End      Blocks   Id  System
         /dev/hda1   *           1          10       80293+  83  Linux
         /dev/hda2              11        4472    35841015   83  Linux
         /dev/hda3            4473        4600     1028160   82  Linux swap
         /dev/hda4            4601       19457   119338852+   f  W95 Ext'd (LBA)
         /dev/hda5            4601       19457   119338821   fd  Linux raid auto...
    
         (windows is on hdb)
    
        Sanjiv's
        config::
    
          #fdisk -l
          Disk /dev/hda: 40.0 GB, 40007761920 bytes
          240 heads, 63 sectors/track, 5168 cylinders
          Units = cylinders of 15120 * 512 = 7741440 bytes
             Device Boot    Start       End    Blocks   Id  System
          /dev/hda1             1      1002   7575088+   7  HPFS/NTFS
          /dev/hda2   *      1003      1022    151200   83  Linux
          /dev/hda3          1023      1632   4611600    c  Win95 FAT32 (LBA)
          /dev/hda4          1633      5168  26732160    f  Win95 Ext'd (LBA)
          /dev/hda5          1633      3664  15361888+  83  Linux
          /dev/hda6          3665      4206   4097488+  83  Linux
          /dev/hda7          4207      4477   2048728+  83  Linux
          /dev/hda8          4478      4694   1640488+  82  Linux swap
          /dev/hda9          4695      4897   1534648+  83  Linux
          /dev/hda10         4898      5100   1534648+  83  Linux
          /dev/hda11         5101      5168    514048+  83  Linux
          #df -h
          Filesystem            Size  Used Avail Use% Mounted on
          /dev/hda10            1.5G  167M  1.3G  12% /
          /dev/hda2             143M  8.5M  128M   7% /boot
          /dev/hda5              15G  126M   14G   1% /home
          none                  378M     0  378M   0% /dev/shm
          /dev/hda11            487M  8.1M  454M   2% /tmp
          /dev/hda6             3.9G  3.0G  708M  82% /usr
          /dev/hda7             2.0G   33M  1.8G   2% /usr/local
          /dev/hda9             1.5G  549M  852M  40% /var
          /dev/hda3             4.4G  1.3G  3.1G  30% /windows
    

Install Linux

  • Run down the battery while doing this.

    Battery got run down.

  • Install warty first, then FC3 (if warty gets fucked up, thats ok).

    Warty recognized and configured speedstep and atheros wireless properly. Fedora didn't do atheros (and I didn't bother setting it up).

  • Give a 2.7GB (2 * 1.333) swap partition to Linux (for swsusp2).

    Yup.

  • FC2 fucks up Windows partition, make sure you know how to prevent. by reading http://lwn.net/Articles/86835

    FC3 had no problems. Ignorance was bliss.

Installing the Kernel

  • Creating an RPM (see http://www.fedoraforum.org/forum/article.php?a=4 and http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/custom-guide/ch-custom-kernel.html)

    (Didn't do it (Ubuntu's kernel worked ok))

Configure Boot-Time Params

  • pci=noacpi acpi_sleep=s3_bios

    Done in fedora by editing /boot/grub/menu.lst

    In Ubuntu, done by editing /boot/grub/menu.lst and adding these options to the kopt= lines, then running sudo update-grub

  • when swsuspend is working: resume=/my/swap (sanjiv)
  • when swsuspend is working: resume2=swap:/dev/hda5 (gentoo)
  • Ensure to make a duplicate entry in grub without the resume= line.

    (swsuspend not in Ubuntu kernel, so giving up)

Daemons That Should Run

  • acpid

    Yup

  • cpufreqd

    Nope. Don't need it under ubuntu. Reason: ubuntu uses powernowd instead.

Tuning

  • Check hdparm. WS has this::
         sh-3.00# /sbin/hdparm -t /dev/hda1
         /dev/hda1:
         Timing buffered disk reads:   92 MB in  3.06 seconds =  30.08 MB/sec
    

CPU Frequency Stepping

  • If compiling speedstep as a module (I haven't), you will need to load the "speedstep-centrino" module while running the new kernel to enable speedstep. The way to check if speedstep is enabled is to look for entries under /sys/devices/system/cpu/cpu0/cpufreq/. I use cpufreqd to manage speedstepping dynamically.

    NOT NECESSARY in Ubuntu

  • According to gardner, latest FC2 errata kernel has speedstep working.

    UNCONFIRMED

  • Here is a cpuspeed.conf file: http://www.sas.upenn.edu/%7Evbraun/computing/T41/cpuspeed.conf

    Not needed (cpufreqd.conf instead)

  • GNOME CPUFreq applet at http://www.gnomedesktop.org/article.php?sid=1664 and FC2 RPMs are at http://dag.wieers.com/packages/gnome-cpufreq-applet/

    Working under Ubuntu

  • Whoever from WS page: For whatever reason cpufreqd doesn't seem to work for me. However, directly echo'ing speeds into /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq and /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq does work for me, and that's enough because it means I have control (I can make a command or icon that speeds up or slows down my computer). For example, to set the computer at maximum:
         echo 1800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
         echo 1800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
         echo 1800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
    
        And, to set it at minimum speed::
    
         echo 600000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
         echo 600000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
         echo 600000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
    
        using nothing whatsoever under Ubuntu works fine for me, so no need for this
    
  • http://modular.fas.harvard.edu/t42/speedstep-centrino.c-version2.6.8.1 (doesn't seem to work automatically with cpufreqd)

    This is unnecessary at least under ubuntu.

Laptop-mode

  • Should just work if apcid is running. Configuration advice for settings is available from http://www.xs4all.nl/~bsamwel/laptop_mode/ and /usr/src/linux-2.6.6/Documentation/laptop-mode.txt

    Laptop-mode is now enabled when the box is remvoed from ac power (via an acpi event)

Configure X

  • Ubuntu warty has binary drivers (see below).
  • Debian packages available from http://xoomer.virgilio.it/flavio.stanchina/debian/fglrx-installer.html

    Didn't use.

  • Binary ATI drivers at http://www.ati.com/support/drivers/linux/radeon-linux.html

    Didn't use

  • XF86Config available from http://www.stanford.edu/~sanjiv/thinkpad/XF86Config-4

    I used this as a jumping-off point but added stuff for Synaptics touchpad later.

  • Fedora howto at http://www.fedoraforum.org/forum/showthread.php?t=16690

    Didn't bother.

  • Free/OSS driver ok in xorg, apparently, although XFree86 free drivers are broken (causes hangs randomly).

    Not using OSS drivers much, so couldn't confirm under Ubuntu.

  • Sanjiv reports that OSS drivers cause mouse/touchpad hangups on resume.

    Unconfirmed.

  • Comment out "dbe" and "glx" from XF86Config in order for swsusp2/suspend-to-ram to restore OK. Maybe just "glx".

    Just uncommenting just "glx" works fine.

  • Change /etc/kde3/kdm/Xservers and add "-dpi 120" to ::0 line if things look weird.

    Edit /etc/gdm/gdm.conf after "audit" to do same for gdm.

  • Synaptics touchpad drivers available from Synaptics or from apt-get xfree86-drivers-synaptics (sanjiv)

    I got xfree86-driver-synaptics from apt and changed XF86Config according to its docs (including the trackpoint as a second input device and making it "alwayscore")

  • VMWare requires the DGA extension for full-screen mode, so change the line that says:

    SubSection "extmod" Option "omit xfree86-dga" EndSubSection

    to read:

         Load "extmod"
    
       This was
       done.
    

  • Useful as screen saver? There's a package called radeontool that lets you control the backlight. Running radeontool light tells you the current status of the backlight; tacking on or off to the end turns the backlight on or off, respectively. (gentoo)

    Didn't bother.

  • For ubuntu (excellent advice from Robert):
         <zwark> uncomment the universe lines in the sources list
         <zwark> search for fglrx in synaptic
         <mcdonc> aha... 
         <zwark> install the restricted kernel modules as well as the drives
         <mcdonc> i'm on fedora now but may switch back
         <zwark> set the flag I mentioned above to no (see below)
         <zwark> then it "should" work
         <mcdonc> i just got this thing today and i've been fucking with it all day
         <zwark> So if you try again you will need: Non-free Linux 2.6.8.1
         modules as well as fglrx-driver and maybe the hint with Option
         "UseInternalAGPGART" = "no". If x comes up and fglrx-info says ATI
         is used for rendering, everything is fine.  Good luck
         <mcdonc> you're the man!
    
       This worked like a champ.  I needed the following modules:
    
         - fglrx-driver
         - fglrx-control
         - fglrx-driver-dev
         - linux-restricted-modules (I used 2.6.8-1-3-686)
    

Configure swsusp2

  • I didn't configure swsusp2 at all, too much hassle to recompile kernels; all the below is from research I did before getting the laptop.
  • hibernate.conf available from http://www.stanford.edu/~sanjiv/thinkpad/hibernate.conf
  • Remove mountnfs.sh from /etc/suspend.conf
  • Might need to turn off /etc/default/ifplugd's HOTPLUG_INTERFACES for madwifi interface (manually name hotplug interfaces instead). See http://modular.fas.harvard.edu/t42/.
  • PCMCIA may not work when restoring from swsusp2: check.
  • Suspend script:

    /etc/init.d/hotplug stop # very important echo 3 > /proc/acpi/sleep /etc/init.d/hotplug start & # this gets run when sleeping is done. /usr/local/bin/fakex # see http://modular.fas.harvard.edu/t42/

    Fakex is required to prevent X from operating slowly on resume

  • USB and ethernet need to be unloaded on suspend (see sanjiv at http://www.stanford.edu/~sanjiv/thinkpad/thinkpad.html)
  • you need to remove the ehci_hcd module before suspending or resuming (gentoo)
  • Map lid buttons: After apcid is installed, modify the /etc/acpi scripts used by acpid to map the lid button to a sleep event and the power button to a wake event. I remove usb modules before suspending through "/etc/init.d/hotplug stop" in my sleep script. After waking "/etc/init.d/hotplug start" is unable to start ehci_hcd and uhci_hcd but they can be manually loaded.
  • Standby and hibernate should be sudo'd wo password (sanjiv)
  • ibm-acpi driver necessary to get Fn key combos recognized as ACPI events (sanjiv)
  • unmount any windows partitions on hibernate!
  • when swsuspend is working: resume=/my/swap (sanjiv)
  • gardner says:

    In order to use SWSUSP2, you must append the line in your /etc/grub.conf file according to the instructions on the swsusp website. Then, you must run the suspend.sh script according to the swsusp website instructions, which will create the files /etc/suspend.conf and /usr/local/sbin/hibernate.

    Everything worked fine for me after un-suspending except for wired ethernet and USB. The USB issue can be easily fixed by adding "ehci_hcd uhci_hcd" to SWSUSP_REMOVEMODS and SWSUSP_INSERTMODS in /etc/suspend.conf to force swsusp2 to remove the USB modules upon suspend and then reinsert them upon unsuspend. The ethernet adapter problem is a little more complex, but I have discovered that manually shutting down the eth0 interface (ifdown eth0) and them removing the e1000 module (rmmod e1000) before suspend will guarantee that the module will load properly when networking is restarted after unsuspending. For some reason, I cannot get this to work automatically (as in the case of USB). I will update here when I experiment more.

  • ACPI files from gardner: http://pmw.org/~gardnerj/Thinkpad/my_acpi.tgz
  • swsusp2 patches for 2.6.8.1 are apparently available (software-suspend-2.0.0.109-for-2.6.8.1)

    for patchfile in ../software-suspend-2.0.0.109-for-2.6.8.1/*; \ do patch -p1 < $patchfile; done

  • If problems like kernel/power/suspend.c:1455: error: `KERNEL_DS' undeclared (first use > in this function when compiling swsusp2, see http://lists.berlios.de/pipermail/softwaresuspend-devel/2004-September/000555.html
  • Testing swsusp2 in new way (requires resume2=):

    rmmod ehci_hcd echo -n "disk" > /sys/power/state; #SuspendToDisk modprobe ehci_hcd ;

    • OR older way (requires resume=) -

    echo 4 > /proc/acpi/sleep

  • I did no configuration of swsusp2 as it's not built into the Ubuntu kernel.

Configure suspend to RAM

  • Took William Stein "a while to figure out" under 2.6.8.1, no other details. From other stuff I've read I think it should just work?

    I needed the ibm-acpi module from ibm-acpi.sourceforge.net and then I mapped an acpi event to the sleep button to go to sleep. Used the "acpi" example directory in ibm-acpi package as a replacement for the /etc/acpi directory that shipped with acpid.

  • Suspend-to-RAM initially kills sound. Fix it by stopping alsasound and starting it after resuming. After starting alsasound, modprobe snd-intel8x0 and run /usr/sbin/alsactl -f /etc/asound.state restore to restore the mixer settings.

    I didn't have this problem.

Wireless

  • Ubuntu atheros worked out of the box, I didn't configure shit; the rest of this is from preresearch.
  • Install sharutils (Fedora), madwifi needs them.
  • Gardner: install the wireless-tools-26-4 RPM for FC2 before installing madwifi drivers.
  • Madwifi drivers (apparently latest CVS version doesn't compile against 2.6.8.1), patch available at http://modular.fas.harvard.edu/t42/
  • MadWifi install instructions: http://www.mattfoster.clara.co.uk/madwifi-faq.htm
  • export COPTS="$COPTS -DSOFTLED" to see lights come on for wireless.
  • To start the interface, ensure the drivers are loaded with modprobe ath_pci, then bring up the ath0 interface with ifconfig ath0 up. Now try iwlist ath0 scan, and you should see information about all access points that your wireless card can detect.
  • Install wavemon (http://www.janmorgenstern.de/projects-software.html)
  • Install kismet (http://modular.fas.harvard.edu/t42)
  • Kudzu misconfigures wireless (eth0 instead of ath0)

CD/DVD

  • edit /etc/cdrecord/cdrecord to say CDR_DEVICE=/dev/cdrom

    Didn't need to do this.

  • Might need to modprobe ide-cd

    Didn't need to do this.

  • apt-get install regionset on Debian and run (set to 1).

    Did this.

  • K3B helps set proper permissions.

    Got k3b from apt under Ubuntu and it works fine.

  • Playing DVDs DVDs using ogle kinda work. At least some of them do.

Configure tpb:

  • Debian: from apt-get tpb

    Yup.

  • Fedora: included in xosd and tbp rpms that ship with Fedora.

    Couldn't find em.

  • modprobe nvram

    Ubuntu (added "nvram" to /etc/modules)

  • chmod a+rw /dev/nvram

    Did this in a startup script in Ubuntu.

  • Need a line in Autostart to a shell script that runs the actual GUI piece

    #!/bin/bash exec tpb --osd=on --verbose --thinkpad="/usr/bin/gnome-terminal"

Configure ibm-acpi:

  • Download the package from http://ibm-acpi.sourceforge.net and do "make; make install". Then add ibm_acpi to /etc/modules (Ubuntu).

    Worked good.

Modem:

  • Get Conexant HSF softmodem driver from Linuxant

    Ubuntu: debian package requires makedep'd linux source

    XXX not done: this isn't the right driver. I need a slmodem driver, I think? Actually no idea. The modem reports CXT from Windows, so who knows.

Sound:

  • Should just work (and does in both Ubuntu and Fedora)
  • Check if can play multiple sounds at once (if not, maybe mux). See http://modular.fas.harvard.edu/t42/
  • VMWare has some sound issues... choppiness. Haven't investigated.

IR:

  • Who knows

Bluetooth (for GPRS):

  • Install bluez

    From apt for ubuntu

  • Configure rfcomm to my phone, in /etc/bluetooth/rfcomm.conf:
       rfcomm0 {
          device XX:XX:XX:XX:XX:XX;
          channel 1;
          comment "My T610";
      }
    
  • GPRS to T-Mobile

    Just used the normal network connection setup tools and then hand-edited the resulting wvdial.conf and came up with:

        [Dialer ppp0]
        Modem = /dev/rfcomm0
        Baud = 57600
        SetVolume = 10
        Init2 = ATL2
        Password = 123
        Stupid mode = 1
        Init1 = ATZ
        Phone = *99***2#
        Username = 123
        Dial Command = ATDT
        FlowControl = Software (XON/XOFF)
    

  • OBEX pictures

    Tried halfheartedly but phone won't sent to machine with obexserver running.

Backups

  • How?

Software

  • VMWare

    Done. On reboot, VMWare wont stay configured. Fixed via http://www.braincells.com/debian/2004/05/

  • Komodo
  • Evolution

    Done.

  • Emacs

    Done.

  • Mozilla (web dev tools)

    Firebird under Ubuntu is cool.

  • K3B

    K3B seems to work.

Misc Ubuntu

  • Uncomment "universe" line from /etc/apt/sources.list to get everything
  • Install zlib1g-dev package to get Python compiles to create zlib.so
  • Install libncurses5dev to make sure mysql compiles
  • Install bison so mysql compile doesn't croak
  • Make a link from /usr/include/des.h to /usr/includeopenssl/des.h to allow cyrus-sasl to compile
  • Install redhat-artwork package deb to get Bluecurve theme
  • kernel-headers package required for VMware compile.

Problems and Resolutions

  • Configure all PCI IRQs for Auto (if ath0 locks up)

    Did it but probably didn't need to.

Misc Untried

Created by chrism
Last modified 2004-10-23 11:23 AM

liking things.

Wow, this keyboard is *sweet*. The fact that Ctrl and Fn are in the wrong order from left to right on it is beginning to not bother me. In any case, this is one seriously solid laptop on the non-keyboard front as well. I'd recommend one to anybody unless they wanted like a 4-hour battery life (it can only get 2.5 hours in best-case scenarios without a second battery plugged in to it).

nvram permission

Dexter Ang wrote me with the following tip:

Greetings!

I've been reading your "Thinkpad notes" especially regarding the
Ubuntu installation. I would like to add a note regarding your extra
startup script to set the proper permissions for /dev/nvram. What you
can simply do is edit /etc/udev/permissions.d/udev.permissions. Then
just grep for "nvram" and change the permissions from there. This way,
the right permissions are loaded immediately on modprobe nvram. Minor
detail really, but it does about the extra script.

Anyway, I hope this is helpful. If not, feel free to rant. =)

dex