Difference between revisions of "Lenovo ThinkPad T61"

From ArchWiki
Jump to: navigation, search
(Other Tweaks: add section about hdd clicking)
(Major changes to improve information, complete acpi and special keys support, hdaps instructions)
Line 1: Line 1:
 
[[Category:Laptops (English)]]
 
[[Category:Laptops (English)]]
 
[[Category:HOWTOs (English)]]
 
[[Category:HOWTOs (English)]]
{{stub}}
 
==Introduction==
 
My plan when I finish is to have my laptop (Lenova Thinkpad T61) dual booted with Windows XP Pro (work image).  I repartitioned my hard drive with [http://gparted.sourceforge.net/livecd.php Gparted Live CD].  It only took a minute or so.  I will be doing the install with arch-core-install-2008.04-rc-i686.iso.  There is an [http://wiki.archlinux.org/index.php/Official_Arch_Linux_Install_Guide installation guide (wiki)] that may help.  I will do my best to give as much detail as possible.
 
 
NOTE:  Per [http://shop.lenovo.com/ISS_Static/merchandising/US/PDFs/T61_Datasheet-USEN-00.pdf Lenovo's website], this laptop is Novell SLED 10 certified.  So getting linux on this laptop should not be too hard.
 
  
 
===System Specifications===
 
===System Specifications===
Line 56: Line 51:
  
 
===What works/What doesn't===
 
===What works/What doesn't===
Pretty much everything works on this laptop. I have not tried the modem (no POTS line) or tried to suspend/hibernate the laptop yet.
+
Pretty much everything works on this laptop. The modem is untested.
  
==Installation==
+
= Pre installation notes =
Boot from the CD and do the base installation from the CD. My partitions are setup as follows:
+
Remember to back up the restore partition if you plan to restore it, or leave it.
  
SDA1 30gb Win XP
+
Follow the [[Official_Arch_Linux_Install_Guide | official Archlinux install guide]]
SDA3 2gb swap (needed for hibernate mode...I think)
+
SDA5 10gb /
+
SDA6 35gb /home
+
  
With Windows XP as an option, the grub boot loader should look something like this:
+
= Accessing the recovery partition with GRUB =
 
+
Edit your '''/boot/grub/menu.lst''' file and add the following:
  # Windows XP
+
  # booting "Rescue and Recovery" partition from Lenovo
  title  Microsoft Windows XP Professional
+
  title Thinkpad Maintenance
 +
  unhide (hd0,0)
 
  rootnoverify (hd0,0)
 
  rootnoverify (hd0,0)
makeactive
 
 
  chainloader +1
 
  chainloader +1
 
# (0) Arch Linux
 
title  Arch Linux
 
root  (hd0,4)
 
kernel /boot/vmlinuz26 root=/dev/sda5 ro
 
initrd /boot/kernel26.img
 
 
# (1) Arch Linux
 
title  Arch Linux Fallback
 
root  (hd0,4)
 
kernel /boot/vmlinuz26 root=/dev/sda5 ro
 
initrd /boot/kernel26-fallback.img
 
  
==Post Installation==
+
= Configuration =
First, create your user account:
+
===Video Driver===
#useradd -m <user>
+
The Intel® Graphics Media Accelerator GM965 uses the xf86-video-intel driver.
Add yourself to some needed group:
+
#gpasswd -a <user> audio; gpasswd -a <user> optical; gpasswd -a <user> storage; gpasswd -a <user> users
+
Next is to upgrade:
+
#pacman -Syu
+
  
==Install GUI==
+
#pacman -S xf86-video-intel
Now, lets get the gui going.
+
  
===Video Driver===
+
The relevent kernel drivers include:
First things first.  Lets install the driver.  Per the lshwd command I displayed earlier, it should be the intel driver.  Let's search for it:
+
  
#pacman -Ss intel
+
*DRM_I915
extra/xf86-video-intel 2.3.2-1 (xorg-video-drivers)
+
    X.org Intel i810/i830/i915 video drivers
+
  
Now let's install it:
+
For framebuffer graphics the kernel drivers:
  
#pacman -S xf86-video-intel
+
*intelfb
 +
*fb_uvesa
 +
*fb_vesa
  
===Xorg/Gnome===
+
Should workIntelfb is known to have a few problems with hardware acceleration and requires grub2 patched with 915resolution to properly set the correct resolution.   
I am a gnome personTo get it installed, I followed the [http://wiki.archlinux.org/index.php/Xorg Xorg] and [http://wiki.archlinux.org/index.php/Gnome Gnome] wikis.  They provide enough information to get it setupI will post my xorg.conf file in the next section.
+
 
Note:  Make sure you update the daemons in /etc/rc.conf.
+
The package grub2-915resolution in the AUR would work if the patch for 915resolution is updated with the most recent 915resolution changes for the GM965 are included.
  
 
====Mouse====
 
====Mouse====
There is a synaptic touchpad on this laptop.  If you follow this [http://wiki.archlinux.org/index.php/Touchpad_Synaptics howto], you should have no problems getting this to work.  It works great for me.
+
There is a synaptic touchpad on this laptop.  If you follow this [http://wiki.archlinux.org/index.php/Touchpad_Synaptics howto], you should have no problems getting this to work.
Note: Make sure you update the modules in /etc/rc.conf.
+
 
 +
The relevant kernel driver is:
  
====Compiz Fusion====
+
*mouse_ps2_synaptics
This laptop supports Compiz Fusion.  So I followed the [http://wiki.archlinux.org/index.php/Compiz_fusion wiki], and it worked great.
+
  
 
====Xorg Config====
 
====Xorg Config====
Here is the output of my /etc/X11/xorg.conf:
+
Here is a sample /etc/X11/xorg.conf:
  
Section "ServerLayout"
+
    Section "Module"
        Identifier    "Xorg Configured"
+
        Load        "dbe"   # Double buffer extension
        Screen      0 "Screen0" 0 0
+
        SubSection "extmod"
        InputDevice   "Keyboard0" "CoreKeyboard"
+
          Option   "omit xfree86-dga"
        InputDevice    "Touchpad" "SendCoreEvents"
+
        EndSubSection
        Option         "AIGLX" "true"
+
        Load        "freetype"
  EndSection
+
        Load        "GLcore"
 +
        Load        "glx"
 +
         Load        "bitmap"
 +
        Load        "dri"
 +
  #        Load        "int10"
 +
#        Load        "ddc"
 +
#        Load        "vbe"
 +
#        Load        "xtrap"
 +
    EndSection
 
   
 
   
Section "ServerFlags"
+
    Section "Files"
        Option "AllowMouseOpenFail" "true"  
+
        ModulePath "/usr/lib/xorg/modules"
EndSection
+
        FontPath  "/usr/share/fonts/local/"
 +
        FontPath  "/usr/share/fonts/misc/:unscaled"
 +
        FontPath  "/usr/share/fonts/75dpi/:unscaled"
 +
        FontPath  "/usr/share/fonts/100dpi/:unscaled"
 +
        FontPath  "/usr/share/fonts/misc/"
 +
        FontPath  "/usr/share/fonts/75dpi/"
 +
        FontPath  "/usr/share/fonts/100dpi/"
 +
        FontPath  "/usr/share/fonts/TTF/"
 +
        FontPath  "/usr/share/fonts/Type1/"
 +
        FontPath  "/usr/share/fonts/local/"
 +
    EndSection
 
   
 
   
Section "Files"
+
    Section "ServerFlags"
        RgbPath     "/usr/share/X11/rgb"
+
        Option     "blank time"   "3"
        ModulePath  "/usr/lib/xorg/modules"
+
        Option      "standby time" "5"
        FontPath    "/usr/share/fonts/misc:unscaled"
+
        Option      "suspend time" "10"
        FontPath    "/usr/share/fonts/misc"
+
        Option      "off time"     "15"
        FontPath    "/usr/share/fonts/75dpi:unscaled"
+
        Option      "RandR"
        FontPath    "/usr/share/fonts/75dpi"
+
        Option      "AutoAddDevices" "False"
        FontPath    "/usr/share/fonts/100dpi:unscaled"
+
     EndSection
        FontPath    "/usr/share/fonts/100dpi"
+
        FontPath    "/usr/share/fonts/PEX"
+
        FontPath    "/usr/share/fonts/cyrillic"
+
        FontPath    "/usr/share/fonts/ttf/western"
+
        FontPath     "/usr/share/fonts/ttf/decoratives"
+
        FontPath    "/usr/share/fonts/truetype"
+
        FontPath    "/usr/share/fonts/truetype/openoffice"
+
        FontPath    "/usr/share/fonts/truetype/ttf-bitstream-vera"
+
        FontPath    "/usr/share/fonts/latex-ttf-fonts"
+
        FontPath    "/usr/share/fonts/defoma/CID"
+
        FontPath    "/usr/share/fonts/defoma/TrueType"
+
EndSection
+
 
   
 
   
Section "Module"
+
    Section "InputDevice"
        Load "ddc" # ddc probing of monitor
+
        Identifier "Keyboard0"
        Load  "dbe"
+
        Driver      "kbd"
        Load  "dri"
+
        Option      "CoreKeyboard"
        Load  "extmod"
+
        Option      "XkbRules" "xorg"
        Load  "glx"
+
        Option      "XkbModel" "thinkpad60"
        Load  "bitmap" # bitmap-fonts
+
        Option      "XkbLayout" "us"
        Load  "freetype"
+
    EndSection
        Load  "record"
+
        Load  "synaptics"
+
EndSection
+
 
   
 
   
Section "InputDevice"
+
    Section "InputDevice"
        Identifier  "Keyboard0"
+
        Identifier  "UltraNav Trackpoint"
        Driver      "keyboard"
+
        Driver      "mouse"
        Option      "CoreKeyboard"
+
        Option      "CorePointer"
        Option "XkbRules" "xorg"
+
        Option     "Device"             "/dev/input/mice"
        Option "XkbModel" "pc105"
+
        Option     "Protocol"           "ImPS/2"
        Option "XkbLayout" ""
+
        Option     "Emulate3Buttons"     "off"
        Option "XkbVariant" ""
+
        Option     "EmulateWheel"       "on"
  EndSection
+
        Option      "EmulateWheelTimeOut" "250"
 +
        Option      "EmulateWheelButton" "2"
 +
        Option      "YAxisMapping"        "4 5"
 +
        Option      "XAxisMapping"        "6 7"
 +
        Option      "ZAxisMapping"        "4 5"
 +
    EndSection
 
   
 
   
  Section "InputDevice"
+
  #    Section "InputDevice"
        Identifier     "USB Mouse"
+
#          Identifier "Synaptics"
        Driver         "mouse"
+
#          Driver     "synaptics"
        Option         "Device"               "/dev/input/mice"
+
#          Option     "Device" "/dev/input/mice"
        Option         "SendCoreEvents"        "true"
+
#          Option     "Protocol" "auto-dev"
        Option          "Protocol"             "IMPS/2"
+
#          Option     "Emulate3Buttons" "yes"
        Option         "ZAxisMapping"         "4 5"
+
#          Option     "SHMConfig" "on"
        Option         "Buttons"               "5"
+
  #    EndSection
  EndSection
+
 
   
 
   
Section "InputDevice"
+
    Section "Monitor"
        Identifier  "Touchpad"
+
        Identifier  "Thinkpad Monitor"
        Driver      "synaptics"
+
        Option      "DPMS"
        Option      "Device" "/dev/input/mouse1"
+
#        HorizSync  31.5-50.0
        Option      "Protocol" "auto-dev"
+
#        VertRefresh 59.9-60.1
        Option      "LeftEdge" "1700"
+
     EndSection
        Option      "RightEdge" "5300"
+
        Option      "TopEdge" "1700"
+
        Option      "BottomEdge" "4200"
+
        Option      "FingerLow" "25"
+
        Option      "FingerHigh" "30"
+
        Option      "MaxTapTime" "180"
+
        Option      "MaxTapMove" "220"
+
        Option      "VertScrollDelta" "100"
+
        Option      "MinSpeed" "0.06"
+
        Option      "MaxSpeed" "0.12"
+
        Option      "AccelFactor" "0.0010"
+
        Option     "SHMConfig" "true"
+
EndSection
+
 
   
 
   
Section "Monitor"
+
    Section "Device"
        Identifier "Monitor0"
+
        Identifier "Intel GMA X3100"
                Option "DPMS" "true"
+
        Driver      "intel"
        HorizSync    28.0 - 96.0 # Warning: This may fry old Monitors
+
        BusID      "PCI:0:2:0"
        VertRefresh  50.0 - 75.0 # Very conservative. May flicker.
+
        Option      "AccelMethod" "exa"
  EndSection
+
        Option      "MigrationHeuristic"    "greedy"
 +
    EndSection
 
   
 
   
Section "Device"
+
    Section "Screen"
         Identifier  "Card0"
+
        Identifier         "Thinkpad Screen"
        Driver      "intel"
+
        Device              "Intel GMA X3100"
        VendorName  "Intel Corp."
+
        Monitor            "Thinkpad Monitor"
        BoardName  "Unknown Board"
+
        DefaultDepth        24
        Option      "XAANoOffscreenPixmaps" "true"
+
        SubSection "Display"
        Option      "DRI" "true"
+
            Depth 24
EndSection
+
            Modes "1280x800" "1024x768" "832x624" "800x600" "640x480" "720x400" "640x400" "640x350"
 +
            Virtual    2048 2048
 +
        EndSubSection
 +
    EndSection
 
   
 
   
Section "Screen"
+
    Section "DRI"
        Identifier "Screen0"
+
        Mode        0666
        Device     "Card0"
+
     EndSection
        Monitor    "Monitor0"
+
        DefaultColorDepth 24
+
        SubSection "Display"
+
                Depth    24
+
        EndSubSection
+
EndSection
+
 
   
 
   
Section "DRI"
+
    Section "Extensions"
        Mode 0666
+
        Option      "Composite"    "Enable"
EndSection
+
        Option      "RENDER"        "Enable"
 +
    EndSection
 
   
 
   
Section "Extensions"
+
    Section "ServerLayout"
        Option "Composite"     "Enable"
+
        Identifier "Default Layout"
  EndSection
+
        Screen "Thinkpad Screen"
 +
        InputDevice "UltraNav Trackpoint" "CorePointer"
 +
  #        InputDevice "Synaptics" "CorePointer"
 +
        InputDevice "Keyboard0" "CoreKeyboard"
 +
    EndSection
 +
 
 +
Please note that this has the touchpad and xorg input hotplugging disabled.
  
  
 
==Audio==
 
==Audio==
 +
Sound works out of the box. The relevant module for sound is:
  
Now for the sound.  I went straight to [http://wiki.archlinux.org/index.php/PulseAudio PulseAudio] and [http://wiki.archlinux.org/index.php/ALSA ALSA] and followed the wikis.  Make sure you do the following as root:
+
*SND_HDA_INTEL
#alsactl store
+
 
Everything that I have tested has worked fine.
+
Refer to following guides to set it up:
 +
 
 +
[[OSS]]
 +
 
 +
[[ALSA]]
 +
 
 +
[[PulseAudio]]
 +
 
 +
Use whichever you wish.
  
 
== Network ==
 
== Network ==
 
=== Wired ===
 
=== Wired ===
The wired connection worked out of the box.  The [http://wiki.archlinux.org/index.php/Networkmanager Neworkmanager], that we will setup in the next section, will manage this as well as the wireless.
+
 
 +
The wired connection works out of the box and uses the following module:
 +
 
 +
*e1000e
  
 
=== Wireless ===
 
=== Wireless ===
Now lets get wireless going.  There is a [http://wiki.archlinux.org/index.php/Wireless_Setup wireless setup howto] and there is a [http://wiki.archlinux.org/index.php/Networkmanager Networkmanager howto].  I will go into detail about this because wireless is one of the most difficult things to get running.  Well, maybe not anymore.  This should be pretty easy to get going.
+
Uses either module, varies with different setups:
  
Install wireless drivers and network tools
+
*iwl3945
#pacman -Sy iwlwifi-4965-ucode wireless_tools gnome-network-manager
+
*iwl4965
Add yourself to the network group
+
 
#gpasswd -a <user> network
+
Requires firmware be installed to work.
Load module
+
 
  #modprobe iwl4965
+
Refer to [[Wireless_Setup#iwl3945.2C_iwl4965_and_iwl5000-series | Wireless Setup for iwl3945, iwl4965 and iwl5000 series]]
See what device the wireless card it on:
+
 
  #iwconfig
+
=== Modem ===
  lo        no wireless extensions.
+
Untested.
 +
 
 +
== USB ==
 +
Works out of the box.
 +
 
 +
Following modules are used:
 +
 
 +
*uhci_hcd
 +
*ehci_hcd
 +
*usbhid
 +
 
 +
== Bluetooth ==
 +
Works out of the box.
 +
 
 +
Following modules are used:
 +
 
 +
*bluetooth
 +
*btusb
 +
*l2cap
 +
*rfcomm
 +
*hci_usb
 +
*ehci-hcd
 +
*uhci-hcd
 +
 
 +
== Trackpoint ==
 +
Works, if you want to scroll while holding the middle mouse button down you can add the following to an .fdi file:
 +
 
 +
/etc/hal/fdi/policy/11-trackpoint-mw.fdi:
 +
<match key="info.product" contains="TrackPoint">
 +
  <merge key="input.x11_options.EmulateWheel" type="string">true</merge>
 +
  <merge key="input.x11_options.EmulateWheelButton" type="string">2</merge>
 +
  <merge key="input.x11_options.ZAxisMapping" type="string">4 5</merge>
 +
  <merge key="input.x11_options.Emulate3Buttons" type="string">true</merge>
 +
  </match
 +
 
 +
What it does is that it sets emulates wheel on button two, which is middle button and maps in what directions it will emulate the scroll wheel, it will at the same time emulate 3 mouse buttons.
 +
 
 +
You can read more about the new [[Xorg_input_hotplugging | Xorg input hotplugging here]]
 +
 
 +
== ThinkFinger ==
 +
Works, read [[ThinkFinger]] for reference and examples.
 +
 
 +
= ACPI =
 +
To get all the special keys working requires the module:
 +
 
 +
*THINKPAD_ACPI
 +
 
 +
Which is currently not included in the stock kernel.  In the AUR the packages:
 +
 
 +
*kernel26tp
 +
*kernel26zen-git
 +
 
 +
Provide the needed module (in addition to many other useful patches.)  Install either one, though it is reccomended that you try the kernel26zen-git package.  Read [[Kernel Compilation with ABS]], [[Custom Kernel Compilation with ABS]], and [[Kernel Compilation From Source]] for more info.
 +
 
 +
It is necessary to edit the default /etc/acpi/handler.sh included with the acpid package to get these keys working.
 +
 
 +
  #!/bin/sh
 +
  # Default acpi script that takes an entry for all actions, modified to include thinkpad special keys.
 
   
 
   
  wmaster0 no wireless extensions.
+
  # NOTE: This is a 2.6-centric script. If you use 2.4.x, you'll have to
 +
#      modify it to not use /sys
 
   
 
   
  wlan0    IEEE 802.11g ESSID:""   
+
  minspeed=`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq`
          Mode:Managed Frequency:2.442 GHz Access Point: 00:90:4C:7E:00:10 
+
  maxspeed=`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq`
          Bit Rate:54 Mb/s  Tx-Power=20 dBm  Sensitivity=8/0
+
setspeed="/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed"
          Retry limit:7  RTS thr:off  Fragment thr:off
+
   
          Power Management:off
+
  set $*
          Link Quality=98/100  Signal level=-27 dBm  Noise level=-92 dBm
+
   
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
+
case "$1" in
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
+
    ibm/hotkey)
eth0     no wireless extensions.
+
    case "$2" in
While still in the /etc/rc.conf file still open, edit the network part of the file:
+
        HKEY)
lo="lo 127.0.0.1"
+
            case "$4" in
eth0="dhcp"
+
                00001002) # Lock screen
wlan0="dhcp"
+
                #Enter your xlock or xscreensaver command here
INTERFACES=(lo !eth0 !wlan0)
+
                    ;;
With /etc/rc.conf still open, edit it to stop the network daemon from starting and have networkmanager and dhcdpd daemons start at boot:
+
                00001003) # swithing display off
DAEMONS=(... !network ... networkmanager dhcdbd)
+
                    xset dpms force off
Now reboot or stop/start the daemons:
+
                    ;;
# /etc/rc.d/network stop;/etc/rc.d/networkmanager start;/etc/rc.d/dhcdbd start
+
                00001004) # Suspend to RAM
 +
                    /usr/sbin/pm-suspend
 +
                    ;;
 +
                00001005) # Switch Bluetooth
 +
                    ;;
 +
                00001007) # Toggle external display
 +
                    if [ "$(xrandr -q | grep "VGA connected")" ]; then
 +
                        if [ "$(xrandr -q | grep "VGA connected [0-9]")" ]; then
 +
                            xrandr --output VGA --off
 +
                        else
 +
                            xrandr --output VGA --auto
 +
                        fi
 +
                    else
 +
                        xrandr --output VGA --off
 +
                    fi
 +
                    ;;
 +
                #00001008) # Toggle Trackpoint/Touchpad
 +
                #    ;;
 +
                #00001009) # Eject from dock
 +
                #    ;;
 +
                0000100c) # Hibernate
 +
                    /usr/sbin/pm-hibernate
 +
                    ;;
 +
                00001011) #Brightness down
 +
                    CUR="xbacklight -get"
 +
                    CUR="echo $CUR | awk '{print $1-5}'"
 +
                    xbacklight -set $CUR
 +
                    ;;
 +
                00001012) #Brightness up
 +
                    CUR=`xbacklight -get`
 +
                    CUR="echo $CUR | awk '{print $1+5}'"
 +
                    xbacklight -set $CUR
 +
                    ;;
 +
                #00001014) # Toggle zoom
 +
                #    ;;
 +
                00001018) # ThinkVantage button
 +
                    ;;
 +
            esac
 +
            ;;
 +
    esac
 +
    ;;
 +
    button/power)
 +
        #echo "PowerButton pressed!">/dev/tty5
 +
        case "$2" in
 +
            PWRF)    
 +
              logger "PowerButton pressed: $2"
 +
              /sbin/init 0
 +
              ;;
 +
            *)     logger "ACPI action undefined: $2" ;;
 +
        esac
 +
        ;;
 +
    button/sleep)
 +
        case "$2" in
 +
            SLPB)  /usr/sbin/pm-suspend ;;
 +
            *)      logger "ACPI action undefined: $2" ;;
 +
        esac
 +
        ;;
 +
    ac_adapter)
 +
        case "$2" in
 +
            AC)
 +
                case "$4" in
 +
                    00000000)
 +
                        #/etc/laptop-mode/laptop-mode start
 +
                    ;;
 +
                    00000001)
 +
                        #/etc/laptop-mode/laptop-mode stop
 +
                    ;;
 +
                esac
 +
                ;;
 +
            *)  logger "ACPI action undefined: $2" ;;
 +
        esac
 +
        ;;
 +
    battery)
 +
        case "$2" in
 +
            BAT0)
 +
                case "$4" in
 +
                    00000000)  #echo "offline" >/dev/tty5
 +
                    #Enter whatever power scripts you have here.
 +
                    ;;
 +
                    00000001)  #echo "online"  >/dev/tty5
 +
                    #Enter whatever power scripts you may have here.
 +
                    ;;
 +
                esac
 +
                ;;
 +
            CPU0)
 +
                ;;
 +
            *)  logger "ACPI action undefined: $2" ;;
 +
        esac
 +
        ;;
 +
    button/lid)
 +
        #echo "LID switched!">/dev/tty5
 +
        /usr/sbin/pm-suspend
 +
        ;;
 +
    *)
 +
        logger "ACPI group/action undefined: $1 / $2"
 +
        ;;
 +
