Difference between revisions of "Installing Slackware 11.0 on a ThinkPad R60"

From ThinkWiki
Jump to: navigation, search
m (Very minor clarification: don't comment out the line being added to rc.local)
 
(14 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
== Overview ==
 
== Overview ==
  
Slackware 11.0 requires a bit of work to get all of the major features of this great notebook working.  It may take some time, but don't be daunted, it can be done.  This wiki is a work in progress (like all wiki's really) and i will try to make frequent updates until i have a fairly comprehensive guide, but i will especially focus on the issues that took some time (and head scratching) to resolve.
+
Slackware 11.0 requires a bit of work to get all of the major features of this notebook working.  It may take some time, but don't be daunted, it can be done.  This wiki is a work in progress (like all wiki's really) and i will try to make frequent updates until i have a fairly comprehensive guide, but i will especially focus on the issues that took some time (and head scratching) to resolve.
  
 
The R60 I am using has the following specifications:
 
The R60 I am using has the following specifications:
Line 9: Line 9:
 
* 60GB 5400rpm SATA HD
 
* 60GB 5400rpm SATA HD
 
* 15in 1400x1050 LCD
 
* 15in 1400x1050 LCD
* Intel 945GM/GMS/940GML Graphics Controller
+
* Intel 945GM/GMS/940GML Graphics Controller  
 
* Built in CDRW/DVD  
 
* Built in CDRW/DVD  
 
* Intel Corporation PRO/Wireless 3945ABG
 
* Intel Corporation PRO/Wireless 3945ABG
Line 23: Line 23:
 
* Ethernet
 
* Ethernet
 
* Suspend-to-RAM (finally)
 
* Suspend-to-RAM (finally)
* X at 1280x1024
 
 
* Dual core support (SMP)
 
* Dual core support (SMP)
* DVD / CDRW support
+
* DVD / CDRW with DMA support
 
* Trackpoint
 
* Trackpoint
 
* Synaptics touchpad (with scroll functionality)
 
* Synaptics touchpad (with scroll functionality)
 
* The highest resolution in X: 1400x1050
 
* The highest resolution in X: 1400x1050
 +
* OpenGL Hardware Acceleration
 +
* Hard Drive [[Active Protection System]] (accelerometer)
 +
* The special keys and key combos
 
