Difference between revisions of "Lenovo ThinkPad X200"

From ArchWiki
Jump to: navigation, search
(Troubleshooting)
m (Coreboot / Libreboot: remove link to commercial website "for more information on the project", because there is already a link to libreboot.org, which has plenty of info)
 
(73 intermediate revisions by 15 users not shown)
Line 1: Line 1:
 
[[Category:Lenovo]]
 
[[Category:Lenovo]]
{{Article summary start}}
+
[[ja:Lenovo ThinkPad X200]]
{{Article summary text|This article covers the Arch Linux support for the Lenovo ThinkPad X200 laptop.}}
+
The Lenovo ThinkPad X200 is a high-quality laptop featuring a 12.1" widescreen WXGA display, an Intel Core 2 Duo processor (2.26 - 2.8GHz), an Intel Graphics Media Accelerator 4500MHD and up to 8GB of RAM whilst still maintaining impressive battery life.
{{Article summary end}}
+
  
The Lenovo ThinkPad X200 is a wonderful high-quality laptop featuring a 12.1" widescreen WXGA monitor, an Intel Core 2 Duo processor (2.26 - 2.66GHz), an Intel Graphics Media Accelerator 4500MHD and up to 4GB of RAM whilst still maintaining impressive battery life.
+
== Configuration ==
  
While Arch Linux is running flawlessly on this laptop there are a few things you have to configure manually. This article will aid you in configuring your system and will provide additionally hints to make your ThinkPad X200 experience even better.
 
 
==Setup==
 
 
===Wireless===
 
===Wireless===
The ThinkPad X200 has a Intel PRO/Wireless 5100 AGN wireless adapter included. In order to make it work you have to install the iwlwifi-5000-ucode package when you install from a 2010.05 snapshot in order to get the firmware, by now the package is included in the linux-firmware package.
 
 
Now you can choose whatever network configuration programs you want to use. If you do not already know which network manager you want to use, we highly recommend [[netctl]].
 
 
If you experience connectivity problems such as a slow connection or aborts, especially when connected to an (Enterprise) WPA2 network, then try to load the iwlwifi module with the options {{ic|11n_disable=1}}, {{ic|11n_disable=2}}, {{ic|swcrypto=1}}, {{ic|bt_coex_active=0}}. There is no clear recommendation which of these options to be used as for some users {{ic|11n_disable=1}} already solves the problem sufficiently, for others {{ic|bt_coex_active=0}}. Thus, play around with each of them. Example:
 
 
modprobe iwlwifi 11n_disable=2
 
 
If some of them work out for you, then make the options permanent by creating the file {{ic|/etc/modprobe.d/wireless.conf}} and adding the following:
 
 
options iwlwifi 11n_disable=2
 
# Disable blinking LED wireless light
 
options iwlwifi led_mode=1
 
 
===Graphics===
 
The graphics card is supported by the xf86-video-intel driver package from the extra repository. The Xorg server makes use of this automatically. There's no need for a Xorg configuration file.
 
  
# pacman -S xf86-video-intel
+
The ThinkPad X200 has a Intel PRO/Wireless 5100/5300 AGN wireless adapter, supported by {{Pkg|linux-firmware}}.
  