esac
  
That should do it. Note, this is a generic way to set it up. My wireless router is broadcasting its SSID and has no encryption on it. I want to get WPA working though. That will be a task for later.
+
== Multimedia Keys ==
 +
Now it is necessary to install xmodmap and xbindkeys via pacman for the multimedia keys.
 +
Now create a file at ~/.Xmodmap
  
=== Modem ===
+
keycode 234 = XF86Back
Have not tried.
+
keycode 233 = XF86Forward
 +
keycode 144 = XF86AudioPrev
 +
keycode 164 = XF86AudioStop
 +
keycode 162 = XF86AudioPlay
 +
keycode 153 = XF86AudioNext
 +
keycode 160 = XF86AudioMute
 +
keycode 174 = XF86AudioLowerVolume
 +
keycode 176 = XF86AudioRaiseVolume
 +
 
 +
And at ~/.xbindkeysrc
 +
 
 +
    "mpc toggle"
 +
    XF86AudioPlay
 +
 +
    "mpc stop"
 +
    XF86AudioStop
 +
 +
    "mpc prev"
 +
    XF86AudioPrev
 +
 +
    "mpc next"
 +
    XF86AudioNext
 +
 +
    "amixer sset PCM 2-"
 +
    XF86AudioLowerVolume
 +
 +
    "amixer sset PCM 2+"
 +
    XF86AudioRaiseVolume
 +
 +
    "amixer sset PCM toggle"
 +
    XF86AudioMute
 +
 
 +