* (most everything else i don't mention below)
 
* (most everything else i don't mention below)
 
  
 
=== Not Yet Working ===
 
=== Not Yet Working ===
* The special keys and key combos (which should be fairly easy, but i have not yet had time to work on)
 
 
* The thumbprint reader (this is due to the fact that Slackware does not use PAM for authentication, not driver problems)
 
* The thumbprint reader (this is due to the fact that Slackware does not use PAM for authentication, not driver problems)
* Although the [[Active Protection System]] accelerometer and deamon work, the head parking patch is unfortunately not yet implimented in the 2.6.18 kernel
+
* Integrated security chip (appearantly this conflicts with part of the snd_intel8x0 module which is needed for sound, i'm currently researching to see if there is a workaround.)
* In 24/32 bit color, artifacts appearing as horizontal lines appear at times of screen movement
 
* In 24/32 bit color: OpenGL
 
  
 
=== Untested ===
 
=== Untested ===
Line 45: Line 43:
 
* Firewire (probably works)
 
* Firewire (probably works)
 
* Modem
 
* Modem
* Integrated security chip
 
  
 
== Before You Begin ==
 
== Before You Begin ==
Line 56: Line 53:
 
Begin by booting off disk 1 of Slackware 11.0. For the purposes of installation, Slackware uses the 2.4.33 kernel which will be installed by default.  After the installation we'll be changing the kernel anyway, so it's okay to just install this default kernel for now.   
 
Begin by booting off disk 1 of Slackware 11.0. For the purposes of installation, Slackware uses the 2.4.33 kernel which will be installed by default.  After the installation we'll be changing the kernel anyway, so it's okay to just install this default kernel for now.   
  
{{WARN|Your Hard Drive is /dev/sda not /dev/hda, this is the DVD/CD drive}}
+
{{WARN|The Hard Drive is /dev/sda not /dev/hda}}
  
 
== Kernel ==
 
== Kernel ==
  
I am using the 2.6.18 kernel, others may work, but this is what i will be focusing on.  I recommend getting it from [http://kernel.org kernel.org] instead of using the Slackware tarball in the /extra branch. (There's no good reason, just my own personal preference) Before starting the configuration you will need two thing:
+
I am using the 2.6.18.3 kernel, others may work, but this is what i will be focusing on.  For the [Active Protection System] to operate correctly, version 3 of the 2.6.18 kernel must be used at this time.  I recommend getting it from [http://kernel.org kernel.org] instead of using the Slackware tarball. (There's no good reason, just my own personal preference) Before starting the configuration you will need two thing:
  
 
# The ieee80211 kernel patch needed for the wireless drivers which can be obtained [http://ieee80211.sourceforge.net here]
 
# The ieee80211 kernel patch needed for the wireless drivers which can be obtained [http://ieee80211.sourceforge.net here]
Line 73: Line 70:
 
{{cmdroot|rm /usr/src/linux}}
 
{{cmdroot|rm /usr/src/linux}}
  
{{cmdroot|ln -s /usr/src/linux-2.6.18 /usr/src/linux}}
+
{{cmdroot|ln -s /usr/src/linux-2.6.18.3 /usr/src/linux}}
  
 
Next unpack the ieee80211 stack, and patch it to the kernel source.  From the ieee80211
 
Next unpack the ieee80211 stack, and patch it to the kernel source.  From the ieee80211
Line 79: Line 76:
 
{{cmdroot|make patch_kernel}}
 
{{cmdroot|make patch_kernel}}
  
Next and most annoyingly, the files that were patched must be changed slightly for the modules to compile.  In each .c file in the {{path|/usr/src/linux-2.6.18/net/ieee80211/}} directory the line
+
Next and most annoyingly, the files that were patched must be changed slightly for the modules to compile.  In each .c file in the {{path|/usr/src/linux-2.6.18.3/net/ieee80211/}} directory the line
  
 
  #include "compat.h"
 
  #include "compat.h"
Line 88: Line 85:
  
 
{{NOTE|I did this completely by hand as i'm not very good at scripting, but if you know another way, more power to you}}
 
{{NOTE|I did this completely by hand as i'm not very good at scripting, but if you know another way, more power to you}}
 +
 +
Next the patch for the Advanced Protections System (HDAPS) will be applied in the usual way.  Download the patch from [http://www.dresco.co.uk/hdaps/hdaps_protect-2.6.18.3-2.patch here].
 +
 +
{{WARN|This patch is VERY new as yet and should be considered unstable for the time being.}}
 +
 +
Copy the patch file to the {{path|/usr/src}} path (one directory below the kernel root.)  Then apply it with:
 +
 +
{{cmduser|patch -p0 <hdaps.patch}}
 +
(Your filename may differ.)
  
 
=== Kernel Config ===
 
=== Kernel Config ===
  
Once you've completed this, copy the config-generic-smp-2.6.17.13 file from the Slackware kernel tarball to .config in the {{path|/usr/src/linux-2.6.18/}} directory.
+
Once you've completed this, copy the config-generic-smp-2.6.17.13 file from the Slackware kernel tarball to .config in the {{path|/usr/src/linux-2.6.18.3/}} directory.
 
Now run:
 
Now run:
  
Line 98: Line 104:
 
or your favorite configure method.
 
or your favorite configure method.
  
{{NOTE|Do not optimize for Pentium-4 M or Pentium-4}}
+
{{NOTE|Do not optimize for Pentium-4 M or Pentium-M, these would work, but be less optimal}}
  
 
Parameters that must be given special attention:
 
Parameters that must be given special attention:
  
#Optimize for "Pentium M"
+
#Optimize for "Pentium 4"
 
#Make sure SMP is enabled
 
#Make sure SMP is enabled
 
#Enable all ACPI functions that apply to the thinkpad, especially ibm-acpi (Compile these into the kernel, do not make them modules)
 
#Enable all ACPI functions that apply to the thinkpad, especially ibm-acpi (Compile these into the kernel, do not make them modules)
 
#SATA options
 
#SATA options
 
#tg3 Gigabit ethernet
 
#tg3 Gigabit ethernet
 +
#TPM atmel (which is the security chip)
  
 
{{cmduser|make bzImage}}
 
{{cmduser|make bzImage}}
Line 115: Line 122:
  
 
Copy the bzImage (along with your new .config) to your {{path|/boot}} directory, and add it to {{path|/etc/lilo.conf}}
 
Copy the bzImage (along with your new .config) to your {{path|/boot}} directory, and add it to {{path|/etc/lilo.conf}}
 +
Next add the following line to lilo.conf in the appropriate image:
 +
 +
append = "libata.atapi_enabled=1 combined_mode=libata"
 +
 +
This causes the SATA driver to pick up the DVD drive instead of the IDE driver.  This is important because the IDE driver won't allow DMA to be enabled properly.  This is one major difference from the other Thinkpad 60's which have a slightly different SATA controller.  The DVD drive will be {{path|/dev/sr0}}
  
 
Finally run
 
Finally run
Line 132: Line 144:
 
=== Suspend-to-RAM functionallity ===
 
=== Suspend-to-RAM functionallity ===
  
Currently the Suspend option in Klaptop from KDE works reliably so long as the wireless network is not active when the machine is suspendedLid-close suspend also seems to work by default in KDE, but doesn't seem to be very stable at the moment.
+
Currently the Suspend option in Klaptop from KDE works reliably. Also, as long as the ACPI drivers are compiled in the kernel (not as modules) you can use the Lid-close suspend in KDE even with the wifi connected.  When you open the lid, everything should resume properly, and the wifi will automatically reconnect to the network you had previously been connected to.
 +
 
 +
=== Active Protection System ===
 +
 
 +
For the most part just follow the directions in [[How_to_protect_the_harddisk_through_APS]].  After you compile hdapsd:
 +
 
 +
{{cmduser|gcc hdapsd-20060409.c}}
 +
(or whatever is the most recent version when you're doing this)
 +
 
 +
copy the hdapsd file to your {{path|/usr/local/sbin}} directoryThen add a line similar to:
 +
 
 +
{{path|/usr/local/sbin/hdapsd -d sda -s 14 -a -b}}
 +
 
 +
to {{path|/etc/rc.d/rc.local}}
 +
 
 +
"14" refers to the sensitivity to shock.  I found that 14 is about right for me.  Your milage may differ.
 +
 
 +
If you're using kde i recommend getting [http://roy.marples.name/node/269 khdapsmonitor] which is a tray icon that shows that current status of the drive (more or less like the tray icon for the same purpose in WindoZe.)  There are others for KDE such as khdapsmon, but this is now unmaintained.  There are also others for different window managers such as gnome, but you're on your own there.
  
 
=== Synaptics Touchpad ===
 
=== Synaptics Touchpad ===
  
 
Follow the directions for setting up the touchpad [http://web.telia.com/~u89404340/touchpad/ here].
 
Follow the directions for setting up the touchpad [http://web.telia.com/~u89404340/touchpad/ here].
Although it isn't mentioned explicitly, the Trackpoint can be used in conjunction with the Touchpad, simply follow the directions as though you have an additional external mouse, but set it's device file to {{path|/dev/psmouse}} as well.  Both devices go throught the same interface, this way you can use the Trackpoint as the pointing device and the Touchpad as a scrolling device.
+
Although it isn't mentioned explicitly, the Trackpoint can be used in conjunction with the Touchpad, simply follow the directions as though you have an additional external mouse, but set it's device file to {{path|/dev/psmouse}} as well.  Both devices go through the same interface, this way you can use the Trackpoint as the pointing device and the Touchpad as a scrolling device.
  
 
=== X11 Video ===
 
=== X11 Video ===
  
I'm using the pre-packaged i830 driver for [http://www.x.org XOrg], and i've found that it works nearly flawlessly in 16bpp mode, but in 24bpp more all kinds of (generally minor) screen corruptions occur.  A program is necessary to enable the 1400x1050 resolution called [http://www.geocities.com/stomljen/ 915resolution].  This program writes the capability to the bios, at which point X is able to use it (providing that it's set up this way in your {{path|/etc/X11/xorg.conf}} file.  I'm not using the external VGA nor S-Video at the moment, but fret not, this as well as help setting up your xorg.conf file for video is available at [Intel Graphics Media Accelerator 950].
+
I'm using the pre-packaged i830 driver for [http://www.x.org XOrg], and i've found that it works nearly flawlessly in 16bpp mode, but in 24bpp more all kinds of (generally minor) screen corruptions occur.  A program is necessary to enable the 1400x1050 resolution called [http://www.geocities.com/stomljen/ 915resolution].  This program writes the capability to the bios, at which point X is able to use it (providing that it's set up this way in your {{path|/etc/X11/xorg.conf}} file.  I'm not using the external VGA nor S-Video at the moment, but fret not, this, as well as help setting up your xorg.conf file is available at [[Intel Graphics Media Accelerator 950]].
 +
To get OpenGL support working, simply add:
 +
 
 +
    Section "DRI"
 +
        Mode 0666
 +
    EndSection
 +
 
 +
to the end of the {{path|/etc/X11/xorg.conf}} file.
  
 
=External Sources=
 
=External Sources=
*This guide is listed at the [http://tuxmobil.org/ibm.html TuxMobil Linux laptop and notebook installation survey (IBM/Lenovo)].
+
*There is information about Slackware on other Thinkpad models at [http://tuxmobil.org/ibm.html TuxMobil Linux laptop and notebook installation survey (IBM/Lenovo)].

Latest revision as of 01:20, 19 June 2010

Overview

Slackware 11.0 requires a bit of work to get all of the major features of this notebook working. It may take some time, but don't be daunted, it can be done. This wiki is a work in progress (like all wiki's really) and i will try to make frequent updates until i have a fairly comprehensive guide, but i will especially focus on the issues that took some time (and head scratching) to resolve.

The R60 I am using has the following specifications:

  • Intel Core Duo T2400 (1.83GHz)
  • 512MB RAM
  • 60GB 5400rpm SATA HD
  • 15in 1400x1050 LCD
  • Intel 945GM/GMS/940GML Graphics Controller
  • Built in CDRW/DVD
  • Intel Corporation PRO/Wireless 3945ABG
  • Built in Modem
  • Broadcom Corporation NetXtreme BCM5751M Gigabit Ethernet
  • Built in fingerprint reader
  • IEEE 1394 (firewire)
  • 6c Li-Ion Battery

Working

  • Intel "High-Def" audio
  • WiFi
  • Ethernet
  • Suspend-to-RAM (finally)
  • Dual core support (SMP)
  • DVD / CDRW with DMA support
  • Trackpoint
  • Synaptics touchpad (with scroll functionality)
  • The highest resolution in X: 1400x1050
  • OpenGL Hardware Acceleration
  • Hard Drive Active Protection System (accelerometer)
  • The special keys and key combos
  • (most everything else i don't mention below)

Not Yet Working

  • The thumbprint reader (this is due to the fact that Slackware does not use PAM for authentication, not driver problems)
  • Integrated security chip (appearantly this conflicts with part of the snd_intel8x0 module which is needed for sound, i'm currently researching to see if there is a workaround.)

Untested

  • Hibernation (to disk), i normally only use Suspend to RAM, but i believe there are pages devoted to hibernation
  • Multi-headed VGA out
  • S-Video out
  • Firewire (probably works)
  • Modem

Before You Begin

Go into the BIOS and enable "compatibility mode" for the SATA controller

NOTE!
"compatibility mode" is necessary to be able to suspend-to-RAM later on

While you're there disable protection of the "recovery partition" if you know you won't be using Windows, and want to recover the extra 5GB (do at your own risk!) Make sure you have a basic understanding of lilo and how to recompile a kernel. Get the Slackware installation set (disks 1-3, but you may only need the first two)

I'll also assume that you are familiar with the basic steps of installing Slackware, if you're not, consult Slackware Installation

Installation

Begin by booting off disk 1 of Slackware 11.0. For the purposes of installation, Slackware uses the 2.4.33 kernel which will be installed by default. After the installation we'll be changing the kernel anyway, so it's okay to just install this default kernel for now.

ATTENTION!
The Hard Drive is /dev/sda not /dev/hda

Kernel

I am using the 2.6.18.3 kernel, others may work, but this is what i will be focusing on. For the [Active Protection System] to operate correctly, version 3 of the 2.6.18 kernel must be used at this time. I recommend getting it from kernel.org instead of using the Slackware tarball. (There's no good reason, just my own personal preference) Before starting the configuration you will need two thing:

  1. The ieee80211 kernel patch needed for the wireless drivers which can be obtained here
  2. The default slackware configuration file for the 2.6.17.13 kernel (which is in that kernel's tarball in the /extra branch) This is really only necessary if you're not a kernel pro, if you are, you don't need this.

Patching

NOTE!
The ieee80211 stack can be built as a modules without patching the kernel, but i have not been able to do this sucessfully, so i've found this the only way to get it to work.

Unpack the kernel and put it into the regular place (/usr/src) delete the linux link and relink it to the new kernel tree:

# rm /usr/src/linux

# ln -s /usr/src/linux-2.6.18.3 /usr/src/linux

Next unpack the ieee80211 stack, and patch it to the kernel source. From the ieee80211

# make patch_kernel

Next and most annoyingly, the files that were patched must be changed slightly for the modules to compile. In each .c file in the /usr/src/linux-2.6.18.3/net/ieee80211/ directory the line

#include "compat.h"

must be changed to

#include <net/compat.h>
NOTE!
I did this completely by hand as i'm not very good at scripting, but if you know another way, more power to you

Next the patch for the Advanced Protections System (HDAPS) will be applied in the usual way. Download the patch from here.

ATTENTION!
This patch is VERY new as yet and should be considered unstable for the time being.

Copy the patch file to the /usr/src path (one directory below the kernel root.) Then apply it with:

$ patch -p0 <hdaps.patch (Your filename may differ.)

Kernel Config

Once you've completed this, copy the config-generic-smp-2.6.17.13 file from the Slackware kernel tarball to .config in the /usr/src/linux-2.6.18.3/ directory. Now run:

$ make menuconfig

or your favorite configure method.

NOTE!
Do not optimize for Pentium-4 M or Pentium-M, these would work, but be less optimal

Parameters that must be given special attention:

  1. Optimize for "Pentium 4"
  2. Make sure SMP is enabled
  3. Enable all ACPI functions that apply to the thinkpad, especially ibm-acpi (Compile these into the kernel, do not make them modules)
  4. SATA options
  5. tg3 Gigabit ethernet
  6. TPM atmel (which is the security chip)

$ make bzImage

$ make modules

# make modules_install

Copy the bzImage (along with your new .config) to your /boot directory, and add it to /etc/lilo.conf Next add the following line to lilo.conf in the appropriate image:

append = "libata.atapi_enabled=1 combined_mode=libata"

This causes the SATA driver to pick up the DVD drive instead of the IDE driver. This is important because the IDE driver won't allow DMA to be enabled properly. This is one major difference from the other Thinkpad 60's which have a slightly different SATA controller. The DVD drive will be /dev/sr0

Finally run

# lilo

Configuration

After you've booted your shiny new kernel, we'll start configuring the system:

Wireless Network

The first and most important thing to have working is your network connectivity. If you're using the gigabit ethernet card, this should already be working (so long as you compiled tg3). If you're like me, you need your wireless up as soon as possible.

The first thing to do is download the latest version of the ipw3945 drivers here.

Suspend-to-RAM functionallity

Currently the Suspend option in Klaptop from KDE works reliably. Also, as long as the ACPI drivers are compiled in the kernel (not as modules) you can use the Lid-close suspend in KDE even with the wifi connected. When you open the lid, everything should resume properly, and the wifi will automatically reconnect to the network you had previously been connected to.

Active Protection System

For the most part just follow the directions in How_to_protect_the_harddisk_through_APS. After you compile hdapsd:

$ gcc hdapsd-20060409.c (or whatever is the most recent version when you're doing this)

copy the hdapsd file to your /usr/local/sbin directory. Then add a line similar to:

/usr/local/sbin/hdapsd -d sda -s 14 -a -b

to /etc/rc.d/rc.local

"14" refers to the sensitivity to shock. I found that 14 is about right for me. Your milage may differ.

If you're using kde i recommend getting khdapsmonitor which is a tray icon that shows that current status of the drive (more or less like the tray icon for the same purpose in WindoZe.) There are others for KDE such as khdapsmon, but this is now unmaintained. There are also others for different window managers such as gnome, but you're on your own there.

Synaptics Touchpad

Follow the directions for setting up the touchpad here. Although it isn't mentioned explicitly, the Trackpoint can be used in conjunction with the Touchpad, simply follow the directions as though you have an additional external mouse, but set it's device file to /dev/psmouse as well. Both devices go through the same interface, this way you can use the Trackpoint as the pointing device and the Touchpad as a scrolling device.

X11 Video

I'm using the pre-packaged i830 driver for XOrg, and i've found that it works nearly flawlessly in 16bpp mode, but in 24bpp more all kinds of (generally minor) screen corruptions occur. A program is necessary to enable the 1400x1050 resolution called 915resolution. This program writes the capability to the bios, at which point X is able to use it (providing that it's set up this way in your /etc/X11/xorg.conf file. I'm not using the external VGA nor S-Video at the moment, but fret not, this, as well as help setting up your xorg.conf file is available at Intel Graphics Media Accelerator 950. To get OpenGL support working, simply add:

   Section "DRI"
       Mode 0666
   EndSection

to the end of the /etc/X11/xorg.conf file.

External Sources