===Audio===
+
If connectivity problems such as a slow connection or aborts are experienced, especially when connected to a [[WPA2 Enterprise]] network, then try to load the iwlwifi module with the options {{ic|11n_disable=1}}, {{ic|11n_disable=2}}, {{ic|swcrypto=1}}, {{ic|bt_coex_active=0}}. There is no clear recommendation which of these options to be used as for some users {{ic|11n_disable=1}} already solves the problem sufficiently, for others {{ic|bt_coex_active=0}}. See [[Wireless network configuration#iwlwifi]] for more detailed instructions.
Audio is supported out of the box after installing the necessary alsa packages from the core repository.
+
  
# sudo pacman -S alsa-lib
+
===TrackPoint===
  
See [[Alsa]] for more information.
+
See [[TrackPoint]].
  
 
===Fingerprint Reader===
 
===Fingerprint Reader===
Some versions of the X200 are equipped with an Authentec 2810 fingerprint reader. The fingerprint reader functions with pam and fprint with minimal configuration of pam.
 
  
# sudo pacman -S pam fprint
+
Depending on the laptop variant the fingerprint reader in the X200/X200T could be supported.
  
See [[Fprint]] for more information.
+
See [[fprint]] for more information.
  
==Configuration==
 
 
===Disable bluetooth at boot===
 
===Disable bluetooth at boot===
In order to disable bluetooth at boot you just need to add the following line to a newly created /etc/tmpfiles.d/disable-bluetooth.conf file. Please note, that there is no longer support for a /etc/rc.local file.
 
  
w /proc/acpi/ibm/bluetooth - - - - disable
+
See [[Power saving#Bluetooth]].
  
===Enable tap to select===
+
===Hard Disk shock protection===
You can enable the double click through tapping on your track point. Create a {{ic|/etc/tmpfiles.d/enable-tap-to-select.conf}} with the following content:
+
  
w /sys/devices/platform/i8042/serio1/press_to_select - - - - 1
+
The ThinkPad X200 comes with an integrated 2-axis accelerometer providing the possibility of parking the hard drive's disk heads preventing from data loss due to heavy shocks. See [[HDAPS]] for details. It may be necessary to set correct [[HDAPS#Invert_module_parameter|invert parameter]].
  
===Hard Disk Shock Protection===
+
===Mute button===
The ThinkPad X200 comes with an integrated 2-axis accelerometer providing the possibility of parking the hard drive's disk heads preventing from data loss due to heavy shocks.
+
If the mute button on the keyboard is not working, then be sure to add acpi_osi="Linux" to the boot parameter in /etc/default/grub.
  
First you'll have to install [https://aur.archlinux.org/packages.php?ID=3985 tp_smapi] and [https://aur.archlinux.org/packages.php?ID=5401 hdapsd] from [[AUR]]. Then you have to load the hdaps module provided by tp_smapi with the option invert=7 passed. This will correct the orientation of the accelerometer's axises. If you are using systemd, create a file {{ic|/etc/modules-load.d/tp_smapi.conf}} with the following line:
+
GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_osi=Linux"
  
# Load tp_smapi at boot
+
===Screen calibration===
options tp_smapi invert=7
+
If the stylus happens to be working very imprecisely, the screen may be in need of calibration. Installing {{AUR|xinput_calibrator}} and running the following command will begin the calibration process.
  
Then you need to start the hdapsd daemon:
+
# xinput_calibrator --device "Serial Wacom Tablet WACf004 stylus"
  
# systemctl enable hdapsd
+
To save the calibration settings, create a config file at {{ic|/etc/X11/xorg.conf.d/99-calibration.conf}} with the settings provided by xinput_calibrator.
# systemctl start hdapsd
+
  
Now check your log files with {{ic|journalctl}} if you see any parking/unparking entries which indicate that hdapsd is successfully configured.
+
===Loading the correct ICC colour profile===
  
For full information see: [[HDAPS]]
+
Download [https://github.com/yuvadm/dotfiles/raw/x200s/.color/icc/x200.icc x200.icc] and move it to {{ic|~/.color/icc}}. Load the profile with {{AUR|xcalib}} as follows:
  
{{Note|If you experience parking / un-parking events when not moving your hard disk, then you might use the wrong invert value. Install and run [[AUR|hdaps-gl]] and check whether it shows your machine in the correct orientation when turning the machine. If not, you need to change the invert value. Alternatively to reloading the module you can also directly write a value between 0 and 7 to {{ic|/sys/devices/platform/hdaps/invert}}.}}
+
$ /usr/bin/xcalib -d :0 ~/.color/icc/x200.icc
  
===Mute button===
+
===Screen rotation===
If the mute button on your keyboard is not working, then be sure to add acpi_osi="Linux" to your boot parameter in /etc/default/grub.
+
{{Note| Commands like [[xmodmap]], xev, showkey, dmesg, setkeycodes can help you. See [[Extra keyboard keys]] for details.}}
  
GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_osi=Linux"
+
The screen rotation hardware button does not work by default. To enable it, the button must first be assigned to a freekey code. To find a free keycode for use, try using the command {{ic|xmodmap -pke <nowiki>|</nowiki> less}}.
  
===Screen calibration===
+
Keycodes can be mapped to hardware buttons during the boot process via a [[systemd]] config file such as the one shown below.
If you experience your stylus to be working very imprecisely, then you might need to calibrate it first. Install {{aur|xinput_calibrator}} and run the following command:
+
  
sudo xinput_calibrator --device "Serial Wacom Tablet WACf004 stylus"
+
{{hc|head=/etc/systemd/system/setkeycodes.service|output=
 +
[Unit]
 +
Description=Assign each hardware button to a free keycode on boot
  
After calibration you need to create the file called {{ic|/etc/X11/xorg.conf.d/99-calibration.conf}} with the settings provided by xinput_calibrator.
+
[Service]
 +
Type=oneshot
 +
ExecStart=/usr/bin/setkeycodes 0x67 184 0x6c 185 0x68 186 0x66 187
  
===Screen rotation===
+
[Install]
The screen rotation hardware button does not work by default. First you have to assign this button to a free keycode. In order to find out an unused keycode, you can use the command {{ic|xmodmap -pke <nowiki>|</nowiki> less}}.
+
WantedBy=multi-user.target
 +
}}
  
# File: /etc/systemd/system/setkeycodes.service
+
After successfully mapping a keycode to a hardware button, it can then be utilized with a script similar to the one below.
+
[Unit]
+
Description=Assign each hardware button to a free keycode on boot
+
+
[Service]
+
Type=oneshot
+
ExecStart=/usr/bin/setkeycodes 0x67 184 0x6c 185 0x68 186 0x66 187
+
+
[Install]
+
WantedBy=multi-user.target
+
  
{{Note| Commands like [[xmodmap]], xev, showkey, dmesg, setkeycodes can help you. <br />
+
{{hc|head=/usr/local/bin/screen_rotation.sh|output=<nowiki>
Here is a very good tutorial for adding extra keys : [[Extra Keyboard Keys]] }}
+
#!/bin/sh
  
Then you can assign the script for screen rotation to that button.
+
# Find the line in "xrandr -q --verbose" output that contains current screen orientation and "strip" out current orientation.
 +
rotation="$(xrandr -q --verbose | grep 'connected' | egrep -o  '\) (normal|left|inverted|right) \(' | egrep -o '(normal|left|inverted|right)')"
  
# File: /usr/local/bin/screen_rotation.sh
+
# Using current screen orientation proceed to rotate screen and input tools.
+
case "$rotation" in
#!/bin/sh
+
    normal)
+
    # rotate to the left
# Find the line in "xrandr -q --verbose" output that contains current screen orientation and "strip" out current orientation.
+
    xrandr -o left
+
    xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate ccw
rotation="$(xrandr -q --verbose | grep 'connected' | egrep -o  '\) (normal|left|inverted|right) \(' | egrep -o '(normal|left|inverted|right)')"
+
    xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate ccw
+
    ;;
# Using current screen orientation proceed to rotate screen and input tools.
+
    left)
+
    # rotate to normal
case "$rotation" in
+
    xrandr -o normal
    normal)
+
    xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate none
    # rotate to the left
+
    xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate none
    xrandr -o left
+
    ;;
    xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate ccw
+
esac
    xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate ccw
+
</nowiki>}}
    ;;
+
    left)
+
    # rotate to normal
+
    xrandr -o normal
+
    xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate none
+
    xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate none
+
    ;;
+
esac
+
  
The assignment of the keycode to the script depends on your desktop environment. For Gnome the assignment can be easily done in the Keyboard preferences of custom shortcuts.
+
The assignment of the keycode to the script depends on the currently installed desktop environment. For [[GNOME]], the assignment can be easily done in the custom shortcuts section of the Keyboard preferences.
If you are using another desktop environment (such as XFCE, LXDE, Fluxbox ...) you can always use the program [[xbindkeys]].
+
 
 +
If you are using another desktop environment (such as [[Xfce]], [[LXDE]], [[Fluxbox]], etc) you can always use the program [[xbindkeys]].
  
 
===Screen auto-rotation===
 
===Screen auto-rotation===
The auto-rotation of the screen does not work by default. First you have to install the [[HDAPS]] package so as to get the values worked out by the integrated 2-axis accelerometer of the Thinkpad X200.
+
 
Then the following script will enable you to use the accelerometer's data to automatically rotate your screen :
+
Screen auto-rotation does not work by default. Installing the [[HDAPS]] package will allow for the utilization of the ThinkPad X200's integrated 2-axis accelerometer.
 +
 
 +
After installing HDAPS, the following configuration file may be created to automate screen rotation:
  
 
{{bc|<nowiki>#!/bin/bash
 
{{bc|<nowiki>#!/bin/bash
Line 196: Line 160:
 
</nowiki>}}
 
</nowiki>}}
  
Then you can run this script at the startup in order to make your screen automatically rotate when you need it. For instance, you can use the file ~/.fluxbox/startup on fluxbox, or the command : gnome-session-properties if you are using Gnome 3).
+
This script may be executed during startup to further automate the screen rotation process. See [[Autostarting]] for more information on startup automation.
  
 
===Power consumption and fan control===
 