== HDAPS ==
 +
To get the hard drive APS working, it is neccessary to have a kernel patched with the tp_smapi patches.  Both the packages:
 +
 
 +
*kernel26tp
 +
*kernel26zen-git
 +
 
 +
Provide this patch by default.  If you installed them earlier, you should be ready in this regard.
  
== ACPI ==
+
Now all that is required is the hdapsd daemonThis can be had from the AUR package hdapsd.
When I login to gnome, I keep getting a acpi did not load error. I installed:
+
pacman -Sy acpid gnome-power-manager
+
And I added the daemons in the /etc/rc.conf file
+
  DAEMONS=(... acpid)
+
And rebooted.  Now I have the battery monitor to the gnome panel and life is good.  Well kinda.  I still cannot get brightness and sleep to work.  I am still looking to see what will get this working.
+
  
 
== Card Readers ==
 
== Card Readers ==
 
=== PCMCIA ===
 
=== PCMCIA ===
As far as I've understood from other reports, the pcmcia card works as expected. I don't have one at this time, so I can't confirm it.
+
Works as expected. Uses the module:
 +
 
 +
*yenta
 +
 
 
=== Compact Flash ===
 
=== Compact Flash ===
 
The same goes for the Compact Flash. It's supposed to work as it uses the same interfaces as the PCMCIA does, but I can't confirm anything since I don't have a CF-card.
 
