Notes for ThinkPad x200 w/ linux
My notes for running linux on the ThinkPad x200. Mine is model NR35NGE, Windows Vista Business, 3x USB 2.0, ExpressCard/54 Slot, weight 1.54kg
hardware
- Intel Core 2 Duo P8600, 2.40GHz, 3MB L2, 1066MHz FSB
- Intel Graphics Media Accelerator 4500 MHD onboard graphics, 12” CCFL with 1280×800 (WXGA, 200 nit)
- Support for up to 4GB DDR3-RAM PC3-8500, 2GB buildin
- harddisk 160GB SATA 2.5” 7200RPM
- 5-1 (MMC/SD/SDHC and MS/MS Pro) Media card Reader with Modem
- Intel Gigabit Ethernet Controller
- MiniPCI Express slot 1 w/ Intel Wifi Link 5100 (AGN)
- Integrated camera (?), Integrated microphone, Fingerprint Reader Authentec Inc. AES2810 ( usb 08ff:2810 )
- Bluetooth
- IBM Embedded Security Subsystem 2.0
- IBM Active Protection System
- TrackPoint only
- 6-cell battery, 56 Wh (10.8 V, 5.2 Ah). up to 6.5 hr, 1.47kg (slightly elevates the back)
first steps
- first step: getting the debian network install-files for amd64 from http://ftp.de.debian.org/debian/dists/stable/main/installer-amd64/20090123/images/netboot/debian-installer/amd64/, setting up dhcp/tftp on other debianbox, PXE-booting the x200
- partitioning:
primary 256M partition for /boot
primary 256M partition for other linuxs /boot (still unused currently)
primary 10GB partition for OpenSolaris or FreeBSD, those still require partitions, right?
extended
2gb encrypted swap
12gb encrypted / for debian
- see snippets/debianinstall
X basic configuration
As of 21.03.2009 X from debian unstable uses the VESA driver by default, thats slow and screen-blanking doesnt work.
# make sure X is not running X -configure mv /root/xorg.conf.new /etc/X11/xorg.conf vi /etc/X11/xorg.conf # make sure Driver "intel" is set in graphic-card section
using the trackball/nipple to scroll websites, current way
- apt-get install xinput
- debian unstable currently detects the device just as 'PS/2 Generic Mouse'
- create /etc/X11/Xsession.d/46trackpoint with these contents:
xinput list | \
egrep 'TPPS/2 IBM TrackPoint|DualPoint Stick|Synaptics Inc. Composite TouchPad / TrackPoint|PS/2 Generic Mouse' | \
sed 's/.*id=\([0-9]\{1,\}\).*/\1/' | \
while read id ; do
xinput set-prop $id "Evdev Wheel Emulation" 1
xinput set-prop $id "Evdev Wheel Emulation Button" 2
xinput set-prop $id "Evdev Wheel Emulation Timeout" 200
xinput set-prop $id "Evdev Wheel Emulation Axes" 6 7 4 5 # horiz. and vert. scrolling
#xinput set-prop $id "Evdev Wheel Emulation Axes" 0 0 4 5 # just vert. scolling
done
using the trackball/nipple to scroll websites, old way 1
- With this one can press the middle-button on websites and scroll the site moving the trackball up/down.
- The 2 keys above the cursor-keys also get a new mapping here, after making this change here you can directly use them in your windowmanager for mappings.
- Create file /etc/udev/rules.d/99_trackpoint.rules with this content and restart uder/X ort reboot:
ACTION!="add|change", GOTO="xorg_trackpoint_end"
KERNEL!="event*", GOTO="xorg_trackpoint_end"
ENV{ID_PATH}!="platform-i8042-serio-1", GOTO="xorg_trackpoint_end"
ENV{x11_options.EmulateWheel}="1"
ENV{x11_options.EmulateWheelButton}="2"
ENV{x11_options.XAxisMapping}="6 7"
ENV{x11_options.Emulate3Buttons}="0"
LABEL="xorg_trackpoint_end"
using the trackball/nipple to scroll in websites, old way 2
- Create file /etc/hal/fdi/policy/mouse-wheel.fdi with this content and reboot:
<match key="info.product" string="TPPS/2 IBM 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.YAxisMapping" type="string">4 5</merge> <merge key="input.x11_options.XAxisMapping" type="string">6 7</merge> <merge key="input.x11_options.Emulate3Buttons" type="string">true</merge> <merge key="input.x11_options.EmulateWheelTimeout" type="string">200</merge> </match>
using the 2 keys next to cursor-keys
Use this if you dont want trackball-scrolling in websites as mentioned in the section above.
Note: This is no longer needed for xorg-installasions as of 2009. Those mostly offer the keys automatically, so you have just to configure your windowmanager appropriately.
xev # select the window that gets created and hit the keys after each other to get their keycodes. here 234 and 233
xmodmap -pk # shows current mappings
xmodmap -e 'keycode 233 = THORN'
xmodmap -e 'keycode 234 = Oslash'
# those commands now maps keysyms to our keys, use keysyms you do not usually
WPrefs # this is the utilits windowmaker uses to assign actions. Go to 'change keyboard shortcuts', select your action
# (for me its switch to next/previous workspace), then 'capture' and hit the key. save, and the keys have their
# new assignment.
# execute the 2 assignment-xmodmap-calls in ~/.xinitrc or ~/.xsession, or read on .xmodmaprc in 'man xmodmap'
automatic detection/modesetting for external monitor
I use a external 24” monitor attached to the ultrabase dockingstation. X detects the DisplayPort-output as HDMI-2, from there i use a cable to the DVI-interface of the monitor. This script is run upon userlogin from xdm.
cat >/etc/X11/Xsession.d/45custom_xrandr-settings <<EOT
# lets detect if the external monitor is currently connected
(xrandr |grep '^HDMI-2 connected' >/dev/null) && ( \
# disable the internal tft-screen, set mode 1920x1080 on external screen
xrandr --output LVDS --off
xrandr --output HDMI-2 --auto
xrandr --output HDMI-2 --mode 1920x1080
)
EOT
using VGA output
With 2.6.31/2.6.32 this works using just 'xrandr –output VGA1 –mode 1024×768'. With 2.6.30 i just get 'xrandr: cannot find crtc for output VGA1' from the command thou. xrandr without option here detects all outputs as connected. The VGA-output can then only be used after manually deactivating the other outputs:
xrandr --output DVI1 --off xrandr --output DVI2 --off
3G UMTS card
- Option GlobeTrotter HSUPA Modem (aka “T-Mobile Web'n'walk Card Compact III'), usb id 0af0:7011
- we have to disable the modem shows up a storage-device and not the modem-interfaces, debian-package usb_modeswitch doesnt work for me:
# get udev.tar.gz from http://www.pharscape.org/ozerocdoff.html apt-get install libusb-dev ppp cd hso_udev CC=/usr/bin/gcc-4.4 make make install
- insert umts-card, driver hso (in kernel since 2.6.29) should be loaded. The udev-rule from hso_udev should switch from usb-storage mode to modemmode, devices /dev/ttyH[1234] should appear
- get hso_26-v1.9 from http://www.pharscape.org, edit conninfo.ini, use './hso_connect.sh up' to get connected
- alternatively use wvdial:
apt-get install wvdial cat >/etc/wvdial.conf <<EOT [Dialer Defaults] Modem = /dev/ttyHS3 Phone = *99***1# Username = t-mobile Password = t-mobile Dial Command = ATDT New PPPD Init2 = AT+CPIN=1234 Init3 = AT+COPS=0 Init4 = AT+CGDCONT=1,"ip","internet.t-mobile.de" Init5 = AT$QCPDPP=1,1,"t-mobile","t-mobile" Init6 = AT_OWANCALL=1,1,0 Modem Type = Analog Modem EOT # replace 1234 with your pin, change providersettings. then start 'wvdial' to dial in
wlan
using wlan: basics
- selfcompiling and installing kernel 2.6.28.8 provides the iwlagn wlan driver (config not very stipped down, available here http://fluxcoil.net/files/linux_kernelconf_2.6.28.8_x200 )
- install firmware: 'wget http://intellinuxwireless.org/iwlwifi/downloads/iwlwifi-5000-ucode-5.4.A.11.tar.gz', extract the archive and place the file iwlwifi-5000-1.ucode ins /lib/firmware
- apt-get install kismet wpasupplicant
- the kismet wlan-scanner doesnt yet know a source-type iwlagn so use 'source=iwl4965,wlan0,iwlagnsource' and 'enablesources=iwlagnsource' in /etc/kismet/kismet.conf
- the cfg80211 module should be configured for your region providing proper channels. I do echo 'options cfg80211 ieee80211_regdom="EU"' >/etc/modprobe.d/wlan.conf' here. 'cat /sys/module/cfg80211/parameters/ieee80211_regdom' shows your setting. 'iw reg set EU' also tries to set this.
- packet-injection with aircrack-ng doesnt work here
using wlan: ad-hoc mode
ifconfig wlan0 down ifconfig wlan0 1.0.0.1 netmask 0xffffff00 iwconfig wlan0 mode ad-hoc iwconfig wlan0 key 1234567890 iwconfig wlan0 channel 1 iwconfig wlan0 essid tester ifconfig wlan0 up
devicesection in kismet.conf
source=iwl4965,wlan0,iwlagnsource enablesources=iwlagnsource
kernelbootline
- append 'vga=0x0368' - for framebuffer mode
fan-control
By default the fan here tunes up when cpus get hot, but do not tune back later. One can control this manually (risking heat-damages) or employ scripts to tune the fan up/down. Bios 3.11 has the problem fixed, maybe.
# activate manual fan-control echo 'options thinkpad_acpi hotkey=enable,0xffffbf experimental=1 fan_control=1' \ >>/etc/modprobe.d/thinkpad_acpi.modprobe.conf # then after reloading the module with those options, lets tune the fan up for example: echo 'level 5' >/proc/acpi/ibm/fan
- I wrote regulator.pl to observe the temp-sensors and control the fan accordingly on my x200. The sensors have to be modified for other thinkpad-models, the limits to ramp up the fan are more or less randomly chosen and there is no mode without fan, its always on at least lowest level. There is a observer-mode for just observing fan/temperatures and a daemon-mode to run the script in background. On thinkwiki.org there are more of these scripts, tried one from there but wrote this myself so i have a clue what it does. Its available here: http://fluxcoil.net/files/scripts/ .
bios-update w/o windows
Lenovo is providing an option for bios-update with windows-binaries, since i am not running windows this wont work here. They also provide a cdrom-iso which i cannot boot with a usb-cdrom since i dont own one.
- http://www.thinkwiki.org/wiki/BIOS_Upgrade – read this
- http://www-307.ibm.com/pc/support/site.wss/BMOE-3VAM8Y.html#x – find out the latest bios-version
- http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-70348 – here is version 3.13 released 2010/03/23
- The memdisk-program from sysutils-common package can boot cdrom iso images, but the one doing the bios-update needs to be converted bevore memdisk can boot it. isobar is is used for the converting.
- http://www.thinkwiki.org/wiki/BIOS_update_without_optical_disk contains informations on the whole procedure, that did work for me for for 2 bios updates.
Notes for ThinkPad x200 w/ FreeBSD
- for installation of FreeBSD 8.0-RELEASE is used a usbstick, just 8.0-RELEASE-i386-memstick.img dd'ed onto a usb-stick
- for wlan:
- you have to upgrade to 8.0-STABLE or CURRENT then to get it working
- manually load the module with 'kldload if_iwn'
- or add line %%if_iwn_load=“YES” to boot/loader.conf and reboot