===Power consumption and fan control===
{{note|There is a useful [http://robert.orzanna.de/2013/06/linux-powersaving-measures.html blog post] describing possible measures to reduce power consumption of a X200T to almost 7 Watt.}}
 
  
You might notice a beeping whilst your system is running. This is due to missing fan control. Install the [https://aur.archlinux.org/packages/tlp/ tlp] package from AUR to enable extensive fan and power consumption control.
+
{{note|There is a useful [http://orschiro.blogspot.com/2013/06/linux-powersaving-measures.html blog post] describing possible measures to reduce power consumption of a X200T to almost 7 Watt.}}
  
You can further disable the nmi-watchdog by creating the file {{ic|/etc/tmpfiles.d/disable-nmi-watchdog.conf}} with the following line:
+
To set up an efficient power saving environment, install the {{Pkg|tlp}} package. A detailed guide how to implement a simplistic power saving environment based upon TLP can be found [http://www.robert.orzanna.de/simplistic-powersaving-with-systemd-service-files-and-udev-rules/ here].
  
w /proc/sys/kernel/nmi_watchdog - - - - 0
+
Fan-control software can be used to further reduce power consumption. The {{AUR|tpfanco-svn}}{{Broken package link|{{aur-mirror|tpfanco-svn}}}} package from AUR provides a simplistic GTK GUI for setting up fan activation thresholds based upon the X200's multiple hardware sensors.
  
This will disable the watchdog at startup.
+
Investigate [[Powertop]] and the {{AUR|powerstat-git}} package from AUR for more information on measuring actual power consumption.
  
Additionally you might want to define different brightness level and automatically dim your screen when you are running on battery. A DE and WM independent solution is the usage of pm-utils. Detailed instructions can be found [https://wiki.archlinux.org/index.php/Pm-utils#Change_brightness_depending_on_AC_state here]. They are tested to work with a X200T.
+
See [[Power saving]] for additional tips.
  
===Suspend to RAM===
+
===Suspend to RAM / hibernate ===
Suspend to RAM is working out of the box with the standard Arch Linux kernel after installing pm-utils from extra.
+
  
# pacman -S pm-utils
+
Suspend to ram and hibernation is fully supported. See [[Suspend and hibernate]] for more information.
  
Issue the command
+
===BIOS WiFi-Whitelist Removal===
# pm-suspend
+
{{Warning| Modifying the system's firmware can be rewarding but it is also very dangerous. Proceed with caution.}}
as root to suspend to RAM. The laptop will wake up on any key press or on opening the lid.
+
  
'''Note:''' Very seldom after resuming the backlight won't come back on. The following page on ThinkWiki might provide information on how to solve this issue: [http://www.thinkwiki.org/wiki/Problem_with_display_remaining_black_after_resume Problem with display remaining black after resume].
+
Like most ThinkPads, the X200(s) / X200T has an [http://support.lenovo.com/us/en/documents/migr-43693 FCC enforced whitelist] for wireless cards. This means if a third party wireless card is installed via Mini PCIe or PCMCIA slot, the system will not boot. However, there are many individuals who modify and distribute whitelist-free BIOS updates online.
  
==Unsupported==
+
The whitelist-free BIOS for the X200(s) can be found [http://forums.mydigitallife.info/threads/5866-LENOVO-(IBM)-Bioses-especially-Thinkpad/page501 here] and the whitelist-free BIOS for the X200T can be found [http://forums.mydigitallife.info/threads/20223-Remove-whitelist-check-add-ID-s-to-break-hardware-restrictions-mod-requests/page338 here].
<s>Unlike those on older models, the fingerprint reader on the X200 ("Authentec 2810") is unsupported on linux as there are no working drivers either in the kernel or outside[http://www.thinkwiki.org/wiki/Integrated_Fingerprint_Reader#Software_support].</s>
+
 
 +
Make sure the BIOS version the system is running matches the cracked version being distributed.
 +
 
 +
For more information about BIOS flashing and system firmware, please see [[Flashing BIOS from Linux]].
 +
 
 +
===Coreboot / Libreboot ===
 +
{{Warning| Modifying the system's firmware can be rewarding but it is also very dangerous. Proceed with caution.}}
 +
 
 +
[http://coreboot.org/ Coreboot] is a fast and flexible open source firmware solution to replace the system BIOS. The ThinkPad X200 is [https://www.fsf.org/news/libreboot-x200-laptop-now-fsf-certified-to-respect-your-freedom fully supported] by Coreboot and good documentation can be found at the Libreboot project's official [http://libreboot.org/ website]. The X200s and X200 Tablet are also partially supported per the [http://www.libreboot.org/docs/hcl/x200.html#x200s Libreboot X200 documentation].
  
 
==Troubleshooting==
 
==Troubleshooting==
  
 
=== failed to execute '/usr/sbin/inputattach' ===
 
=== failed to execute '/usr/sbin/inputattach' ===
If you see the above error in your logs, open {{ic|/usr/lib/udev/rules.d/70-wacom.rules}} and comment out SUBSYSTEM of inputattach.
+
If you see the above error in your logs, copy {{ic|/usr/lib/udev/rules.d/70-wacom.rules}} to {{ic|/etc/udev/rules.d/70-wacom.rules}} and comment out SUBSYSTEM of inputattach.
  
 
===System feels unresponsive===
 
===System feels unresponsive===
Line 234: Line 203:
  
 
  options drm_kms_helper poll=N
 
  options drm_kms_helper poll=N
 +
 +
===Backlight fails to activate after system resume ===
 +
On rare occasions the backlight may not activate after resuming. See [http://www.thinkwiki.org/wiki/Problem_with_display_remaining_black_after_resume Problem with display remaining black after resume] for possible workarounds.
  
 
===PM device: Resume from hibernation error: Failed to restore -19===
 
===PM device: Resume from hibernation error: Failed to restore -19===
Line 260: Line 232:
 
     ;;
 
     ;;
 
  esac
 
  esac
 +
 +
=== mei_me 0000:00:03.0: suspend ===
 +
 +
If you are seeing this error, a workaround is to blacklist the {{ic|mei}} and {{ic|mei_me}} modules. More information can be found [https://bbs.archlinux.org/viewtopic.php?pid=1314282#p1314282 here].
 +
 +
=== pciehp 0000:00:1c.1:pcie04: Cannot add device at 0000:03:00 ===
 +
See [https://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X200&action=submit#mei_me_0000:00:03.0:_suspend #mei_me 0000:00:03.0: suspend].
 +
 +
=== Uhhuh. NMI received for unknown reason 30. ===
 +
The Thinkpad X200 is known to report the following error on resume from hibernation or suspension:
 +
 +
Uhhuh. NMI received for unknown reason 30.
 +
Dazed and confused, but trying to continue
 +
Do you have a strange power saving mode enabled?
 +
 +
In this case you can disable the high precision event timer (HPET) by adding "nohpet" to your [[GRUB]] kernel parameter line.
 +
 +
=== High pitched noises ===
 +
The X200(s) is prone to high pitched, low volume noises originating from the CPU, usually in low power scenarios. One proved solution to this is to disable CPU power control in the BIOS.
 +
 +
High pitched noises may also be emitted from the display's inverter board on CCFL models. This is normal behavior and may or may not be present depending on how much energy the installed display draws.
 +
 +
For more information see [http://www.thinkwiki.org/wiki/Problem_with_high_pitch_noises].
  
 
==See also==
 
==See also==
 
* Thinkwiki: [http://www.thinkwiki.org/wiki/Category:X200 X200 Overview]
 
* Thinkwiki: [http://www.thinkwiki.org/wiki/Category:X200 X200 Overview]
 
* ThinkWiki: [http://www.thinkwiki.org/wiki/How_to_reduce_power_consumption How to reduce power consumption]
 
* ThinkWiki: [http://www.thinkwiki.org/wiki/How_to_reduce_power_consumption How to reduce power consumption]

Latest revision as of 17:15, 18 November 2016

The Lenovo ThinkPad X200 is a high-quality laptop featuring a 12.1" widescreen WXGA display, an Intel Core 2 Duo processor (2.26 - 2.8GHz), an Intel Graphics Media Accelerator 4500MHD and up to 8GB of RAM whilst still maintaining impressive battery life.

Configuration

Wireless

The ThinkPad X200 has a Intel PRO/Wireless 5100/5300 AGN wireless adapter, supported by linux-firmware.

If connectivity problems such as a slow connection or aborts are experienced, especially when connected to a WPA2 Enterprise network, then try to load the iwlwifi module with the options 11n_disable=1, 11n_disable=2, swcrypto=1, bt_coex_active=0. There is no clear recommendation which of these options to be used as for some users 11n_disable=1 already solves the problem sufficiently, for others bt_coex_active=0. See Wireless network configuration#iwlwifi for more detailed instructions.

TrackPoint

See TrackPoint.

Fingerprint Reader

Depending on the laptop variant the fingerprint reader in the X200/X200T could be supported.

See fprint for more information.

Disable bluetooth at boot

See Power saving#Bluetooth.

Hard Disk shock protection

The ThinkPad X200 comes with an integrated 2-axis accelerometer providing the possibility of parking the hard drive's disk heads preventing from data loss due to heavy shocks. See HDAPS for details. It may be necessary to set correct invert parameter.

Mute button

If the mute button on the keyboard is not working, then be sure to add acpi_osi="Linux" to the boot parameter in /etc/default/grub.

GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_osi=Linux"

Screen calibration

If the stylus happens to be working very imprecisely, the screen may be in need of calibration. Installing xinput_calibratorAUR and running the following command will begin the calibration process.

# xinput_calibrator --device "Serial Wacom Tablet WACf004 stylus"

To save the calibration settings, create a config file at /etc/X11/xorg.conf.d/99-calibration.conf with the settings provided by xinput_calibrator.

Loading the correct ICC colour profile

Download x200.icc and move it to ~/.color/icc. Load the profile with xcalibAUR as follows:

$ /usr/bin/xcalib -d :0 ~/.color/icc/x200.icc

Screen rotation

Note: Commands like xmodmap, xev, showkey, dmesg, setkeycodes can help you. See Extra keyboard keys for details.

The screen rotation hardware button does not work by default. To enable it, the button must first be assigned to a freekey code. To find a free keycode for use, try using the command xmodmap -pke | less.

Keycodes can be mapped to hardware buttons during the boot process via a systemd config file such as the one shown below.

/etc/systemd/system/setkeycodes.service
[Unit]
Description=Assign each hardware button to a free keycode on boot

[Service]
Type=oneshot
ExecStart=/usr/bin/setkeycodes 0x67 184 0x6c 185 0x68 186 0x66 187

[Install]
WantedBy=multi-user.target

After successfully mapping a keycode to a hardware button, it can then be utilized with a script similar to the one below.

/usr/local/bin/screen_rotation.sh
#!/bin/sh

# Find the line in "xrandr -q --verbose" output that contains current screen orientation and "strip" out current orientation.
rotation="$(xrandr -q --verbose | grep 'connected' | egrep -o  '\) (normal|left|inverted|right) \(' | egrep -o '(normal|left|inverted|right)')"

# Using current screen orientation proceed to rotate screen and input tools.
case "$rotation" in
    normal)
    # rotate to the left
    xrandr -o left
    xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate ccw
    xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate ccw
    ;;
    left)
    # rotate to normal
    xrandr -o normal
    xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate none
    xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate none
    ;;
esac

The assignment of the keycode to the script depends on the currently installed desktop environment. For GNOME, the assignment can be easily done in the custom shortcuts section of the Keyboard preferences.

If you are using another desktop environment (such as Xfce, LXDE, Fluxbox, etc) you can always use the program xbindkeys.

Screen auto-rotation

Screen auto-rotation does not work by default. Installing the HDAPS package will allow for the utilization of the ThinkPad X200's integrated 2-axis accelerometer.

After installing HDAPS, the following configuration file may be created to automate screen rotation:

#!/bin/bash

# (To have the exact names of these devices you should type the command : xsetwacom --list devices )
stylus="Serial Wacom Tablet stylus" 
eraser="Serial Wacom Tablet eraser"

function rotate {
    if [ $# -lt 1 ]; then  # error ...
	exit 1 
    fi

    case "$1" in
        up)
            nextRotate="none"
            nextOrient="normal" ;;
        down)
            nextRotate="half"
            nextOrient="inverted" ;;
	right)
            nextRotate="ccw"
            nextOrient="left" ;;
	left)
            nextRotate="cw"
            nextOrient="right";;
    esac

    # Rotate the screen      
    xrandr -o $nextOrient

    # Rotate the tablet                      
    xsetwacom set "$stylus" Rotate $nextRotate
    xsetwacom set "$eraser" Rotate $nextRotate
}

while true; do
    # 1) We extract data about the actual position
    position=$(cat /sys/devices/platform/hdaps/position)
    x=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\1/p") # most of time contained in [350,650]
    y=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\2/p") # most of time contained in [-650,-350]

    # 2) We work out the x value (= left and right inclination) (always between 
    if [ $x -lt 400 ]; then
	rotate left
    elif [ $x -gt 600 ]; then
	rotate right
    fi
    
    # 3) We work out the y value (= front and back inclination)
    if [ $y -gt -400 ]; then
	rotate down
    elif [ $y -lt -600 ]; then
	rotate up
    fi

    # 4) wait before checking the value again
    sleep 0.5
done

This script may be executed during startup to further automate the screen rotation process. See Autostarting for more information on startup automation.

Power consumption and fan control

Note: There is a useful blog post describing possible measures to reduce power consumption of a X200T to almost 7 Watt.

To set up an efficient power saving environment, install the tlp package. A detailed guide how to implement a simplistic power saving environment based upon TLP can be found here.

Fan-control software can be used to further reduce power consumption. The tpfanco-svnAUR[broken link: archived in aur-mirror] package from AUR provides a simplistic GTK GUI for setting up fan activation thresholds based upon the X200's multiple hardware sensors.

Investigate Powertop and the powerstat-gitAUR package from AUR for more information on measuring actual power consumption.

See Power saving for additional tips.

Suspend to RAM / hibernate

Suspend to ram and hibernation is fully supported. See Suspend and hibernate for more information.

BIOS WiFi-Whitelist Removal

Warning: Modifying the system's firmware can be rewarding but it is also very dangerous. Proceed with caution.

Like most ThinkPads, the X200(s) / X200T has an FCC enforced whitelist for wireless cards. This means if a third party wireless card is installed via Mini PCIe or PCMCIA slot, the system will not boot. However, there are many individuals who modify and distribute whitelist-free BIOS updates online.

The whitelist-free BIOS for the X200(s) can be found here and the whitelist-free BIOS for the X200T can be found here.

Make sure the BIOS version the system is running matches the cracked version being distributed.

For more information about BIOS flashing and system firmware, please see Flashing BIOS from Linux.

Coreboot / Libreboot

Warning: Modifying the system's firmware can be rewarding but it is also very dangerous. Proceed with caution.

Coreboot is a fast and flexible open source firmware solution to replace the system BIOS. The ThinkPad X200 is fully supported by Coreboot and good documentation can be found at the Libreboot project's official website. The X200s and X200 Tablet are also partially supported per the Libreboot X200 documentation.

Troubleshooting

failed to execute '/usr/sbin/inputattach'

If you see the above error in your logs, copy /usr/lib/udev/rules.d/70-wacom.rules to /etc/udev/rules.d/70-wacom.rules and comment out SUBSYSTEM of inputattach.

System feels unresponsive

If your system feels unresponsive and lagging, you can try creating a file called /etc/modprobe.d/drm_kms.conf:

options drm_kms_helper poll=N

Backlight fails to activate after system resume

On rare occasions the backlight may not activate after resuming. See Problem with display remaining black after resume for possible workarounds.

PM device: Resume from hibernation error: Failed to restore -19

This is likely to be related to the tpm_tis and tpm modules not being properly unloaded before hibernation. These modules are required by the device listed in the error as 00:0a:

# dmesg | grep 00:0a
[    0.377877] pnp 00:0a: Plug and Play ACPI device, IDs PNP0c31 (active)
[   10.746742] tpm_tis 00:0a: 1.2 TPM (device-id 0x1020, rev-id 6)
[   10.746751] tpm_tis 00:0a: Intel iTPM workaround enabled
[   10.866734] tpm_tis 00:0a: TPM is disabled/deactivated (0x6)

To unload the module create the following executable file called /usr/lib/systemd/system-sleep/tpm.sh, assuming the use of the systemd hibernation procedure:

#!/bin/sh
case $1/$2 in
  pre/*)
    echo "Going to $2..."
    modprobe -r tpm
    modprobe -r tpm_tis
    ;;
  post/*)
    echo "Waking up from $2..."
    modprobe tpm
    modprobe tpm_tis
    ;;
esac

mei_me 0000:00:03.0: suspend

If you are seeing this error, a workaround is to blacklist the mei and mei_me modules. More information can be found here.

pciehp 0000:00:1c.1:pcie04: Cannot add device at 0000:03:00

See #mei_me 0000:00:03.0: suspend.

Uhhuh. NMI received for unknown reason 30.

The Thinkpad X200 is known to report the following error on resume from hibernation or suspension:

Uhhuh. NMI received for unknown reason 30.
Dazed and confused, but trying to continue
Do you have a strange power saving mode enabled?

In this case you can disable the high precision event timer (HPET) by adding "nohpet" to your GRUB kernel parameter line.

High pitched noises

The X200(s) is prone to high pitched, low volume noises originating from the CPU, usually in low power scenarios. One proved solution to this is to disable CPU power control in the BIOS.

High pitched noises may also be emitted from the display's inverter board on CCFL models. This is normal behavior and may or may not be present depending on how much energy the installed display draws.

For more information see [1].

See also