Debian Installation on ThinkPad X60 Tablet

This documentation describes Debian GNU/Linux 5.0 aka Lenny installation on Thinkpad X60 Tablet.

I bought this used tablet on January 31, 2009 from someone who generous enough to give all bonuses along with it.

If you have some comments or suggestions, please contact stwn.

TuxMobil - Linux on Laptops, Notebooks, PDAs and Mobile Phones

TODO:

Hardware

Hardware Status Notes
Processor: Intel Core Duo 1.83 GHz OK dual core processor detected, type cat /proc/cpuinfo to see the info
RAM: DDR2 PC-5300 2048 GB OK -
HDD: SATA 80 GB 5400 RPM OK -
Video Card: Intel GMA 950 OK driver: i810, xorg 7.3 runs without xorg.conf configuration
LCD: Lenovo 12“ Multitouch OK needs to activate wacom multitouch, see Tweak and Configuration
Sound Card: Intel 82801G HD OK -
Bluetooth: Broadcom BCM2045B OK my bluetooth indicator start to lit and blink :)
Infrared Untested -
SDCard Slot OK -
Ethernet: Intel 82573L Gigabit OK driver: e1000e, watchout if you want to use Linux kernel 2.6.27. lenny provides 2.6.26 as its default kernel
Wireless Card: Intel PRO/Wireless 3945ABG OK needs iwl3945 ucode, see Tweak and Configuration
Fingerprint: SGS Thomson Microelectronics OK see Tweak and Configuration
Cardbus PCMCIA Type II with ExpressCard/34 Untested linux-2.6.26 detects it
Firewire Untested linux-2.6.26 detects it as “Ricoh R5C552”
Modem Untested -

Features

Feature Status Notes
Display OK max 1024×768; need some configuration for desktop effect
VGA out OK use xrandr or its front-end like grandr, KRandRTray
Suspend OK to-ram and to-disk works
Hotkeys OK Fn-FX
Tablet Buttons - works for some buttons
Auto Rotate OK see Tweak and Configuration
Multitouch OK see Tweak and Configuration
Fingerprint OK see Tweak and Configuration
CPU scalling OK install cpufreq* if you want cpu scalling support in userspace
APS - the good news: it works for detecting motion and it can be a joystick or “lightsaber”. the (relatively) bad news: hdaps_protect1) isn't merged yet in Linux kernel 2.6.26. you may try to recompile 2.6.26 with the patch or use 2.6.28 instead

Programs

I installed some programs that is not included in default installation of Debian 5.0, at least in disk #1. This the list of my “additional” programs:

Desktop Environment

I use KDE3, so I remove GNOME.

Development

  • ganttproject

Graphics

  • Aqsis
  • Dia
  • Blender
  • Gwenview
  • Inkscape
  • The Gimp
  • Xfig

Internet

  • KDEBluetooth
  • KMail
  • Pidgin

Multimedia

  • Amarok
  • K3b
  • Kaffeine
  • MPlayer

Networking

  • Apache2+PHP5
  • OpenSSH server
  • PPP and pppconfig

Office

  • amora-server +bluetooth config
  • freemind
  • impressive
  • Kivio
  • OpenOffice.org 3.0

System

  • Compiz Fusion along with fusion-icon ;-)
  • CUPS & foomatic-db
  • GDM
  • Kpowersave
  • Synaptic
  • Yakuake
  • acpi, acpi-support
  • fortune-min and kernelnewbies-fortune-data
    $ tar zxvf kernelnewbies-fortunes.tar.gz
    $ cd kernelnewbies-fortunes/
    $ sudo mv kernelnewbies* /usr/share/games/fortunes/
  • kde-guidance
  • laptop-mode-tools
  • networkmanager and networkmanager-kde
  • readahead
  • smartmontools
  • sudo
    # visudo

    Add line

    stwn    ALL=(ALL) ALL

    or whatever priviledges you want to add to the user.

  • xscreensaver. Don't forget to switch off KDE screensaver if you want to use it.

Utilities

  • Basket
  • Cellwriter
  • Grandr
  • Kate
  • KNotes
  • Speedcrunch
  • Synergy
  • wacom-tools
  • Xournal

Tweak and Configuration

Bluetooth

FIXME

Fingerprint

