Lenovo ThinkPad X200

From ArchWiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Tango-edit-clear.pngThis article or section does not follow the Laptop page guidelines.Tango-edit-clear.png

Reason: Needs some serious cleanup. Hardware table and function keys section is somewhere to start. (Discuss in Talk:Lenovo ThinkPad X200)
Hardware PCI/USB ID Working?
Touchpad Yes
Keyboard Yes
GPU 8086:2a43 Yes
Webcam 17ef:480c Yes
Ethernet 8086:10f5 Yes
Bluetooth Yes
SD-card reader Yes
Audio 8086:293e Yes
Wireless 8086:4237 Yes
Fingerprint reader Untested
TPM Untested

Firmware

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

BIOS card whitelist removal

Warning: Installing third-party BIOS updates from untrusted sources can potentially leave a computer with firmware-level malicious rootkits. Be careful!

Like most ThinkPads, the X200(s) / X200T has an FCC enforced whitelist[dead link 2021-11-13 ⓘ] 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

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.

Fingerprint reader

Install fprint. Support depends on the model variant.

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"

Power management

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.

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

See Power saving for additional tips.

Screen calibration

Loading the correct ICC colour profile

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

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

Calibrating the digitizer

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.

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.

Wireless internet

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.

Troubleshooting

Libreboot uneven backlight brightness problem

In some CCFL display panel libreboot fails to detect the correct PWM brightness value resulting in uneven backlight (summary). To fix this, you need to flash libreboot version 20210522 or newer (download) (warning libreboot 20210522 has a grub font & restart bug, altough shutdown is okay).

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