The same goes for the Compact Flash. It's supposed to work as it uses the same interfaces as the PCMCIA does, but I can't confirm anything since I don't have a CF-card.
Line 309: Line 486:
  
 
===HDD clicks===
 
===HDD clicks===
  # pacman -Ss hdparm
+
  # pacman -S hdparm
 
Put following line to /etc/rc.local (replace /dev/sda with other device if needed):
 
Put following line to /etc/rc.local (replace /dev/sda with other device if needed):
 
  hdparm -B 244 /dev/sda
 
  hdparm -B 244 /dev/sda
 
Details: http://www.thinkwiki.org/wiki/Problem_with_hard_drive_clicking
 
Details: http://www.thinkwiki.org/wiki/Problem_with_hard_drive_clicking
 
===Sudo===
 
I like to use sudo to manage my system.  So as root, I do a:
 
# pacman -Sy sudo
 
Then I do a give myself rights:
 
# visudo -f /etc/sudoers
 
Add myself under root.
 
===DISABLE IPV6===
 
I disabled the IPV6 module because I do not need it.  Here is the [http://wiki.archlinux.org/index.php/IPv6_-_Disabling_the_Module howto] to get this.
 
===SSHfs===
 
To connect to other shares and doing updates I use SSHfs.  Here is a [http://wiki.archlinux.org/index.php/Sshfs howto] for that.
 
===NTP===
 
To get you clock synced up check out [http://wiki.archlinux.org/index.php/NTP Network Time Protocol].
 
===Packages===
 
affinity
 
firefox
 
thunderbird
 
flashplugin
 
flashplayer-standalone
 
jre # Java
 
mplayer
 
vlc
 
Glipper
 
tomboy
 
openoffice-spell-en
 
pidgin
 
ttf-ms-fonts
 
ntp
 
tracker
 
affinity
 
f-spot
 
xorg-fonts-cyrillic
 
ttf-bitstream-vera
 
 
===Files Edited===
 
 
rc.local
 
rc.conf
 
pacman.conf
 
modprobe.conf
 
inittab
 
xorg.conf
 
sudoers
 
  
 
= External Links =
 
= External Links =
  
 
* This report is listed at the [http://tuxmobil.org/fujitsu.html TuxMobil: Linux Laptop and Notebook Installation Guides Survey: Fujitsu-Siemens - FSC].
 
* This report is listed at the [http://tuxmobil.org/fujitsu.html TuxMobil: Linux Laptop and Notebook Installation Guides Survey: Fujitsu-Siemens - FSC].

Revision as of 01:37, 1 February 2009


System Specifications

Lenovo Thinkpad T61 - Intel Centrino Pro

  • Intel(R) Core(TM)2 Duo CPU T7300 (2.00GHz, 4MB, 800MHz)
  • Mobile Intel 965GM Express Chipset
  • 2GB PC2-5300/677MHz
  • 80-GB 5400 rpm SATA Harddrive
  • 14.1-inch color TFT WXGA+ (1440 x 900, 200 nit)
  • Intel® Graphics Media Accelerator GM965 (128MB)
  • 82801H ICH8 Family HD Audio Controller
  • DVD-ROM, CD-RW/DVD Combo, Multi-Burner Plus
  • Modem; Gigabit Ethernet
  • Intel® Wireless Wi-Fi Link 4965AG
  • 1 Type II PC Card slot
  • 1 ExpressCard 34/54
  • Dual pointing devices (both Pointstick and Touchpad)

Output of lshwd

00:00.0 Class 0600: Intel Corporation|Mobile Memory Controller Hub (unknown)
00:02.0 Class 0300: Intel Corporation|Mobile Integrated Graphics Controller (vesa)
00:02.1 Class 0380: Intel Corporation|Mobile Integrated Graphics Controller (vesa)
00:19.0 Class 0200: Intel Corporation|Mobile Integrated Graphics Controller (unknown)
00:1a.0 Class 0c03: Intel Corporation|USB UHCI Controller #4 (unknown)
00:1a.1 Class 0c03: Intel Corporation|USB UHCI Controller #5 (unknown)
00:1a.7 Class 0c03: Intel Corporation|USB2 EHCI Controller #2 (unknown)
00:1b.0 Class 0403: Intel Corp.|ICH8 HD Audio DID (snd-hda-intel)
00:1c.0 Class 0604: Intel Corporation|PCI Express Port 1 (unknown)
00:1c.1 Class 0604: Intel Corporation|PCI Express Port 2 (unknown)
00:1c.2 Class 0604: Intel Corporation|PCI Express Port 3 (unknown)
00:1c.3 Class 0604: Intel Corporation|PCI Express Port 4 (unknown)
00:1c.4 Class 0604: Intel Corporation|PCI Express Port 5 (unknown)
00:1d.0 Class 0c03: Intel Corporation|USB UHCI Controller #1 (unknown)
00:1d.1 Class 0c03: Intel Corporation|USB UHCI Controller #2 (unknown)
00:1d.2 Class 0c03: Intel Corporation|USB UHCI Controller #3 (unknown)
00:1d.7 Class 0c03: Intel Corporation|USB2 EHCI Controller #1 (unknown)
00:1e.0 Class 0604: Intel Corp.|82801 Hub Interface to PCI Bridge (hw_random)
00:1f.0 Class 0601: Intel Corporation|Mobile LPC Interface Controller (unknown)
00:1f.2 Class 0101: Intel Corporation|Mobile SATA Controller cc=IDE (ata_piix)
00:1f.3 Class 0c05: Intel Corporation|SMBus Controller (i2c-i801)
03:00.0 Class 0280: Intel Corporation|SMBus Controller (unknown)
15:00.0 Class 0607: Ricoh Co Ltd.|RL5c476 II (yenta_socket)
15:00.1 Class 0c00: Ricoh Co Ltd.|RL5c476 II (unknown)
15:00.2 Class 0805: Ricoh Co Ltd.|SD Card reader (unknown)
15:00.3 Class ffff: Ricoh Co Ltd.|SD Card reader (unknown)
15:00.4 Class 0880: Ricoh Co Ltd.|R5C592 Memory Stick Bus Host Adapter (unknown)
15:00.5 Class 0880: Ricoh Co Ltd.|xD-Picture Card Controller (unknown)

What works/What doesn't

Pretty much everything works on this laptop. The modem is untested.

Pre installation notes

Remember to back up the restore partition if you plan to restore it, or leave it.

Follow the official Archlinux install guide

Accessing the recovery partition with GRUB

Edit your /boot/grub/menu.lst file and add the following:

# booting "Rescue and Recovery" partition from Lenovo
title Thinkpad Maintenance
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1

Configuration

Video Driver

The Intel® Graphics Media Accelerator GM965 uses the xf86-video-intel driver.

#pacman -S xf86-video-intel

The relevent kernel drivers include:

  • DRM_I915

For framebuffer graphics the kernel drivers:

  • intelfb
  • fb_uvesa
  • fb_vesa

Should work. Intelfb is known to have a few problems with hardware acceleration and requires grub2 patched with 915resolution to properly set the correct resolution.

The package grub2-915resolution in the AUR would work if the patch for 915resolution is updated with the most recent 915resolution changes for the GM965 are included.

Mouse

There is a synaptic touchpad on this laptop. If you follow this howto, you should have no problems getting this to work.

The relevant kernel driver is:

  • mouse_ps2_synaptics

Xorg Config

Here is a sample /etc/X11/xorg.conf:

   Section "Module"
       Load        "dbe"   # Double buffer extension
       SubSection  "extmod"
         Option    "omit xfree86-dga"
       EndSubSection
       Load        "freetype"
       Load        "GLcore"
       Load        "glx"
       Load        "bitmap"
       Load        "dri"
#        Load        "int10"
#        Load        "ddc"
#        Load        "vbe"
#        Load        "xtrap"
   EndSection

   Section "Files"
       ModulePath "/usr/lib/xorg/modules"
       FontPath   "/usr/share/fonts/local/"
       FontPath   "/usr/share/fonts/misc/:unscaled"
       FontPath   "/usr/share/fonts/75dpi/:unscaled"
       FontPath   "/usr/share/fonts/100dpi/:unscaled"
       FontPath   "/usr/share/fonts/misc/"
       FontPath   "/usr/share/fonts/75dpi/"
       FontPath   "/usr/share/fonts/100dpi/"
       FontPath   "/usr/share/fonts/TTF/"
       FontPath   "/usr/share/fonts/Type1/"
       FontPath   "/usr/share/fonts/local/"
   EndSection

   Section "ServerFlags"
       Option      "blank time"    "3"
       Option      "standby time"  "5"
       Option      "suspend time"  "10"
       Option      "off time"      "15"
       Option      "RandR"
       Option      "AutoAddDevices" "False"
   EndSection

   Section "InputDevice"
       Identifier  "Keyboard0"
       Driver      "kbd"
       Option      "CoreKeyboard"
       Option      "XkbRules" "xorg"
       Option      "XkbModel" "thinkpad60"
       Option      "XkbLayout" "us"
   EndSection

   Section "InputDevice"
       Identifier  "UltraNav Trackpoint"
       Driver      "mouse"
       Option      "CorePointer"
       Option      "Device"              "/dev/input/mice"
       Option      "Protocol"            "ImPS/2"
       Option      "Emulate3Buttons"     "off"
       Option      "EmulateWheel"        "on"
       Option      "EmulateWheelTimeOut" "250"
       Option      "EmulateWheelButton"  "2"
       Option      "YAxisMapping"        "4 5"
       Option      "XAxisMapping"        "6 7"
       Option      "ZAxisMapping"        "4 5"
   EndSection

#    Section "InputDevice"
#           Identifier  "Synaptics"
#           Driver      "synaptics"
#           Option      "Device" "/dev/input/mice"
#           Option      "Protocol" "auto-dev"
#           Option      "Emulate3Buttons" "yes"
#           Option      "SHMConfig" "on"
#    EndSection

   Section "Monitor"
       Identifier  "Thinkpad Monitor"
       Option      "DPMS"
#        HorizSync   31.5-50.0
#        VertRefresh 59.9-60.1
    EndSection

   Section "Device"
       Identifier  "Intel GMA X3100"
       Driver      "intel"
       BusID       "PCI:0:2:0"
       Option      "AccelMethod"  "exa"
       Option      "MigrationHeuristic"     "greedy"
   EndSection

   Section "Screen"
       Identifier          "Thinkpad Screen"
       Device              "Intel GMA X3100"
       Monitor             "Thinkpad Monitor"
       DefaultDepth        24
       SubSection "Display"
            Depth 24
            Modes "1280x800" "1024x768"  "832x624" "800x600" "640x480" "720x400" "640x400" "640x350"
            Virtual     2048 2048
       EndSubSection
   EndSection

   Section "DRI"
       Mode        0666
   EndSection

   Section "Extensions"
       Option      "Composite"     "Enable"
       Option      "RENDER"        "Enable"
   EndSection

   Section "ServerLayout"
       Identifier  "Default Layout"
       Screen "Thinkpad Screen"
       InputDevice "UltraNav Trackpoint" "CorePointer"
#        InputDevice "Synaptics" "CorePointer"
       InputDevice "Keyboard0" "CoreKeyboard"
   EndSection

Please note that this has the touchpad and xorg input hotplugging disabled.


Audio

Sound works out of the box. The relevant module for sound is:

  • SND_HDA_INTEL

Refer to following guides to set it up:

OSS

ALSA

PulseAudio

Use whichever you wish.

Network

Wired

The wired connection works out of the box and uses the following module:

  • e1000e

Wireless

Uses either module, varies with different setups:

  • iwl3945
  • iwl4965

Requires firmware be installed to work.

Refer to Wireless Setup for iwl3945, iwl4965 and iwl5000 series

Modem

Untested.

USB

Works out of the box.

Following modules are used:

  • uhci_hcd
  • ehci_hcd
  • usbhid

Bluetooth

Works out of the box.

Following modules are used:

  • bluetooth
  • btusb
  • l2cap
  • rfcomm
  • hci_usb
  • ehci-hcd
  • uhci-hcd

Trackpoint

Works, if you want to scroll while holding the middle mouse button down you can add the following to an .fdi file:

/etc/hal/fdi/policy/11-trackpoint-mw.fdi:

<match key="info.product" contains="TrackPoint">
 <merge key="input.x11_options.EmulateWheel" type="string">true</merge>
 <merge key="input.x11_options.EmulateWheelButton" type="string">2</merge>
 <merge key="input.x11_options.ZAxisMapping" type="string">4 5</merge>
 <merge key="input.x11_options.Emulate3Buttons" type="string">true</merge>
</match

What it does is that it sets emulates wheel on button two, which is middle button and maps in what directions it will emulate the scroll wheel, it will at the same time emulate 3 mouse buttons.

You can read more about the new Xorg input hotplugging here

ThinkFinger

Works, read ThinkFinger for reference and examples.

ACPI

To get all the special keys working requires the module:

  • THINKPAD_ACPI

Which is currently not included in the stock kernel. In the AUR the packages:

  • kernel26tp
  • kernel26zen-git

Provide the needed module (in addition to many other useful patches.) Install either one, though it is reccomended that you try the kernel26zen-git package. Read Kernel Compilation with ABS, Custom Kernel Compilation with ABS, and Kernel Compilation From Source for more info.

It is necessary to edit the default /etc/acpi/handler.sh included with the acpid package to get these keys working.

#!/bin/sh
# Default acpi script that takes an entry for all actions, modified to include thinkpad special keys.

# NOTE: This is a 2.6-centric script.  If you use 2.4.x, you'll have to
#       modify it to not use /sys

minspeed=`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq`
maxspeed=`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq`
setspeed="/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed"

set $*

case "$1" in
   ibm/hotkey)
   case "$2" in
       HKEY)
           case "$4" in
               00001002) # Lock screen
               #Enter your xlock or xscreensaver command here
                   ;;
               00001003) # swithing display off
                   xset dpms force off
                   ;;
               00001004) # Suspend to RAM
                   /usr/sbin/pm-suspend
                   ;;
               00001005) # Switch Bluetooth
                   ;;
               00001007) # Toggle external display
                   if [ "$(xrandr -q | grep "VGA connected")" ]; then
                       if [ "$(xrandr -q | grep "VGA connected [0-9]")" ]; then
                           xrandr --output VGA --off
                       else
                           xrandr --output VGA --auto
                       fi
                   else
                       xrandr --output VGA --off
                   fi
                   ;;
               #00001008) # Toggle Trackpoint/Touchpad
               #    ;;
               #00001009) # Eject from dock
               #    ;;
               0000100c) # Hibernate
                   /usr/sbin/pm-hibernate
                   ;;
               00001011) #Brightness down
                   CUR="xbacklight -get"
                   CUR="echo $CUR | awk '{print $1-5}'"
                   xbacklight -set $CUR
                   ;;
               00001012) #Brightness up
                   CUR=`xbacklight -get`
                   CUR="echo $CUR | awk '{print $1+5}'"
                   xbacklight -set $CUR
                   ;;
               #00001014) # Toggle zoom
               #    ;;
               00001018) # ThinkVantage button
                   ;;
           esac
           ;;
   esac
   ;;
   button/power)
       #echo "PowerButton pressed!">/dev/tty5
       case "$2" in
           PWRF)   
              logger "PowerButton pressed: $2"
              /sbin/init 0
              ;;
           *)      logger "ACPI action undefined: $2" ;;
       esac
       ;;
   button/sleep)
       case "$2" in
           SLPB)   /usr/sbin/pm-suspend ;;
           *)      logger "ACPI action undefined: $2" ;;
       esac
       ;;
   ac_adapter)
       case "$2" in
           AC)
               case "$4" in
                   00000000)
                       #/etc/laptop-mode/laptop-mode start
                   ;;
                   00000001)
                       #/etc/laptop-mode/laptop-mode stop
                   ;;
               esac
               ;;
           *)  logger "ACPI action undefined: $2" ;;
       esac
       ;;
   battery)
       case "$2" in
           BAT0)
               case "$4" in
                   00000000)   #echo "offline" >/dev/tty5
                   #Enter whatever power scripts you have here.
                   ;;
                   00000001)   #echo "online"  >/dev/tty5
                   #Enter whatever power scripts you may have here.
                   ;;
               esac
               ;;
           CPU0)	
               ;;
           *)  logger "ACPI action undefined: $2" ;;
       esac
       ;;
   button/lid)
       #echo "LID switched!">/dev/tty5
       /usr/sbin/pm-suspend
       ;;
   *)
       logger "ACPI group/action undefined: $1 / $2"
       ;;