Installation

  • Add experimental debian repository or get libthinkfinger0, libpam-thinkfinger, thinkfinger-tools packages individually ;-)
  • Install libthinkfinger0 libpam-thinkfinger thinkfinger-tools
    # dpkg -i libpam-thinkfinger_0.3+rev118.2-4_i386.deb
    # dpkg -i libthinkfinger0_0.3+rev118.2-4_i386.deb
    # dpkg -i thinkfinger-tools_0.3+rev118.2-4_i386.deb

Testing

  • Record your fingerprint
    $ sudo tf-tool --acquire
    ThinkFinger 0.3 (http://thinkfinger.sourceforge.net/)
    Copyright (C) 2006, 2007 Timo Hoenig <thoenig@suse.de>
    
    Initializing... done.
    Please swipe your finger (successful swipes 3/3, failed swipes: 0)... done.
    Storing data (/home/user/.thinkfinger.bir)... done.

    If you got an error message

    Initializing...Could not claim USB device.

    Run tf-tool with sudo.

Configuration

  • We must configure pam to use libthinkfinger if it available
    auth	sufficient	pam_thinkfinger.so
    auth	required	pam_unix.so nullok_secure try_first_pass
  • Add uinput module to /etc/modules, so it will be loaded when debian boot
    # vim /etc/modules
  • Generate initramfs
    # update-initramfs -u

HDAPS

Installation

  • Install tp-smapi-modules for your linux kernel version, hdapsd and hdaps-utils packages
    # apt-get install tp-smapi-modules hdapsd hdaps-utils

Configuration

  • Load tp_smapi and hdaps module
    # modprobe tp-smapi
    # modprobe hdaps
  • Edit /etc/modules and generate initramfs if you want to load those modules on boot
    # vim /etc/modules

    Add this lines and save

    hdaps
    tp-smapi
  • Run update-initramfs
    # update-initramfs -u

Testing

  • Run hdaps-gl and you will find it displays the position of your thinkpad.
    $ hdaps-gl

    Just tilt right, left, up, and down. You got the idea.

Notes

Those steps above are not make your Debian has an APS feature that will protect your harddisk
when it falling by parks its head. It just detect acceleration values through HDAPS interface.
If you want the feature, patch your kernel and recompile or use Linux kernel 2.6.28, AFAIK 
this version includes the hdaps_protect patch.

2.6.31

  • get 2.6.31, hdapsd, and tp-smapi-source from unstable
  • m-a a-i tp-smapi-source
  • test with moving your notebook, you should hear your headdisk is parking

Internet

FIXME

Bluetooth

Mini USB

Tablet

Stylus and Eraser

  • Add this lines into /etc/X11/xorg.conf
    Section "InputDevice"
            Identifier  "Stylus"
            Driver      "wacom"
            Option      "Device" "/dev/ttyS0"
            Option      "Type" "stylus"
            Option      "ForceDevice" "ISDV4"
            Option      "Button2" "3"
    EndSection
    
    Section "InputDevice"
            Identifier  "Eraser"
            Driver      "wacom"
            Option      "Device" "/dev/ttyS0"
            Option      "Type" "eraser"
            Option      "ForceDevice" "ISDV4"
            Option      "Button3" "2"
    EndSection
    
    Section "InputDevice"
    	Identifier    "Touch"
    	Driver        "wacom"
    	Option        "Device"        "/dev/ttyS0"
    	Option        "Type"          "touch"
    	Option        "ForceDevice"   "ISDV4"
    	Option        "TopY" "48"
    	Option        "TopX" "22"
    	Option        "BottomY" "980"
    	Option        "BottomX" "950"
    EndSection
    
    Section "InputDevice"
    	Identifier    "Cursor"
    	Driver        "wacom"
    	Option        "Device"        "/dev/ttyS0"
    	Option        "Type"          "cursor"
    	Option        "ForceDevice"   "ISDV4"      
    EndSection
  • Add this lines to Section “Serverlayout” in /etc/X11/xorg.conf
            InputDevice    "Cursor" "SendCoreEvents"
            InputDevice    "Stylus" "SendCoreEvents"
            InputDevice    "Eraser" "SendCoreEvents"
            InputDevice    "Touch" "SendCoreEvents"

Multitouch

  • First, make sure you bought X60t which has Multitouch support.
  • Comment Stylus and Eraser configuration from /etc/X11/xorg.conf. Just use '#' character in front of the lines to comment them, or stop X server
    /etc/init.d/gdm stop

    or

    /etc/init.d/kdm stop
  • Remove Wacom input driver and wacom-tools
    sudo apt-get remove --purge wacom-tools xserver-xorg-input-wacom

    You also want to remove xserver-xorg-input-all meta-package, since it depends on xserver-xorg-input-wacom.

  • Install build-essential, xorg-dev, libncurses5-dev, libx11-dev, tcl8.4-dev, tk8.4-dev
    apt-get install build-essential, xorg-dev, libncurses5-dev, libx11-dev, tcl8.4-dev, tk8.4-dev
  • Download linuxwacom from The Linux Wacom Project site. As this article is being written, linuxwacom version is 0.8.2-2.
  • Extract linuxwacom-0.8.2-2.tar.bz2
    tar jxvf linuxwacom-0.8.2-2.tar.bz2
  • Change directory to linuxwacom-0.8.2-2/
    cd linuxwacom-0.8.2-2
  • Run three usual commands ;-)
    ./configure
    make
    make install
  • Uncomment Stylus and Eraser configuration in /etc/X11/xorg.conf and/or start gdm or kdm
  • Use wacomcpl to calibrate your touch. If you got an error message something like wacomcpl lost its libraries, do ldconfig first
    ldconfig
    wacomcpl

    Choose touch Device and Calibration. Calibrate your touch by touching crosshair inside pink rectangle until it changes its color to black and do the same for the other pink rectangle.

  • Program wacomcpl generates configuration in .xinitrc in home directory, just open it with an editor like vim
    vim ~/.xinitrc
  • Add Options in Section “InputDevice” for “Option” “Type” “touch” in /etc/X11/xorg.conf
    Option      "TopY" "48"
    Option      "TopX" "22"
    Option      "BottomY" "980"
    Option      "BottomX" "950"

    The values are from ~/.xinitrc.

  • Congrats! you have a multitouch feature in your X60t calibrated and works!