esac

Multimedia Keys

Now it is necessary to install xmodmap and xbindkeys via pacman for the multimedia keys. Now create a file at ~/.Xmodmap

keycode 234 = XF86Back
keycode 233 = XF86Forward
keycode 144 = XF86AudioPrev
keycode 164 = XF86AudioStop
keycode 162 = XF86AudioPlay
keycode 153 = XF86AudioNext
keycode 160 = XF86AudioMute
keycode 174 = XF86AudioLowerVolume
keycode 176 = XF86AudioRaiseVolume

And at ~/.xbindkeysrc

   "mpc toggle"
   XF86AudioPlay

   "mpc stop"
   XF86AudioStop

   "mpc prev"
   XF86AudioPrev

   "mpc next"
   XF86AudioNext

   "amixer sset PCM 2-"
   XF86AudioLowerVolume

   "amixer sset PCM 2+"
   XF86AudioRaiseVolume

   "amixer sset PCM toggle"
   XF86AudioMute

HDAPS

To get the hard drive APS working, it is neccessary to have a kernel patched with the tp_smapi patches. Both the packages:

  • kernel26tp
  • kernel26zen-git

Provide this patch by default. If you installed them earlier, you should be ready in this regard.

Now all that is required is the hdapsd daemon. This can be had from the AUR package hdapsd.

Card Readers

PCMCIA

Works as expected. Uses the module:

  • yenta

Compact Flash

The same goes for the Compact Flash. It's supposed to work as it uses the same interfaces as the PCMCIA does, but I can't confirm anything since I don't have a CF-card.

Secure Digital

The SD-card reader on the other hand is a pain! It uses proprietary drivers from ricoh under windows and there are no drivers under linux. I would really want this working but I think the only chance would be to reverse engineer the reader and I guess not enough coders have this device. Subsequently, there are no drivers now and there won't be in the foreseeable future...

Other Tweaks

HDD clicks

# pacman -S hdparm

Put following line to /etc/rc.local (replace /dev/sda with other device if needed):

hdparm -B 244 /dev/sda

Details: http://www.thinkwiki.org/wiki/Problem_with_hard_drive_clicking

External Links