Auto Rotate

  • You need acpid and acpi-support packages installed
  • Change directory to /etc/acpi/events/
    # cd /etc/acpi/events/
  • Create two files which represent two states of mode, ex: thinkpad-up that contains
    event=ibm/hotkey HKEY 00000080 0000500a
    action=/etc/acpi/thinkpad-up

    and thinkpad-down contains

    event=ibm/hotkey HKEY 00000080 00005009
    action=/etc/acpi/thinkpad-down

    I got the swivel event keys by looking at x60t-swivel-up and x60t-swivel-down. Use acpi_listen to see event key managed by ACPI.

  • Change directory to /etc/acpi/
    # cd ..
  • Copy rotatescreen.sh to thinkpad-up and thinkpad-down, whatever you want to name them ;)
    # cp rotatescreen.sh thinkpad-up
    # cp rotatescreen.sh thinkpad-up
  • Edit thinkpad-up script
    # vim thinkpad-up

    Add $NEW_ORIENTATION, $ORIENT variables, set Stylus, Touch, and arrow tablet keys to suit to laptop mode. This is the modified version of thinkpad-up:

    . /usr/share/acpi-support/power-funcs
    
    NEW_ROTATION="normal"
    ORIENT="0"
    
    for x in /tmp/.X11-unix/*; do
            displaynum=`echo $x | sed s#/tmp/.X11-unix/X##`
            getXconsole;
            if [ x"$XAUTHORITY" != x"" ]; then
                export DISPLAY=":$displaynum"
                /usr/bin/xrandr -o $NEW_ROTATION && echo $NEW_ROTATION > /var/lib/acpi-support/screen-rotation
                /usr/local/bin/xsetwacom set Stylus Rotate $ORIENT
                /usr/local/bin/xsetwacom set touch Rotate $ORIENT
                xmodmap -e 'keycode 98 = Up';xmodmap -e 'keycode 100 = Left';xmodmap -e 'keycode 102 = Right';xmodmap -e 'keycode 104 = Down'
            fi
    done
  • Edit thinkpad-down script
    # vim thinkpad-down

    Add $NEW_ORIENTATION, $ORIENT variables, set Stylus, Touch, and arrow tablet keys to suit to slate mode. This is the modified version of thinkpad-down:

    . /usr/share/acpi-support/power-funcs
    
    NEW_ROTATION="right"
    ORIENT="1"
    
    for x in /tmp/.X11-unix/*; do
            displaynum=`echo $x | sed s#/tmp/.X11-unix/X##`
            getXconsole;
            if [ x"$XAUTHORITY" != x"" ]; then
                export DISPLAY=":$displaynum"
                /usr/bin/xrandr -o $NEW_ROTATION && echo $NEW_ROTATION > /var/lib/acpi-support/screen-rotation
                /usr/local/bin/xsetwacom set Stylus Rotate $ORIENT
                /usr/local/bin/xsetwacom set touch Rotate $ORIENT
                xmodmap -e 'keycode 98 = Left';xmodmap -e 'keycode 100 = Down';xmodmap -e 'keycode 102 = Up';xmodmap -e 'keycode 104 = Right'
            fi
    done
  • Try to swivel-up and -down the LCD, make sure the screen orientation, Stylus, touch, and arrow keys are set suit to the mode.

Wireless Card

  • Download ucode from intellinuxwireless.org
  • Extract iwlwifi-3945-ucode-15.28.2.8.tgz
    tar zxvf iwlwifi-3945-ucode-15.28.2.8.tgz
  • Change directory to iwlwifi-3945-ucode-15.28.2.8/
    cd iwlwifi-3945-ucode-15.28.2.8/
  • Copy or move the content of the directory to /lib/firmware/
    sudo mv * /lib/firmware/
  • Change directory to /lib/firmware/
    cd /lib/firmware/
  • Make symlink from new ucode to iwlwifi-3945-1.ucode
    sudo ln -s iwlwifi-3945-2.ucode iwlwifi-3945-1.ucode

    Why we need to do this step? because iwl3945 module in the linux-2.6.26 will try to search “iwlwifi-3945-1.ucode” in /lib/firmware/.

  • Reboot your X60t or try to unload and reload iwl3945 module
    sudo rmmod iwl3945
    sudo modprobe iwl3945
  • Your wireless card should be working and the indicator start to lit/blink.

Notes

  • If you couldn't run compiz fusion or it has run with your applications all window-less, maybe you forgot to install libgl1-mesa-dri package. Since X60t uses Intel graphic card, we use AIGLX that depends on DRI to do direct-rendering acceleration (CMIIW). No DRI support, No AIGLX. No AIGLX, No Compiz Fusion. The error message of Xorg from /var/log/Xorg.0.log
    (EE) AIGLX error: dlopen of /usr/lib/dri/i915_dri.so failed (/usr/lib/dri/i915_dri.so: cannot open shared object file: No such file or directory)
    (EE) AIGLX: reverting to software rendering

    Another error message is come from compiz fusion itself. This message appeared when I run fusion icon and activated Compiz window manager:

    fusion-icon
     * Detected Session: kde
     * Searching for installed applications...
    Backend     : ini
    Integration : true
    Profile     : default
    Adding plugin decoration (decoration)
    Initializing decoration options...done
     * Using the GTK Interface
     * KWin is already running
     * Setting window manager to Compiz
     ... executing: compiz.real --replace --sm-disable --ignore-desktop-hints ccp --indirect-rendering
    compiz.real (core) - Fatal: No GLXFBConfig for default depth, this isn't going to work.
    compiz.real (core) - Error: Failed to manage screen: 0
    compiz.real (core) - Fatal: No manageable screens found on display :0

    If we run glxgears to test GLX, we just got ~240.000 frames per second

    $ glxgears
    1244 frames in 5.0 seconds = 247.030 FPS
    940 frames in 5.1 seconds = 185.979 FPS
    1200 frames in 5.0 seconds = 238.331 FPS

    It should be around 1240.000 in my machine

    $ glxgears
    6234 frames in 5.0 seconds = 1246.726 FPS
    6213 frames in 5.0 seconds = 1242.486 FPS
    6270 frames in 5.0 seconds = 1253.926 FPS
    6230 frames in 5.0 seconds = 1245.942 FPS
  • You have installed networkmanager, and networkmanager-kde told you that it couldn't find network devices on your pc. The solution is add your username to netdev group by editing /etc/group
    sudo vim /etc/group
  • When you found an error message out from CUPS via “web control panel”
    "Filter "foomatic-rip" for printer "BJC-265" not available: No such file or directory"

    Install foomatic-db

  • Tablet-related commands:
    xsetwacom list dev

Reading List

1)
this is something that control and protect your harddisk from shock
 
doc/x60t.txt · Last modified: 2012/08/26 19:22 (external edit) · [Old revisions]
Recent changes RSS feed Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki