https://wiki.archlinux.org/api.php?action=feedcontributions&user=Jmanes&feedformat=atomArchWiki - User contributions [en]2024-03-29T10:48:27ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Dell_Latitude_7490&diff=571750Dell Latitude 74902019-04-21T00:21:45Z<p>Jmanes: Clarified refresh rate.</p>
<hr />
<div>The Latitude 7490 is virtually identical to the [[Dell Latitude 7480]] with the exception of an upgrade to Kabylake-R processors (8th gen).<br />
<br />
== Components ==<br />
<br />
''Note: This information is from my particular laptop (which does not have a webcam nor touchscreen). Other variants may have slightly different output but should generally behave similarly.''<br />
<br />
=== <code>lscpu</code> Output ===<br />
<br />
<pre><br />
Architecture: x86_64<br />
CPU op-mode(s): 32-bit, 64-bit<br />
Byte Order: Little Endian<br />
Address sizes: 39 bits physical, 48 bits virtual<br />
CPU(s): 8<br />
On-line CPU(s) list: 0-7<br />
Thread(s) per core: 2<br />
Core(s) per socket: 4<br />
Socket(s): 1<br />
NUMA node(s): 1<br />
Vendor ID: GenuineIntel<br />
CPU family: 6<br />
Model: 142<br />
Model name: Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz<br />
Stepping: 10<br />
CPU MHz: 1565.593<br />
CPU max MHz: 1700.0000<br />
CPU min MHz: 400.0000<br />
BogoMIPS: 3793.00<br />
Virtualization: VT-x<br />
L1d cache: 32K<br />
L1i cache: 32K<br />
L2 cache: 256K<br />
L3 cache: 6144K<br />
NUMA node0 CPU(s): 0-7<br />
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp flush_l1d<br />
</pre><br />
<br />
=== <code>lspci -k</code> Output ===<br />
<br />
<pre><br />
00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers (rev 08)<br />
Subsystem: Dell Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers<br />
Kernel driver in use: skl_uncore<br />
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (rev 07)<br />
DeviceName: Onboard IGD<br />
Subsystem: Dell UHD Graphics 620<br />
Kernel driver in use: i915<br />
Kernel modules: i915<br />
00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 08)<br />
Subsystem: Dell Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem<br />
Kernel driver in use: proc_thermal<br />
Kernel modules: processor_thermal_device<br />
00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21)<br />
Subsystem: Dell Sunrise Point-LP USB 3.0 xHCI Controller<br />
Kernel driver in use: xhci_hcd<br />
Kernel modules: xhci_pci<br />
00:14.2 Signal processing controller: Intel Corporation Sunrise Point-LP Thermal subsystem (rev 21)<br />
Subsystem: Dell Sunrise Point-LP Thermal subsystem<br />
Kernel driver in use: intel_pch_thermal<br />
Kernel modules: intel_pch_thermal<br />
00:15.0 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #0 (rev 21)<br />
Subsystem: Dell Sunrise Point-LP Serial IO I2C Controller<br />
Kernel driver in use: intel-lpss<br />
Kernel modules: intel_lpss_pci<br />
00:15.1 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #1 (rev 21)<br />
Subsystem: Dell Sunrise Point-LP Serial IO I2C Controller<br />
Kernel driver in use: intel-lpss<br />
Kernel modules: intel_lpss_pci<br />
00:15.2 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #2 (rev 21)<br />
Subsystem: Dell Sunrise Point-LP Serial IO I2C Controller<br />
Kernel driver in use: intel-lpss<br />
Kernel modules: intel_lpss_pci<br />
00:15.3 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #3 (rev 21)<br />
Subsystem: Dell Sunrise Point-LP Serial IO I2C Controller<br />
Kernel driver in use: intel-lpss<br />
Kernel modules: intel_lpss_pci<br />
00:16.0 Communication controller: Intel Corporation Sunrise Point-LP CSME HECI #1 (rev 21)<br />
Subsystem: Dell Sunrise Point-LP CSME HECI<br />
Kernel driver in use: mei_me<br />
Kernel modules: mei_me<br />
00:16.3 Serial controller: Intel Corporation Device 9d3d (rev 21)<br />
Subsystem: Dell Device 081c<br />
Kernel driver in use: serial<br />
00:17.0 SATA controller: Intel Corporation Sunrise Point-LP SATA Controller [AHCI mode] (rev 21)<br />
Subsystem: Dell Sunrise Point-LP SATA Controller [AHCI mode]<br />
Kernel driver in use: ahci<br />
Kernel modules: ahci<br />
00:1c.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #1 (rev f1)<br />
Kernel driver in use: pcieport<br />
00:1c.2 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #3 (rev f1)<br />
Kernel driver in use: pcieport<br />
00:1f.0 ISA bridge: Intel Corporation Intel(R) 100 Series Chipset Family LPC Controller/eSPI Controller - 9D4E (rev 21)<br />
Subsystem: Dell Intel(R) 100 Series Chipset Family LPC Controller/eSPI Controller - 9D4E<br />
00:1f.2 Memory controller: Intel Corporation Sunrise Point-LP PMC (rev 21)<br />
Subsystem: Dell Sunrise Point-LP PMC<br />
00:1f.3 Audio device: Intel Corporation Sunrise Point-LP HD Audio (rev 21)<br />
Subsystem: Dell Sunrise Point-LP HD Audio<br />
Kernel driver in use: snd_hda_intel<br />
Kernel modules: snd_hda_intel, snd_soc_skl<br />
00:1f.4 SMBus: Intel Corporation Sunrise Point-LP SMBus (rev 21)<br />
Subsystem: Dell Sunrise Point-LP SMBus<br />
Kernel driver in use: i801_smbus<br />
Kernel modules: i2c_i801<br />
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (4) I219-LM (rev 21)<br />
Subsystem: Dell Ethernet Connection (4) I219-LM<br />
Kernel driver in use: e1000e<br />
Kernel modules: e1000e<br />
01:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS525A PCI Express Card Reader (rev 01)<br />
Subsystem: Dell RTS525A PCI Express Card Reader<br />
Kernel driver in use: rtsx_pci<br />
Kernel modules: rtsx_pci<br />
02:00.0 Network controller: Intel Corporation Wireless 8265 / 8275 (rev 78)<br />
Subsystem: Intel Corporation Wireless 8265 / 8275<br />
Kernel driver in use: iwlwifi<br />
Kernel modules: iwlwifi<br />
</pre><br />
<br />
=== <code>lsusb</code> Output ===<br />
<br />
<pre><br />
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub<br />
Bus 001 Device 004: ID 8087:0a2b Intel Corp. # Bluetooth<br />
Bus 001 Device 003: ID 0a5c:5834 Broadcom Corp. # Dell ControlVault (SmartCard, NFC, and fingerprint)<br />
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br />
</pre><br />
<br />
== What works ==<br />
<br />
Almost everything works:<br />
<br />
* Basic hardware (display, touchpad, trackpoint, keyboard, WiFi, Ethernet, Bluetooth, audio, suspend & resume from RAM and disk, etc.)<br />
* Keyboard backlight control<br />
* Screen backlight control<br />
* Fn/Hotkeys, including Fn-lock<br />
* Contact SmartCard reader<br />
* Qualcomm Snapdragon X7 LTE Modem<br />
* USB-C (connected to Android phone, was able to charge phone and read files)<br />
* USB-C power delivery<br />
* USB-C Display port with D6000 docking station (triple screen with dual 4k works) + power delivery<br />
* Thunderbolt 3.0 (shows up in gnome-settings, works with Dell TB16 dock (Ethernet, DisplayPort @120hz, USB, power delivery, etc))<br />
<br />
== What doesn't work ==<br />
<br />
* Fingerprint reader (tracked at https://gitlab.freedesktop.org/libfprint/libfprint/issues/88)<br />
* Presumably NFC<br />
<br />
== What was not tested ==<br />
<br />
* Contactless SmartCard (probably works since it was detected by <code>pcsc_scan</code><br />
* DisplayPort Alternate Mode for USB-C<br />
* TPM 2.0 (There is an error in dmesg, <code>tpm tpm0: A TPM error (2314) occurred attempting the self test</code>)<br />
<br />
[[Category:Dell]]</div>Jmaneshttps://wiki.archlinux.org/index.php?title=Dell_Latitude_7490&diff=571749Dell Latitude 74902019-04-21T00:21:10Z<p>Jmanes: Tested TB3 dock, works.</p>
<hr />
<div>The Latitude 7490 is virtually identical to the [[Dell Latitude 7480]] with the exception of an upgrade to Kabylake-R processors (8th gen).<br />
<br />
== Components ==<br />
<br />
''Note: This information is from my particular laptop (which does not have a webcam nor touchscreen). Other variants may have slightly different output but should generally behave similarly.''<br />
<br />
=== <code>lscpu</code> Output ===<br />
<br />
<pre><br />
Architecture: x86_64<br />
CPU op-mode(s): 32-bit, 64-bit<br />
Byte Order: Little Endian<br />
Address sizes: 39 bits physical, 48 bits virtual<br />
CPU(s): 8<br />
On-line CPU(s) list: 0-7<br />
Thread(s) per core: 2<br />
Core(s) per socket: 4<br />
Socket(s): 1<br />
NUMA node(s): 1<br />
Vendor ID: GenuineIntel<br />
CPU family: 6<br />
Model: 142<br />
Model name: Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz<br />
Stepping: 10<br />
CPU MHz: 1565.593<br />
CPU max MHz: 1700.0000<br />
CPU min MHz: 400.0000<br />
BogoMIPS: 3793.00<br />
Virtualization: VT-x<br />
L1d cache: 32K<br />
L1i cache: 32K<br />
L2 cache: 256K<br />
L3 cache: 6144K<br />
NUMA node0 CPU(s): 0-7<br />
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp flush_l1d<br />
</pre><br />
<br />
=== <code>lspci -k</code> Output ===<br />
<br />
<pre><br />
00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers (rev 08)<br />
Subsystem: Dell Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers<br />
Kernel driver in use: skl_uncore<br />
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (rev 07)<br />
DeviceName: Onboard IGD<br />
Subsystem: Dell UHD Graphics 620<br />
Kernel driver in use: i915<br />
Kernel modules: i915<br />
00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 08)<br />
Subsystem: Dell Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem<br />
Kernel driver in use: proc_thermal<br />
Kernel modules: processor_thermal_device<br />
00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21)<br />
Subsystem: Dell Sunrise Point-LP USB 3.0 xHCI Controller<br />
Kernel driver in use: xhci_hcd<br />
Kernel modules: xhci_pci<br />
00:14.2 Signal processing controller: Intel Corporation Sunrise Point-LP Thermal subsystem (rev 21)<br />
Subsystem: Dell Sunrise Point-LP Thermal subsystem<br />
Kernel driver in use: intel_pch_thermal<br />
Kernel modules: intel_pch_thermal<br />
00:15.0 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #0 (rev 21)<br />
Subsystem: Dell Sunrise Point-LP Serial IO I2C Controller<br />
Kernel driver in use: intel-lpss<br />
Kernel modules: intel_lpss_pci<br />
00:15.1 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #1 (rev 21)<br />
Subsystem: Dell Sunrise Point-LP Serial IO I2C Controller<br />
Kernel driver in use: intel-lpss<br />
Kernel modules: intel_lpss_pci<br />
00:15.2 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #2 (rev 21)<br />
Subsystem: Dell Sunrise Point-LP Serial IO I2C Controller<br />
Kernel driver in use: intel-lpss<br />
Kernel modules: intel_lpss_pci<br />
00:15.3 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #3 (rev 21)<br />
Subsystem: Dell Sunrise Point-LP Serial IO I2C Controller<br />
Kernel driver in use: intel-lpss<br />
Kernel modules: intel_lpss_pci<br />
00:16.0 Communication controller: Intel Corporation Sunrise Point-LP CSME HECI #1 (rev 21)<br />
Subsystem: Dell Sunrise Point-LP CSME HECI<br />
Kernel driver in use: mei_me<br />
Kernel modules: mei_me<br />
00:16.3 Serial controller: Intel Corporation Device 9d3d (rev 21)<br />
Subsystem: Dell Device 081c<br />
Kernel driver in use: serial<br />
00:17.0 SATA controller: Intel Corporation Sunrise Point-LP SATA Controller [AHCI mode] (rev 21)<br />
Subsystem: Dell Sunrise Point-LP SATA Controller [AHCI mode]<br />
Kernel driver in use: ahci<br />
Kernel modules: ahci<br />
00:1c.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #1 (rev f1)<br />
Kernel driver in use: pcieport<br />
00:1c.2 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #3 (rev f1)<br />
Kernel driver in use: pcieport<br />
00:1f.0 ISA bridge: Intel Corporation Intel(R) 100 Series Chipset Family LPC Controller/eSPI Controller - 9D4E (rev 21)<br />
Subsystem: Dell Intel(R) 100 Series Chipset Family LPC Controller/eSPI Controller - 9D4E<br />
00:1f.2 Memory controller: Intel Corporation Sunrise Point-LP PMC (rev 21)<br />
Subsystem: Dell Sunrise Point-LP PMC<br />
00:1f.3 Audio device: Intel Corporation Sunrise Point-LP HD Audio (rev 21)<br />
Subsystem: Dell Sunrise Point-LP HD Audio<br />
Kernel driver in use: snd_hda_intel<br />
Kernel modules: snd_hda_intel, snd_soc_skl<br />
00:1f.4 SMBus: Intel Corporation Sunrise Point-LP SMBus (rev 21)<br />
Subsystem: Dell Sunrise Point-LP SMBus<br />
Kernel driver in use: i801_smbus<br />
Kernel modules: i2c_i801<br />
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (4) I219-LM (rev 21)<br />
Subsystem: Dell Ethernet Connection (4) I219-LM<br />
Kernel driver in use: e1000e<br />
Kernel modules: e1000e<br />
01:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS525A PCI Express Card Reader (rev 01)<br />
Subsystem: Dell RTS525A PCI Express Card Reader<br />
Kernel driver in use: rtsx_pci<br />
Kernel modules: rtsx_pci<br />
02:00.0 Network controller: Intel Corporation Wireless 8265 / 8275 (rev 78)<br />
Subsystem: Intel Corporation Wireless 8265 / 8275<br />
Kernel driver in use: iwlwifi<br />
Kernel modules: iwlwifi<br />
</pre><br />
<br />
=== <code>lsusb</code> Output ===<br />
<br />
<pre><br />
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub<br />
Bus 001 Device 004: ID 8087:0a2b Intel Corp. # Bluetooth<br />
Bus 001 Device 003: ID 0a5c:5834 Broadcom Corp. # Dell ControlVault (SmartCard, NFC, and fingerprint)<br />
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br />
</pre><br />
<br />
== What works ==<br />
<br />
Almost everything works:<br />
<br />
* Basic hardware (display, touchpad, trackpoint, keyboard, WiFi, Ethernet, Bluetooth, audio, suspend & resume from RAM and disk, etc.)<br />
* Keyboard backlight control<br />
* Screen backlight control<br />
* Fn/Hotkeys, including Fn-lock<br />
* Contact SmartCard reader<br />
* Qualcomm Snapdragon X7 LTE Modem<br />
* USB-C (connected to Android phone, was able to charge phone and read files)<br />
* USB-C power delivery<br />
* USB-C Display port with D6000 docking station (triple screen with dual 4k works) + power delivery<br />
* Thunderbolt 3.0 (shows up in gnome-settings, works with Dell TB16 dock (Ethernet, DisplayPort, USB, power delivery, etc))<br />
<br />
== What doesn't work ==<br />
<br />
* Fingerprint reader (tracked at https://gitlab.freedesktop.org/libfprint/libfprint/issues/88)<br />
* Presumably NFC<br />
<br />
== What was not tested ==<br />
<br />
* Contactless SmartCard (probably works since it was detected by <code>pcsc_scan</code><br />
* DisplayPort Alternate Mode for USB-C<br />
* TPM 2.0 (There is an error in dmesg, <code>tpm tpm0: A TPM error (2314) occurred attempting the self test</code>)<br />
<br />
[[Category:Dell]]</div>Jmaneshttps://wiki.archlinux.org/index.php?title=Dell_Latitude_7490&diff=570348Dell Latitude 74902019-04-02T00:26:27Z<p>Jmanes: Updated list to show working hardware with my config.</p>
<hr />
<div>The Latitude 7490 is virtually identical to the [[Dell Latitude 7480]] with the exception of an upgrade to Kabylake-R processors (8th gen).<br />
<br />
== Components ==<br />
<br />
''Note: This information is from my particular laptop (which does not have a webcam nor touchscreen). Other variants may have slightly different output but should generally behave similarly.''<br />
<br />
=== <code>lscpu</code> Output ===<br />
<br />
<pre><br />
Architecture: x86_64<br />
CPU op-mode(s): 32-bit, 64-bit<br />
Byte Order: Little Endian<br />
Address sizes: 39 bits physical, 48 bits virtual<br />
CPU(s): 8<br />
On-line CPU(s) list: 0-7<br />
Thread(s) per core: 2<br />
Core(s) per socket: 4<br />
Socket(s): 1<br />
NUMA node(s): 1<br />
Vendor ID: GenuineIntel<br />
CPU family: 6<br />
Model: 142<br />
Model name: Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz<br />
Stepping: 10<br />
CPU MHz: 1565.593<br />
CPU max MHz: 1700.0000<br />
CPU min MHz: 400.0000<br />
BogoMIPS: 3793.00<br />
Virtualization: VT-x<br />
L1d cache: 32K<br />
L1i cache: 32K<br />
L2 cache: 256K<br />
L3 cache: 6144K<br />
NUMA node0 CPU(s): 0-7<br />
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp flush_l1d<br />
</pre><br />
<br />
=== <code>lspci -k</code> Output ===<br />
<br />
<pre><br />
00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers (rev 08)<br />
Subsystem: Dell Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers<br />
Kernel driver in use: skl_uncore<br />
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (rev 07)<br />
DeviceName: Onboard IGD<br />
Subsystem: Dell UHD Graphics 620<br />
Kernel driver in use: i915<br />
Kernel modules: i915<br />
00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 08)<br />
Subsystem: Dell Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem<br />
Kernel driver in use: proc_thermal<br />
Kernel modules: processor_thermal_device<br />
00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21)<br />
Subsystem: Dell Sunrise Point-LP USB 3.0 xHCI Controller<br />
Kernel driver in use: xhci_hcd<br />
Kernel modules: xhci_pci<br />
00:14.2 Signal processing controller: Intel Corporation Sunrise Point-LP Thermal subsystem (rev 21)<br />
Subsystem: Dell Sunrise Point-LP Thermal subsystem<br />
Kernel driver in use: intel_pch_thermal<br />
Kernel modules: intel_pch_thermal<br />
00:15.0 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #0 (rev 21)<br />
Subsystem: Dell Sunrise Point-LP Serial IO I2C Controller<br />
Kernel driver in use: intel-lpss<br />
Kernel modules: intel_lpss_pci<br />
00:15.1 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #1 (rev 21)<br />
Subsystem: Dell Sunrise Point-LP Serial IO I2C Controller<br />
Kernel driver in use: intel-lpss<br />
Kernel modules: intel_lpss_pci<br />
00:15.2 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #2 (rev 21)<br />
Subsystem: Dell Sunrise Point-LP Serial IO I2C Controller<br />
Kernel driver in use: intel-lpss<br />
Kernel modules: intel_lpss_pci<br />
00:15.3 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #3 (rev 21)<br />
Subsystem: Dell Sunrise Point-LP Serial IO I2C Controller<br />
Kernel driver in use: intel-lpss<br />
Kernel modules: intel_lpss_pci<br />
00:16.0 Communication controller: Intel Corporation Sunrise Point-LP CSME HECI #1 (rev 21)<br />
Subsystem: Dell Sunrise Point-LP CSME HECI<br />
Kernel driver in use: mei_me<br />
Kernel modules: mei_me<br />
00:16.3 Serial controller: Intel Corporation Device 9d3d (rev 21)<br />
Subsystem: Dell Device 081c<br />
Kernel driver in use: serial<br />
00:17.0 SATA controller: Intel Corporation Sunrise Point-LP SATA Controller [AHCI mode] (rev 21)<br />
Subsystem: Dell Sunrise Point-LP SATA Controller [AHCI mode]<br />
Kernel driver in use: ahci<br />
Kernel modules: ahci<br />
00:1c.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #1 (rev f1)<br />
Kernel driver in use: pcieport<br />
00:1c.2 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #3 (rev f1)<br />
Kernel driver in use: pcieport<br />
00:1f.0 ISA bridge: Intel Corporation Intel(R) 100 Series Chipset Family LPC Controller/eSPI Controller - 9D4E (rev 21)<br />
Subsystem: Dell Intel(R) 100 Series Chipset Family LPC Controller/eSPI Controller - 9D4E<br />
00:1f.2 Memory controller: Intel Corporation Sunrise Point-LP PMC (rev 21)<br />
Subsystem: Dell Sunrise Point-LP PMC<br />
00:1f.3 Audio device: Intel Corporation Sunrise Point-LP HD Audio (rev 21)<br />
Subsystem: Dell Sunrise Point-LP HD Audio<br />
Kernel driver in use: snd_hda_intel<br />
Kernel modules: snd_hda_intel, snd_soc_skl<br />
00:1f.4 SMBus: Intel Corporation Sunrise Point-LP SMBus (rev 21)<br />
Subsystem: Dell Sunrise Point-LP SMBus<br />
Kernel driver in use: i801_smbus<br />
Kernel modules: i2c_i801<br />
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (4) I219-LM (rev 21)<br />
Subsystem: Dell Ethernet Connection (4) I219-LM<br />
Kernel driver in use: e1000e<br />
Kernel modules: e1000e<br />
01:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS525A PCI Express Card Reader (rev 01)<br />
Subsystem: Dell RTS525A PCI Express Card Reader<br />
Kernel driver in use: rtsx_pci<br />
Kernel modules: rtsx_pci<br />
02:00.0 Network controller: Intel Corporation Wireless 8265 / 8275 (rev 78)<br />
Subsystem: Intel Corporation Wireless 8265 / 8275<br />
Kernel driver in use: iwlwifi<br />
Kernel modules: iwlwifi<br />
</pre><br />
<br />
=== <code>lsusb</code> Output ===<br />
<br />
<pre><br />
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub<br />
Bus 001 Device 004: ID 8087:0a2b Intel Corp. # Bluetooth<br />
Bus 001 Device 003: ID 0a5c:5834 Broadcom Corp. # Dell ControlVault (SmartCard, NFC, and fingerprint)<br />
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br />
</pre><br />
<br />
== What works ==<br />
<br />
Almost everything works:<br />
<br />
* Basic hardware (display, touchpad, trackpoint, keyboard, WiFi, Ethernet, Bluetooth, audio, suspend & resume from RAM and disk, etc.)<br />
* Keyboard backlight control<br />
* Screen backlight control<br />
* Fn/Hotkeys, including Fn-lock<br />
* Contact SmartCard reader<br />
* Qualcomm Snapdragon X7 LTE Modem<br />
* USB-C (connected to Android phone, was able to charge phone and read files)<br />
<br />
== What doesn't work ==<br />
<br />
* Fingerprint reader (tracked at https://gitlab.freedesktop.org/libfprint/libfprint/issues/88)<br />
* Presumably NFC<br />
<br />
== What was not tested ==<br />
<br />
* Contactless SmartCard (probably works since it was detected by <code>pcsc_scan</code><br />
* USB-C power delivery<br />
* DisplayPort Alternate Mode for USB-C<br />
* Thunderbolt 3.0 (my SKU doesn't have this)<br />
* TPM 2.0 (There is an error in dmesg, <code>tpm tpm0: A TPM error (2314) occurred attempting the self test</code>)<br />
<br />
[[Category:Dell]]</div>Jmaneshttps://wiki.archlinux.org/index.php?title=Plymouth&diff=370208Plymouth2015-04-20T02:24:56Z<p>Jmanes: /* Configuration */</p>
<hr />
<div>[[Category:Bootsplash]]<br />
[[cs:Plymouth]]<br />
[[es:Plymouth]]<br />
[[it:Plymouth]]<br />
[[ja:Plymouth]]<br />
[[ru:Plymouth]]<br />
[[zh-CN:Plymouth]]<br />
[http://www.freedesktop.org/wiki/Software/Plymouth Plymouth] is a project from Fedora providing a flicker-free graphical boot process. It relies on [[kernel mode setting]] (KMS) to set the native resolution of the display as early as possible, then provides an eye-candy splash screen leading all the way up to the login manager.<br />
<br />
== Preparation ==<br />
<br />
{{Warning|Plymouth is currently under heavy development and may contain serious bugs.}}<br />
<br />
Plymouth primarily uses [[KMS]] (Kernel Mode Setting) to display graphics. If you can't use KMS (e.g. because you are using a proprietary driver) you will need to use [[Framebuffer#Framebuffer_Resolution|framebuffer]] instead. In EFI/UEFI systems, plymouth can utilize the EFI framebuffer, otherwise Uvesafb is recommended as it can function with widescreen resolutions.<br />
<br />
If you have neither KMS nor a framebuffer, Plymouth will fall back to text-mode.<br />
<br />
== Installation ==<br />
<br />
Plymouth is available from the [[AUR]]: the stable package is {{AUR|plymouth}} and the development version is {{AUR|plymouth-git}}.<br />
<br />
If you also use [[KDM]], you need to install the {{AUR|kdebase-workspace-plymouth}}, otherwise kdm may not start correctly.<br />
<br />
=== The plymouth hook ===<br />
<br />
Add {{ic|plymouth}} to the HOOKS array in {{ic|/etc/[[mkinitcpio.conf]]}}. It '''must''' be added '''after''' {{ic|base}} and {{ic|udev}} for it to work:<br />
<br />
{{hc|/etc/mkinitcpio.conf|2=HOOKS="base udev plymouth [...] "}}<br />
<br />
{{Warning|If you use [[System Encryption with LUKS for dm-crypt|hard drive encryption]] with the {{ic|encrypt}} hook, you '''must''' replace the {{ic|encrypt}} hook with {{ic|plymouth-encrypt}} in order to get to the TTY password prompts.}}<br />
<br />
For early KMS start (if you are using the open drivers) add the module [[radeon]] (for radeon cards), [[Intel|i915]] (for intel cards) or [[nouveau]] (for nvidia cards) to the MODULES line in {{ic|/etc/mkinitcpio.conf}}:<br />
<br />
{{hc|/etc/mkinitcpio.conf|2=<br />
MODULES="i915"<br />
'''or'''<br />
MODULES="radeon"<br />
'''or'''<br />
MODULES="nouveau"<br />
}}<br />
<br />
=== The kernel command line ===<br />
<br />
You now need to set {{ic|quiet splash}} as your kernel command line parameter in your bootloader. See [[Kernel parameters]] for more info.<br />
<br />
Rebuild your initrd image (see [[mkinitcpio]] article for details), for example:<br />
<br />
# mkinitcpio -p linux<br />
<br />
== Configuration ==<br />
<br />
=== Smooth transition ===<br />
{{Warning|Plymouth version 0.9.2-2 has been reported to cause flickering and malfunction during the boot process when using gdm-plymouth.service and possibly <br />
others.}}<br />
<br />
For ''smooth transition'' to [[Display Manager]] you have to:<br />
<br />
# Disable your Display Manager Unit, e.g. {{ic|systemctl disable kdm.service}}<br />
# Enable the respective DM-plymouth Unit (GDM, KDM, LXDM, SLiM units provided), e.g. {{ic|systemctl enable kdm-plymouth.service}}<br />
<br />
=== Show Delay ===<br />
<br />
As of version 0.9.0 plymouth has a new configuration option available in /etc/plymouth/plymouthd.conf<br />
<br />
{{hc|/etc/plymouth/plymouthd.conf|2=<br />
[Daemon]<br />
Theme=spinner<br />
ShowDelay=5<br />
}}<br />
<br />
On systems that boot quickly, you may only see a flicker of your splash theme before your DM or login prompt is ready. You can set ShowDelay to an interval (in seconds) longer than your boot time to prevent this flicker and only show a blank screen.<br />
The default is 5 seconds, but you may wish to change this to a lower value to see your splash earlier during boot.<br />
<br />
=== Changing the Theme ===<br />
<br />
Plymouth comes with a selection of themes:<br />
<br />
# '''Fade-in''': "Simple theme that fades in and out with shimmering stars"<br />
# '''Glow''': "Corporate theme with pie chart boot progress followed by a glowing emerging logo"<br />
# '''Script''': "Script example plugin" (Despite the description seems to be a quite nice Arch logo theme)<br />
# '''Solar''': "Space theme with violent flaring blue star"<br />
# '''Spinner''': "Simple theme with a loading spinner" <br />
# '''Spinfinity''': "Simple theme that shows a rotating infinity sign in the center of the screen"<br />
# ''('''Text''': "Text mode theme with tricolor progress bar")''<br />
# ''('''Details''': "Verbose fallback theme")''<br />
<br />
By default, '''spinner''' theme is selected. You can change the theme by editing {{ic|/etc/plymouth/plymouthd.conf}}, for example:<br />
<br />
{{hc|/etc/plymouth/plymouthd.conf|2=<br />
[Daemon]<br />
Theme=spinner<br />
ShowDelay=5<br />
}}<br />
<br />
You will also need to rebuild your initrd image every time you change your theme.<br />
<br />
All currently installed themes can be listed by using this command:<br />
<br />
$ plymouth-set-default-theme -l<br />
<br />
or:<br />
<br />
{{hc|$ ls /usr/share/plymouth/themes|<br />
details glow solar spinner tribar<br />
fade-in script spinfinity text<br />
}}<br />
<br />
Themes can be previewed without rebuilding, press {{ic|Ctrl+Alt+F2}} to change to console, log in as root and type:<br />
<br />
# plymouthd<br />
# plymouth --show-splash<br />
<br />
To quit the preview, press {{ic|Ctrl+Alt+F2}} again and type:<br />
<br />
# plymouth --quit<br />
<br />
every time a theme is changed, the kernel image must be rebuilt with:<br />
<br />
# mkinitcpio -p <name of your kernel preset; e.g. linux><br />
<br />
To change theme and rebuild initrd image:<br />
<br />
# plymouth-set-default-theme -R <theme><br />
<br />
Reboot to apply the changes.<br />
<br />
== See also ==<br />
<br />
* [http://fedoraproject.org/wiki/Releases/FeatureBetterStartup Original Spec]<br />
* [https://bbs.archlinux.org/viewtopic.php?id=81406 Related forum thread]</div>Jmaneshttps://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X200&diff=369382Lenovo ThinkPad X2002015-04-11T18:07:00Z<p>Jmanes: /* Wireless */ Re-written to avoid use of nonacademic wording such as "your" and "you."</p>
<hr />
<div>[[Category:Lenovo]]<br />
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.66GHz), an Intel Graphics Media Accelerator 4500MHD and up to 8GB of RAM whilst still maintaining impressive battery life.<br />
<br />
== Configuration ==<br />
<br />
===Wireless===<br />
<br />
The ThinkPad X200 has a Intel PRO/Wireless 5100/5300 AGN wireless adapter, supported by {{Pkg|linux-firmware}}.<br />
<br />
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&#61;1}}, {{ic|11n_disable&#61;2}}, {{ic|swcrypto&#61;1}}, {{ic|bt_coex_active&#61;0}}. There is no clear recommendation which of these options to be used as for some users {{ic|11n_disable&#61;1}} already solves the problem sufficiently, for others {{ic|bt_coex_active&#61;0}}. See [[Wireless_network_configuration#iwlwifi]] for more detailed instructions.<br />
<br />
===TrackPoint===<br />
<br />
See [[TrackPoint]].<br />
<br />
===Fingerprint Reader===<br />
<br />
The fingerprint reader that is found in the X200/X200T is not supported.<br />
<br />
See [[fprint]] for more information.<br />
<br />
===Disable bluetooth at boot===<br />
<br />
See [[Power saving#Bluetooth]].<br />
<br />
===Hard Disk shock protection===<br />
<br />
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]].<br />
<br />
===Mute button===<br />
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.<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_osi=Linux"<br />
<br />
===Screen calibration===<br />
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.<br />
<br />
# xinput_calibrator --device "Serial Wacom Tablet WACf004 stylus"<br />
<br />
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.<br />
<br />
===Loading the correct ICC colour profile===<br />
<br />
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:<br />
<br />
$ /usr/bin/xcalib -d :0 ~/.color/icc/x200.icc<br />
<br />
===Screen rotation===<br />
{{Note| Commands like [[xmodmap]], xev, showkey, dmesg, setkeycodes can help you. See [[Extra keyboard keys]] for details.}}<br />
<br />
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}}.<br />
<br />
Keycodes can be mapped to hardware buttons during the boot process via a [[systemd]] config file such as the one shown below.<br />
<br />
{{hc|head=/etc/systemd/system/setkeycodes.service|output=<br />
[Unit]<br />
Description=Assign each hardware button to a free keycode on boot<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/bin/setkeycodes 0x67 184 0x6c 185 0x68 186 0x66 187<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
}}<br />
<br />
After successfully mapping a keycode to a hardware button, it can then be utilized with a script similar to the one below.<br />
<br />
{{hc|head=/usr/local/bin/screen_rotation.sh|output=<nowiki><br />
#!/bin/sh<br />
<br />
# Find the line in "xrandr -q --verbose" output that contains current screen orientation and "strip" out current orientation.<br />
rotation="$(xrandr -q --verbose | grep 'connected' | egrep -o '\) (normal|left|inverted|right) \(' | egrep -o '(normal|left|inverted|right)')"<br />
<br />
# Using current screen orientation proceed to rotate screen and input tools.<br />
case "$rotation" in<br />
normal)<br />
# rotate to the left<br />
xrandr -o left<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate ccw<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate ccw<br />
;;<br />
left)<br />
# rotate to normal<br />
xrandr -o normal<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate none<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate none<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
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.<br />
<br />
If you are using another desktop environment (such as [[XFCE]], [[LXDE]], [[Fluxbox]], etc) you can always use the program [[xbindkeys]].<br />
<br />
===Screen auto-rotation===<br />
<br />
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.<br />
<br />
After installing HDAPS, the following configuration file may be created to automate screen rotation:<br />
<br />
{{bc|<nowiki>#!/bin/bash<br />
<br />
# (To have the exact names of these devices you should type the command : xsetwacom --list devices )<br />
stylus="Serial Wacom Tablet stylus" <br />
eraser="Serial Wacom Tablet eraser"<br />
<br />
function rotate {<br />
if [ $# -lt 1 ]; then # error ...<br />
exit 1 <br />
fi<br />
<br />
case "$1" in<br />
up)<br />
nextRotate="none"<br />
nextOrient="normal" ;;<br />
down)<br />
nextRotate="half"<br />
nextOrient="inverted" ;;<br />
right)<br />
nextRotate="ccw"<br />
nextOrient="left" ;;<br />
left)<br />
nextRotate="cw"<br />
nextOrient="right";;<br />
esac<br />
<br />
# Rotate the screen <br />
xrandr -o $nextOrient<br />
<br />
# Rotate the tablet <br />
xsetwacom set "$stylus" Rotate $nextRotate<br />
xsetwacom set "$eraser" Rotate $nextRotate<br />
}<br />
<br />
while true; do<br />
# 1) We extract data about the actual position<br />
position=$(cat /sys/devices/platform/hdaps/position)<br />
x=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\1/p") # most of time contained in [350,650]<br />
y=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\2/p") # most of time contained in [-650,-350]<br />
<br />
# 2) We work out the x value (= left and right inclination) (always between <br />
if [ $x -lt 400 ]; then<br />
rotate left<br />
elif [ $x -gt 600 ]; then<br />
rotate right<br />
fi<br />
<br />
# 3) We work out the y value (= front and back inclination)<br />
if [ $y -gt -400 ]; then<br />
rotate down<br />
elif [ $y -lt -600 ]; then<br />
rotate up<br />
fi<br />
<br />
# 4) wait before checking the value again<br />
sleep 0.5<br />
done<br />
</nowiki>}}<br />
<br />
This script may be executed during startup to further automate the screen rotation process. See [[Autostarting]] for more information on startup automation.<br />
<br />
===Power consumption and fan control===<br />
<br />
{{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.}}<br />
<br />
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].<br />
<br />
Fan-control software can be used to further reduce power consumption. The {{AUR|tpfanco-svn}} package from AUR provides a simplistic GTK GUI for setting up fan activation thresholds based upon the X200's multiple hardware sensors.<br />
<br />
Investigate [[Powertop]] and the {{AUR|powerstat-git}} package from AUR for more information on measuring actual power consumption.<br />
<br />
See [[Power saving]] for additional tips.<br />
<br />
===Suspend to RAM / hibernate ===<br />
<br />
Suspend to ram and hibernation is fully supported. See [[Suspend and hibernate]] for more information. <br />
<br />
===BIOS WiFi-Whitelist Removal===<br />
{{Warning| Modifying the system's firmware can be rewarding but it is also very dangerous. Proceed with caution.}}<br />
<br />
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.<br />
<br />
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].<br />
<br />
Make sure the BIOS version the system is running matches the cracked version being distributed.<br />
<br />
For more information about BIOS flashing and system firmware, please see [[Flashing_BIOS_from_Linux]].<br />
<br />
===Coreboot / Libreboot ===<br />
{{Warning| Modifying the system's firmware can be rewarding but it is also very dangerous. Proceed with caution.}}<br />
<br />
[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].<br />
<br />
For more information on the Libreboot project, see Gluglug's official [http://www.gluglug.org.uk/ website].<br />
<br />
==Troubleshooting==<br />
<br />
=== failed to execute '/usr/sbin/inputattach' ===<br />
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.<br />
<br />
===System feels unresponsive===<br />
If your system feels unresponsive and lagging, you can try creating a file called {{ic|/etc/modprobe.d/drm_kms.conf}}:<br />
<br />
options drm_kms_helper poll=N<br />
<br />
===Backlight fails to activate after system resume ===<br />
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.<br />
<br />
===PM device: Resume from hibernation error: Failed to restore -19===<br />
<br />
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:<br />
<br />
# dmesg | grep 00:0a<br />
[ 0.377877] pnp 00:0a: Plug and Play ACPI device, IDs PNP0c31 (active)<br />
[ 10.746742] tpm_tis 00:0a: 1.2 TPM (device-id 0x1020, rev-id 6)<br />
[ 10.746751] tpm_tis 00:0a: Intel iTPM workaround enabled<br />
[ 10.866734] tpm_tis 00:0a: TPM is disabled/deactivated (0x6)<br />
<br />
To unload the module create the following executable file called {{ic|/usr/lib/systemd/system-sleep/tpm.sh}}, assuming the use of the systemd hibernation procedure:<br />
<br />
#!/bin/sh<br />
case $1/$2 in<br />
pre/*)<br />
echo "Going to $2..."<br />
modprobe -r tpm<br />
modprobe -r tpm_tis<br />
;;<br />
post/*)<br />
echo "Waking up from $2..."<br />
modprobe tpm<br />
modprobe tpm_tis<br />
;;<br />
esac<br />
<br />
=== mei_me 0000:00:03.0: suspend ===<br />
<br />
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].<br />
<br />
=== pciehp 0000:00:1c.1:pcie04: Cannot add device at 0000:03:00 ===<br />
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].<br />
<br />
=== Uhhuh. NMI received for unknown reason 30. ===<br />
The Thinkpad X200 is known to report the following error on resume from hibernation or suspension:<br />
<br />
Uhhuh. NMI received for unknown reason 30.<br />
Dazed and confused, but trying to continue<br />
Do you have a strange power saving mode enabled?<br />
<br />
In this case you can disable the high precision event timer (HPET) by adding "nohpet" to your [[GRUB]] kernel parameter line.<br />
<br />
=== High pitched noises ===<br />
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.<br />
<br />
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.<br />
<br />
For more information see [http://www.thinkwiki.org/wiki/Problem_with_high_pitch_noises].<br />
<br />
==See also==<br />
* Thinkwiki: [http://www.thinkwiki.org/wiki/Category:X200 X200 Overview]<br />
* ThinkWiki: [http://www.thinkwiki.org/wiki/How_to_reduce_power_consumption How to reduce power consumption]<br />
* [https://gist.github.com/yuvadm/52b3f350293a96501478 Example installation procedure for X200s]</div>Jmaneshttps://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X200&diff=369381Lenovo ThinkPad X2002015-04-11T18:06:08Z<p>Jmanes: /* Power consumption and fan control */ Re-written to avoid use of nonacademic wording such as "your" and "you."</p>
<hr />
<div>[[Category:Lenovo]]<br />
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.66GHz), an Intel Graphics Media Accelerator 4500MHD and up to 8GB of RAM whilst still maintaining impressive battery life.<br />
<br />
== Configuration ==<br />
<br />
===Wireless===<br />
<br />
The ThinkPad X200 has a Intel PRO/Wireless 5100/5300 AGN wireless adapter, supported by {{Pkg|linux-firmware}}.<br />
<br />
If you experience connectivity problems such as a slow connection or aborts, especially when connected to a [[WPA2 Enterprise]] network, then try to load the iwlwifi module with the options {{ic|11n_disable&#61;1}}, {{ic|11n_disable&#61;2}}, {{ic|swcrypto&#61;1}}, {{ic|bt_coex_active&#61;0}}. There is no clear recommendation which of these options to be used as for some users {{ic|11n_disable&#61;1}} already solves the problem sufficiently, for others {{ic|bt_coex_active&#61;0}}. See [[Wireless_network_configuration#iwlwifi]] for more detailed instructions.<br />
<br />
===TrackPoint===<br />
<br />
See [[TrackPoint]].<br />
<br />
===Fingerprint Reader===<br />
<br />
The fingerprint reader that is found in the X200/X200T is not supported.<br />
<br />
See [[fprint]] for more information.<br />
<br />
===Disable bluetooth at boot===<br />
<br />
See [[Power saving#Bluetooth]].<br />
<br />
===Hard Disk shock protection===<br />
<br />
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]].<br />
<br />
===Mute button===<br />
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.<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_osi=Linux"<br />
<br />
===Screen calibration===<br />
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.<br />
<br />
# xinput_calibrator --device "Serial Wacom Tablet WACf004 stylus"<br />
<br />
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.<br />
<br />
===Loading the correct ICC colour profile===<br />
<br />
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:<br />
<br />
$ /usr/bin/xcalib -d :0 ~/.color/icc/x200.icc<br />
<br />
===Screen rotation===<br />
{{Note| Commands like [[xmodmap]], xev, showkey, dmesg, setkeycodes can help you. See [[Extra keyboard keys]] for details.}}<br />
<br />
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}}.<br />
<br />
Keycodes can be mapped to hardware buttons during the boot process via a [[systemd]] config file such as the one shown below.<br />
<br />
{{hc|head=/etc/systemd/system/setkeycodes.service|output=<br />
[Unit]<br />
Description=Assign each hardware button to a free keycode on boot<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/bin/setkeycodes 0x67 184 0x6c 185 0x68 186 0x66 187<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
}}<br />
<br />
After successfully mapping a keycode to a hardware button, it can then be utilized with a script similar to the one below.<br />
<br />
{{hc|head=/usr/local/bin/screen_rotation.sh|output=<nowiki><br />
#!/bin/sh<br />
<br />
# Find the line in "xrandr -q --verbose" output that contains current screen orientation and "strip" out current orientation.<br />
rotation="$(xrandr -q --verbose | grep 'connected' | egrep -o '\) (normal|left|inverted|right) \(' | egrep -o '(normal|left|inverted|right)')"<br />
<br />
# Using current screen orientation proceed to rotate screen and input tools.<br />
case "$rotation" in<br />
normal)<br />
# rotate to the left<br />
xrandr -o left<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate ccw<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate ccw<br />
;;<br />
left)<br />
# rotate to normal<br />
xrandr -o normal<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate none<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate none<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
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.<br />
<br />
If you are using another desktop environment (such as [[XFCE]], [[LXDE]], [[Fluxbox]], etc) you can always use the program [[xbindkeys]].<br />
<br />
===Screen auto-rotation===<br />
<br />
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.<br />
<br />
After installing HDAPS, the following configuration file may be created to automate screen rotation:<br />
<br />
{{bc|<nowiki>#!/bin/bash<br />
<br />
# (To have the exact names of these devices you should type the command : xsetwacom --list devices )<br />
stylus="Serial Wacom Tablet stylus" <br />
eraser="Serial Wacom Tablet eraser"<br />
<br />
function rotate {<br />
if [ $# -lt 1 ]; then # error ...<br />
exit 1 <br />
fi<br />
<br />
case "$1" in<br />
up)<br />
nextRotate="none"<br />
nextOrient="normal" ;;<br />
down)<br />
nextRotate="half"<br />
nextOrient="inverted" ;;<br />
right)<br />
nextRotate="ccw"<br />
nextOrient="left" ;;<br />
left)<br />
nextRotate="cw"<br />
nextOrient="right";;<br />
esac<br />
<br />
# Rotate the screen <br />
xrandr -o $nextOrient<br />
<br />
# Rotate the tablet <br />
xsetwacom set "$stylus" Rotate $nextRotate<br />
xsetwacom set "$eraser" Rotate $nextRotate<br />
}<br />
<br />
while true; do<br />
# 1) We extract data about the actual position<br />
position=$(cat /sys/devices/platform/hdaps/position)<br />
x=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\1/p") # most of time contained in [350,650]<br />
y=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\2/p") # most of time contained in [-650,-350]<br />
<br />
# 2) We work out the x value (= left and right inclination) (always between <br />
if [ $x -lt 400 ]; then<br />
rotate left<br />
elif [ $x -gt 600 ]; then<br />
rotate right<br />
fi<br />
<br />
# 3) We work out the y value (= front and back inclination)<br />
if [ $y -gt -400 ]; then<br />
rotate down<br />
elif [ $y -lt -600 ]; then<br />
rotate up<br />
fi<br />
<br />
# 4) wait before checking the value again<br />
sleep 0.5<br />
done<br />
</nowiki>}}<br />
<br />
This script may be executed during startup to further automate the screen rotation process. See [[Autostarting]] for more information on startup automation.<br />
<br />
===Power consumption and fan control===<br />
<br />
{{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.}}<br />
<br />
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].<br />
<br />
Fan-control software can be used to further reduce power consumption. The {{AUR|tpfanco-svn}} package from AUR provides a simplistic GTK GUI for setting up fan activation thresholds based upon the X200's multiple hardware sensors.<br />
<br />
Investigate [[Powertop]] and the {{AUR|powerstat-git}} package from AUR for more information on measuring actual power consumption.<br />
<br />
See [[Power saving]] for additional tips.<br />
<br />
===Suspend to RAM / hibernate ===<br />
<br />
Suspend to ram and hibernation is fully supported. See [[Suspend and hibernate]] for more information. <br />
<br />
===BIOS WiFi-Whitelist Removal===<br />
{{Warning| Modifying the system's firmware can be rewarding but it is also very dangerous. Proceed with caution.}}<br />
<br />
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.<br />
<br />
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].<br />
<br />
Make sure the BIOS version the system is running matches the cracked version being distributed.<br />
<br />
For more information about BIOS flashing and system firmware, please see [[Flashing_BIOS_from_Linux]].<br />
<br />
===Coreboot / Libreboot ===<br />
{{Warning| Modifying the system's firmware can be rewarding but it is also very dangerous. Proceed with caution.}}<br />
<br />
[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].<br />
<br />
For more information on the Libreboot project, see Gluglug's official [http://www.gluglug.org.uk/ website].<br />
<br />
==Troubleshooting==<br />
<br />
=== failed to execute '/usr/sbin/inputattach' ===<br />
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.<br />
<br />
===System feels unresponsive===<br />
If your system feels unresponsive and lagging, you can try creating a file called {{ic|/etc/modprobe.d/drm_kms.conf}}:<br />
<br />
options drm_kms_helper poll=N<br />
<br />
===Backlight fails to activate after system resume ===<br />
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.<br />
<br />
===PM device: Resume from hibernation error: Failed to restore -19===<br />
<br />
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:<br />
<br />
# dmesg | grep 00:0a<br />
[ 0.377877] pnp 00:0a: Plug and Play ACPI device, IDs PNP0c31 (active)<br />
[ 10.746742] tpm_tis 00:0a: 1.2 TPM (device-id 0x1020, rev-id 6)<br />
[ 10.746751] tpm_tis 00:0a: Intel iTPM workaround enabled<br />
[ 10.866734] tpm_tis 00:0a: TPM is disabled/deactivated (0x6)<br />
<br />
To unload the module create the following executable file called {{ic|/usr/lib/systemd/system-sleep/tpm.sh}}, assuming the use of the systemd hibernation procedure:<br />
<br />
#!/bin/sh<br />
case $1/$2 in<br />
pre/*)<br />
echo "Going to $2..."<br />
modprobe -r tpm<br />
modprobe -r tpm_tis<br />
;;<br />
post/*)<br />
echo "Waking up from $2..."<br />
modprobe tpm<br />
modprobe tpm_tis<br />
;;<br />
esac<br />
<br />
=== mei_me 0000:00:03.0: suspend ===<br />
<br />
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].<br />
<br />
=== pciehp 0000:00:1c.1:pcie04: Cannot add device at 0000:03:00 ===<br />
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].<br />
<br />
=== Uhhuh. NMI received for unknown reason 30. ===<br />
The Thinkpad X200 is known to report the following error on resume from hibernation or suspension:<br />
<br />
Uhhuh. NMI received for unknown reason 30.<br />
Dazed and confused, but trying to continue<br />
Do you have a strange power saving mode enabled?<br />
<br />
In this case you can disable the high precision event timer (HPET) by adding "nohpet" to your [[GRUB]] kernel parameter line.<br />
<br />
=== High pitched noises ===<br />
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.<br />
<br />
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.<br />
<br />
For more information see [http://www.thinkwiki.org/wiki/Problem_with_high_pitch_noises].<br />
<br />
==See also==<br />
* Thinkwiki: [http://www.thinkwiki.org/wiki/Category:X200 X200 Overview]<br />
* ThinkWiki: [http://www.thinkwiki.org/wiki/How_to_reduce_power_consumption How to reduce power consumption]<br />
* [https://gist.github.com/yuvadm/52b3f350293a96501478 Example installation procedure for X200s]</div>Jmaneshttps://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X200&diff=369380Lenovo ThinkPad X2002015-04-11T18:03:14Z<p>Jmanes: /* BIOS WiFi-Whitelist Removal */</p>
<hr />
<div>[[Category:Lenovo]]<br />
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.66GHz), an Intel Graphics Media Accelerator 4500MHD and up to 8GB of RAM whilst still maintaining impressive battery life.<br />
<br />
== Configuration ==<br />
<br />
===Wireless===<br />
<br />
The ThinkPad X200 has a Intel PRO/Wireless 5100/5300 AGN wireless adapter, supported by {{Pkg|linux-firmware}}.<br />
<br />
If you experience connectivity problems such as a slow connection or aborts, especially when connected to a [[WPA2 Enterprise]] network, then try to load the iwlwifi module with the options {{ic|11n_disable&#61;1}}, {{ic|11n_disable&#61;2}}, {{ic|swcrypto&#61;1}}, {{ic|bt_coex_active&#61;0}}. There is no clear recommendation which of these options to be used as for some users {{ic|11n_disable&#61;1}} already solves the problem sufficiently, for others {{ic|bt_coex_active&#61;0}}. See [[Wireless_network_configuration#iwlwifi]] for more detailed instructions.<br />
<br />
===TrackPoint===<br />
<br />
See [[TrackPoint]].<br />
<br />
===Fingerprint Reader===<br />
<br />
The fingerprint reader that is found in the X200/X200T is not supported.<br />
<br />
See [[fprint]] for more information.<br />
<br />
===Disable bluetooth at boot===<br />
<br />
See [[Power saving#Bluetooth]].<br />
<br />
===Hard Disk shock protection===<br />
<br />
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]].<br />
<br />
===Mute button===<br />
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.<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_osi=Linux"<br />
<br />
===Screen calibration===<br />
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.<br />
<br />
# xinput_calibrator --device "Serial Wacom Tablet WACf004 stylus"<br />
<br />
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.<br />
<br />
===Loading the correct ICC colour profile===<br />
<br />
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:<br />
<br />
$ /usr/bin/xcalib -d :0 ~/.color/icc/x200.icc<br />
<br />
===Screen rotation===<br />
{{Note| Commands like [[xmodmap]], xev, showkey, dmesg, setkeycodes can help you. See [[Extra keyboard keys]] for details.}}<br />
<br />
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}}.<br />
<br />
Keycodes can be mapped to hardware buttons during the boot process via a [[systemd]] config file such as the one shown below.<br />
<br />
{{hc|head=/etc/systemd/system/setkeycodes.service|output=<br />
[Unit]<br />
Description=Assign each hardware button to a free keycode on boot<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/bin/setkeycodes 0x67 184 0x6c 185 0x68 186 0x66 187<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
}}<br />
<br />
After successfully mapping a keycode to a hardware button, it can then be utilized with a script similar to the one below.<br />
<br />
{{hc|head=/usr/local/bin/screen_rotation.sh|output=<nowiki><br />
#!/bin/sh<br />
<br />
# Find the line in "xrandr -q --verbose" output that contains current screen orientation and "strip" out current orientation.<br />
rotation="$(xrandr -q --verbose | grep 'connected' | egrep -o '\) (normal|left|inverted|right) \(' | egrep -o '(normal|left|inverted|right)')"<br />
<br />
# Using current screen orientation proceed to rotate screen and input tools.<br />
case "$rotation" in<br />
normal)<br />
# rotate to the left<br />
xrandr -o left<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate ccw<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate ccw<br />
;;<br />
left)<br />
# rotate to normal<br />
xrandr -o normal<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate none<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate none<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
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.<br />
<br />
If you are using another desktop environment (such as [[XFCE]], [[LXDE]], [[Fluxbox]], etc) you can always use the program [[xbindkeys]].<br />
<br />
===Screen auto-rotation===<br />
<br />
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.<br />
<br />
After installing HDAPS, the following configuration file may be created to automate screen rotation:<br />
<br />
{{bc|<nowiki>#!/bin/bash<br />
<br />
# (To have the exact names of these devices you should type the command : xsetwacom --list devices )<br />
stylus="Serial Wacom Tablet stylus" <br />
eraser="Serial Wacom Tablet eraser"<br />
<br />
function rotate {<br />
if [ $# -lt 1 ]; then # error ...<br />
exit 1 <br />
fi<br />
<br />
case "$1" in<br />
up)<br />
nextRotate="none"<br />
nextOrient="normal" ;;<br />
down)<br />
nextRotate="half"<br />
nextOrient="inverted" ;;<br />
right)<br />
nextRotate="ccw"<br />
nextOrient="left" ;;<br />
left)<br />
nextRotate="cw"<br />
nextOrient="right";;<br />
esac<br />
<br />
# Rotate the screen <br />
xrandr -o $nextOrient<br />
<br />
# Rotate the tablet <br />
xsetwacom set "$stylus" Rotate $nextRotate<br />
xsetwacom set "$eraser" Rotate $nextRotate<br />
}<br />
<br />
while true; do<br />
# 1) We extract data about the actual position<br />
position=$(cat /sys/devices/platform/hdaps/position)<br />
x=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\1/p") # most of time contained in [350,650]<br />
y=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\2/p") # most of time contained in [-650,-350]<br />
<br />
# 2) We work out the x value (= left and right inclination) (always between <br />
if [ $x -lt 400 ]; then<br />
rotate left<br />
elif [ $x -gt 600 ]; then<br />
rotate right<br />
fi<br />
<br />
# 3) We work out the y value (= front and back inclination)<br />
if [ $y -gt -400 ]; then<br />
rotate down<br />
elif [ $y -lt -600 ]; then<br />
rotate up<br />
fi<br />
<br />
# 4) wait before checking the value again<br />
sleep 0.5<br />
done<br />
</nowiki>}}<br />
<br />
This script may be executed during startup to further automate the screen rotation process. See [[Autostarting]] for more information on startup automation.<br />
<br />
===Power consumption and fan control===<br />
<br />
{{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.}}<br />
<br />
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].<br />
<br />
Fan-control software can be used to further reduce power consumption. The {{AUR|tpfanco-svn}} package from AUR provides a simplistic GTK GUI for setting up fan activation thresholds based upon the X200's multiple hardware sensors.<br />
<br />
To measure your systems power consumption, see [[Powertop]] and the {{AUR|powerstat-git}} package from AUR.<br />
<br />
See [[Power saving]] for additional tips.<br />
<br />
===Suspend to RAM / hibernate ===<br />
<br />
Suspend to ram and hibernation is fully supported. See [[Suspend and hibernate]] for more information. <br />
<br />
===BIOS WiFi-Whitelist Removal===<br />
{{Warning| Modifying the system's firmware can be rewarding but it is also very dangerous. Proceed with caution.}}<br />
<br />
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.<br />
<br />
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].<br />
<br />
Make sure the BIOS version the system is running matches the cracked version being distributed.<br />
<br />
For more information about BIOS flashing and system firmware, please see [[Flashing_BIOS_from_Linux]].<br />
<br />
===Coreboot / Libreboot ===<br />
{{Warning| Modifying the system's firmware can be rewarding but it is also very dangerous. Proceed with caution.}}<br />
<br />
[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].<br />
<br />
For more information on the Libreboot project, see Gluglug's official [http://www.gluglug.org.uk/ website].<br />
<br />
==Troubleshooting==<br />
<br />
=== failed to execute '/usr/sbin/inputattach' ===<br />
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.<br />
<br />
===System feels unresponsive===<br />
If your system feels unresponsive and lagging, you can try creating a file called {{ic|/etc/modprobe.d/drm_kms.conf}}:<br />
<br />
options drm_kms_helper poll=N<br />
<br />
===Backlight fails to activate after system resume ===<br />
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.<br />
<br />
===PM device: Resume from hibernation error: Failed to restore -19===<br />
<br />
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:<br />
<br />
# dmesg | grep 00:0a<br />
[ 0.377877] pnp 00:0a: Plug and Play ACPI device, IDs PNP0c31 (active)<br />
[ 10.746742] tpm_tis 00:0a: 1.2 TPM (device-id 0x1020, rev-id 6)<br />
[ 10.746751] tpm_tis 00:0a: Intel iTPM workaround enabled<br />
[ 10.866734] tpm_tis 00:0a: TPM is disabled/deactivated (0x6)<br />
<br />
To unload the module create the following executable file called {{ic|/usr/lib/systemd/system-sleep/tpm.sh}}, assuming the use of the systemd hibernation procedure:<br />
<br />
#!/bin/sh<br />
case $1/$2 in<br />
pre/*)<br />
echo "Going to $2..."<br />
modprobe -r tpm<br />
modprobe -r tpm_tis<br />
;;<br />
post/*)<br />
echo "Waking up from $2..."<br />
modprobe tpm<br />
modprobe tpm_tis<br />
;;<br />
esac<br />
<br />
=== mei_me 0000:00:03.0: suspend ===<br />
<br />
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].<br />
<br />
=== pciehp 0000:00:1c.1:pcie04: Cannot add device at 0000:03:00 ===<br />
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].<br />
<br />
=== Uhhuh. NMI received for unknown reason 30. ===<br />
The Thinkpad X200 is known to report the following error on resume from hibernation or suspension:<br />
<br />
Uhhuh. NMI received for unknown reason 30.<br />
Dazed and confused, but trying to continue<br />
Do you have a strange power saving mode enabled?<br />
<br />
In this case you can disable the high precision event timer (HPET) by adding "nohpet" to your [[GRUB]] kernel parameter line.<br />
<br />
=== High pitched noises ===<br />
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.<br />
<br />
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.<br />
<br />
For more information see [http://www.thinkwiki.org/wiki/Problem_with_high_pitch_noises].<br />
<br />
==See also==<br />
* Thinkwiki: [http://www.thinkwiki.org/wiki/Category:X200 X200 Overview]<br />
* ThinkWiki: [http://www.thinkwiki.org/wiki/How_to_reduce_power_consumption How to reduce power consumption]<br />
* [https://gist.github.com/yuvadm/52b3f350293a96501478 Example installation procedure for X200s]</div>Jmaneshttps://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X200&diff=369379Lenovo ThinkPad X2002015-04-11T18:03:04Z<p>Jmanes: /* Coreboot / Libreboot */</p>
<hr />
<div>[[Category:Lenovo]]<br />
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.66GHz), an Intel Graphics Media Accelerator 4500MHD and up to 8GB of RAM whilst still maintaining impressive battery life.<br />
<br />
== Configuration ==<br />
<br />
===Wireless===<br />
<br />
The ThinkPad X200 has a Intel PRO/Wireless 5100/5300 AGN wireless adapter, supported by {{Pkg|linux-firmware}}.<br />
<br />
If you experience connectivity problems such as a slow connection or aborts, especially when connected to a [[WPA2 Enterprise]] network, then try to load the iwlwifi module with the options {{ic|11n_disable&#61;1}}, {{ic|11n_disable&#61;2}}, {{ic|swcrypto&#61;1}}, {{ic|bt_coex_active&#61;0}}. There is no clear recommendation which of these options to be used as for some users {{ic|11n_disable&#61;1}} already solves the problem sufficiently, for others {{ic|bt_coex_active&#61;0}}. See [[Wireless_network_configuration#iwlwifi]] for more detailed instructions.<br />
<br />
===TrackPoint===<br />
<br />
See [[TrackPoint]].<br />
<br />
===Fingerprint Reader===<br />
<br />
The fingerprint reader that is found in the X200/X200T is not supported.<br />
<br />
See [[fprint]] for more information.<br />
<br />
===Disable bluetooth at boot===<br />
<br />
See [[Power saving#Bluetooth]].<br />
<br />
===Hard Disk shock protection===<br />
<br />
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]].<br />
<br />
===Mute button===<br />
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.<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_osi=Linux"<br />
<br />
===Screen calibration===<br />
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.<br />
<br />
# xinput_calibrator --device "Serial Wacom Tablet WACf004 stylus"<br />
<br />
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.<br />
<br />
===Loading the correct ICC colour profile===<br />
<br />
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:<br />
<br />
$ /usr/bin/xcalib -d :0 ~/.color/icc/x200.icc<br />
<br />
===Screen rotation===<br />
{{Note| Commands like [[xmodmap]], xev, showkey, dmesg, setkeycodes can help you. See [[Extra keyboard keys]] for details.}}<br />
<br />
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}}.<br />
<br />
Keycodes can be mapped to hardware buttons during the boot process via a [[systemd]] config file such as the one shown below.<br />
<br />
{{hc|head=/etc/systemd/system/setkeycodes.service|output=<br />
[Unit]<br />
Description=Assign each hardware button to a free keycode on boot<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/bin/setkeycodes 0x67 184 0x6c 185 0x68 186 0x66 187<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
}}<br />
<br />
After successfully mapping a keycode to a hardware button, it can then be utilized with a script similar to the one below.<br />
<br />
{{hc|head=/usr/local/bin/screen_rotation.sh|output=<nowiki><br />
#!/bin/sh<br />
<br />
# Find the line in "xrandr -q --verbose" output that contains current screen orientation and "strip" out current orientation.<br />
rotation="$(xrandr -q --verbose | grep 'connected' | egrep -o '\) (normal|left|inverted|right) \(' | egrep -o '(normal|left|inverted|right)')"<br />
<br />
# Using current screen orientation proceed to rotate screen and input tools.<br />
case "$rotation" in<br />
normal)<br />
# rotate to the left<br />
xrandr -o left<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate ccw<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate ccw<br />
;;<br />
left)<br />
# rotate to normal<br />
xrandr -o normal<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate none<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate none<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
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.<br />
<br />
If you are using another desktop environment (such as [[XFCE]], [[LXDE]], [[Fluxbox]], etc) you can always use the program [[xbindkeys]].<br />
<br />
===Screen auto-rotation===<br />
<br />
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.<br />
<br />
After installing HDAPS, the following configuration file may be created to automate screen rotation:<br />
<br />
{{bc|<nowiki>#!/bin/bash<br />
<br />
# (To have the exact names of these devices you should type the command : xsetwacom --list devices )<br />
stylus="Serial Wacom Tablet stylus" <br />
eraser="Serial Wacom Tablet eraser"<br />
<br />
function rotate {<br />
if [ $# -lt 1 ]; then # error ...<br />
exit 1 <br />
fi<br />
<br />
case "$1" in<br />
up)<br />
nextRotate="none"<br />
nextOrient="normal" ;;<br />
down)<br />
nextRotate="half"<br />
nextOrient="inverted" ;;<br />
right)<br />
nextRotate="ccw"<br />
nextOrient="left" ;;<br />
left)<br />
nextRotate="cw"<br />
nextOrient="right";;<br />
esac<br />
<br />
# Rotate the screen <br />
xrandr -o $nextOrient<br />
<br />
# Rotate the tablet <br />
xsetwacom set "$stylus" Rotate $nextRotate<br />
xsetwacom set "$eraser" Rotate $nextRotate<br />
}<br />
<br />
while true; do<br />
# 1) We extract data about the actual position<br />
position=$(cat /sys/devices/platform/hdaps/position)<br />
x=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\1/p") # most of time contained in [350,650]<br />
y=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\2/p") # most of time contained in [-650,-350]<br />
<br />
# 2) We work out the x value (= left and right inclination) (always between <br />
if [ $x -lt 400 ]; then<br />
rotate left<br />
elif [ $x -gt 600 ]; then<br />
rotate right<br />
fi<br />
<br />
# 3) We work out the y value (= front and back inclination)<br />
if [ $y -gt -400 ]; then<br />
rotate down<br />
elif [ $y -lt -600 ]; then<br />
rotate up<br />
fi<br />
<br />
# 4) wait before checking the value again<br />
sleep 0.5<br />
done<br />
</nowiki>}}<br />
<br />
This script may be executed during startup to further automate the screen rotation process. See [[Autostarting]] for more information on startup automation.<br />
<br />
===Power consumption and fan control===<br />
<br />
{{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.}}<br />
<br />
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].<br />
<br />
Fan-control software can be used to further reduce power consumption. The {{AUR|tpfanco-svn}} package from AUR provides a simplistic GTK GUI for setting up fan activation thresholds based upon the X200's multiple hardware sensors.<br />
<br />
To measure your systems power consumption, see [[Powertop]] and the {{AUR|powerstat-git}} package from AUR.<br />
<br />
See [[Power saving]] for additional tips.<br />
<br />
===Suspend to RAM / hibernate ===<br />
<br />
Suspend to ram and hibernation is fully supported. See [[Suspend and hibernate]] for more information. <br />
<br />
===BIOS WiFi-Whitelist Removal===<br />
{{Warning| Modifying the system's firmware can be rewarding but it is also very dangerous. Proceed with caution}}<br />
<br />
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.<br />
<br />
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].<br />
<br />
Make sure the BIOS version the system is running matches the cracked version being distributed.<br />
<br />
For more information about BIOS flashing and system firmware, please see [[Flashing_BIOS_from_Linux]].<br />
<br />
===Coreboot / Libreboot ===<br />
{{Warning| Modifying the system's firmware can be rewarding but it is also very dangerous. Proceed with caution.}}<br />
<br />
[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].<br />
<br />
For more information on the Libreboot project, see Gluglug's official [http://www.gluglug.org.uk/ website].<br />
<br />
==Troubleshooting==<br />
<br />
=== failed to execute '/usr/sbin/inputattach' ===<br />
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.<br />
<br />
===System feels unresponsive===<br />
If your system feels unresponsive and lagging, you can try creating a file called {{ic|/etc/modprobe.d/drm_kms.conf}}:<br />
<br />
options drm_kms_helper poll=N<br />
<br />
===Backlight fails to activate after system resume ===<br />
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.<br />
<br />
===PM device: Resume from hibernation error: Failed to restore -19===<br />
<br />
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:<br />
<br />
# dmesg | grep 00:0a<br />
[ 0.377877] pnp 00:0a: Plug and Play ACPI device, IDs PNP0c31 (active)<br />
[ 10.746742] tpm_tis 00:0a: 1.2 TPM (device-id 0x1020, rev-id 6)<br />
[ 10.746751] tpm_tis 00:0a: Intel iTPM workaround enabled<br />
[ 10.866734] tpm_tis 00:0a: TPM is disabled/deactivated (0x6)<br />
<br />
To unload the module create the following executable file called {{ic|/usr/lib/systemd/system-sleep/tpm.sh}}, assuming the use of the systemd hibernation procedure:<br />
<br />
#!/bin/sh<br />
case $1/$2 in<br />
pre/*)<br />
echo "Going to $2..."<br />
modprobe -r tpm<br />
modprobe -r tpm_tis<br />
;;<br />
post/*)<br />
echo "Waking up from $2..."<br />
modprobe tpm<br />
modprobe tpm_tis<br />
;;<br />
esac<br />
<br />
=== mei_me 0000:00:03.0: suspend ===<br />
<br />
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].<br />
<br />
=== pciehp 0000:00:1c.1:pcie04: Cannot add device at 0000:03:00 ===<br />
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].<br />
<br />
=== Uhhuh. NMI received for unknown reason 30. ===<br />
The Thinkpad X200 is known to report the following error on resume from hibernation or suspension:<br />
<br />
Uhhuh. NMI received for unknown reason 30.<br />
Dazed and confused, but trying to continue<br />
Do you have a strange power saving mode enabled?<br />
<br />
In this case you can disable the high precision event timer (HPET) by adding "nohpet" to your [[GRUB]] kernel parameter line.<br />
<br />
=== High pitched noises ===<br />
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.<br />
<br />
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.<br />
<br />
For more information see [http://www.thinkwiki.org/wiki/Problem_with_high_pitch_noises].<br />
<br />
==See also==<br />
* Thinkwiki: [http://www.thinkwiki.org/wiki/Category:X200 X200 Overview]<br />
* ThinkWiki: [http://www.thinkwiki.org/wiki/How_to_reduce_power_consumption How to reduce power consumption]<br />
* [https://gist.github.com/yuvadm/52b3f350293a96501478 Example installation procedure for X200s]</div>Jmaneshttps://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X200&diff=369378Lenovo ThinkPad X2002015-04-11T18:02:48Z<p>Jmanes: /* BIOS WiFi-Whitelist Removal */</p>
<hr />
<div>[[Category:Lenovo]]<br />
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.66GHz), an Intel Graphics Media Accelerator 4500MHD and up to 8GB of RAM whilst still maintaining impressive battery life.<br />
<br />
== Configuration ==<br />
<br />
===Wireless===<br />
<br />
The ThinkPad X200 has a Intel PRO/Wireless 5100/5300 AGN wireless adapter, supported by {{Pkg|linux-firmware}}.<br />
<br />
If you experience connectivity problems such as a slow connection or aborts, especially when connected to a [[WPA2 Enterprise]] network, then try to load the iwlwifi module with the options {{ic|11n_disable&#61;1}}, {{ic|11n_disable&#61;2}}, {{ic|swcrypto&#61;1}}, {{ic|bt_coex_active&#61;0}}. There is no clear recommendation which of these options to be used as for some users {{ic|11n_disable&#61;1}} already solves the problem sufficiently, for others {{ic|bt_coex_active&#61;0}}. See [[Wireless_network_configuration#iwlwifi]] for more detailed instructions.<br />
<br />
===TrackPoint===<br />
<br />
See [[TrackPoint]].<br />
<br />
===Fingerprint Reader===<br />
<br />
The fingerprint reader that is found in the X200/X200T is not supported.<br />
<br />
See [[fprint]] for more information.<br />
<br />
===Disable bluetooth at boot===<br />
<br />
See [[Power saving#Bluetooth]].<br />
<br />
===Hard Disk shock protection===<br />
<br />
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]].<br />
<br />
===Mute button===<br />
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.<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_osi=Linux"<br />
<br />
===Screen calibration===<br />
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.<br />
<br />
# xinput_calibrator --device "Serial Wacom Tablet WACf004 stylus"<br />
<br />
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.<br />
<br />
===Loading the correct ICC colour profile===<br />
<br />
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:<br />
<br />
$ /usr/bin/xcalib -d :0 ~/.color/icc/x200.icc<br />
<br />
===Screen rotation===<br />
{{Note| Commands like [[xmodmap]], xev, showkey, dmesg, setkeycodes can help you. See [[Extra keyboard keys]] for details.}}<br />
<br />
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}}.<br />
<br />
Keycodes can be mapped to hardware buttons during the boot process via a [[systemd]] config file such as the one shown below.<br />
<br />
{{hc|head=/etc/systemd/system/setkeycodes.service|output=<br />
[Unit]<br />
Description=Assign each hardware button to a free keycode on boot<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/bin/setkeycodes 0x67 184 0x6c 185 0x68 186 0x66 187<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
}}<br />
<br />
After successfully mapping a keycode to a hardware button, it can then be utilized with a script similar to the one below.<br />
<br />
{{hc|head=/usr/local/bin/screen_rotation.sh|output=<nowiki><br />
#!/bin/sh<br />
<br />
# Find the line in "xrandr -q --verbose" output that contains current screen orientation and "strip" out current orientation.<br />
rotation="$(xrandr -q --verbose | grep 'connected' | egrep -o '\) (normal|left|inverted|right) \(' | egrep -o '(normal|left|inverted|right)')"<br />
<br />
# Using current screen orientation proceed to rotate screen and input tools.<br />
case "$rotation" in<br />
normal)<br />
# rotate to the left<br />
xrandr -o left<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate ccw<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate ccw<br />
;;<br />
left)<br />
# rotate to normal<br />
xrandr -o normal<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate none<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate none<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
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.<br />
<br />
If you are using another desktop environment (such as [[XFCE]], [[LXDE]], [[Fluxbox]], etc) you can always use the program [[xbindkeys]].<br />
<br />
===Screen auto-rotation===<br />
<br />
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.<br />
<br />
After installing HDAPS, the following configuration file may be created to automate screen rotation:<br />
<br />
{{bc|<nowiki>#!/bin/bash<br />
<br />
# (To have the exact names of these devices you should type the command : xsetwacom --list devices )<br />
stylus="Serial Wacom Tablet stylus" <br />
eraser="Serial Wacom Tablet eraser"<br />
<br />
function rotate {<br />
if [ $# -lt 1 ]; then # error ...<br />
exit 1 <br />
fi<br />
<br />
case "$1" in<br />
up)<br />
nextRotate="none"<br />
nextOrient="normal" ;;<br />
down)<br />
nextRotate="half"<br />
nextOrient="inverted" ;;<br />
right)<br />
nextRotate="ccw"<br />
nextOrient="left" ;;<br />
left)<br />
nextRotate="cw"<br />
nextOrient="right";;<br />
esac<br />
<br />
# Rotate the screen <br />
xrandr -o $nextOrient<br />
<br />
# Rotate the tablet <br />
xsetwacom set "$stylus" Rotate $nextRotate<br />
xsetwacom set "$eraser" Rotate $nextRotate<br />
}<br />
<br />
while true; do<br />
# 1) We extract data about the actual position<br />
position=$(cat /sys/devices/platform/hdaps/position)<br />
x=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\1/p") # most of time contained in [350,650]<br />
y=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\2/p") # most of time contained in [-650,-350]<br />
<br />
# 2) We work out the x value (= left and right inclination) (always between <br />
if [ $x -lt 400 ]; then<br />
rotate left<br />
elif [ $x -gt 600 ]; then<br />
rotate right<br />
fi<br />
<br />
# 3) We work out the y value (= front and back inclination)<br />
if [ $y -gt -400 ]; then<br />
rotate down<br />
elif [ $y -lt -600 ]; then<br />
rotate up<br />
fi<br />
<br />
# 4) wait before checking the value again<br />
sleep 0.5<br />
done<br />
</nowiki>}}<br />
<br />
This script may be executed during startup to further automate the screen rotation process. See [[Autostarting]] for more information on startup automation.<br />
<br />
===Power consumption and fan control===<br />
<br />
{{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.}}<br />
<br />
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].<br />
<br />
Fan-control software can be used to further reduce power consumption. The {{AUR|tpfanco-svn}} package from AUR provides a simplistic GTK GUI for setting up fan activation thresholds based upon the X200's multiple hardware sensors.<br />
<br />
To measure your systems power consumption, see [[Powertop]] and the {{AUR|powerstat-git}} package from AUR.<br />
<br />
See [[Power saving]] for additional tips.<br />
<br />
===Suspend to RAM / hibernate ===<br />
<br />
Suspend to ram and hibernation is fully supported. See [[Suspend and hibernate]] for more information. <br />
<br />
===BIOS WiFi-Whitelist Removal===<br />
{{Warning| Modifying the system's firmware can be rewarding but it is also very dangerous. Proceed with caution}}<br />
<br />
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.<br />
<br />
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].<br />
<br />
Make sure the BIOS version the system is running matches the cracked version being distributed.<br />
<br />
For more information about BIOS flashing and system firmware, please see [[Flashing_BIOS_from_Linux]].<br />
<br />
===Coreboot / Libreboot ===<br />
{{Warning| Modifying the system's firmware can be rewarding but it is also very dangerous. Please do not modify your system's firmware unless you know what you are doing.}}<br />
<br />
[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].<br />
<br />
For more information on the Libreboot project, see Gluglug's official [http://www.gluglug.org.uk/ website].<br />
<br />
==Troubleshooting==<br />
<br />
=== failed to execute '/usr/sbin/inputattach' ===<br />
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.<br />
<br />
===System feels unresponsive===<br />
If your system feels unresponsive and lagging, you can try creating a file called {{ic|/etc/modprobe.d/drm_kms.conf}}:<br />
<br />
options drm_kms_helper poll=N<br />
<br />
===Backlight fails to activate after system resume ===<br />
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.<br />
<br />
===PM device: Resume from hibernation error: Failed to restore -19===<br />
<br />
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:<br />
<br />
# dmesg | grep 00:0a<br />
[ 0.377877] pnp 00:0a: Plug and Play ACPI device, IDs PNP0c31 (active)<br />
[ 10.746742] tpm_tis 00:0a: 1.2 TPM (device-id 0x1020, rev-id 6)<br />
[ 10.746751] tpm_tis 00:0a: Intel iTPM workaround enabled<br />
[ 10.866734] tpm_tis 00:0a: TPM is disabled/deactivated (0x6)<br />
<br />
To unload the module create the following executable file called {{ic|/usr/lib/systemd/system-sleep/tpm.sh}}, assuming the use of the systemd hibernation procedure:<br />
<br />
#!/bin/sh<br />
case $1/$2 in<br />
pre/*)<br />
echo "Going to $2..."<br />
modprobe -r tpm<br />
modprobe -r tpm_tis<br />
;;<br />
post/*)<br />
echo "Waking up from $2..."<br />
modprobe tpm<br />
modprobe tpm_tis<br />
;;<br />
esac<br />
<br />
=== mei_me 0000:00:03.0: suspend ===<br />
<br />
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].<br />
<br />
=== pciehp 0000:00:1c.1:pcie04: Cannot add device at 0000:03:00 ===<br />
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].<br />
<br />
=== Uhhuh. NMI received for unknown reason 30. ===<br />
The Thinkpad X200 is known to report the following error on resume from hibernation or suspension:<br />
<br />
Uhhuh. NMI received for unknown reason 30.<br />
Dazed and confused, but trying to continue<br />
Do you have a strange power saving mode enabled?<br />
<br />
In this case you can disable the high precision event timer (HPET) by adding "nohpet" to your [[GRUB]] kernel parameter line.<br />
<br />
=== High pitched noises ===<br />
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.<br />
<br />
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.<br />
<br />
For more information see [http://www.thinkwiki.org/wiki/Problem_with_high_pitch_noises].<br />
<br />
==See also==<br />
* Thinkwiki: [http://www.thinkwiki.org/wiki/Category:X200 X200 Overview]<br />
* ThinkWiki: [http://www.thinkwiki.org/wiki/How_to_reduce_power_consumption How to reduce power consumption]<br />
* [https://gist.github.com/yuvadm/52b3f350293a96501478 Example installation procedure for X200s]</div>Jmaneshttps://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X200&diff=369377Lenovo ThinkPad X2002015-04-11T18:01:35Z<p>Jmanes: /* Coreboot / Libreboot */ Re-written to avoid use of nonacademic wording such as "your" and "you."</p>
<hr />
<div>[[Category:Lenovo]]<br />
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.66GHz), an Intel Graphics Media Accelerator 4500MHD and up to 8GB of RAM whilst still maintaining impressive battery life.<br />
<br />
== Configuration ==<br />
<br />
===Wireless===<br />
<br />
The ThinkPad X200 has a Intel PRO/Wireless 5100/5300 AGN wireless adapter, supported by {{Pkg|linux-firmware}}.<br />
<br />
If you experience connectivity problems such as a slow connection or aborts, especially when connected to a [[WPA2 Enterprise]] network, then try to load the iwlwifi module with the options {{ic|11n_disable&#61;1}}, {{ic|11n_disable&#61;2}}, {{ic|swcrypto&#61;1}}, {{ic|bt_coex_active&#61;0}}. There is no clear recommendation which of these options to be used as for some users {{ic|11n_disable&#61;1}} already solves the problem sufficiently, for others {{ic|bt_coex_active&#61;0}}. See [[Wireless_network_configuration#iwlwifi]] for more detailed instructions.<br />
<br />
===TrackPoint===<br />
<br />
See [[TrackPoint]].<br />
<br />
===Fingerprint Reader===<br />
<br />
The fingerprint reader that is found in the X200/X200T is not supported.<br />
<br />
See [[fprint]] for more information.<br />
<br />
===Disable bluetooth at boot===<br />
<br />
See [[Power saving#Bluetooth]].<br />
<br />
===Hard Disk shock protection===<br />
<br />
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]].<br />
<br />
===Mute button===<br />
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.<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_osi=Linux"<br />
<br />
===Screen calibration===<br />
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.<br />
<br />
# xinput_calibrator --device "Serial Wacom Tablet WACf004 stylus"<br />
<br />
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.<br />
<br />
===Loading the correct ICC colour profile===<br />
<br />
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:<br />
<br />
$ /usr/bin/xcalib -d :0 ~/.color/icc/x200.icc<br />
<br />
===Screen rotation===<br />
{{Note| Commands like [[xmodmap]], xev, showkey, dmesg, setkeycodes can help you. See [[Extra keyboard keys]] for details.}}<br />
<br />
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}}.<br />
<br />
Keycodes can be mapped to hardware buttons during the boot process via a [[systemd]] config file such as the one shown below.<br />
<br />
{{hc|head=/etc/systemd/system/setkeycodes.service|output=<br />
[Unit]<br />
Description=Assign each hardware button to a free keycode on boot<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/bin/setkeycodes 0x67 184 0x6c 185 0x68 186 0x66 187<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
}}<br />
<br />
After successfully mapping a keycode to a hardware button, it can then be utilized with a script similar to the one below.<br />
<br />
{{hc|head=/usr/local/bin/screen_rotation.sh|output=<nowiki><br />
#!/bin/sh<br />
<br />
# Find the line in "xrandr -q --verbose" output that contains current screen orientation and "strip" out current orientation.<br />
rotation="$(xrandr -q --verbose | grep 'connected' | egrep -o '\) (normal|left|inverted|right) \(' | egrep -o '(normal|left|inverted|right)')"<br />
<br />
# Using current screen orientation proceed to rotate screen and input tools.<br />
case "$rotation" in<br />
normal)<br />
# rotate to the left<br />
xrandr -o left<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate ccw<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate ccw<br />
;;<br />
left)<br />
# rotate to normal<br />
xrandr -o normal<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate none<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate none<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
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.<br />
<br />
If you are using another desktop environment (such as [[XFCE]], [[LXDE]], [[Fluxbox]], etc) you can always use the program [[xbindkeys]].<br />
<br />
===Screen auto-rotation===<br />
<br />
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.<br />
<br />
After installing HDAPS, the following configuration file may be created to automate screen rotation:<br />
<br />
{{bc|<nowiki>#!/bin/bash<br />
<br />
# (To have the exact names of these devices you should type the command : xsetwacom --list devices )<br />
stylus="Serial Wacom Tablet stylus" <br />
eraser="Serial Wacom Tablet eraser"<br />
<br />
function rotate {<br />
if [ $# -lt 1 ]; then # error ...<br />
exit 1 <br />
fi<br />
<br />
case "$1" in<br />
up)<br />
nextRotate="none"<br />
nextOrient="normal" ;;<br />
down)<br />
nextRotate="half"<br />
nextOrient="inverted" ;;<br />
right)<br />
nextRotate="ccw"<br />
nextOrient="left" ;;<br />
left)<br />
nextRotate="cw"<br />
nextOrient="right";;<br />
esac<br />
<br />
# Rotate the screen <br />
xrandr -o $nextOrient<br />
<br />
# Rotate the tablet <br />
xsetwacom set "$stylus" Rotate $nextRotate<br />
xsetwacom set "$eraser" Rotate $nextRotate<br />
}<br />
<br />
while true; do<br />
# 1) We extract data about the actual position<br />
position=$(cat /sys/devices/platform/hdaps/position)<br />
x=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\1/p") # most of time contained in [350,650]<br />
y=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\2/p") # most of time contained in [-650,-350]<br />
<br />
# 2) We work out the x value (= left and right inclination) (always between <br />
if [ $x -lt 400 ]; then<br />
rotate left<br />
elif [ $x -gt 600 ]; then<br />
rotate right<br />
fi<br />
<br />
# 3) We work out the y value (= front and back inclination)<br />
if [ $y -gt -400 ]; then<br />
rotate down<br />
elif [ $y -lt -600 ]; then<br />
rotate up<br />
fi<br />
<br />
# 4) wait before checking the value again<br />
sleep 0.5<br />
done<br />
</nowiki>}}<br />
<br />
This script may be executed during startup to further automate the screen rotation process. See [[Autostarting]] for more information on startup automation.<br />
<br />
===Power consumption and fan control===<br />
<br />
{{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.}}<br />
<br />
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].<br />
<br />
Fan-control software can be used to further reduce power consumption. The {{AUR|tpfanco-svn}} package from AUR provides a simplistic GTK GUI for setting up fan activation thresholds based upon the X200's multiple hardware sensors.<br />
<br />
To measure your systems power consumption, see [[Powertop]] and the {{AUR|powerstat-git}} package from AUR.<br />
<br />
See [[Power saving]] for additional tips.<br />
<br />
===Suspend to RAM / hibernate ===<br />
<br />
Suspend to ram and hibernation is fully supported. See [[Suspend and hibernate]] for more information. <br />
<br />
===BIOS WiFi-Whitelist Removal===<br />
{{Warning| Modifying the system's firmware can be rewarding but it is also very dangerous. Please do not modify your system's firmware unless you know what you are doing.}}<br />
<br />
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.<br />
<br />
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].<br />
<br />
Make sure the BIOS version the system is running matches the cracked version being distributed.<br />
<br />
For more information about BIOS flashing and system firmware, please see [[Flashing_BIOS_from_Linux]].<br />
<br />
===Coreboot / Libreboot ===<br />
{{Warning| Modifying the system's firmware can be rewarding but it is also very dangerous. Please do not modify your system's firmware unless you know what you are doing.}}<br />
<br />
[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].<br />
<br />
For more information on the Libreboot project, see Gluglug's official [http://www.gluglug.org.uk/ website].<br />
<br />
==Troubleshooting==<br />
<br />
=== failed to execute '/usr/sbin/inputattach' ===<br />
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.<br />
<br />
===System feels unresponsive===<br />
If your system feels unresponsive and lagging, you can try creating a file called {{ic|/etc/modprobe.d/drm_kms.conf}}:<br />
<br />
options drm_kms_helper poll=N<br />
<br />
===Backlight fails to activate after system resume ===<br />
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.<br />
<br />
===PM device: Resume from hibernation error: Failed to restore -19===<br />
<br />
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:<br />
<br />
# dmesg | grep 00:0a<br />
[ 0.377877] pnp 00:0a: Plug and Play ACPI device, IDs PNP0c31 (active)<br />
[ 10.746742] tpm_tis 00:0a: 1.2 TPM (device-id 0x1020, rev-id 6)<br />
[ 10.746751] tpm_tis 00:0a: Intel iTPM workaround enabled<br />
[ 10.866734] tpm_tis 00:0a: TPM is disabled/deactivated (0x6)<br />
<br />
To unload the module create the following executable file called {{ic|/usr/lib/systemd/system-sleep/tpm.sh}}, assuming the use of the systemd hibernation procedure:<br />
<br />
#!/bin/sh<br />
case $1/$2 in<br />
pre/*)<br />
echo "Going to $2..."<br />
modprobe -r tpm<br />
modprobe -r tpm_tis<br />
;;<br />
post/*)<br />
echo "Waking up from $2..."<br />
modprobe tpm<br />
modprobe tpm_tis<br />
;;<br />
esac<br />
<br />
=== mei_me 0000:00:03.0: suspend ===<br />
<br />
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].<br />
<br />
=== pciehp 0000:00:1c.1:pcie04: Cannot add device at 0000:03:00 ===<br />
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].<br />
<br />
=== Uhhuh. NMI received for unknown reason 30. ===<br />
The Thinkpad X200 is known to report the following error on resume from hibernation or suspension:<br />
<br />
Uhhuh. NMI received for unknown reason 30.<br />
Dazed and confused, but trying to continue<br />
Do you have a strange power saving mode enabled?<br />
<br />
In this case you can disable the high precision event timer (HPET) by adding "nohpet" to your [[GRUB]] kernel parameter line.<br />
<br />
=== High pitched noises ===<br />
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.<br />
<br />
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.<br />
<br />
For more information see [http://www.thinkwiki.org/wiki/Problem_with_high_pitch_noises].<br />
<br />
==See also==<br />
* Thinkwiki: [http://www.thinkwiki.org/wiki/Category:X200 X200 Overview]<br />
* ThinkWiki: [http://www.thinkwiki.org/wiki/How_to_reduce_power_consumption How to reduce power consumption]<br />
* [https://gist.github.com/yuvadm/52b3f350293a96501478 Example installation procedure for X200s]</div>Jmaneshttps://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X200&diff=369376Lenovo ThinkPad X2002015-04-11T18:01:23Z<p>Jmanes: /* BIOS WiFi-Whitelist Removal */ Re-written to avoid use of nonacademic wording such as "your" and "you."</p>
<hr />
<div>[[Category:Lenovo]]<br />
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.66GHz), an Intel Graphics Media Accelerator 4500MHD and up to 8GB of RAM whilst still maintaining impressive battery life.<br />
<br />
== Configuration ==<br />
<br />
===Wireless===<br />
<br />
The ThinkPad X200 has a Intel PRO/Wireless 5100/5300 AGN wireless adapter, supported by {{Pkg|linux-firmware}}.<br />
<br />
If you experience connectivity problems such as a slow connection or aborts, especially when connected to a [[WPA2 Enterprise]] network, then try to load the iwlwifi module with the options {{ic|11n_disable&#61;1}}, {{ic|11n_disable&#61;2}}, {{ic|swcrypto&#61;1}}, {{ic|bt_coex_active&#61;0}}. There is no clear recommendation which of these options to be used as for some users {{ic|11n_disable&#61;1}} already solves the problem sufficiently, for others {{ic|bt_coex_active&#61;0}}. See [[Wireless_network_configuration#iwlwifi]] for more detailed instructions.<br />
<br />
===TrackPoint===<br />
<br />
See [[TrackPoint]].<br />
<br />
===Fingerprint Reader===<br />
<br />
The fingerprint reader that is found in the X200/X200T is not supported.<br />
<br />
See [[fprint]] for more information.<br />
<br />
===Disable bluetooth at boot===<br />
<br />
See [[Power saving#Bluetooth]].<br />
<br />
===Hard Disk shock protection===<br />
<br />
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]].<br />
<br />
===Mute button===<br />
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.<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_osi=Linux"<br />
<br />
===Screen calibration===<br />
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.<br />
<br />
# xinput_calibrator --device "Serial Wacom Tablet WACf004 stylus"<br />
<br />
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.<br />
<br />
===Loading the correct ICC colour profile===<br />
<br />
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:<br />
<br />
$ /usr/bin/xcalib -d :0 ~/.color/icc/x200.icc<br />
<br />
===Screen rotation===<br />
{{Note| Commands like [[xmodmap]], xev, showkey, dmesg, setkeycodes can help you. See [[Extra keyboard keys]] for details.}}<br />
<br />
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}}.<br />
<br />
Keycodes can be mapped to hardware buttons during the boot process via a [[systemd]] config file such as the one shown below.<br />
<br />
{{hc|head=/etc/systemd/system/setkeycodes.service|output=<br />
[Unit]<br />
Description=Assign each hardware button to a free keycode on boot<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/bin/setkeycodes 0x67 184 0x6c 185 0x68 186 0x66 187<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
}}<br />
<br />
After successfully mapping a keycode to a hardware button, it can then be utilized with a script similar to the one below.<br />
<br />
{{hc|head=/usr/local/bin/screen_rotation.sh|output=<nowiki><br />
#!/bin/sh<br />
<br />
# Find the line in "xrandr -q --verbose" output that contains current screen orientation and "strip" out current orientation.<br />
rotation="$(xrandr -q --verbose | grep 'connected' | egrep -o '\) (normal|left|inverted|right) \(' | egrep -o '(normal|left|inverted|right)')"<br />
<br />
# Using current screen orientation proceed to rotate screen and input tools.<br />
case "$rotation" in<br />
normal)<br />
# rotate to the left<br />
xrandr -o left<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate ccw<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate ccw<br />
;;<br />
left)<br />
# rotate to normal<br />
xrandr -o normal<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate none<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate none<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
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.<br />
<br />
If you are using another desktop environment (such as [[XFCE]], [[LXDE]], [[Fluxbox]], etc) you can always use the program [[xbindkeys]].<br />
<br />
===Screen auto-rotation===<br />
<br />
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.<br />
<br />
After installing HDAPS, the following configuration file may be created to automate screen rotation:<br />
<br />
{{bc|<nowiki>#!/bin/bash<br />
<br />
# (To have the exact names of these devices you should type the command : xsetwacom --list devices )<br />
stylus="Serial Wacom Tablet stylus" <br />
eraser="Serial Wacom Tablet eraser"<br />
<br />
function rotate {<br />
if [ $# -lt 1 ]; then # error ...<br />
exit 1 <br />
fi<br />
<br />
case "$1" in<br />
up)<br />
nextRotate="none"<br />
nextOrient="normal" ;;<br />
down)<br />
nextRotate="half"<br />
nextOrient="inverted" ;;<br />
right)<br />
nextRotate="ccw"<br />
nextOrient="left" ;;<br />
left)<br />
nextRotate="cw"<br />
nextOrient="right";;<br />
esac<br />
<br />
# Rotate the screen <br />
xrandr -o $nextOrient<br />
<br />
# Rotate the tablet <br />
xsetwacom set "$stylus" Rotate $nextRotate<br />
xsetwacom set "$eraser" Rotate $nextRotate<br />
}<br />
<br />
while true; do<br />
# 1) We extract data about the actual position<br />
position=$(cat /sys/devices/platform/hdaps/position)<br />
x=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\1/p") # most of time contained in [350,650]<br />
y=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\2/p") # most of time contained in [-650,-350]<br />
<br />
# 2) We work out the x value (= left and right inclination) (always between <br />
if [ $x -lt 400 ]; then<br />
rotate left<br />
elif [ $x -gt 600 ]; then<br />
rotate right<br />
fi<br />
<br />
# 3) We work out the y value (= front and back inclination)<br />
if [ $y -gt -400 ]; then<br />
rotate down<br />
elif [ $y -lt -600 ]; then<br />
rotate up<br />
fi<br />
<br />
# 4) wait before checking the value again<br />
sleep 0.5<br />
done<br />
</nowiki>}}<br />
<br />
This script may be executed during startup to further automate the screen rotation process. See [[Autostarting]] for more information on startup automation.<br />
<br />
===Power consumption and fan control===<br />
<br />
{{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.}}<br />
<br />
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].<br />
<br />
Fan-control software can be used to further reduce power consumption. The {{AUR|tpfanco-svn}} package from AUR provides a simplistic GTK GUI for setting up fan activation thresholds based upon the X200's multiple hardware sensors.<br />
<br />
To measure your systems power consumption, see [[Powertop]] and the {{AUR|powerstat-git}} package from AUR.<br />
<br />
See [[Power saving]] for additional tips.<br />
<br />
===Suspend to RAM / hibernate ===<br />
<br />
Suspend to ram and hibernation is fully supported. See [[Suspend and hibernate]] for more information. <br />
<br />
===BIOS WiFi-Whitelist Removal===<br />
{{Warning| Modifying the system's firmware can be rewarding but it is also very dangerous. Please do not modify your system's firmware unless you know what you are doing.}}<br />
<br />
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.<br />
<br />
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].<br />
<br />
Make sure the BIOS version the system is running matches the cracked version being distributed.<br />
<br />
For more information about BIOS flashing and system firmware, please see [[Flashing_BIOS_from_Linux]].<br />
<br />
===Coreboot / Libreboot ===<br />
{{Warning| Modifying your system's firmware can be rewarding but it is also very dangerous. Please do not modify your system's firmware unless you know what you are doing.}}<br />
<br />
[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].<br />
<br />
For more information on the Libreboot project, see Gluglug's official [http://www.gluglug.org.uk/ website].<br />
<br />
==Troubleshooting==<br />
<br />
=== failed to execute '/usr/sbin/inputattach' ===<br />
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.<br />
<br />
===System feels unresponsive===<br />
If your system feels unresponsive and lagging, you can try creating a file called {{ic|/etc/modprobe.d/drm_kms.conf}}:<br />
<br />
options drm_kms_helper poll=N<br />
<br />
===Backlight fails to activate after system resume ===<br />
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.<br />
<br />
===PM device: Resume from hibernation error: Failed to restore -19===<br />
<br />
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:<br />
<br />
# dmesg | grep 00:0a<br />
[ 0.377877] pnp 00:0a: Plug and Play ACPI device, IDs PNP0c31 (active)<br />
[ 10.746742] tpm_tis 00:0a: 1.2 TPM (device-id 0x1020, rev-id 6)<br />
[ 10.746751] tpm_tis 00:0a: Intel iTPM workaround enabled<br />
[ 10.866734] tpm_tis 00:0a: TPM is disabled/deactivated (0x6)<br />
<br />
To unload the module create the following executable file called {{ic|/usr/lib/systemd/system-sleep/tpm.sh}}, assuming the use of the systemd hibernation procedure:<br />
<br />
#!/bin/sh<br />
case $1/$2 in<br />
pre/*)<br />
echo "Going to $2..."<br />
modprobe -r tpm<br />
modprobe -r tpm_tis<br />
;;<br />
post/*)<br />
echo "Waking up from $2..."<br />
modprobe tpm<br />
modprobe tpm_tis<br />
;;<br />
esac<br />
<br />
=== mei_me 0000:00:03.0: suspend ===<br />
<br />
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].<br />
<br />
=== pciehp 0000:00:1c.1:pcie04: Cannot add device at 0000:03:00 ===<br />
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].<br />
<br />
=== Uhhuh. NMI received for unknown reason 30. ===<br />
The Thinkpad X200 is known to report the following error on resume from hibernation or suspension:<br />
<br />
Uhhuh. NMI received for unknown reason 30.<br />
Dazed and confused, but trying to continue<br />
Do you have a strange power saving mode enabled?<br />
<br />
In this case you can disable the high precision event timer (HPET) by adding "nohpet" to your [[GRUB]] kernel parameter line.<br />
<br />
=== High pitched noises ===<br />
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.<br />
<br />
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.<br />
<br />
For more information see [http://www.thinkwiki.org/wiki/Problem_with_high_pitch_noises].<br />
<br />
==See also==<br />
* Thinkwiki: [http://www.thinkwiki.org/wiki/Category:X200 X200 Overview]<br />
* ThinkWiki: [http://www.thinkwiki.org/wiki/How_to_reduce_power_consumption How to reduce power consumption]<br />
* [https://gist.github.com/yuvadm/52b3f350293a96501478 Example installation procedure for X200s]</div>Jmaneshttps://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X200&diff=369375Lenovo ThinkPad X2002015-04-11T18:00:59Z<p>Jmanes: /* Screen auto-rotation */ Re-written to avoid use of nonacademic wording such as "your" and "you."</p>
<hr />
<div>[[Category:Lenovo]]<br />
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.66GHz), an Intel Graphics Media Accelerator 4500MHD and up to 8GB of RAM whilst still maintaining impressive battery life.<br />
<br />
== Configuration ==<br />
<br />
===Wireless===<br />
<br />
The ThinkPad X200 has a Intel PRO/Wireless 5100/5300 AGN wireless adapter, supported by {{Pkg|linux-firmware}}.<br />
<br />
If you experience connectivity problems such as a slow connection or aborts, especially when connected to a [[WPA2 Enterprise]] network, then try to load the iwlwifi module with the options {{ic|11n_disable&#61;1}}, {{ic|11n_disable&#61;2}}, {{ic|swcrypto&#61;1}}, {{ic|bt_coex_active&#61;0}}. There is no clear recommendation which of these options to be used as for some users {{ic|11n_disable&#61;1}} already solves the problem sufficiently, for others {{ic|bt_coex_active&#61;0}}. See [[Wireless_network_configuration#iwlwifi]] for more detailed instructions.<br />
<br />
===TrackPoint===<br />
<br />
See [[TrackPoint]].<br />
<br />
===Fingerprint Reader===<br />
<br />
The fingerprint reader that is found in the X200/X200T is not supported.<br />
<br />
See [[fprint]] for more information.<br />
<br />
===Disable bluetooth at boot===<br />
<br />
See [[Power saving#Bluetooth]].<br />
<br />
===Hard Disk shock protection===<br />
<br />
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]].<br />
<br />
===Mute button===<br />
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.<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_osi=Linux"<br />
<br />
===Screen calibration===<br />
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.<br />
<br />
# xinput_calibrator --device "Serial Wacom Tablet WACf004 stylus"<br />
<br />
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.<br />
<br />
===Loading the correct ICC colour profile===<br />
<br />
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:<br />
<br />
$ /usr/bin/xcalib -d :0 ~/.color/icc/x200.icc<br />
<br />
===Screen rotation===<br />
{{Note| Commands like [[xmodmap]], xev, showkey, dmesg, setkeycodes can help you. See [[Extra keyboard keys]] for details.}}<br />
<br />
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}}.<br />
<br />
Keycodes can be mapped to hardware buttons during the boot process via a [[systemd]] config file such as the one shown below.<br />
<br />
{{hc|head=/etc/systemd/system/setkeycodes.service|output=<br />
[Unit]<br />
Description=Assign each hardware button to a free keycode on boot<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/bin/setkeycodes 0x67 184 0x6c 185 0x68 186 0x66 187<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
}}<br />
<br />
After successfully mapping a keycode to a hardware button, it can then be utilized with a script similar to the one below.<br />
<br />
{{hc|head=/usr/local/bin/screen_rotation.sh|output=<nowiki><br />
#!/bin/sh<br />
<br />
# Find the line in "xrandr -q --verbose" output that contains current screen orientation and "strip" out current orientation.<br />
rotation="$(xrandr -q --verbose | grep 'connected' | egrep -o '\) (normal|left|inverted|right) \(' | egrep -o '(normal|left|inverted|right)')"<br />
<br />
# Using current screen orientation proceed to rotate screen and input tools.<br />
case "$rotation" in<br />
normal)<br />
# rotate to the left<br />
xrandr -o left<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate ccw<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate ccw<br />
;;<br />
left)<br />
# rotate to normal<br />
xrandr -o normal<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate none<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate none<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
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.<br />
<br />
If you are using another desktop environment (such as [[XFCE]], [[LXDE]], [[Fluxbox]], etc) you can always use the program [[xbindkeys]].<br />
<br />
===Screen auto-rotation===<br />
<br />
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.<br />
<br />
After installing HDAPS, the following configuration file may be created to automate screen rotation:<br />
<br />
{{bc|<nowiki>#!/bin/bash<br />
<br />
# (To have the exact names of these devices you should type the command : xsetwacom --list devices )<br />
stylus="Serial Wacom Tablet stylus" <br />
eraser="Serial Wacom Tablet eraser"<br />
<br />
function rotate {<br />
if [ $# -lt 1 ]; then # error ...<br />
exit 1 <br />
fi<br />
<br />
case "$1" in<br />
up)<br />
nextRotate="none"<br />
nextOrient="normal" ;;<br />
down)<br />
nextRotate="half"<br />
nextOrient="inverted" ;;<br />
right)<br />
nextRotate="ccw"<br />
nextOrient="left" ;;<br />
left)<br />
nextRotate="cw"<br />
nextOrient="right";;<br />
esac<br />
<br />
# Rotate the screen <br />
xrandr -o $nextOrient<br />
<br />
# Rotate the tablet <br />
xsetwacom set "$stylus" Rotate $nextRotate<br />
xsetwacom set "$eraser" Rotate $nextRotate<br />
}<br />
<br />
while true; do<br />
# 1) We extract data about the actual position<br />
position=$(cat /sys/devices/platform/hdaps/position)<br />
x=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\1/p") # most of time contained in [350,650]<br />
y=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\2/p") # most of time contained in [-650,-350]<br />
<br />
# 2) We work out the x value (= left and right inclination) (always between <br />
if [ $x -lt 400 ]; then<br />
rotate left<br />
elif [ $x -gt 600 ]; then<br />
rotate right<br />
fi<br />
<br />
# 3) We work out the y value (= front and back inclination)<br />
if [ $y -gt -400 ]; then<br />
rotate down<br />
elif [ $y -lt -600 ]; then<br />
rotate up<br />
fi<br />
<br />
# 4) wait before checking the value again<br />
sleep 0.5<br />
done<br />
</nowiki>}}<br />
<br />
This script may be executed during startup to further automate the screen rotation process. See [[Autostarting]] for more information on startup automation.<br />
<br />
===Power consumption and fan control===<br />
<br />
{{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.}}<br />
<br />
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].<br />
<br />
Fan-control software can be used to further reduce power consumption. The {{AUR|tpfanco-svn}} package from AUR provides a simplistic GTK GUI for setting up fan activation thresholds based upon the X200's multiple hardware sensors.<br />
<br />
To measure your systems power consumption, see [[Powertop]] and the {{AUR|powerstat-git}} package from AUR.<br />
<br />
See [[Power saving]] for additional tips.<br />
<br />
===Suspend to RAM / hibernate ===<br />
<br />
Suspend to ram and hibernation is fully supported. See [[Suspend and hibernate]] for more information. <br />
<br />
===BIOS WiFi-Whitelist Removal===<br />
{{Warning| Modifying your system's firmware can be rewarding but it is also very dangerous. Please do not modify your system's firmware unless you know what you are doing.}}<br />
<br />
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.<br />
<br />
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].<br />
<br />
Make sure the BIOS version the system is running matches the cracked version being distributed.<br />
<br />
For more information about BIOS flashing and system firmware, please see [[Flashing_BIOS_from_Linux]].<br />
<br />
===Coreboot / Libreboot ===<br />
{{Warning| Modifying your system's firmware can be rewarding but it is also very dangerous. Please do not modify your system's firmware unless you know what you are doing.}}<br />
<br />
[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].<br />
<br />
For more information on the Libreboot project, see Gluglug's official [http://www.gluglug.org.uk/ website].<br />
<br />
==Troubleshooting==<br />
<br />
=== failed to execute '/usr/sbin/inputattach' ===<br />
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.<br />
<br />
===System feels unresponsive===<br />
If your system feels unresponsive and lagging, you can try creating a file called {{ic|/etc/modprobe.d/drm_kms.conf}}:<br />
<br />
options drm_kms_helper poll=N<br />
<br />
===Backlight fails to activate after system resume ===<br />
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.<br />
<br />
===PM device: Resume from hibernation error: Failed to restore -19===<br />
<br />
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:<br />
<br />
# dmesg | grep 00:0a<br />
[ 0.377877] pnp 00:0a: Plug and Play ACPI device, IDs PNP0c31 (active)<br />
[ 10.746742] tpm_tis 00:0a: 1.2 TPM (device-id 0x1020, rev-id 6)<br />
[ 10.746751] tpm_tis 00:0a: Intel iTPM workaround enabled<br />
[ 10.866734] tpm_tis 00:0a: TPM is disabled/deactivated (0x6)<br />
<br />
To unload the module create the following executable file called {{ic|/usr/lib/systemd/system-sleep/tpm.sh}}, assuming the use of the systemd hibernation procedure:<br />
<br />
#!/bin/sh<br />
case $1/$2 in<br />
pre/*)<br />
echo "Going to $2..."<br />
modprobe -r tpm<br />
modprobe -r tpm_tis<br />
;;<br />
post/*)<br />
echo "Waking up from $2..."<br />
modprobe tpm<br />
modprobe tpm_tis<br />
;;<br />
esac<br />
<br />
=== mei_me 0000:00:03.0: suspend ===<br />
<br />
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].<br />
<br />
=== pciehp 0000:00:1c.1:pcie04: Cannot add device at 0000:03:00 ===<br />
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].<br />
<br />
=== Uhhuh. NMI received for unknown reason 30. ===<br />
The Thinkpad X200 is known to report the following error on resume from hibernation or suspension:<br />
<br />
Uhhuh. NMI received for unknown reason 30.<br />
Dazed and confused, but trying to continue<br />
Do you have a strange power saving mode enabled?<br />
<br />
In this case you can disable the high precision event timer (HPET) by adding "nohpet" to your [[GRUB]] kernel parameter line.<br />
<br />
=== High pitched noises ===<br />
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.<br />
<br />
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.<br />
<br />
For more information see [http://www.thinkwiki.org/wiki/Problem_with_high_pitch_noises].<br />
<br />
==See also==<br />
* Thinkwiki: [http://www.thinkwiki.org/wiki/Category:X200 X200 Overview]<br />
* ThinkWiki: [http://www.thinkwiki.org/wiki/How_to_reduce_power_consumption How to reduce power consumption]<br />
* [https://gist.github.com/yuvadm/52b3f350293a96501478 Example installation procedure for X200s]</div>Jmaneshttps://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X200&diff=369374Lenovo ThinkPad X2002015-04-11T17:45:59Z<p>Jmanes: /* Screen calibration */ Rewritten in third person. Avoiding words such as "your" or "you."</p>
<hr />
<div>[[Category:Lenovo]]<br />
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.66GHz), an Intel Graphics Media Accelerator 4500MHD and up to 8GB of RAM whilst still maintaining impressive battery life.<br />
<br />
== Configuration ==<br />
<br />
===Wireless===<br />
<br />
The ThinkPad X200 has a Intel PRO/Wireless 5100/5300 AGN wireless adapter, supported by {{Pkg|linux-firmware}}.<br />
<br />
If you experience connectivity problems such as a slow connection or aborts, especially when connected to a [[WPA2 Enterprise]] network, then try to load the iwlwifi module with the options {{ic|11n_disable&#61;1}}, {{ic|11n_disable&#61;2}}, {{ic|swcrypto&#61;1}}, {{ic|bt_coex_active&#61;0}}. There is no clear recommendation which of these options to be used as for some users {{ic|11n_disable&#61;1}} already solves the problem sufficiently, for others {{ic|bt_coex_active&#61;0}}. See [[Wireless_network_configuration#iwlwifi]] for more detailed instructions.<br />
<br />
===TrackPoint===<br />
<br />
See [[TrackPoint]].<br />
<br />
===Fingerprint Reader===<br />
<br />
The fingerprint reader that is found in the X200/X200T is not supported.<br />
<br />
See [[fprint]] for more information.<br />
<br />
===Disable bluetooth at boot===<br />
<br />
See [[Power saving#Bluetooth]].<br />
<br />
===Hard Disk shock protection===<br />
<br />
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]].<br />
<br />
===Mute button===<br />
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.<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_osi=Linux"<br />
<br />
===Screen calibration===<br />
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.<br />
<br />
# xinput_calibrator --device "Serial Wacom Tablet WACf004 stylus"<br />
<br />
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.<br />
<br />
===Loading the correct ICC colour profile===<br />
<br />
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:<br />
<br />
$ /usr/bin/xcalib -d :0 ~/.color/icc/x200.icc<br />
<br />
===Screen rotation===<br />
{{Note| Commands like [[xmodmap]], xev, showkey, dmesg, setkeycodes can help you. See [[Extra keyboard keys]] for details.}}<br />
<br />
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}}.<br />
<br />
Keycodes can be mapped to hardware buttons during the boot process via a [[systemd]] config file such as the one shown below.<br />
<br />
{{hc|head=/etc/systemd/system/setkeycodes.service|output=<br />
[Unit]<br />
Description=Assign each hardware button to a free keycode on boot<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/bin/setkeycodes 0x67 184 0x6c 185 0x68 186 0x66 187<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
}}<br />
<br />
After successfully mapping a keycode to a hardware button, it can then be utilized with a script similar to the one below.<br />
<br />
{{hc|head=/usr/local/bin/screen_rotation.sh|output=<nowiki><br />
#!/bin/sh<br />
<br />
# Find the line in "xrandr -q --verbose" output that contains current screen orientation and "strip" out current orientation.<br />
rotation="$(xrandr -q --verbose | grep 'connected' | egrep -o '\) (normal|left|inverted|right) \(' | egrep -o '(normal|left|inverted|right)')"<br />
<br />
# Using current screen orientation proceed to rotate screen and input tools.<br />
case "$rotation" in<br />
normal)<br />
# rotate to the left<br />
xrandr -o left<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate ccw<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate ccw<br />
;;<br />
left)<br />
# rotate to normal<br />
xrandr -o normal<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate none<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate none<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
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.<br />
<br />
If you are using another desktop environment (such as [[XFCE]], [[LXDE]], [[Fluxbox]], etc) you can always use the program [[xbindkeys]].<br />
<br />
===Screen auto-rotation===<br />
<br />
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.<br />
Then the following script will enable you to use the accelerometer's data to automatically rotate your screen :<br />
<br />
{{bc|<nowiki>#!/bin/bash<br />
<br />
# (To have the exact names of these devices you should type the command : xsetwacom --list devices )<br />
stylus="Serial Wacom Tablet stylus" <br />
eraser="Serial Wacom Tablet eraser"<br />
<br />
function rotate {<br />
if [ $# -lt 1 ]; then # error ...<br />
exit 1 <br />
fi<br />
<br />
case "$1" in<br />
up)<br />
nextRotate="none"<br />
nextOrient="normal" ;;<br />
down)<br />
nextRotate="half"<br />
nextOrient="inverted" ;;<br />
right)<br />
nextRotate="ccw"<br />
nextOrient="left" ;;<br />
left)<br />
nextRotate="cw"<br />
nextOrient="right";;<br />
esac<br />
<br />
# Rotate the screen <br />
xrandr -o $nextOrient<br />
<br />
# Rotate the tablet <br />
xsetwacom set "$stylus" Rotate $nextRotate<br />
xsetwacom set "$eraser" Rotate $nextRotate<br />
}<br />
<br />
while true; do<br />
# 1) We extract data about the actual position<br />
position=$(cat /sys/devices/platform/hdaps/position)<br />
x=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\1/p") # most of time contained in [350,650]<br />
y=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\2/p") # most of time contained in [-650,-350]<br />
<br />
# 2) We work out the x value (= left and right inclination) (always between <br />
if [ $x -lt 400 ]; then<br />
rotate left<br />
elif [ $x -gt 600 ]; then<br />
rotate right<br />
fi<br />
<br />
# 3) We work out the y value (= front and back inclination)<br />
if [ $y -gt -400 ]; then<br />
rotate down<br />
elif [ $y -lt -600 ]; then<br />
rotate up<br />
fi<br />
<br />
# 4) wait before checking the value again<br />
sleep 0.5<br />
done<br />
</nowiki>}}<br />
<br />
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).<br />
<br />
===Power consumption and fan control===<br />
<br />
{{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.}}<br />
<br />
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].<br />
<br />
Fan-control software can be used to further reduce power consumption. The {{AUR|tpfanco-svn}} package from AUR provides a simplistic GTK GUI for setting up fan activation thresholds based upon the X200's multiple hardware sensors.<br />
<br />
To measure your systems power consumption, see [[Powertop]] and the {{AUR|powerstat-git}} package from AUR.<br />
<br />
See [[Power saving]] for additional tips.<br />
<br />
===Suspend to RAM / hibernate ===<br />
<br />
Suspend to ram and hibernation is fully supported. See [[Suspend and hibernate]] for more information. <br />
<br />
===BIOS WiFi-Whitelist Removal===<br />
{{Warning| Modifying your system's firmware can be rewarding but it is also very dangerous. Please do not modify your system's firmware unless you know what you are doing.}}<br />
<br />
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.<br />
<br />
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].<br />
<br />
Make sure the BIOS version the system is running matches the cracked version being distributed.<br />
<br />
For more information about BIOS flashing and system firmware, please see [[Flashing_BIOS_from_Linux]].<br />
<br />
===Coreboot / Libreboot ===<br />
{{Warning| Modifying your system's firmware can be rewarding but it is also very dangerous. Please do not modify your system's firmware unless you know what you are doing.}}<br />
<br />
[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].<br />
<br />
For more information on the Libreboot project, see Gluglug's official [http://www.gluglug.org.uk/ website].<br />
<br />
==Troubleshooting==<br />
<br />
=== failed to execute '/usr/sbin/inputattach' ===<br />
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.<br />
<br />
===System feels unresponsive===<br />
If your system feels unresponsive and lagging, you can try creating a file called {{ic|/etc/modprobe.d/drm_kms.conf}}:<br />
<br />
options drm_kms_helper poll=N<br />
<br />
===Backlight fails to activate after system resume ===<br />
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.<br />
<br />
===PM device: Resume from hibernation error: Failed to restore -19===<br />
<br />
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:<br />
<br />
# dmesg | grep 00:0a<br />
[ 0.377877] pnp 00:0a: Plug and Play ACPI device, IDs PNP0c31 (active)<br />
[ 10.746742] tpm_tis 00:0a: 1.2 TPM (device-id 0x1020, rev-id 6)<br />
[ 10.746751] tpm_tis 00:0a: Intel iTPM workaround enabled<br />
[ 10.866734] tpm_tis 00:0a: TPM is disabled/deactivated (0x6)<br />
<br />
To unload the module create the following executable file called {{ic|/usr/lib/systemd/system-sleep/tpm.sh}}, assuming the use of the systemd hibernation procedure:<br />
<br />
#!/bin/sh<br />
case $1/$2 in<br />
pre/*)<br />
echo "Going to $2..."<br />
modprobe -r tpm<br />
modprobe -r tpm_tis<br />
;;<br />
post/*)<br />
echo "Waking up from $2..."<br />
modprobe tpm<br />
modprobe tpm_tis<br />
;;<br />
esac<br />
<br />
=== mei_me 0000:00:03.0: suspend ===<br />
<br />
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].<br />
<br />
=== pciehp 0000:00:1c.1:pcie04: Cannot add device at 0000:03:00 ===<br />
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].<br />
<br />
=== Uhhuh. NMI received for unknown reason 30. ===<br />
The Thinkpad X200 is known to report the following error on resume from hibernation or suspension:<br />
<br />
Uhhuh. NMI received for unknown reason 30.<br />
Dazed and confused, but trying to continue<br />
Do you have a strange power saving mode enabled?<br />
<br />
In this case you can disable the high precision event timer (HPET) by adding "nohpet" to your [[GRUB]] kernel parameter line.<br />
<br />
=== High pitched noises ===<br />
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.<br />
<br />
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.<br />
<br />
For more information see [http://www.thinkwiki.org/wiki/Problem_with_high_pitch_noises].<br />
<br />
==See also==<br />
* Thinkwiki: [http://www.thinkwiki.org/wiki/Category:X200 X200 Overview]<br />
* ThinkWiki: [http://www.thinkwiki.org/wiki/How_to_reduce_power_consumption How to reduce power consumption]<br />
* [https://gist.github.com/yuvadm/52b3f350293a96501478 Example installation procedure for X200s]</div>Jmaneshttps://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X200&diff=369373Lenovo ThinkPad X2002015-04-11T17:41:19Z<p>Jmanes: /* Mute button */ Rewritten in third person. Avoiding words such as "your" or "you."</p>
<hr />
<div>[[Category:Lenovo]]<br />
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.66GHz), an Intel Graphics Media Accelerator 4500MHD and up to 8GB of RAM whilst still maintaining impressive battery life.<br />
<br />
== Configuration ==<br />
<br />
===Wireless===<br />
<br />
The ThinkPad X200 has a Intel PRO/Wireless 5100/5300 AGN wireless adapter, supported by {{Pkg|linux-firmware}}.<br />
<br />
If you experience connectivity problems such as a slow connection or aborts, especially when connected to a [[WPA2 Enterprise]] network, then try to load the iwlwifi module with the options {{ic|11n_disable&#61;1}}, {{ic|11n_disable&#61;2}}, {{ic|swcrypto&#61;1}}, {{ic|bt_coex_active&#61;0}}. There is no clear recommendation which of these options to be used as for some users {{ic|11n_disable&#61;1}} already solves the problem sufficiently, for others {{ic|bt_coex_active&#61;0}}. See [[Wireless_network_configuration#iwlwifi]] for more detailed instructions.<br />
<br />
===TrackPoint===<br />
<br />
See [[TrackPoint]].<br />
<br />
===Fingerprint Reader===<br />
<br />
The fingerprint reader that is found in the X200/X200T is not supported.<br />
<br />
See [[fprint]] for more information.<br />
<br />
===Disable bluetooth at boot===<br />
<br />
See [[Power saving#Bluetooth]].<br />
<br />
===Hard Disk shock protection===<br />
<br />
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]].<br />
<br />
===Mute button===<br />
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.<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_osi=Linux"<br />
<br />
===Screen calibration===<br />
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:<br />
<br />
# xinput_calibrator --device "Serial Wacom Tablet WACf004 stylus"<br />
<br />
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.<br />
<br />
===Loading the correct ICC colour profile===<br />
<br />
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:<br />
<br />
$ /usr/bin/xcalib -d :0 ~/.color/icc/x200.icc<br />
<br />
===Screen rotation===<br />
{{Note| Commands like [[xmodmap]], xev, showkey, dmesg, setkeycodes can help you. See [[Extra keyboard keys]] for details.}}<br />
<br />
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}}.<br />
<br />
Keycodes can be mapped to hardware buttons during the boot process via a [[systemd]] config file such as the one shown below.<br />
<br />
{{hc|head=/etc/systemd/system/setkeycodes.service|output=<br />
[Unit]<br />
Description=Assign each hardware button to a free keycode on boot<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/bin/setkeycodes 0x67 184 0x6c 185 0x68 186 0x66 187<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
}}<br />
<br />
After successfully mapping a keycode to a hardware button, it can then be utilized with a script similar to the one below.<br />
<br />
{{hc|head=/usr/local/bin/screen_rotation.sh|output=<nowiki><br />
#!/bin/sh<br />
<br />
# Find the line in "xrandr -q --verbose" output that contains current screen orientation and "strip" out current orientation.<br />
rotation="$(xrandr -q --verbose | grep 'connected' | egrep -o '\) (normal|left|inverted|right) \(' | egrep -o '(normal|left|inverted|right)')"<br />
<br />
# Using current screen orientation proceed to rotate screen and input tools.<br />
case "$rotation" in<br />
normal)<br />
# rotate to the left<br />
xrandr -o left<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate ccw<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate ccw<br />
;;<br />
left)<br />
# rotate to normal<br />
xrandr -o normal<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate none<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate none<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
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.<br />
<br />
If you are using another desktop environment (such as [[XFCE]], [[LXDE]], [[Fluxbox]], etc) you can always use the program [[xbindkeys]].<br />
<br />
===Screen auto-rotation===<br />
<br />
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.<br />
Then the following script will enable you to use the accelerometer's data to automatically rotate your screen :<br />
<br />
{{bc|<nowiki>#!/bin/bash<br />
<br />
# (To have the exact names of these devices you should type the command : xsetwacom --list devices )<br />
stylus="Serial Wacom Tablet stylus" <br />
eraser="Serial Wacom Tablet eraser"<br />
<br />
function rotate {<br />
if [ $# -lt 1 ]; then # error ...<br />
exit 1 <br />
fi<br />
<br />
case "$1" in<br />
up)<br />
nextRotate="none"<br />
nextOrient="normal" ;;<br />
down)<br />
nextRotate="half"<br />
nextOrient="inverted" ;;<br />
right)<br />
nextRotate="ccw"<br />
nextOrient="left" ;;<br />
left)<br />
nextRotate="cw"<br />
nextOrient="right";;<br />
esac<br />
<br />
# Rotate the screen <br />
xrandr -o $nextOrient<br />
<br />
# Rotate the tablet <br />
xsetwacom set "$stylus" Rotate $nextRotate<br />
xsetwacom set "$eraser" Rotate $nextRotate<br />
}<br />
<br />
while true; do<br />
# 1) We extract data about the actual position<br />
position=$(cat /sys/devices/platform/hdaps/position)<br />
x=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\1/p") # most of time contained in [350,650]<br />
y=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\2/p") # most of time contained in [-650,-350]<br />
<br />
# 2) We work out the x value (= left and right inclination) (always between <br />
if [ $x -lt 400 ]; then<br />
rotate left<br />
elif [ $x -gt 600 ]; then<br />
rotate right<br />
fi<br />
<br />
# 3) We work out the y value (= front and back inclination)<br />
if [ $y -gt -400 ]; then<br />
rotate down<br />
elif [ $y -lt -600 ]; then<br />
rotate up<br />
fi<br />
<br />
# 4) wait before checking the value again<br />
sleep 0.5<br />
done<br />
</nowiki>}}<br />
<br />
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).<br />
<br />
===Power consumption and fan control===<br />
<br />
{{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.}}<br />
<br />
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].<br />
<br />
Fan-control software can be used to further reduce power consumption. The {{AUR|tpfanco-svn}} package from AUR provides a simplistic GTK GUI for setting up fan activation thresholds based upon the X200's multiple hardware sensors.<br />
<br />
To measure your systems power consumption, see [[Powertop]] and the {{AUR|powerstat-git}} package from AUR.<br />
<br />
See [[Power saving]] for additional tips.<br />
<br />
===Suspend to RAM / hibernate ===<br />
<br />
Suspend to ram and hibernation is fully supported. See [[Suspend and hibernate]] for more information. <br />
<br />
===BIOS WiFi-Whitelist Removal===<br />
{{Warning| Modifying your system's firmware can be rewarding but it is also very dangerous. Please do not modify your system's firmware unless you know what you are doing.}}<br />
<br />
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.<br />
<br />
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].<br />
<br />
Make sure the BIOS version the system is running matches the cracked version being distributed.<br />
<br />
For more information about BIOS flashing and system firmware, please see [[Flashing_BIOS_from_Linux]].<br />
<br />
===Coreboot / Libreboot ===<br />
{{Warning| Modifying your system's firmware can be rewarding but it is also very dangerous. Please do not modify your system's firmware unless you know what you are doing.}}<br />
<br />
[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].<br />
<br />
For more information on the Libreboot project, see Gluglug's official [http://www.gluglug.org.uk/ website].<br />
<br />
==Troubleshooting==<br />
<br />
=== failed to execute '/usr/sbin/inputattach' ===<br />
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.<br />
<br />
===System feels unresponsive===<br />
If your system feels unresponsive and lagging, you can try creating a file called {{ic|/etc/modprobe.d/drm_kms.conf}}:<br />
<br />
options drm_kms_helper poll=N<br />
<br />
===Backlight fails to activate after system resume ===<br />
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.<br />
<br />
===PM device: Resume from hibernation error: Failed to restore -19===<br />
<br />
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:<br />
<br />
# dmesg | grep 00:0a<br />
[ 0.377877] pnp 00:0a: Plug and Play ACPI device, IDs PNP0c31 (active)<br />
[ 10.746742] tpm_tis 00:0a: 1.2 TPM (device-id 0x1020, rev-id 6)<br />
[ 10.746751] tpm_tis 00:0a: Intel iTPM workaround enabled<br />
[ 10.866734] tpm_tis 00:0a: TPM is disabled/deactivated (0x6)<br />
<br />
To unload the module create the following executable file called {{ic|/usr/lib/systemd/system-sleep/tpm.sh}}, assuming the use of the systemd hibernation procedure:<br />
<br />
#!/bin/sh<br />
case $1/$2 in<br />
pre/*)<br />
echo "Going to $2..."<br />
modprobe -r tpm<br />
modprobe -r tpm_tis<br />
;;<br />
post/*)<br />
echo "Waking up from $2..."<br />
modprobe tpm<br />
modprobe tpm_tis<br />
;;<br />
esac<br />
<br />
=== mei_me 0000:00:03.0: suspend ===<br />
<br />
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].<br />
<br />
=== pciehp 0000:00:1c.1:pcie04: Cannot add device at 0000:03:00 ===<br />
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].<br />
<br />
=== Uhhuh. NMI received for unknown reason 30. ===<br />
The Thinkpad X200 is known to report the following error on resume from hibernation or suspension:<br />
<br />
Uhhuh. NMI received for unknown reason 30.<br />
Dazed and confused, but trying to continue<br />
Do you have a strange power saving mode enabled?<br />
<br />
In this case you can disable the high precision event timer (HPET) by adding "nohpet" to your [[GRUB]] kernel parameter line.<br />
<br />
=== High pitched noises ===<br />
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.<br />
<br />
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.<br />
<br />
For more information see [http://www.thinkwiki.org/wiki/Problem_with_high_pitch_noises].<br />
<br />
==See also==<br />
* Thinkwiki: [http://www.thinkwiki.org/wiki/Category:X200 X200 Overview]<br />
* ThinkWiki: [http://www.thinkwiki.org/wiki/How_to_reduce_power_consumption How to reduce power consumption]<br />
* [https://gist.github.com/yuvadm/52b3f350293a96501478 Example installation procedure for X200s]</div>Jmaneshttps://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X200&diff=368430Lenovo ThinkPad X2002015-04-03T22:23:57Z<p>Jmanes: /* High pitched noises */ Re-wrote sentence in third person.</p>
<hr />
<div>[[Category:Lenovo]]<br />
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.66GHz), an Intel Graphics Media Accelerator 4500MHD and up to 8GB of RAM whilst still maintaining impressive battery life.<br />
<br />
== Configuration ==<br />
<br />
===Wireless===<br />
<br />
The ThinkPad X200 has a Intel PRO/Wireless 5100/5300 AGN wireless adapter, supported by {{Pkg|linux-firmware}}.<br />
<br />
If you experience connectivity problems such as a slow connection or aborts, especially when connected to a [[WPA2 Enterprise]] network, then try to load the iwlwifi module with the options {{ic|11n_disable&#61;1}}, {{ic|11n_disable&#61;2}}, {{ic|swcrypto&#61;1}}, {{ic|bt_coex_active&#61;0}}. There is no clear recommendation which of these options to be used as for some users {{ic|11n_disable&#61;1}} already solves the problem sufficiently, for others {{ic|bt_coex_active&#61;0}}. See [[Wireless_network_configuration#iwlwifi]] for more detailed instructions.<br />
<br />
===TrackPoint===<br />
<br />
See [[TrackPoint]].<br />
<br />
===Fingerprint Reader===<br />
<br />
The fingerprint reader that is found in the X200/X200T is not supported.<br />
<br />
See [[fprint]] for more information.<br />
<br />
===Disable bluetooth at boot===<br />
<br />
See [[Power saving#Bluetooth]].<br />
<br />
===Hard Disk shock protection===<br />
<br />
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]].<br />
<br />
===Mute button===<br />
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.<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_osi=Linux"<br />
<br />
===Screen calibration===<br />
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:<br />
<br />
# xinput_calibrator --device "Serial Wacom Tablet WACf004 stylus"<br />
<br />
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.<br />
<br />
===Loading the correct ICC colour profile===<br />
<br />
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:<br />
<br />
$ /usr/bin/xcalib -d :0 ~/.color/icc/x200.icc<br />
<br />
===Screen rotation===<br />
{{Note| Commands like [[xmodmap]], xev, showkey, dmesg, setkeycodes can help you. See [[Extra keyboard keys]] for details.}}<br />
<br />
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}}.<br />
<br />
Keycodes can be mapped to hardware buttons during the boot process via a [[systemd]] config file such as the one shown below.<br />
<br />
{{hc|head=/etc/systemd/system/setkeycodes.service|output=<br />
[Unit]<br />
Description=Assign each hardware button to a free keycode on boot<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/bin/setkeycodes 0x67 184 0x6c 185 0x68 186 0x66 187<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
}}<br />
<br />
After successfully mapping a keycode to a hardware button, it can then be utilized with a script similar to the one below.<br />
<br />
{{hc|head=/usr/local/bin/screen_rotation.sh|output=<nowiki><br />
#!/bin/sh<br />
<br />
# Find the line in "xrandr -q --verbose" output that contains current screen orientation and "strip" out current orientation.<br />
rotation="$(xrandr -q --verbose | grep 'connected' | egrep -o '\) (normal|left|inverted|right) \(' | egrep -o '(normal|left|inverted|right)')"<br />
<br />
# Using current screen orientation proceed to rotate screen and input tools.<br />
case "$rotation" in<br />
normal)<br />
# rotate to the left<br />
xrandr -o left<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate ccw<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate ccw<br />
;;<br />
left)<br />
# rotate to normal<br />
xrandr -o normal<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate none<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate none<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
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.<br />
<br />
If you are using another desktop environment (such as [[XFCE]], [[LXDE]], [[Fluxbox]], etc) you can always use the program [[xbindkeys]].<br />
<br />
===Screen auto-rotation===<br />
<br />
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.<br />
Then the following script will enable you to use the accelerometer's data to automatically rotate your screen :<br />
<br />
{{bc|<nowiki>#!/bin/bash<br />
<br />
# (To have the exact names of these devices you should type the command : xsetwacom --list devices )<br />
stylus="Serial Wacom Tablet stylus" <br />
eraser="Serial Wacom Tablet eraser"<br />
<br />
function rotate {<br />
if [ $# -lt 1 ]; then # error ...<br />
exit 1 <br />
fi<br />
<br />
case "$1" in<br />
up)<br />
nextRotate="none"<br />
nextOrient="normal" ;;<br />
down)<br />
nextRotate="half"<br />
nextOrient="inverted" ;;<br />
right)<br />
nextRotate="ccw"<br />
nextOrient="left" ;;<br />
left)<br />
nextRotate="cw"<br />
nextOrient="right";;<br />
esac<br />
<br />
# Rotate the screen <br />
xrandr -o $nextOrient<br />
<br />
# Rotate the tablet <br />
xsetwacom set "$stylus" Rotate $nextRotate<br />
xsetwacom set "$eraser" Rotate $nextRotate<br />
}<br />
<br />
while true; do<br />
# 1) We extract data about the actual position<br />
position=$(cat /sys/devices/platform/hdaps/position)<br />
x=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\1/p") # most of time contained in [350,650]<br />
y=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\2/p") # most of time contained in [-650,-350]<br />
<br />
# 2) We work out the x value (= left and right inclination) (always between <br />
if [ $x -lt 400 ]; then<br />
rotate left<br />
elif [ $x -gt 600 ]; then<br />
rotate right<br />
fi<br />
<br />
# 3) We work out the y value (= front and back inclination)<br />
if [ $y -gt -400 ]; then<br />
rotate down<br />
elif [ $y -lt -600 ]; then<br />
rotate up<br />
fi<br />
<br />
# 4) wait before checking the value again<br />
sleep 0.5<br />
done<br />
</nowiki>}}<br />
<br />
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).<br />
<br />
===Power consumption and fan control===<br />
<br />
{{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.}}<br />
<br />
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].<br />
<br />
Fan-control software can be used to further reduce power consumption. The {{AUR|tpfanco-svn}} package from AUR provides a simplistic GTK GUI for setting up fan activation thresholds based upon the X200's multiple hardware sensors.<br />
<br />
To measure your systems power consumption, see [[Powertop]] and the {{AUR|powerstat-git}} package from AUR.<br />
<br />
See [[Power saving]] for additional tips.<br />
<br />
===Suspend to RAM / hibernate ===<br />
<br />
Suspend to ram and hibernation is fully supported. See [[Suspend and hibernate]] for more information. <br />
<br />
===BIOS WiFi-Whitelist Removal===<br />
{{Warning| Modifying your system's firmware can be rewarding but it is also very dangerous. Please do not modify your system's firmware unless you know what you are doing.}}<br />
<br />
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.<br />
<br />
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].<br />
<br />
Make sure the BIOS version the system is running matches the cracked version being distributed.<br />
<br />
For more information about BIOS flashing and system firmware, please see [[Flashing_BIOS_from_Linux]].<br />
<br />
===Coreboot / Libreboot ===<br />
{{Warning| Modifying your system's firmware can be rewarding but it is also very dangerous. Please do not modify your system's firmware unless you know what you are doing.}}<br />
<br />
[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].<br />
<br />
For more information on the Libreboot project, see Gluglug's official [http://www.gluglug.org.uk/ website].<br />
<br />
==Troubleshooting==<br />
<br />
=== failed to execute '/usr/sbin/inputattach' ===<br />
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.<br />
<br />
===System feels unresponsive===<br />
If your system feels unresponsive and lagging, you can try creating a file called {{ic|/etc/modprobe.d/drm_kms.conf}}:<br />
<br />
options drm_kms_helper poll=N<br />
<br />
===Backlight fails to activate after system resume ===<br />
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.<br />
<br />
===PM device: Resume from hibernation error: Failed to restore -19===<br />
<br />
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:<br />
<br />
# dmesg | grep 00:0a<br />
[ 0.377877] pnp 00:0a: Plug and Play ACPI device, IDs PNP0c31 (active)<br />
[ 10.746742] tpm_tis 00:0a: 1.2 TPM (device-id 0x1020, rev-id 6)<br />
[ 10.746751] tpm_tis 00:0a: Intel iTPM workaround enabled<br />
[ 10.866734] tpm_tis 00:0a: TPM is disabled/deactivated (0x6)<br />
<br />
To unload the module create the following executable file called {{ic|/usr/lib/systemd/system-sleep/tpm.sh}}, assuming the use of the systemd hibernation procedure:<br />
<br />
#!/bin/sh<br />
case $1/$2 in<br />
pre/*)<br />
echo "Going to $2..."<br />
modprobe -r tpm<br />
modprobe -r tpm_tis<br />
;;<br />
post/*)<br />
echo "Waking up from $2..."<br />
modprobe tpm<br />
modprobe tpm_tis<br />
;;<br />
esac<br />
<br />
=== mei_me 0000:00:03.0: suspend ===<br />
<br />
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].<br />
<br />
=== pciehp 0000:00:1c.1:pcie04: Cannot add device at 0000:03:00 ===<br />
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].<br />
<br />
=== Uhhuh. NMI received for unknown reason 30. ===<br />
The Thinkpad X200 is known to report the following error on resume from hibernation or suspension:<br />
<br />
Uhhuh. NMI received for unknown reason 30.<br />
Dazed and confused, but trying to continue<br />
Do you have a strange power saving mode enabled?<br />
<br />
In this case you can disable the high precision event timer (HPET) by adding "nohpet" to your [[GRUB]] kernel parameter line.<br />
<br />
=== High pitched noises ===<br />
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.<br />
<br />
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.<br />
<br />
For more information see [http://www.thinkwiki.org/wiki/Problem_with_high_pitch_noises].<br />
<br />
==See also==<br />
* Thinkwiki: [http://www.thinkwiki.org/wiki/Category:X200 X200 Overview]<br />
* ThinkWiki: [http://www.thinkwiki.org/wiki/How_to_reduce_power_consumption How to reduce power consumption]<br />
* [https://gist.github.com/yuvadm/52b3f350293a96501478 Example installation procedure for X200s]</div>Jmaneshttps://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X200&diff=361656Lenovo ThinkPad X2002015-02-18T08:49:36Z<p>Jmanes: Cleared up some ambiguity involving the config files.</p>
<hr />
<div>[[Category:Lenovo]]<br />
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.66GHz), an Intel Graphics Media Accelerator 4500MHD and up to 8GB of RAM whilst still maintaining impressive battery life.<br />
<br />
== Configuration ==<br />
<br />
===Wireless===<br />
<br />
The ThinkPad X200 has a Intel PRO/Wireless 5100/5300 AGN wireless adapter, supported by {{Pkg|linux-firmware}}.<br />
<br />
If you experience connectivity problems such as a slow connection or aborts, especially when connected to a [[WPA2 Enterprise]] network, then try to load the iwlwifi module with the options {{ic|11n_disable&#61;1}}, {{ic|11n_disable&#61;2}}, {{ic|swcrypto&#61;1}}, {{ic|bt_coex_active&#61;0}}. There is no clear recommendation which of these options to be used as for some users {{ic|11n_disable&#61;1}} already solves the problem sufficiently, for others {{ic|bt_coex_active&#61;0}}. See [[Wireless_network_configuration#iwlwifi]] for more detailed instructions.<br />
<br />
===TrackPoint===<br />
<br />
See [[TrackPoint]].<br />
<br />
===Fingerprint Reader===<br />
<br />
The fingerprint reader that is found in the X200/X200T is not supported.<br />
<br />
See [[fprint]] for more information.<br />
<br />
===Disable bluetooth at boot===<br />
<br />
See [[Power saving#Bluetooth]].<br />
<br />
===Hard Disk shock protection===<br />
<br />
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]].<br />
<br />
===Mute button===<br />
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.<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_osi=Linux"<br />
<br />
===Screen calibration===<br />
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:<br />
<br />
# xinput_calibrator --device "Serial Wacom Tablet WACf004 stylus"<br />
<br />
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.<br />
<br />
===Loading the correct ICC colour profile===<br />
<br />
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:<br />
<br />
$ /usr/bin/xcalib -d :0 ~/.color/icc/x200.icc<br />
<br />
===Screen rotation===<br />
{{Note| Commands like [[xmodmap]], xev, showkey, dmesg, setkeycodes can help you. See [[Extra keyboard keys]] for details.}}<br />
<br />
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}}.<br />
<br />
Keycodes can be mapped to hardware buttons during the boot process via a [[systemd]] config file such as the one shown below.<br />
<br />
{{hc|head=/etc/systemd/system/setkeycodes.service|output=<br />
[Unit]<br />
Description=Assign each hardware button to a free keycode on boot<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/bin/setkeycodes 0x67 184 0x6c 185 0x68 186 0x66 187<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
}}<br />
<br />
After successfully mapping a keycode to a hardware button, it can then be utilized with a script similar to the one below.<br />
<br />
{{hc|head=/usr/local/bin/screen_rotation.sh|output=<nowiki><br />
#!/bin/sh<br />
<br />
# Find the line in "xrandr -q --verbose" output that contains current screen orientation and "strip" out current orientation.<br />
rotation="$(xrandr -q --verbose | grep 'connected' | egrep -o '\) (normal|left|inverted|right) \(' | egrep -o '(normal|left|inverted|right)')"<br />
<br />
# Using current screen orientation proceed to rotate screen and input tools.<br />
case "$rotation" in<br />
normal)<br />
# rotate to the left<br />
xrandr -o left<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate ccw<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate ccw<br />
;;<br />
left)<br />
# rotate to normal<br />
xrandr -o normal<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate none<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate none<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
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.<br />
<br />
If you are using another desktop environment (such as [[XFCE]], [[LXDE]], [[Fluxbox]], etc) you can always use the program [[xbindkeys]].<br />
<br />
===Screen auto-rotation===<br />
<br />
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.<br />
Then the following script will enable you to use the accelerometer's data to automatically rotate your screen :<br />
<br />
{{bc|<nowiki>#!/bin/bash<br />
<br />
# (To have the exact names of these devices you should type the command : xsetwacom --list devices )<br />
stylus="Serial Wacom Tablet stylus" <br />
eraser="Serial Wacom Tablet eraser"<br />
<br />
function rotate {<br />
if [ $# -lt 1 ]; then # error ...<br />
exit 1 <br />
fi<br />
<br />
case "$1" in<br />
up)<br />
nextRotate="none"<br />
nextOrient="normal" ;;<br />
down)<br />
nextRotate="half"<br />
nextOrient="inverted" ;;<br />
right)<br />
nextRotate="ccw"<br />
nextOrient="left" ;;<br />
left)<br />
nextRotate="cw"<br />
nextOrient="right";;<br />
esac<br />
<br />
# Rotate the screen <br />
xrandr -o $nextOrient<br />
<br />
# Rotate the tablet <br />
xsetwacom set "$stylus" Rotate $nextRotate<br />
xsetwacom set "$eraser" Rotate $nextRotate<br />
}<br />
<br />
while true; do<br />
# 1) We extract data about the actual position<br />
position=$(cat /sys/devices/platform/hdaps/position)<br />
x=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\1/p") # most of time contained in [350,650]<br />
y=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\2/p") # most of time contained in [-650,-350]<br />
<br />
# 2) We work out the x value (= left and right inclination) (always between <br />
if [ $x -lt 400 ]; then<br />
rotate left<br />
elif [ $x -gt 600 ]; then<br />
rotate right<br />
fi<br />
<br />
# 3) We work out the y value (= front and back inclination)<br />
if [ $y -gt -400 ]; then<br />
rotate down<br />
elif [ $y -lt -600 ]; then<br />
rotate up<br />
fi<br />
<br />
# 4) wait before checking the value again<br />
sleep 0.5<br />
done<br />
</nowiki>}}<br />
<br />
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).<br />
<br />
===Power consumption and fan control===<br />
<br />
{{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.}}<br />
<br />
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].<br />
<br />
Fan-control software can be used to further reduce power consumption. The {{AUR|tpfanco-svn}} package from AUR provides a simplistic GTK GUI for setting up fan activation thresholds based upon the X200's multiple hardware sensors.<br />
<br />
To measure your systems power consumption, see [[Powertop]] and the {{AUR|powerstat-git}} package from AUR.<br />
<br />
See [[Power saving]] for additional tips.<br />
<br />
===Suspend to RAM / hibernate ===<br />
<br />
Suspend to ram and hibernation is fully supported. See [[Suspend and hibernate]] for more information. <br />
<br />
===BIOS WiFi-Whitelist Removal===<br />
{{Warning| Modifying your system's firmware can be rewarding but it is also very dangerous. Please do not modify your system's firmware unless you know what you are doing.}}<br />
<br />
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.<br />
<br />
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].<br />
<br />
Make sure the BIOS version the system is running matches the cracked version being distributed.<br />
<br />
For more information about BIOS flashing and system firmware, please see [[Flashing_BIOS_from_Linux]].<br />
<br />
===Coreboot / Libreboot ===<br />
{{Warning| Modifying your system's firmware can be rewarding but it is also very dangerous. Please do not modify your system's firmware unless you know what you are doing.}}<br />
{{Note| The following information is only valid for the ThinkPad X200, NOT the X200T or X200s.}}<br />
<br />
[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].<br />
<br />
For more information on the Libreboot project, see Gluglug's official [http://www.gluglug.org.uk/ website].<br />
<br />
==Troubleshooting==<br />
<br />
=== failed to execute '/usr/sbin/inputattach' ===<br />
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.<br />
<br />
===System feels unresponsive===<br />
If your system feels unresponsive and lagging, you can try creating a file called {{ic|/etc/modprobe.d/drm_kms.conf}}:<br />
<br />
options drm_kms_helper poll=N<br />
<br />
===Backlight fails to activate after system resume ===<br />
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.<br />
<br />
===PM device: Resume from hibernation error: Failed to restore -19===<br />
<br />
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:<br />
<br />
# dmesg | grep 00:0a<br />
[ 0.377877] pnp 00:0a: Plug and Play ACPI device, IDs PNP0c31 (active)<br />
[ 10.746742] tpm_tis 00:0a: 1.2 TPM (device-id 0x1020, rev-id 6)<br />
[ 10.746751] tpm_tis 00:0a: Intel iTPM workaround enabled<br />
[ 10.866734] tpm_tis 00:0a: TPM is disabled/deactivated (0x6)<br />
<br />
To unload the module create the following executable file called {{ic|/usr/lib/systemd/system-sleep/tpm.sh}}, assuming the use of the systemd hibernation procedure:<br />
<br />
#!/bin/sh<br />
case $1/$2 in<br />
pre/*)<br />
echo "Going to $2..."<br />
modprobe -r tpm<br />
modprobe -r tpm_tis<br />
;;<br />
post/*)<br />
echo "Waking up from $2..."<br />
modprobe tpm<br />
modprobe tpm_tis<br />
;;<br />
esac<br />
<br />
=== mei_me 0000:00:03.0: suspend ===<br />
<br />
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].<br />
<br />
=== pciehp 0000:00:1c.1:pcie04: Cannot add device at 0000:03:00 ===<br />
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].<br />
<br />
=== Uhhuh. NMI received for unknown reason 30. ===<br />
The Thinkpad X200 is known to report the following error on resume from hibernation or suspension:<br />
<br />
Uhhuh. NMI received for unknown reason 30.<br />
Dazed and confused, but trying to continue<br />
Do you have a strange power saving mode enabled?<br />
<br />
In this case you can disable the high precision event timer (HPET) by adding "nohpet" to your [[GRUB]] kernel parameter line.<br />
<br />
=== High pitched noises ===<br />
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.<br />
<br />
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 your display draws.<br />
<br />
For more information see [http://www.thinkwiki.org/wiki/Problem_with_high_pitch_noises].<br />
<br />
==See also==<br />
* Thinkwiki: [http://www.thinkwiki.org/wiki/Category:X200 X200 Overview]<br />
* ThinkWiki: [http://www.thinkwiki.org/wiki/How_to_reduce_power_consumption How to reduce power consumption]<br />
* [https://gist.github.com/yuvadm/52b3f350293a96501478 Example installation procedure for X200s]</div>Jmaneshttps://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X200&diff=361607Lenovo ThinkPad X2002015-02-17T23:39:19Z<p>Jmanes: /* Coreboot / Libreboot */</p>
<hr />
<div>[[Category:Lenovo]]<br />
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.66GHz), an Intel Graphics Media Accelerator 4500MHD and up to 8GB of RAM whilst still maintaining impressive battery life.<br />
<br />
== Configuration ==<br />
<br />
===Wireless===<br />
<br />
The ThinkPad X200 has a Intel PRO/Wireless 5100/5300 AGN wireless adapter, supported by {{Pkg|linux-firmware}}.<br />
<br />
If you experience connectivity problems such as a slow connection or aborts, especially when connected to a [[WPA2 Enterprise]] network, then try to load the iwlwifi module with the options {{ic|11n_disable&#61;1}}, {{ic|11n_disable&#61;2}}, {{ic|swcrypto&#61;1}}, {{ic|bt_coex_active&#61;0}}. There is no clear recommendation which of these options to be used as for some users {{ic|11n_disable&#61;1}} already solves the problem sufficiently, for others {{ic|bt_coex_active&#61;0}}. See [[Wireless_network_configuration#iwlwifi]] for more detailed instructions.<br />
<br />
===TrackPoint===<br />
<br />
See [[TrackPoint]].<br />
<br />
===Fingerprint Reader===<br />
<br />
The fingerprint reader that is found in the X200/X200T is not supported.<br />
<br />
See [[fprint]] for more information.<br />
<br />
===Disable bluetooth at boot===<br />
<br />
See [[Power saving#Bluetooth]].<br />
<br />
===Hard Disk shock protection===<br />
<br />
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]].<br />
<br />
===Mute button===<br />
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.<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_osi=Linux"<br />
<br />
===Screen calibration===<br />
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:<br />
<br />
# xinput_calibrator --device "Serial Wacom Tablet WACf004 stylus"<br />
<br />
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.<br />
<br />
===Loading the correct ICC colour profile===<br />
<br />
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:<br />
<br />
$ /usr/bin/xcalib -d :0 ~/.color/icc/x200.icc<br />
<br />
===Screen rotation===<br />
<br />
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}}.<br />
<br />
{{hc|head=/etc/systemd/system/setkeycodes.service|output=<br />
[Unit]<br />
Description=Assign each hardware button to a free keycode on boot<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/bin/setkeycodes 0x67 184 0x6c 185 0x68 186 0x66 187<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
}}<br />
<br />
{{Note| Commands like [[xmodmap]], xev, showkey, dmesg, setkeycodes can help you. See [[Extra keyboard keys]] for details.}}<br />
<br />
Then you can assign the script for screen rotation to that button.<br />
<br />
{{Style|In-code comments, see [[Help:Style]]}}<br />
<br />
{{hc|head=/usr/local/bin/screen_rotation.sh|output=<nowiki><br />
#!/bin/sh<br />
<br />
# Find the line in "xrandr -q --verbose" output that contains current screen orientation and "strip" out current orientation.<br />
rotation="$(xrandr -q --verbose | grep 'connected' | egrep -o '\) (normal|left|inverted|right) \(' | egrep -o '(normal|left|inverted|right)')"<br />
<br />
# Using current screen orientation proceed to rotate screen and input tools.<br />
case "$rotation" in<br />
normal)<br />
# rotate to the left<br />
xrandr -o left<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate ccw<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate ccw<br />
;;<br />
left)<br />
# rotate to normal<br />
xrandr -o normal<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate none<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate none<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
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.<br />
<br />
If you are using another desktop environment (such as XFCE, LXDE, Fluxbox ...) you can always use the program [[xbindkeys]].<br />
<br />
===Screen auto-rotation===<br />
<br />
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.<br />
Then the following script will enable you to use the accelerometer's data to automatically rotate your screen :<br />
<br />
{{bc|<nowiki>#!/bin/bash<br />
<br />
# (To have the exact names of these devices you should type the command : xsetwacom --list devices )<br />
stylus="Serial Wacom Tablet stylus" <br />
eraser="Serial Wacom Tablet eraser"<br />
<br />
function rotate {<br />
if [ $# -lt 1 ]; then # error ...<br />
exit 1 <br />
fi<br />
<br />
case "$1" in<br />
up)<br />
nextRotate="none"<br />
nextOrient="normal" ;;<br />
down)<br />
nextRotate="half"<br />
nextOrient="inverted" ;;<br />
right)<br />
nextRotate="ccw"<br />
nextOrient="left" ;;<br />
left)<br />
nextRotate="cw"<br />
nextOrient="right";;<br />
esac<br />
<br />
# Rotate the screen <br />
xrandr -o $nextOrient<br />
<br />
# Rotate the tablet <br />
xsetwacom set "$stylus" Rotate $nextRotate<br />
xsetwacom set "$eraser" Rotate $nextRotate<br />
}<br />
<br />
while true; do<br />
# 1) We extract data about the actual position<br />
position=$(cat /sys/devices/platform/hdaps/position)<br />
x=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\1/p") # most of time contained in [350,650]<br />
y=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\2/p") # most of time contained in [-650,-350]<br />
<br />
# 2) We work out the x value (= left and right inclination) (always between <br />
if [ $x -lt 400 ]; then<br />
rotate left<br />
elif [ $x -gt 600 ]; then<br />
rotate right<br />
fi<br />
<br />
# 3) We work out the y value (= front and back inclination)<br />
if [ $y -gt -400 ]; then<br />
rotate down<br />
elif [ $y -lt -600 ]; then<br />
rotate up<br />
fi<br />
<br />
# 4) wait before checking the value again<br />
sleep 0.5<br />
done<br />
</nowiki>}}<br />
<br />
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).<br />
<br />
===Power consumption and fan control===<br />
<br />
{{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.}}<br />
<br />
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].<br />
<br />
Fan-control software can be used to further reduce power consumption. The {{AUR|tpfanco-svn}} package from AUR provides a simplistic GTK GUI for setting up fan activation thresholds based upon the X200's multiple hardware sensors.<br />
<br />
To measure your systems power consumption, see [[Powertop]] and the {{AUR|powerstat-git}} package from AUR.<br />
<br />
See [[Power saving]] for additional tips.<br />
<br />
===Suspend to RAM / hibernate ===<br />
<br />
Suspend to ram and hibernation is fully supported. See [[Suspend and hibernate]] for more information. <br />
<br />
===BIOS WiFi-Whitelist Removal===<br />
{{Warning| Modifying your system's firmware can be rewarding but it is also very dangerous. Please do not modify your system's firmware unless you know what you are doing.}}<br />
<br />
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.<br />
<br />
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].<br />
<br />
Make sure the BIOS version the system is running matches the cracked version being distributed.<br />
<br />
For more information about BIOS flashing and system firmware, please see [[Flashing_BIOS_from_Linux]].<br />
<br />
===Coreboot / Libreboot ===<br />
{{Warning| Modifying your system's firmware can be rewarding but it is also very dangerous. Please do not modify your system's firmware unless you know what you are doing.}}<br />
{{Note| The following information is only valid for the ThinkPad X200, NOT the X200T or X200s.}}<br />
<br />
[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].<br />
<br />
For more information on the Libreboot project, see Gluglug's official [http://www.gluglug.org.uk/ website].<br />
<br />
==Troubleshooting==<br />
<br />
=== failed to execute '/usr/sbin/inputattach' ===<br />
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.<br />
<br />
===System feels unresponsive===<br />
If your system feels unresponsive and lagging, you can try creating a file called {{ic|/etc/modprobe.d/drm_kms.conf}}:<br />
<br />
options drm_kms_helper poll=N<br />
<br />
===Backlight fails to activate after system resume ===<br />
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.<br />
<br />
===PM device: Resume from hibernation error: Failed to restore -19===<br />
<br />
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:<br />
<br />
# dmesg | grep 00:0a<br />
[ 0.377877] pnp 00:0a: Plug and Play ACPI device, IDs PNP0c31 (active)<br />
[ 10.746742] tpm_tis 00:0a: 1.2 TPM (device-id 0x1020, rev-id 6)<br />
[ 10.746751] tpm_tis 00:0a: Intel iTPM workaround enabled<br />
[ 10.866734] tpm_tis 00:0a: TPM is disabled/deactivated (0x6)<br />
<br />
To unload the module create the following executable file called {{ic|/usr/lib/systemd/system-sleep/tpm.sh}}, assuming the use of the systemd hibernation procedure:<br />
<br />
#!/bin/sh<br />
case $1/$2 in<br />
pre/*)<br />
echo "Going to $2..."<br />
modprobe -r tpm<br />
modprobe -r tpm_tis<br />
;;<br />
post/*)<br />
echo "Waking up from $2..."<br />
modprobe tpm<br />
modprobe tpm_tis<br />
;;<br />
esac<br />
<br />
=== mei_me 0000:00:03.0: suspend ===<br />
<br />
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].<br />
<br />
=== pciehp 0000:00:1c.1:pcie04: Cannot add device at 0000:03:00 ===<br />
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].<br />
<br />
=== Uhhuh. NMI received for unknown reason 30. ===<br />
The Thinkpad X200 is known to report the following error on resume from hibernation or suspension:<br />
<br />
Uhhuh. NMI received for unknown reason 30.<br />
Dazed and confused, but trying to continue<br />
Do you have a strange power saving mode enabled?<br />
<br />
In this case you can disable the high precision event timer (HPET) by adding "nohpet" to your [[GRUB]] kernel parameter line.<br />
<br />
=== High pitched noises ===<br />
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.<br />
<br />
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 your display draws.<br />
<br />
For more information see [http://www.thinkwiki.org/wiki/Problem_with_high_pitch_noises].<br />
<br />
==See also==<br />
* Thinkwiki: [http://www.thinkwiki.org/wiki/Category:X200 X200 Overview]<br />
* ThinkWiki: [http://www.thinkwiki.org/wiki/How_to_reduce_power_consumption How to reduce power consumption]<br />
* [https://gist.github.com/yuvadm/52b3f350293a96501478 Example installation procedure for X200s]</div>Jmaneshttps://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X200&diff=361587Lenovo ThinkPad X2002015-02-17T22:01:59Z<p>Jmanes: /* BIOS WiFi-Whitelist Removal */</p>
<hr />
<div>[[Category:Lenovo]]<br />
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.66GHz), an Intel Graphics Media Accelerator 4500MHD and up to 8GB of RAM whilst still maintaining impressive battery life.<br />
<br />
== Configuration ==<br />
<br />
===Wireless===<br />
<br />
The ThinkPad X200 has a Intel PRO/Wireless 5100/5300 AGN wireless adapter, supported by {{Pkg|linux-firmware}}.<br />
<br />
If you experience connectivity problems such as a slow connection or aborts, especially when connected to a [[WPA2 Enterprise]] network, then try to load the iwlwifi module with the options {{ic|11n_disable&#61;1}}, {{ic|11n_disable&#61;2}}, {{ic|swcrypto&#61;1}}, {{ic|bt_coex_active&#61;0}}. There is no clear recommendation which of these options to be used as for some users {{ic|11n_disable&#61;1}} already solves the problem sufficiently, for others {{ic|bt_coex_active&#61;0}}. See [[Wireless_network_configuration#iwlwifi]] for more detailed instructions.<br />
<br />
===TrackPoint===<br />
<br />
See [[TrackPoint]].<br />
<br />
===Fingerprint Reader===<br />
<br />
The fingerprint reader that is found in the X200/X200T is not supported.<br />
<br />
See [[fprint]] for more information.<br />
<br />
===Disable bluetooth at boot===<br />
<br />
See [[Power saving#Bluetooth]].<br />
<br />
===Hard Disk shock protection===<br />
<br />
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]].<br />
<br />
===Mute button===<br />
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.<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_osi=Linux"<br />
<br />
===Screen calibration===<br />
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:<br />
<br />
# xinput_calibrator --device "Serial Wacom Tablet WACf004 stylus"<br />
<br />
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.<br />
<br />
===Loading the correct ICC colour profile===<br />
<br />
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:<br />
<br />
$ /usr/bin/xcalib -d :0 ~/.color/icc/x200.icc<br />
<br />
===Screen rotation===<br />
<br />
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}}.<br />
<br />
{{hc|head=/etc/systemd/system/setkeycodes.service|output=<br />
[Unit]<br />
Description=Assign each hardware button to a free keycode on boot<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/bin/setkeycodes 0x67 184 0x6c 185 0x68 186 0x66 187<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
}}<br />
<br />
{{Note| Commands like [[xmodmap]], xev, showkey, dmesg, setkeycodes can help you. See [[Extra keyboard keys]] for details.}}<br />
<br />
Then you can assign the script for screen rotation to that button.<br />
<br />
{{Style|In-code comments, see [[Help:Style]]}}<br />
<br />
{{hc|head=/usr/local/bin/screen_rotation.sh|output=<nowiki><br />
#!/bin/sh<br />
<br />
# Find the line in "xrandr -q --verbose" output that contains current screen orientation and "strip" out current orientation.<br />
rotation="$(xrandr -q --verbose | grep 'connected' | egrep -o '\) (normal|left|inverted|right) \(' | egrep -o '(normal|left|inverted|right)')"<br />
<br />
# Using current screen orientation proceed to rotate screen and input tools.<br />
case "$rotation" in<br />
normal)<br />
# rotate to the left<br />
xrandr -o left<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate ccw<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate ccw<br />
;;<br />
left)<br />
# rotate to normal<br />
xrandr -o normal<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate none<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate none<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
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.<br />
<br />
If you are using another desktop environment (such as XFCE, LXDE, Fluxbox ...) you can always use the program [[xbindkeys]].<br />
<br />
===Screen auto-rotation===<br />
<br />
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.<br />
Then the following script will enable you to use the accelerometer's data to automatically rotate your screen :<br />
<br />
{{bc|<nowiki>#!/bin/bash<br />
<br />
# (To have the exact names of these devices you should type the command : xsetwacom --list devices )<br />
stylus="Serial Wacom Tablet stylus" <br />
eraser="Serial Wacom Tablet eraser"<br />
<br />
function rotate {<br />
if [ $# -lt 1 ]; then # error ...<br />
exit 1 <br />
fi<br />
<br />
case "$1" in<br />
up)<br />
nextRotate="none"<br />
nextOrient="normal" ;;<br />
down)<br />
nextRotate="half"<br />
nextOrient="inverted" ;;<br />
right)<br />
nextRotate="ccw"<br />
nextOrient="left" ;;<br />
left)<br />
nextRotate="cw"<br />
nextOrient="right";;<br />
esac<br />
<br />
# Rotate the screen <br />
xrandr -o $nextOrient<br />
<br />
# Rotate the tablet <br />
xsetwacom set "$stylus" Rotate $nextRotate<br />
xsetwacom set "$eraser" Rotate $nextRotate<br />
}<br />
<br />
while true; do<br />
# 1) We extract data about the actual position<br />
position=$(cat /sys/devices/platform/hdaps/position)<br />
x=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\1/p") # most of time contained in [350,650]<br />
y=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\2/p") # most of time contained in [-650,-350]<br />
<br />
# 2) We work out the x value (= left and right inclination) (always between <br />
if [ $x -lt 400 ]; then<br />
rotate left<br />
elif [ $x -gt 600 ]; then<br />
rotate right<br />
fi<br />
<br />
# 3) We work out the y value (= front and back inclination)<br />
if [ $y -gt -400 ]; then<br />
rotate down<br />
elif [ $y -lt -600 ]; then<br />
rotate up<br />
fi<br />
<br />
# 4) wait before checking the value again<br />
sleep 0.5<br />
done<br />
</nowiki>}}<br />
<br />
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).<br />
<br />
===Power consumption and fan control===<br />
<br />
{{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.}}<br />
<br />
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].<br />
<br />
Fan-control software can be used to further reduce power consumption. The {{AUR|tpfanco-svn}} package from AUR provides a simplistic GTK GUI for setting up fan activation thresholds based upon the X200's multiple hardware sensors.<br />
<br />
To measure your systems power consumption, see [[Powertop]] and the {{AUR|powerstat-git}} package from AUR.<br />
<br />
See [[Power saving]] for additional tips.<br />
<br />
===Suspend to RAM / hibernate ===<br />
<br />
Suspend to ram and hibernation is fully supported. See [[Suspend and hibernate]] for more information. <br />
<br />
===BIOS WiFi-Whitelist Removal===<br />
{{Warning| Modifying your system's firmware can be rewarding but it is also very dangerous. Please do not modify your system's firmware unless you know what you are doing.}}<br />
<br />
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.<br />
<br />
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].<br />
<br />
Make sure the BIOS version the system is running matches the cracked version being distributed.<br />
<br />
For more information about BIOS flashing and system firmware, please see [[Flashing_BIOS_from_Linux]].<br />
<br />
===Coreboot / Libreboot ===<br />
{{Warning| Modifying your system's firmware can be rewarding but it is also very dangerous. Please do not modify your system's firmware unless you know what you are doing.}}<br />
{{Note| The following information is only valid for the ThinkPad X200, NOT the X200T or X200s.}}<br />
<br />
[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].<br />
<br />
For more information on the Libreboot project, see Gluglug's official [http://www.gluglug.org.uk/ Gluglug website].<br />
<br />
==Troubleshooting==<br />
<br />
=== failed to execute '/usr/sbin/inputattach' ===<br />
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.<br />
<br />
===System feels unresponsive===<br />
If your system feels unresponsive and lagging, you can try creating a file called {{ic|/etc/modprobe.d/drm_kms.conf}}:<br />
<br />
options drm_kms_helper poll=N<br />
<br />
===Backlight fails to activate after system resume ===<br />
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.<br />
<br />
===PM device: Resume from hibernation error: Failed to restore -19===<br />
<br />
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:<br />
<br />
# dmesg | grep 00:0a<br />
[ 0.377877] pnp 00:0a: Plug and Play ACPI device, IDs PNP0c31 (active)<br />
[ 10.746742] tpm_tis 00:0a: 1.2 TPM (device-id 0x1020, rev-id 6)<br />
[ 10.746751] tpm_tis 00:0a: Intel iTPM workaround enabled<br />
[ 10.866734] tpm_tis 00:0a: TPM is disabled/deactivated (0x6)<br />
<br />
To unload the module create the following executable file called {{ic|/usr/lib/systemd/system-sleep/tpm.sh}}, assuming the use of the systemd hibernation procedure:<br />
<br />
#!/bin/sh<br />
case $1/$2 in<br />
pre/*)<br />
echo "Going to $2..."<br />
modprobe -r tpm<br />
modprobe -r tpm_tis<br />
;;<br />
post/*)<br />
echo "Waking up from $2..."<br />
modprobe tpm<br />
modprobe tpm_tis<br />
;;<br />
esac<br />
<br />
=== mei_me 0000:00:03.0: suspend ===<br />
<br />
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].<br />
<br />
=== pciehp 0000:00:1c.1:pcie04: Cannot add device at 0000:03:00 ===<br />
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].<br />
<br />
=== Uhhuh. NMI received for unknown reason 30. ===<br />
The Thinkpad X200 is known to report the following error on resume from hibernation or suspension:<br />
<br />
Uhhuh. NMI received for unknown reason 30.<br />
Dazed and confused, but trying to continue<br />
Do you have a strange power saving mode enabled?<br />
<br />
In this case you can disable the high precision event timer (HPET) by adding "nohpet" to your [[GRUB]] kernel parameter line.<br />
<br />
=== High pitched noises ===<br />
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.<br />
<br />
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 your display draws.<br />
<br />
For more information see [http://www.thinkwiki.org/wiki/Problem_with_high_pitch_noises].<br />
<br />
==See also==<br />
* Thinkwiki: [http://www.thinkwiki.org/wiki/Category:X200 X200 Overview]<br />
* ThinkWiki: [http://www.thinkwiki.org/wiki/How_to_reduce_power_consumption How to reduce power consumption]<br />
* [https://gist.github.com/yuvadm/52b3f350293a96501478 Example installation procedure for X200s]</div>Jmaneshttps://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X200&diff=361586Lenovo ThinkPad X2002015-02-17T22:01:03Z<p>Jmanes: /* Coreboot / Libreboot */</p>
<hr />
<div>[[Category:Lenovo]]<br />
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.66GHz), an Intel Graphics Media Accelerator 4500MHD and up to 8GB of RAM whilst still maintaining impressive battery life.<br />
<br />
== Configuration ==<br />
<br />
===Wireless===<br />
<br />
The ThinkPad X200 has a Intel PRO/Wireless 5100/5300 AGN wireless adapter, supported by {{Pkg|linux-firmware}}.<br />
<br />
If you experience connectivity problems such as a slow connection or aborts, especially when connected to a [[WPA2 Enterprise]] network, then try to load the iwlwifi module with the options {{ic|11n_disable&#61;1}}, {{ic|11n_disable&#61;2}}, {{ic|swcrypto&#61;1}}, {{ic|bt_coex_active&#61;0}}. There is no clear recommendation which of these options to be used as for some users {{ic|11n_disable&#61;1}} already solves the problem sufficiently, for others {{ic|bt_coex_active&#61;0}}. See [[Wireless_network_configuration#iwlwifi]] for more detailed instructions.<br />
<br />
===TrackPoint===<br />
<br />
See [[TrackPoint]].<br />
<br />
===Fingerprint Reader===<br />
<br />
The fingerprint reader that is found in the X200/X200T is not supported.<br />
<br />
See [[fprint]] for more information.<br />
<br />
===Disable bluetooth at boot===<br />
<br />
See [[Power saving#Bluetooth]].<br />
<br />
===Hard Disk shock protection===<br />
<br />
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]].<br />
<br />
===Mute button===<br />
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.<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_osi=Linux"<br />
<br />
===Screen calibration===<br />
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:<br />
<br />
# xinput_calibrator --device "Serial Wacom Tablet WACf004 stylus"<br />
<br />
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.<br />
<br />
===Loading the correct ICC colour profile===<br />
<br />
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:<br />
<br />
$ /usr/bin/xcalib -d :0 ~/.color/icc/x200.icc<br />
<br />
===Screen rotation===<br />
<br />
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}}.<br />
<br />
{{hc|head=/etc/systemd/system/setkeycodes.service|output=<br />
[Unit]<br />
Description=Assign each hardware button to a free keycode on boot<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/bin/setkeycodes 0x67 184 0x6c 185 0x68 186 0x66 187<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
}}<br />
<br />
{{Note| Commands like [[xmodmap]], xev, showkey, dmesg, setkeycodes can help you. See [[Extra keyboard keys]] for details.}}<br />
<br />
Then you can assign the script for screen rotation to that button.<br />
<br />
{{Style|In-code comments, see [[Help:Style]]}}<br />
<br />
{{hc|head=/usr/local/bin/screen_rotation.sh|output=<nowiki><br />
#!/bin/sh<br />
<br />
# Find the line in "xrandr -q --verbose" output that contains current screen orientation and "strip" out current orientation.<br />
rotation="$(xrandr -q --verbose | grep 'connected' | egrep -o '\) (normal|left|inverted|right) \(' | egrep -o '(normal|left|inverted|right)')"<br />
<br />
# Using current screen orientation proceed to rotate screen and input tools.<br />
case "$rotation" in<br />
normal)<br />
# rotate to the left<br />
xrandr -o left<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate ccw<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate ccw<br />
;;<br />
left)<br />
# rotate to normal<br />
xrandr -o normal<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate none<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate none<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
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.<br />
<br />
If you are using another desktop environment (such as XFCE, LXDE, Fluxbox ...) you can always use the program [[xbindkeys]].<br />
<br />
===Screen auto-rotation===<br />
<br />
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.<br />
Then the following script will enable you to use the accelerometer's data to automatically rotate your screen :<br />
<br />
{{bc|<nowiki>#!/bin/bash<br />
<br />
# (To have the exact names of these devices you should type the command : xsetwacom --list devices )<br />
stylus="Serial Wacom Tablet stylus" <br />
eraser="Serial Wacom Tablet eraser"<br />
<br />
function rotate {<br />
if [ $# -lt 1 ]; then # error ...<br />
exit 1 <br />
fi<br />
<br />
case "$1" in<br />
up)<br />
nextRotate="none"<br />
nextOrient="normal" ;;<br />
down)<br />
nextRotate="half"<br />
nextOrient="inverted" ;;<br />
right)<br />
nextRotate="ccw"<br />
nextOrient="left" ;;<br />
left)<br />
nextRotate="cw"<br />
nextOrient="right";;<br />
esac<br />
<br />
# Rotate the screen <br />
xrandr -o $nextOrient<br />
<br />
# Rotate the tablet <br />
xsetwacom set "$stylus" Rotate $nextRotate<br />
xsetwacom set "$eraser" Rotate $nextRotate<br />
}<br />
<br />
while true; do<br />
# 1) We extract data about the actual position<br />
position=$(cat /sys/devices/platform/hdaps/position)<br />
x=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\1/p") # most of time contained in [350,650]<br />
y=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\2/p") # most of time contained in [-650,-350]<br />
<br />
# 2) We work out the x value (= left and right inclination) (always between <br />
if [ $x -lt 400 ]; then<br />
rotate left<br />
elif [ $x -gt 600 ]; then<br />
rotate right<br />
fi<br />
<br />
# 3) We work out the y value (= front and back inclination)<br />
if [ $y -gt -400 ]; then<br />
rotate down<br />
elif [ $y -lt -600 ]; then<br />
rotate up<br />
fi<br />
<br />
# 4) wait before checking the value again<br />
sleep 0.5<br />
done<br />
</nowiki>}}<br />
<br />
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).<br />
<br />
===Power consumption and fan control===<br />
<br />
{{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.}}<br />
<br />
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].<br />
<br />
Fan-control software can be used to further reduce power consumption. The {{AUR|tpfanco-svn}} package from AUR provides a simplistic GTK GUI for setting up fan activation thresholds based upon the X200's multiple hardware sensors.<br />
<br />
To measure your systems power consumption, see [[Powertop]] and the {{AUR|powerstat-git}} package from AUR.<br />
<br />
See [[Power saving]] for additional tips.<br />
<br />
===Suspend to RAM / hibernate ===<br />
<br />
Suspend to ram and hibernation is fully supported. See [[Suspend and hibernate]] for more information. <br />
<br />
===BIOS WiFi-Whitelist Removal===<br />
{{Warning| Modifying your system's firmware can be rewarding but it is also very dangerous. Please do not modify your system's firmware unless you know what you are doing.}}<br />
<br />
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.<br />
<br />
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].<br />
<br />
Make sure the BIOS version the system is running matches the cracked version being distributed.<br />
<br />
For more information about BIOS flashing and system firmware, please see [[Flashing_BIOS_From_Linux]].<br />
<br />
===Coreboot / Libreboot ===<br />
{{Warning| Modifying your system's firmware can be rewarding but it is also very dangerous. Please do not modify your system's firmware unless you know what you are doing.}}<br />
{{Note| The following information is only valid for the ThinkPad X200, NOT the X200T or X200s.}}<br />
<br />
[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].<br />
<br />
For more information on the Libreboot project, see Gluglug's official [http://www.gluglug.org.uk/ Gluglug website].<br />
<br />
==Troubleshooting==<br />
<br />
=== failed to execute '/usr/sbin/inputattach' ===<br />
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.<br />
<br />
===System feels unresponsive===<br />
If your system feels unresponsive and lagging, you can try creating a file called {{ic|/etc/modprobe.d/drm_kms.conf}}:<br />
<br />
options drm_kms_helper poll=N<br />
<br />
===Backlight fails to activate after system resume ===<br />
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.<br />
<br />
===PM device: Resume from hibernation error: Failed to restore -19===<br />
<br />
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:<br />
<br />
# dmesg | grep 00:0a<br />
[ 0.377877] pnp 00:0a: Plug and Play ACPI device, IDs PNP0c31 (active)<br />
[ 10.746742] tpm_tis 00:0a: 1.2 TPM (device-id 0x1020, rev-id 6)<br />
[ 10.746751] tpm_tis 00:0a: Intel iTPM workaround enabled<br />
[ 10.866734] tpm_tis 00:0a: TPM is disabled/deactivated (0x6)<br />
<br />
To unload the module create the following executable file called {{ic|/usr/lib/systemd/system-sleep/tpm.sh}}, assuming the use of the systemd hibernation procedure:<br />
<br />
#!/bin/sh<br />
case $1/$2 in<br />
pre/*)<br />
echo "Going to $2..."<br />
modprobe -r tpm<br />
modprobe -r tpm_tis<br />
;;<br />
post/*)<br />
echo "Waking up from $2..."<br />
modprobe tpm<br />
modprobe tpm_tis<br />
;;<br />
esac<br />
<br />
=== mei_me 0000:00:03.0: suspend ===<br />
<br />
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].<br />
<br />
=== pciehp 0000:00:1c.1:pcie04: Cannot add device at 0000:03:00 ===<br />
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].<br />
<br />
=== Uhhuh. NMI received for unknown reason 30. ===<br />
The Thinkpad X200 is known to report the following error on resume from hibernation or suspension:<br />
<br />
Uhhuh. NMI received for unknown reason 30.<br />
Dazed and confused, but trying to continue<br />
Do you have a strange power saving mode enabled?<br />
<br />
In this case you can disable the high precision event timer (HPET) by adding "nohpet" to your [[GRUB]] kernel parameter line.<br />
<br />
=== High pitched noises ===<br />
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.<br />
<br />
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 your display draws.<br />
<br />
For more information see [http://www.thinkwiki.org/wiki/Problem_with_high_pitch_noises].<br />
<br />
==See also==<br />
* Thinkwiki: [http://www.thinkwiki.org/wiki/Category:X200 X200 Overview]<br />
* ThinkWiki: [http://www.thinkwiki.org/wiki/How_to_reduce_power_consumption How to reduce power consumption]<br />
* [https://gist.github.com/yuvadm/52b3f350293a96501478 Example installation procedure for X200s]</div>Jmaneshttps://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X200&diff=361585Lenovo ThinkPad X2002015-02-17T21:59:44Z<p>Jmanes: Added information on BIOS flashing and coreboot.</p>
<hr />
<div>[[Category:Lenovo]]<br />
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.66GHz), an Intel Graphics Media Accelerator 4500MHD and up to 8GB of RAM whilst still maintaining impressive battery life.<br />
<br />
== Configuration ==<br />
<br />
===Wireless===<br />
<br />
The ThinkPad X200 has a Intel PRO/Wireless 5100/5300 AGN wireless adapter, supported by {{Pkg|linux-firmware}}.<br />
<br />
If you experience connectivity problems such as a slow connection or aborts, especially when connected to a [[WPA2 Enterprise]] network, then try to load the iwlwifi module with the options {{ic|11n_disable&#61;1}}, {{ic|11n_disable&#61;2}}, {{ic|swcrypto&#61;1}}, {{ic|bt_coex_active&#61;0}}. There is no clear recommendation which of these options to be used as for some users {{ic|11n_disable&#61;1}} already solves the problem sufficiently, for others {{ic|bt_coex_active&#61;0}}. See [[Wireless_network_configuration#iwlwifi]] for more detailed instructions.<br />
<br />
===TrackPoint===<br />
<br />
See [[TrackPoint]].<br />
<br />
===Fingerprint Reader===<br />
<br />
The fingerprint reader that is found in the X200/X200T is not supported.<br />
<br />
See [[fprint]] for more information.<br />
<br />
===Disable bluetooth at boot===<br />
<br />
See [[Power saving#Bluetooth]].<br />
<br />
===Hard Disk shock protection===<br />
<br />
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]].<br />
<br />
===Mute button===<br />
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.<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_osi=Linux"<br />
<br />
===Screen calibration===<br />
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:<br />
<br />
# xinput_calibrator --device "Serial Wacom Tablet WACf004 stylus"<br />
<br />
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.<br />
<br />
===Loading the correct ICC colour profile===<br />
<br />
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:<br />
<br />
$ /usr/bin/xcalib -d :0 ~/.color/icc/x200.icc<br />
<br />
===Screen rotation===<br />
<br />
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}}.<br />
<br />
{{hc|head=/etc/systemd/system/setkeycodes.service|output=<br />
[Unit]<br />
Description=Assign each hardware button to a free keycode on boot<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/bin/setkeycodes 0x67 184 0x6c 185 0x68 186 0x66 187<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
}}<br />
<br />
{{Note| Commands like [[xmodmap]], xev, showkey, dmesg, setkeycodes can help you. See [[Extra keyboard keys]] for details.}}<br />
<br />
Then you can assign the script for screen rotation to that button.<br />
<br />
{{Style|In-code comments, see [[Help:Style]]}}<br />
<br />
{{hc|head=/usr/local/bin/screen_rotation.sh|output=<nowiki><br />
#!/bin/sh<br />
<br />
# Find the line in "xrandr -q --verbose" output that contains current screen orientation and "strip" out current orientation.<br />
rotation="$(xrandr -q --verbose | grep 'connected' | egrep -o '\) (normal|left|inverted|right) \(' | egrep -o '(normal|left|inverted|right)')"<br />
<br />
# Using current screen orientation proceed to rotate screen and input tools.<br />
case "$rotation" in<br />
normal)<br />
# rotate to the left<br />
xrandr -o left<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate ccw<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate ccw<br />
;;<br />
left)<br />
# rotate to normal<br />
xrandr -o normal<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate none<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate none<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
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.<br />
<br />
If you are using another desktop environment (such as XFCE, LXDE, Fluxbox ...) you can always use the program [[xbindkeys]].<br />
<br />
===Screen auto-rotation===<br />
<br />
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.<br />
Then the following script will enable you to use the accelerometer's data to automatically rotate your screen :<br />
<br />
{{bc|<nowiki>#!/bin/bash<br />
<br />
# (To have the exact names of these devices you should type the command : xsetwacom --list devices )<br />
stylus="Serial Wacom Tablet stylus" <br />
eraser="Serial Wacom Tablet eraser"<br />
<br />
function rotate {<br />
if [ $# -lt 1 ]; then # error ...<br />
exit 1 <br />
fi<br />
<br />
case "$1" in<br />
up)<br />
nextRotate="none"<br />
nextOrient="normal" ;;<br />
down)<br />
nextRotate="half"<br />
nextOrient="inverted" ;;<br />
right)<br />
nextRotate="ccw"<br />
nextOrient="left" ;;<br />
left)<br />
nextRotate="cw"<br />
nextOrient="right";;<br />
esac<br />
<br />
# Rotate the screen <br />
xrandr -o $nextOrient<br />
<br />
# Rotate the tablet <br />
xsetwacom set "$stylus" Rotate $nextRotate<br />
xsetwacom set "$eraser" Rotate $nextRotate<br />
}<br />
<br />
while true; do<br />
# 1) We extract data about the actual position<br />
position=$(cat /sys/devices/platform/hdaps/position)<br />
x=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\1/p") # most of time contained in [350,650]<br />
y=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\2/p") # most of time contained in [-650,-350]<br />
<br />
# 2) We work out the x value (= left and right inclination) (always between <br />
if [ $x -lt 400 ]; then<br />
rotate left<br />
elif [ $x -gt 600 ]; then<br />
rotate right<br />
fi<br />
<br />
# 3) We work out the y value (= front and back inclination)<br />
if [ $y -gt -400 ]; then<br />
rotate down<br />
elif [ $y -lt -600 ]; then<br />
rotate up<br />
fi<br />
<br />
# 4) wait before checking the value again<br />
sleep 0.5<br />
done<br />
</nowiki>}}<br />
<br />
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).<br />
<br />
===Power consumption and fan control===<br />
<br />
{{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.}}<br />
<br />
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].<br />
<br />
Fan-control software can be used to further reduce power consumption. The {{AUR|tpfanco-svn}} package from AUR provides a simplistic GTK GUI for setting up fan activation thresholds based upon the X200's multiple hardware sensors.<br />
<br />
To measure your systems power consumption, see [[Powertop]] and the {{AUR|powerstat-git}} package from AUR.<br />
<br />
See [[Power saving]] for additional tips.<br />
<br />
===Suspend to RAM / hibernate ===<br />
<br />
Suspend to ram and hibernation is fully supported. See [[Suspend and hibernate]] for more information. <br />
<br />
===BIOS WiFi-Whitelist Removal===<br />
{{Warning| Modifying your system's firmware can be rewarding but it is also very dangerous. Please do not modify your system's firmware unless you know what you are doing.}}<br />
<br />
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.<br />
<br />
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].<br />
<br />
Make sure the BIOS version the system is running matches the cracked version being distributed.<br />
<br />
For more information about BIOS flashing and system firmware, please see [[Flashing_BIOS_From_Linux]].<br />
<br />
===Coreboot / Libreboot ===<br />
{{Warning| Modifying your system's firmware can be rewarding but it is also very dangerous. Please do not modify your system's firmware unless you know what you are doing.}}<br />
{{Note| The following information is only valid for the ThinkPad X200, NOT the X200T or X200s.}}<br />
<br />
[http://coreboot.org/ 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 [http://libreboot.org/ website].<br />
<br />
For more information on the Libreboot project, see Gluglug's official [http://www.gluglug.org.uk/ Gluglug website].<br />
<br />
==Troubleshooting==<br />
<br />
=== failed to execute '/usr/sbin/inputattach' ===<br />
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.<br />
<br />
===System feels unresponsive===<br />
If your system feels unresponsive and lagging, you can try creating a file called {{ic|/etc/modprobe.d/drm_kms.conf}}:<br />
<br />
options drm_kms_helper poll=N<br />
<br />
===Backlight fails to activate after system resume ===<br />
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.<br />
<br />
===PM device: Resume from hibernation error: Failed to restore -19===<br />
<br />
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:<br />
<br />
# dmesg | grep 00:0a<br />
[ 0.377877] pnp 00:0a: Plug and Play ACPI device, IDs PNP0c31 (active)<br />
[ 10.746742] tpm_tis 00:0a: 1.2 TPM (device-id 0x1020, rev-id 6)<br />
[ 10.746751] tpm_tis 00:0a: Intel iTPM workaround enabled<br />
[ 10.866734] tpm_tis 00:0a: TPM is disabled/deactivated (0x6)<br />
<br />
To unload the module create the following executable file called {{ic|/usr/lib/systemd/system-sleep/tpm.sh}}, assuming the use of the systemd hibernation procedure:<br />
<br />
#!/bin/sh<br />
case $1/$2 in<br />
pre/*)<br />
echo "Going to $2..."<br />
modprobe -r tpm<br />
modprobe -r tpm_tis<br />
;;<br />
post/*)<br />
echo "Waking up from $2..."<br />
modprobe tpm<br />
modprobe tpm_tis<br />
;;<br />
esac<br />
<br />
=== mei_me 0000:00:03.0: suspend ===<br />
<br />
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].<br />
<br />
=== pciehp 0000:00:1c.1:pcie04: Cannot add device at 0000:03:00 ===<br />
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].<br />
<br />
=== Uhhuh. NMI received for unknown reason 30. ===<br />
The Thinkpad X200 is known to report the following error on resume from hibernation or suspension:<br />
<br />
Uhhuh. NMI received for unknown reason 30.<br />
Dazed and confused, but trying to continue<br />
Do you have a strange power saving mode enabled?<br />
<br />
In this case you can disable the high precision event timer (HPET) by adding "nohpet" to your [[GRUB]] kernel parameter line.<br />
<br />
=== High pitched noises ===<br />
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.<br />
<br />
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 your display draws.<br />
<br />
For more information see [http://www.thinkwiki.org/wiki/Problem_with_high_pitch_noises].<br />
<br />
==See also==<br />
* Thinkwiki: [http://www.thinkwiki.org/wiki/Category:X200 X200 Overview]<br />
* ThinkWiki: [http://www.thinkwiki.org/wiki/How_to_reduce_power_consumption How to reduce power consumption]<br />
* [https://gist.github.com/yuvadm/52b3f350293a96501478 Example installation procedure for X200s]</div>Jmaneshttps://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X200&diff=361584Lenovo ThinkPad X2002015-02-17T21:47:12Z<p>Jmanes: </p>
<hr />
<div>[[Category:Lenovo]]<br />
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.66GHz), an Intel Graphics Media Accelerator 4500MHD and up to 8GB of RAM whilst still maintaining impressive battery life.<br />
<br />
== Configuration ==<br />
<br />
===Wireless===<br />
<br />
The ThinkPad X200 has a Intel PRO/Wireless 5100/5300 AGN wireless adapter, supported by {{Pkg|linux-firmware}}.<br />
<br />
If you experience connectivity problems such as a slow connection or aborts, especially when connected to a [[WPA2 Enterprise]] network, then try to load the iwlwifi module with the options {{ic|11n_disable&#61;1}}, {{ic|11n_disable&#61;2}}, {{ic|swcrypto&#61;1}}, {{ic|bt_coex_active&#61;0}}. There is no clear recommendation which of these options to be used as for some users {{ic|11n_disable&#61;1}} already solves the problem sufficiently, for others {{ic|bt_coex_active&#61;0}}. See [[Wireless_network_configuration#iwlwifi]] for more detailed instructions.<br />
<br />
===TrackPoint===<br />
<br />
See [[TrackPoint]].<br />
<br />
===Fingerprint Reader===<br />
<br />
The fingerprint reader that is found in the X200/X200T is not supported.<br />
<br />
See [[fprint]] for more information.<br />
<br />
===Disable bluetooth at boot===<br />
<br />
See [[Power saving#Bluetooth]].<br />
<br />
===Hard Disk shock protection===<br />
<br />
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]].<br />
<br />
===Mute button===<br />
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.<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_osi=Linux"<br />
<br />
===Screen calibration===<br />
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:<br />
<br />
# xinput_calibrator --device "Serial Wacom Tablet WACf004 stylus"<br />
<br />
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.<br />
<br />
===Loading the correct ICC colour profile===<br />
<br />
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:<br />
<br />
$ /usr/bin/xcalib -d :0 ~/.color/icc/x200.icc<br />
<br />
===Screen rotation===<br />
<br />
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}}.<br />
<br />
{{hc|head=/etc/systemd/system/setkeycodes.service|output=<br />
[Unit]<br />
Description=Assign each hardware button to a free keycode on boot<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/bin/setkeycodes 0x67 184 0x6c 185 0x68 186 0x66 187<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
}}<br />
<br />
{{Note| Commands like [[xmodmap]], xev, showkey, dmesg, setkeycodes can help you. See [[Extra keyboard keys]] for details.}}<br />
<br />
Then you can assign the script for screen rotation to that button.<br />
<br />
{{Style|In-code comments, see [[Help:Style]]}}<br />
<br />
{{hc|head=/usr/local/bin/screen_rotation.sh|output=<nowiki><br />
#!/bin/sh<br />
<br />
# Find the line in "xrandr -q --verbose" output that contains current screen orientation and "strip" out current orientation.<br />
rotation="$(xrandr -q --verbose | grep 'connected' | egrep -o '\) (normal|left|inverted|right) \(' | egrep -o '(normal|left|inverted|right)')"<br />
<br />
# Using current screen orientation proceed to rotate screen and input tools.<br />
case "$rotation" in<br />
normal)<br />
# rotate to the left<br />
xrandr -o left<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate ccw<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate ccw<br />
;;<br />
left)<br />
# rotate to normal<br />
xrandr -o normal<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate none<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate none<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
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.<br />
<br />
If you are using another desktop environment (such as XFCE, LXDE, Fluxbox ...) you can always use the program [[xbindkeys]].<br />
<br />
===Screen auto-rotation===<br />
<br />
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.<br />
Then the following script will enable you to use the accelerometer's data to automatically rotate your screen :<br />
<br />
{{bc|<nowiki>#!/bin/bash<br />
<br />
# (To have the exact names of these devices you should type the command : xsetwacom --list devices )<br />
stylus="Serial Wacom Tablet stylus" <br />
eraser="Serial Wacom Tablet eraser"<br />
<br />
function rotate {<br />
if [ $# -lt 1 ]; then # error ...<br />
exit 1 <br />
fi<br />
<br />
case "$1" in<br />
up)<br />
nextRotate="none"<br />
nextOrient="normal" ;;<br />
down)<br />
nextRotate="half"<br />
nextOrient="inverted" ;;<br />
right)<br />
nextRotate="ccw"<br />
nextOrient="left" ;;<br />
left)<br />
nextRotate="cw"<br />
nextOrient="right";;<br />
esac<br />
<br />
# Rotate the screen <br />
xrandr -o $nextOrient<br />
<br />
# Rotate the tablet <br />
xsetwacom set "$stylus" Rotate $nextRotate<br />
xsetwacom set "$eraser" Rotate $nextRotate<br />
}<br />
<br />
while true; do<br />
# 1) We extract data about the actual position<br />
position=$(cat /sys/devices/platform/hdaps/position)<br />
x=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\1/p") # most of time contained in [350,650]<br />
y=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\2/p") # most of time contained in [-650,-350]<br />
<br />
# 2) We work out the x value (= left and right inclination) (always between <br />
if [ $x -lt 400 ]; then<br />
rotate left<br />
elif [ $x -gt 600 ]; then<br />
rotate right<br />
fi<br />
<br />
# 3) We work out the y value (= front and back inclination)<br />
if [ $y -gt -400 ]; then<br />
rotate down<br />
elif [ $y -lt -600 ]; then<br />
rotate up<br />
fi<br />
<br />
# 4) wait before checking the value again<br />
sleep 0.5<br />
done<br />
</nowiki>}}<br />
<br />
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).<br />
<br />
===Power consumption and fan control===<br />
<br />
{{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.}}<br />
<br />
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].<br />
<br />
Fan-control software can be used to further reduce power consumption. The {{AUR|tpfanco-svn}} package from AUR provides a simplistic GTK GUI for setting up fan activation thresholds based upon the X200's multiple hardware sensors.<br />
<br />
To measure your systems power consumption, see [[Powertop]] and the {{AUR|powerstat-git}} package from AUR.<br />
<br />
See [[Power saving]] for additional tips.<br />
<br />
===Suspend to RAM / hibernate ===<br />
<br />
Suspend to ram and hibernation is fully supported. See [[Suspend and hibernate]] for more information. <br />
<br />
===BIOS WiFi-Whitelist Removal===<br />
{{Warning| Modifying your system's firmware can be rewarding but it is also very dangerous. Please do not modify your system's firmware unless you know what you are doing.}}<br />
<br />
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.<br />
<br />
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].<br />
<br />
Make sure the BIOS version the system is running matches the cracked version being distributed.<br />
<br />
==Troubleshooting==<br />
<br />
=== failed to execute '/usr/sbin/inputattach' ===<br />
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.<br />
<br />
===System feels unresponsive===<br />
If your system feels unresponsive and lagging, you can try creating a file called {{ic|/etc/modprobe.d/drm_kms.conf}}:<br />
<br />
options drm_kms_helper poll=N<br />
<br />
===Backlight fails to activate after system resume ===<br />
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.<br />
<br />
===PM device: Resume from hibernation error: Failed to restore -19===<br />
<br />
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:<br />
<br />
# dmesg | grep 00:0a<br />
[ 0.377877] pnp 00:0a: Plug and Play ACPI device, IDs PNP0c31 (active)<br />
[ 10.746742] tpm_tis 00:0a: 1.2 TPM (device-id 0x1020, rev-id 6)<br />
[ 10.746751] tpm_tis 00:0a: Intel iTPM workaround enabled<br />
[ 10.866734] tpm_tis 00:0a: TPM is disabled/deactivated (0x6)<br />
<br />
To unload the module create the following executable file called {{ic|/usr/lib/systemd/system-sleep/tpm.sh}}, assuming the use of the systemd hibernation procedure:<br />
<br />
#!/bin/sh<br />
case $1/$2 in<br />
pre/*)<br />
echo "Going to $2..."<br />
modprobe -r tpm<br />
modprobe -r tpm_tis<br />
;;<br />
post/*)<br />
echo "Waking up from $2..."<br />
modprobe tpm<br />
modprobe tpm_tis<br />
;;<br />
esac<br />
<br />
=== mei_me 0000:00:03.0: suspend ===<br />
<br />
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].<br />
<br />
=== pciehp 0000:00:1c.1:pcie04: Cannot add device at 0000:03:00 ===<br />
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].<br />
<br />
=== Uhhuh. NMI received for unknown reason 30. ===<br />
The Thinkpad X200 is known to report the following error on resume from hibernation or suspension:<br />
<br />
Uhhuh. NMI received for unknown reason 30.<br />
Dazed and confused, but trying to continue<br />
Do you have a strange power saving mode enabled?<br />
<br />
In this case you can disable the high precision event timer (HPET) by adding "nohpet" to your [[GRUB]] kernel parameter line.<br />
<br />
=== High pitched noises ===<br />
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.<br />
<br />
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 your display draws.<br />
<br />
For more information see [http://www.thinkwiki.org/wiki/Problem_with_high_pitch_noises].<br />
<br />
==See also==<br />
* Thinkwiki: [http://www.thinkwiki.org/wiki/Category:X200 X200 Overview]<br />
* ThinkWiki: [http://www.thinkwiki.org/wiki/How_to_reduce_power_consumption How to reduce power consumption]<br />
* [https://gist.github.com/yuvadm/52b3f350293a96501478 Example installation procedure for X200s]</div>Jmaneshttps://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X200&diff=361583Lenovo ThinkPad X2002015-02-17T21:29:39Z<p>Jmanes: Added more info as to what causes high pitch noises.</p>
<hr />
<div>[[Category:Lenovo]]<br />
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.66GHz), an Intel Graphics Media Accelerator 4500MHD and up to 8GB of RAM whilst still maintaining impressive battery life.<br />
<br />
== Configuration ==<br />
<br />
===Wireless===<br />
<br />
The ThinkPad X200 has a Intel PRO/Wireless 5100/5300 AGN wireless adapter, supported by {{Pkg|linux-firmware}}.<br />
<br />
If you experience connectivity problems such as a slow connection or aborts, especially when connected to a [[WPA2 Enterprise]] network, then try to load the iwlwifi module with the options {{ic|11n_disable&#61;1}}, {{ic|11n_disable&#61;2}}, {{ic|swcrypto&#61;1}}, {{ic|bt_coex_active&#61;0}}. There is no clear recommendation which of these options to be used as for some users {{ic|11n_disable&#61;1}} already solves the problem sufficiently, for others {{ic|bt_coex_active&#61;0}}. See [[Wireless_network_configuration#iwlwifi]] for more detailed instructions.<br />
<br />
===TrackPoint===<br />
<br />
See [[TrackPoint]].<br />
<br />
===Fingerprint Reader===<br />
<br />
The fingerprint reader that is found in the X200/X200T is not supported.<br />
<br />
See [[fprint]] for more information.<br />
<br />
===Disable bluetooth at boot===<br />
<br />
See [[Power saving#Bluetooth]].<br />
<br />
===Hard Disk shock protection===<br />
<br />
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]].<br />
<br />
===Mute button===<br />
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.<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_osi=Linux"<br />
<br />
===Screen calibration===<br />
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:<br />
<br />
# xinput_calibrator --device "Serial Wacom Tablet WACf004 stylus"<br />
<br />
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.<br />
<br />
===Loading the correct ICC colour profile===<br />
<br />
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:<br />
<br />
$ /usr/bin/xcalib -d :0 ~/.color/icc/x200.icc<br />
<br />
===Screen rotation===<br />
<br />
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}}.<br />
<br />
{{hc|head=/etc/systemd/system/setkeycodes.service|output=<br />
[Unit]<br />
Description=Assign each hardware button to a free keycode on boot<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/bin/setkeycodes 0x67 184 0x6c 185 0x68 186 0x66 187<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
}}<br />
<br />
{{Note| Commands like [[xmodmap]], xev, showkey, dmesg, setkeycodes can help you. See [[Extra keyboard keys]] for details.}}<br />
<br />
Then you can assign the script for screen rotation to that button.<br />
<br />
{{Style|In-code comments, see [[Help:Style]]}}<br />
<br />
{{hc|head=/usr/local/bin/screen_rotation.sh|output=<nowiki><br />
#!/bin/sh<br />
<br />
# Find the line in "xrandr -q --verbose" output that contains current screen orientation and "strip" out current orientation.<br />
rotation="$(xrandr -q --verbose | grep 'connected' | egrep -o '\) (normal|left|inverted|right) \(' | egrep -o '(normal|left|inverted|right)')"<br />
<br />
# Using current screen orientation proceed to rotate screen and input tools.<br />
case "$rotation" in<br />
normal)<br />
# rotate to the left<br />
xrandr -o left<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate ccw<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate ccw<br />
;;<br />
left)<br />
# rotate to normal<br />
xrandr -o normal<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate none<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate none<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
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.<br />
<br />
If you are using another desktop environment (such as XFCE, LXDE, Fluxbox ...) you can always use the program [[xbindkeys]].<br />
<br />
===Screen auto-rotation===<br />
<br />
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.<br />
Then the following script will enable you to use the accelerometer's data to automatically rotate your screen :<br />
<br />
{{bc|<nowiki>#!/bin/bash<br />
<br />
# (To have the exact names of these devices you should type the command : xsetwacom --list devices )<br />
stylus="Serial Wacom Tablet stylus" <br />
eraser="Serial Wacom Tablet eraser"<br />
<br />
function rotate {<br />
if [ $# -lt 1 ]; then # error ...<br />
exit 1 <br />
fi<br />
<br />
case "$1" in<br />
up)<br />
nextRotate="none"<br />
nextOrient="normal" ;;<br />
down)<br />
nextRotate="half"<br />
nextOrient="inverted" ;;<br />
right)<br />
nextRotate="ccw"<br />
nextOrient="left" ;;<br />
left)<br />
nextRotate="cw"<br />
nextOrient="right";;<br />
esac<br />
<br />
# Rotate the screen <br />
xrandr -o $nextOrient<br />
<br />
# Rotate the tablet <br />
xsetwacom set "$stylus" Rotate $nextRotate<br />
xsetwacom set "$eraser" Rotate $nextRotate<br />
}<br />
<br />
while true; do<br />
# 1) We extract data about the actual position<br />
position=$(cat /sys/devices/platform/hdaps/position)<br />
x=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\1/p") # most of time contained in [350,650]<br />
y=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\2/p") # most of time contained in [-650,-350]<br />
<br />
# 2) We work out the x value (= left and right inclination) (always between <br />
if [ $x -lt 400 ]; then<br />
rotate left<br />
elif [ $x -gt 600 ]; then<br />
rotate right<br />
fi<br />
<br />
# 3) We work out the y value (= front and back inclination)<br />
if [ $y -gt -400 ]; then<br />
rotate down<br />
elif [ $y -lt -600 ]; then<br />
rotate up<br />
fi<br />
<br />
# 4) wait before checking the value again<br />
sleep 0.5<br />
done<br />
</nowiki>}}<br />
<br />
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).<br />
<br />
===Power consumption and fan control===<br />
<br />
{{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.}}<br />
<br />
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].<br />
<br />
Fan-control software can be used to further reduce power consumption. The {{AUR|tpfanco-svn}} package from AUR provides a simplistic GTK GUI for setting up fan activation thresholds based upon the X200's multiple hardware sensors.<br />
<br />
To measure your systems power consumption, see [[Powertop]] and the {{AUR|powerstat-git}} package from AUR.<br />
<br />
See [[Power saving]] for additional tips.<br />
<br />
===Suspend to RAM / hibernate ===<br />
<br />
Suspend to ram and hibernation is fully supported. See [[Suspend and hibernate]] for more information. <br />
<br />
==Troubleshooting==<br />
<br />
=== failed to execute '/usr/sbin/inputattach' ===<br />
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.<br />
<br />
===System feels unresponsive===<br />
If your system feels unresponsive and lagging, you can try creating a file called {{ic|/etc/modprobe.d/drm_kms.conf}}:<br />
<br />
options drm_kms_helper poll=N<br />
<br />
===Backlight fails to activate after system resume ===<br />
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.<br />
<br />
===PM device: Resume from hibernation error: Failed to restore -19===<br />
<br />
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:<br />
<br />
# dmesg | grep 00:0a<br />
[ 0.377877] pnp 00:0a: Plug and Play ACPI device, IDs PNP0c31 (active)<br />
[ 10.746742] tpm_tis 00:0a: 1.2 TPM (device-id 0x1020, rev-id 6)<br />
[ 10.746751] tpm_tis 00:0a: Intel iTPM workaround enabled<br />
[ 10.866734] tpm_tis 00:0a: TPM is disabled/deactivated (0x6)<br />
<br />
To unload the module create the following executable file called {{ic|/usr/lib/systemd/system-sleep/tpm.sh}}, assuming the use of the systemd hibernation procedure:<br />
<br />
#!/bin/sh<br />
case $1/$2 in<br />
pre/*)<br />
echo "Going to $2..."<br />
modprobe -r tpm<br />
modprobe -r tpm_tis<br />
;;<br />
post/*)<br />
echo "Waking up from $2..."<br />
modprobe tpm<br />
modprobe tpm_tis<br />
;;<br />
esac<br />
<br />
=== mei_me 0000:00:03.0: suspend ===<br />
<br />
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].<br />
<br />
=== pciehp 0000:00:1c.1:pcie04: Cannot add device at 0000:03:00 ===<br />
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].<br />
<br />
=== Uhhuh. NMI received for unknown reason 30. ===<br />
The Thinkpad X200 is known to report the following error on resume from hibernation or suspension:<br />
<br />
Uhhuh. NMI received for unknown reason 30.<br />
Dazed and confused, but trying to continue<br />
Do you have a strange power saving mode enabled?<br />
<br />
In this case you can disable the high precision event timer (HPET) by adding "nohpet" to your [[GRUB]] kernel parameter line.<br />
<br />
=== High pitched noises ===<br />
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.<br />
<br />
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 your display draws.<br />
<br />
For more information see [http://www.thinkwiki.org/wiki/Problem_with_high_pitch_noises].<br />
<br />
==See also==<br />
* Thinkwiki: [http://www.thinkwiki.org/wiki/Category:X200 X200 Overview]<br />
* ThinkWiki: [http://www.thinkwiki.org/wiki/How_to_reduce_power_consumption How to reduce power consumption]<br />
* [https://gist.github.com/yuvadm/52b3f350293a96501478 Example installation procedure for X200s]</div>Jmaneshttps://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X200&diff=361582Lenovo ThinkPad X2002015-02-17T21:23:11Z<p>Jmanes: Merged tap-to-click with TrackPoint.</p>
<hr />
<div>[[Category:Lenovo]]<br />
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.66GHz), an Intel Graphics Media Accelerator 4500MHD and up to 8GB of RAM whilst still maintaining impressive battery life.<br />
<br />
== Configuration ==<br />
<br />
===Wireless===<br />
<br />
The ThinkPad X200 has a Intel PRO/Wireless 5100/5300 AGN wireless adapter, supported by {{Pkg|linux-firmware}}.<br />
<br />
If you experience connectivity problems such as a slow connection or aborts, especially when connected to a [[WPA2 Enterprise]] network, then try to load the iwlwifi module with the options {{ic|11n_disable&#61;1}}, {{ic|11n_disable&#61;2}}, {{ic|swcrypto&#61;1}}, {{ic|bt_coex_active&#61;0}}. There is no clear recommendation which of these options to be used as for some users {{ic|11n_disable&#61;1}} already solves the problem sufficiently, for others {{ic|bt_coex_active&#61;0}}. See [[Wireless_network_configuration#iwlwifi]] for more detailed instructions.<br />
<br />
===TrackPoint===<br />
<br />
See [[TrackPoint]].<br />
<br />
===Fingerprint Reader===<br />
<br />
The fingerprint reader that is found in the X200/X200T is not supported.<br />
<br />
See [[fprint]] for more information.<br />
<br />
===Disable bluetooth at boot===<br />
<br />
See [[Power saving#Bluetooth]].<br />
<br />
===Hard Disk shock protection===<br />
<br />
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]].<br />
<br />
===Mute button===<br />
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.<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_osi=Linux"<br />
<br />
===Screen calibration===<br />
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:<br />
<br />
# xinput_calibrator --device "Serial Wacom Tablet WACf004 stylus"<br />
<br />
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.<br />
<br />
===Loading the correct ICC colour profile===<br />
<br />
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:<br />
<br />
$ /usr/bin/xcalib -d :0 ~/.color/icc/x200.icc<br />
<br />
===Screen rotation===<br />
<br />
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}}.<br />
<br />
{{hc|head=/etc/systemd/system/setkeycodes.service|output=<br />
[Unit]<br />
Description=Assign each hardware button to a free keycode on boot<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/bin/setkeycodes 0x67 184 0x6c 185 0x68 186 0x66 187<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
}}<br />
<br />
{{Note| Commands like [[xmodmap]], xev, showkey, dmesg, setkeycodes can help you. See [[Extra keyboard keys]] for details.}}<br />
<br />
Then you can assign the script for screen rotation to that button.<br />
<br />
{{Style|In-code comments, see [[Help:Style]]}}<br />
<br />
{{hc|head=/usr/local/bin/screen_rotation.sh|output=<nowiki><br />
#!/bin/sh<br />
<br />
# Find the line in "xrandr -q --verbose" output that contains current screen orientation and "strip" out current orientation.<br />
rotation="$(xrandr -q --verbose | grep 'connected' | egrep -o '\) (normal|left|inverted|right) \(' | egrep -o '(normal|left|inverted|right)')"<br />
<br />
# Using current screen orientation proceed to rotate screen and input tools.<br />
case "$rotation" in<br />
normal)<br />
# rotate to the left<br />
xrandr -o left<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate ccw<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate ccw<br />
;;<br />
left)<br />
# rotate to normal<br />
xrandr -o normal<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate none<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate none<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
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.<br />
<br />
If you are using another desktop environment (such as XFCE, LXDE, Fluxbox ...) you can always use the program [[xbindkeys]].<br />
<br />
===Screen auto-rotation===<br />
<br />
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.<br />
Then the following script will enable you to use the accelerometer's data to automatically rotate your screen :<br />
<br />
{{bc|<nowiki>#!/bin/bash<br />
<br />
# (To have the exact names of these devices you should type the command : xsetwacom --list devices )<br />
stylus="Serial Wacom Tablet stylus" <br />
eraser="Serial Wacom Tablet eraser"<br />
<br />
function rotate {<br />
if [ $# -lt 1 ]; then # error ...<br />
exit 1 <br />
fi<br />
<br />
case "$1" in<br />
up)<br />
nextRotate="none"<br />
nextOrient="normal" ;;<br />
down)<br />
nextRotate="half"<br />
nextOrient="inverted" ;;<br />
right)<br />
nextRotate="ccw"<br />
nextOrient="left" ;;<br />
left)<br />
nextRotate="cw"<br />
nextOrient="right";;<br />
esac<br />
<br />
# Rotate the screen <br />
xrandr -o $nextOrient<br />
<br />
# Rotate the tablet <br />
xsetwacom set "$stylus" Rotate $nextRotate<br />
xsetwacom set "$eraser" Rotate $nextRotate<br />
}<br />
<br />
while true; do<br />
# 1) We extract data about the actual position<br />
position=$(cat /sys/devices/platform/hdaps/position)<br />
x=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\1/p") # most of time contained in [350,650]<br />
y=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\2/p") # most of time contained in [-650,-350]<br />
<br />
# 2) We work out the x value (= left and right inclination) (always between <br />
if [ $x -lt 400 ]; then<br />
rotate left<br />
elif [ $x -gt 600 ]; then<br />
rotate right<br />
fi<br />
<br />
# 3) We work out the y value (= front and back inclination)<br />
if [ $y -gt -400 ]; then<br />
rotate down<br />
elif [ $y -lt -600 ]; then<br />
rotate up<br />
fi<br />
<br />
# 4) wait before checking the value again<br />
sleep 0.5<br />
done<br />
</nowiki>}}<br />
<br />
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).<br />
<br />
===Power consumption and fan control===<br />
<br />
{{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.}}<br />
<br />
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].<br />
<br />
Fan-control software can be used to further reduce power consumption. The {{AUR|tpfanco-svn}} package from AUR provides a simplistic GTK GUI for setting up fan activation thresholds based upon the X200's multiple hardware sensors.<br />
<br />
To measure your systems power consumption, see [[Powertop]] and the {{AUR|powerstat-git}} package from AUR.<br />
<br />
See [[Power saving]] for additional tips.<br />
<br />
===Suspend to RAM / hibernate ===<br />
<br />
Suspend to ram and hibernation is fully supported. See [[Suspend and hibernate]] for more information. <br />
<br />
==Troubleshooting==<br />
<br />
=== failed to execute '/usr/sbin/inputattach' ===<br />
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.<br />
<br />
===System feels unresponsive===<br />
If your system feels unresponsive and lagging, you can try creating a file called {{ic|/etc/modprobe.d/drm_kms.conf}}:<br />
<br />
options drm_kms_helper poll=N<br />
<br />
===Backlight fails to activate after system resume ===<br />
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.<br />
<br />
===PM device: Resume from hibernation error: Failed to restore -19===<br />
<br />
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:<br />
<br />
# dmesg | grep 00:0a<br />
[ 0.377877] pnp 00:0a: Plug and Play ACPI device, IDs PNP0c31 (active)<br />
[ 10.746742] tpm_tis 00:0a: 1.2 TPM (device-id 0x1020, rev-id 6)<br />
[ 10.746751] tpm_tis 00:0a: Intel iTPM workaround enabled<br />
[ 10.866734] tpm_tis 00:0a: TPM is disabled/deactivated (0x6)<br />
<br />
To unload the module create the following executable file called {{ic|/usr/lib/systemd/system-sleep/tpm.sh}}, assuming the use of the systemd hibernation procedure:<br />
<br />
#!/bin/sh<br />
case $1/$2 in<br />
pre/*)<br />
echo "Going to $2..."<br />
modprobe -r tpm<br />
modprobe -r tpm_tis<br />
;;<br />
post/*)<br />
echo "Waking up from $2..."<br />
modprobe tpm<br />
modprobe tpm_tis<br />
;;<br />
esac<br />
<br />
=== mei_me 0000:00:03.0: suspend ===<br />
<br />
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].<br />
<br />
=== pciehp 0000:00:1c.1:pcie04: Cannot add device at 0000:03:00 ===<br />
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].<br />
<br />
=== Uhhuh. NMI received for unknown reason 30. ===<br />
The Thinkpad X200 is known to report the following error on resume from hibernation or suspension:<br />
<br />
Uhhuh. NMI received for unknown reason 30.<br />
Dazed and confused, but trying to continue<br />
Do you have a strange power saving mode enabled?<br />
<br />
In this case you can disable the high precision event timer (HPET) by adding "nohpet" to your [[GRUB]] kernel parameter line.<br />
<br />
=== High pitched noises ===<br />
The X200(s) is prone to high pitched, low volume noises originating from the CPU, usually in low power scenarios.<br />
<br />
One proved solution is to disable CPU power control in the BIOS.<br />
<br />
For more information see [http://www.thinkwiki.org/wiki/Problem_with_high_pitch_noises].<br />
<br />
==See also==<br />
* Thinkwiki: [http://www.thinkwiki.org/wiki/Category:X200 X200 Overview]<br />
* ThinkWiki: [http://www.thinkwiki.org/wiki/How_to_reduce_power_consumption How to reduce power consumption]<br />
* [https://gist.github.com/yuvadm/52b3f350293a96501478 Example installation procedure for X200s]</div>Jmaneshttps://wiki.archlinux.org/index.php?title=TrackPoint&diff=361581TrackPoint2015-02-17T21:22:08Z<p>Jmanes: </p>
<hr />
<div>[[Category:Input devices]]<br />
[[Category:Lenovo]]<br />
{{Expansion|Many pages in [[:Category:Lenovo]] contain more detailed configuration, which need to be merged here.|ArchWiki:Requests#TrackPoint}}<br />
<br />
The TrackPoint is Lenovo's trademark for the pointing-stick in the middle of the keyboard.<br />
<br />
Default [[Xorg]] behavior supports click and point, but middle-click and scrolling requires extra configuration.<br />
<br />
==Middle button scroll==<br />
<br />
Middle-button scrolling, is supported via the {{Pkg|xorg-xinput}} package, with the following sane config:<br />
<br />
{{hc|~/.xinitrc|<br />
xinput set-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation" 1<br />
xinput set-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Button" 2<br />
xinput set-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Timeout" 200<br />
xinput set-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Axes" 6 7 4 5<br />
xinput set-prop "TPPS/2 IBM TrackPoint" "Device Accel Constant Deceleration" 0.75<br />
}}<br />
<br />
The {{ic|"Device Accel Constant Deceleration"}} line configures the sensitivity of the trackpoint. Note that you can just type these commands into the shell, changing sensitivity on the fly to find a value that's sensible.<br />
<br />
==Tap to select==<br />
{{Note| The file location below may be different depending upon the device you are using. Systems with both a TrackPoint and a touchpad device will use the /sys/devices/platform/i8042/serio1/serio2/ location where as systems with only a TrackPoint device will use the /sys/devices/platform/i8042/serio1/ location.}}<br />
<br />
The TrackPoint supports tap-to-click functionality just as most touchpads do. The following one-liner should work.<br />
{{bc| # echo -n 1 > /sys/devices/platform/i8042/serio1/press_to_select}}<br />
<br />
==References==<br />
* [http://www.thinkwiki.org/wiki/How_to_configure_the_TrackPoint How to configure the TrackPoint - ThinkWiki]</div>Jmaneshttps://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X200&diff=361577Lenovo ThinkPad X2002015-02-17T20:57:15Z<p>Jmanes: Removed the "grub kernel parameter" section. The information given in the section is found in the power saving section note.</p>
<hr />
<div>[[Category:Lenovo]]<br />
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.66GHz), an Intel Graphics Media Accelerator 4500MHD and up to 8GB of RAM whilst still maintaining impressive battery life.<br />
<br />
== Configuration ==<br />
<br />
===Wireless===<br />
<br />
The ThinkPad X200 has a Intel PRO/Wireless 5100/5300 AGN wireless adapter, supported by {{Pkg|linux-firmware}}.<br />
<br />
If you experience connectivity problems such as a slow connection or aborts, especially when connected to a [[WPA2 Enterprise]] network, then try to load the iwlwifi module with the options {{ic|11n_disable&#61;1}}, {{ic|11n_disable&#61;2}}, {{ic|swcrypto&#61;1}}, {{ic|bt_coex_active&#61;0}}. There is no clear recommendation which of these options to be used as for some users {{ic|11n_disable&#61;1}} already solves the problem sufficiently, for others {{ic|bt_coex_active&#61;0}}. See [[Wireless_network_configuration#iwlwifi]] for more detailed instructions.<br />
<br />
===TrackPoint===<br />
<br />
See [[TrackPoint]].<br />
<br />
===Fingerprint Reader===<br />
<br />
The fingerprint reader that is found in the X200/X200T is not supported.<br />
<br />
See [[fprint]] for more information.<br />
<br />
===Disable bluetooth at boot===<br />
<br />
See [[Power saving#Bluetooth]].<br />
<br />
===Enable tap to select===<br />
<br />
{{Merge|TrackPoint}}<br />
<br />
You can enable the double click through tapping on your track point. Create the following file:<br />
<br />
{{hc|/etc/tmpfiles.d/enable-tap-to-select.conf|<br />
w /sys/devices/platform/i8042/serio1/press_to_select - - - - 1<br />
}}<br />
<br />
===Hard Disk shock protection===<br />
<br />
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]].<br />
<br />
===Mute button===<br />
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.<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_osi=Linux"<br />
<br />
===Screen calibration===<br />
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:<br />
<br />
# xinput_calibrator --device "Serial Wacom Tablet WACf004 stylus"<br />
<br />
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.<br />
<br />
===Loading the correct ICC colour profile===<br />
<br />
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:<br />
<br />
$ /usr/bin/xcalib -d :0 ~/.color/icc/x200.icc<br />
<br />
===Screen rotation===<br />
<br />
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}}.<br />
<br />
{{hc|head=/etc/systemd/system/setkeycodes.service|output=<br />
[Unit]<br />
Description=Assign each hardware button to a free keycode on boot<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/bin/setkeycodes 0x67 184 0x6c 185 0x68 186 0x66 187<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
}}<br />
<br />
{{Note| Commands like [[xmodmap]], xev, showkey, dmesg, setkeycodes can help you. See [[Extra keyboard keys]] for details.}}<br />
<br />
Then you can assign the script for screen rotation to that button.<br />
<br />
{{Style|In-code comments, see [[Help:Style]]}}<br />
<br />
{{hc|head=/usr/local/bin/screen_rotation.sh|output=<nowiki><br />
#!/bin/sh<br />
<br />
# Find the line in "xrandr -q --verbose" output that contains current screen orientation and "strip" out current orientation.<br />
rotation="$(xrandr -q --verbose | grep 'connected' | egrep -o '\) (normal|left|inverted|right) \(' | egrep -o '(normal|left|inverted|right)')"<br />
<br />
# Using current screen orientation proceed to rotate screen and input tools.<br />
case "$rotation" in<br />
normal)<br />
# rotate to the left<br />
xrandr -o left<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate ccw<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate ccw<br />
;;<br />
left)<br />
# rotate to normal<br />
xrandr -o normal<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate none<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate none<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
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.<br />
<br />
If you are using another desktop environment (such as XFCE, LXDE, Fluxbox ...) you can always use the program [[xbindkeys]].<br />
<br />
===Screen auto-rotation===<br />
<br />
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.<br />
Then the following script will enable you to use the accelerometer's data to automatically rotate your screen :<br />
<br />
{{bc|<nowiki>#!/bin/bash<br />
<br />
# (To have the exact names of these devices you should type the command : xsetwacom --list devices )<br />
stylus="Serial Wacom Tablet stylus" <br />
eraser="Serial Wacom Tablet eraser"<br />
<br />
function rotate {<br />
if [ $# -lt 1 ]; then # error ...<br />
exit 1 <br />
fi<br />
<br />
case "$1" in<br />
up)<br />
nextRotate="none"<br />
nextOrient="normal" ;;<br />
down)<br />
nextRotate="half"<br />
nextOrient="inverted" ;;<br />
right)<br />
nextRotate="ccw"<br />
nextOrient="left" ;;<br />
left)<br />
nextRotate="cw"<br />
nextOrient="right";;<br />
esac<br />
<br />
# Rotate the screen <br />
xrandr -o $nextOrient<br />
<br />
# Rotate the tablet <br />
xsetwacom set "$stylus" Rotate $nextRotate<br />
xsetwacom set "$eraser" Rotate $nextRotate<br />
}<br />
<br />
while true; do<br />
# 1) We extract data about the actual position<br />
position=$(cat /sys/devices/platform/hdaps/position)<br />
x=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\1/p") # most of time contained in [350,650]<br />
y=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\2/p") # most of time contained in [-650,-350]<br />
<br />
# 2) We work out the x value (= left and right inclination) (always between <br />
if [ $x -lt 400 ]; then<br />
rotate left<br />
elif [ $x -gt 600 ]; then<br />
rotate right<br />
fi<br />
<br />
# 3) We work out the y value (= front and back inclination)<br />
if [ $y -gt -400 ]; then<br />
rotate down<br />
elif [ $y -lt -600 ]; then<br />
rotate up<br />
fi<br />
<br />
# 4) wait before checking the value again<br />
sleep 0.5<br />
done<br />
</nowiki>}}<br />
<br />
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).<br />
<br />
===Power consumption and fan control===<br />
<br />
{{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.}}<br />
<br />
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].<br />
<br />
Fan-control software can be used to further reduce power consumption. The {{AUR|tpfanco-svn}} package from AUR provides a simplistic GTK GUI for setting up fan activation thresholds based upon the X200's multiple hardware sensors.<br />
<br />
To measure your systems power consumption, see [[Powertop]] and the {{AUR|powerstat-git}} package from AUR.<br />
<br />
See [[Power saving]] for additional tips.<br />
<br />
===Suspend to RAM / hibernate ===<br />
<br />
Suspend to ram and hibernation is fully supported. See [[Suspend and hibernate]] for more information. <br />
<br />
==Troubleshooting==<br />
<br />
=== failed to execute '/usr/sbin/inputattach' ===<br />
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.<br />
<br />
===System feels unresponsive===<br />
If your system feels unresponsive and lagging, you can try creating a file called {{ic|/etc/modprobe.d/drm_kms.conf}}:<br />
<br />
options drm_kms_helper poll=N<br />
<br />
===Backlight fails to activate after system resume ===<br />
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.<br />
<br />
===PM device: Resume from hibernation error: Failed to restore -19===<br />
<br />
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:<br />
<br />
# dmesg | grep 00:0a<br />
[ 0.377877] pnp 00:0a: Plug and Play ACPI device, IDs PNP0c31 (active)<br />
[ 10.746742] tpm_tis 00:0a: 1.2 TPM (device-id 0x1020, rev-id 6)<br />
[ 10.746751] tpm_tis 00:0a: Intel iTPM workaround enabled<br />
[ 10.866734] tpm_tis 00:0a: TPM is disabled/deactivated (0x6)<br />
<br />
To unload the module create the following executable file called {{ic|/usr/lib/systemd/system-sleep/tpm.sh}}, assuming the use of the systemd hibernation procedure:<br />
<br />
#!/bin/sh<br />
case $1/$2 in<br />
pre/*)<br />
echo "Going to $2..."<br />
modprobe -r tpm<br />
modprobe -r tpm_tis<br />
;;<br />
post/*)<br />
echo "Waking up from $2..."<br />
modprobe tpm<br />
modprobe tpm_tis<br />
;;<br />
esac<br />
<br />
=== mei_me 0000:00:03.0: suspend ===<br />
<br />
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].<br />
<br />
=== pciehp 0000:00:1c.1:pcie04: Cannot add device at 0000:03:00 ===<br />
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].<br />
<br />
=== Uhhuh. NMI received for unknown reason 30. ===<br />
The Thinkpad X200 is known to report the following error on resume from hibernation or suspension:<br />
<br />
Uhhuh. NMI received for unknown reason 30.<br />
Dazed and confused, but trying to continue<br />
Do you have a strange power saving mode enabled?<br />
<br />
In this case you can disable the high precision event timer (HPET) by adding "nohpet" to your [[GRUB]] kernel parameter line.<br />
<br />
=== High pitched noises ===<br />
The X200(s) is prone to high pitched, low volume noises originating from the CPU, usually in low power scenarios.<br />
<br />
One proved solution is to disable CPU power control in the BIOS.<br />
<br />
For more information see [http://www.thinkwiki.org/wiki/Problem_with_high_pitch_noises].<br />
<br />
==See also==<br />
* Thinkwiki: [http://www.thinkwiki.org/wiki/Category:X200 X200 Overview]<br />
* ThinkWiki: [http://www.thinkwiki.org/wiki/How_to_reduce_power_consumption How to reduce power consumption]<br />
* [https://gist.github.com/yuvadm/52b3f350293a96501478 Example installation procedure for X200s]</div>Jmaneshttps://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X200&diff=361576Lenovo ThinkPad X2002015-02-17T20:52:58Z<p>Jmanes: Clarified that one of the packages was from AUR.</p>
<hr />
<div>[[Category:Lenovo]]<br />
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.66GHz), an Intel Graphics Media Accelerator 4500MHD and up to 8GB of RAM whilst still maintaining impressive battery life.<br />
<br />
== Configuration ==<br />
<br />
===Wireless===<br />
<br />
The ThinkPad X200 has a Intel PRO/Wireless 5100/5300 AGN wireless adapter, supported by {{Pkg|linux-firmware}}.<br />
<br />
If you experience connectivity problems such as a slow connection or aborts, especially when connected to a [[WPA2 Enterprise]] network, then try to load the iwlwifi module with the options {{ic|11n_disable&#61;1}}, {{ic|11n_disable&#61;2}}, {{ic|swcrypto&#61;1}}, {{ic|bt_coex_active&#61;0}}. There is no clear recommendation which of these options to be used as for some users {{ic|11n_disable&#61;1}} already solves the problem sufficiently, for others {{ic|bt_coex_active&#61;0}}. See [[Wireless_network_configuration#iwlwifi]] for more detailed instructions.<br />
<br />
===TrackPoint===<br />
<br />
See [[TrackPoint]].<br />
<br />
===Fingerprint Reader===<br />
<br />
The fingerprint reader that is found in the X200/X200T is not supported.<br />
<br />
See [[fprint]] for more information.<br />
<br />
=== GRUB kernel parameter ===<br />
<br />
{{Merge|GRUB|Doesn't belong here}}<br />
<br />
Many kernel parameters usually recommended in the past to increase performance and battery conservation are obsolete or already implemented in the kernel by default. As such the actual kernel line in {{ic|/etc/default/grub}} can look very minimal:<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="acpi_osi=Linux zswap.enabled=1 zswap.compressor=lz4 resume=/dev/mapper/VolGroup00-Swap"<br />
<br />
{{ic|acpi_osi&#61;Linux}} is required to make the mute button working and {{ic|zswap.enabled&#61;1}} as well as {{ic|zswap.compressor&#61;lz4}} will increase the speed on resume from hibernation.<br />
<br />
===Disable bluetooth at boot===<br />
<br />
See [[Power saving#Bluetooth]].<br />
<br />
===Enable tap to select===<br />
<br />
{{Merge|TrackPoint}}<br />
<br />
You can enable the double click through tapping on your track point. Create the following file:<br />
<br />
{{hc|/etc/tmpfiles.d/enable-tap-to-select.conf|<br />
w /sys/devices/platform/i8042/serio1/press_to_select - - - - 1<br />
}}<br />
<br />
===Hard Disk shock protection===<br />
<br />
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]].<br />
<br />
===Mute button===<br />
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.<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_osi=Linux"<br />
<br />
===Screen calibration===<br />
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:<br />
<br />
# xinput_calibrator --device "Serial Wacom Tablet WACf004 stylus"<br />
<br />
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.<br />
<br />
===Loading the correct ICC colour profile===<br />
<br />
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:<br />
<br />
$ /usr/bin/xcalib -d :0 ~/.color/icc/x200.icc<br />
<br />
===Screen rotation===<br />
<br />
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}}.<br />
<br />
{{hc|head=/etc/systemd/system/setkeycodes.service|output=<br />
[Unit]<br />
Description=Assign each hardware button to a free keycode on boot<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/bin/setkeycodes 0x67 184 0x6c 185 0x68 186 0x66 187<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
}}<br />
<br />
{{Note| Commands like [[xmodmap]], xev, showkey, dmesg, setkeycodes can help you. See [[Extra keyboard keys]] for details.}}<br />
<br />
Then you can assign the script for screen rotation to that button.<br />
<br />
{{Style|In-code comments, see [[Help:Style]]}}<br />
<br />
{{hc|head=/usr/local/bin/screen_rotation.sh|output=<nowiki><br />
#!/bin/sh<br />
<br />
# Find the line in "xrandr -q --verbose" output that contains current screen orientation and "strip" out current orientation.<br />
rotation="$(xrandr -q --verbose | grep 'connected' | egrep -o '\) (normal|left|inverted|right) \(' | egrep -o '(normal|left|inverted|right)')"<br />
<br />
# Using current screen orientation proceed to rotate screen and input tools.<br />
case "$rotation" in<br />
normal)<br />
# rotate to the left<br />
xrandr -o left<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate ccw<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate ccw<br />
;;<br />
left)<br />
# rotate to normal<br />
xrandr -o normal<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate none<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate none<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
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.<br />
<br />
If you are using another desktop environment (such as XFCE, LXDE, Fluxbox ...) you can always use the program [[xbindkeys]].<br />
<br />
===Screen auto-rotation===<br />
<br />
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.<br />
Then the following script will enable you to use the accelerometer's data to automatically rotate your screen :<br />
<br />
{{bc|<nowiki>#!/bin/bash<br />
<br />
# (To have the exact names of these devices you should type the command : xsetwacom --list devices )<br />
stylus="Serial Wacom Tablet stylus" <br />
eraser="Serial Wacom Tablet eraser"<br />
<br />
function rotate {<br />
if [ $# -lt 1 ]; then # error ...<br />
exit 1 <br />
fi<br />
<br />
case "$1" in<br />
up)<br />
nextRotate="none"<br />
nextOrient="normal" ;;<br />
down)<br />
nextRotate="half"<br />
nextOrient="inverted" ;;<br />
right)<br />
nextRotate="ccw"<br />
nextOrient="left" ;;<br />
left)<br />
nextRotate="cw"<br />
nextOrient="right";;<br />
esac<br />
<br />
# Rotate the screen <br />
xrandr -o $nextOrient<br />
<br />
# Rotate the tablet <br />
xsetwacom set "$stylus" Rotate $nextRotate<br />
xsetwacom set "$eraser" Rotate $nextRotate<br />
}<br />
<br />
while true; do<br />
# 1) We extract data about the actual position<br />
position=$(cat /sys/devices/platform/hdaps/position)<br />
x=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\1/p") # most of time contained in [350,650]<br />
y=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\2/p") # most of time contained in [-650,-350]<br />
<br />
# 2) We work out the x value (= left and right inclination) (always between <br />
if [ $x -lt 400 ]; then<br />
rotate left<br />
elif [ $x -gt 600 ]; then<br />
rotate right<br />
fi<br />
<br />
# 3) We work out the y value (= front and back inclination)<br />
if [ $y -gt -400 ]; then<br />
rotate down<br />
elif [ $y -lt -600 ]; then<br />
rotate up<br />
fi<br />
<br />
# 4) wait before checking the value again<br />
sleep 0.5<br />
done<br />
</nowiki>}}<br />
<br />
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).<br />
<br />
===Power consumption and fan control===<br />
<br />
{{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.}}<br />
<br />
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].<br />
<br />
Fan-control software can be used to further reduce power consumption. The {{AUR|tpfanco-svn}} package from AUR provides a simplistic GTK GUI for setting up fan activation thresholds based upon the X200's multiple hardware sensors.<br />
<br />
To measure your systems power consumption, see [[Powertop]] and the {{AUR|powerstat-git}} package from AUR.<br />
<br />
See [[Power saving]] for additional tips.<br />
<br />
===Suspend to RAM / hibernate ===<br />
<br />
Suspend to ram and hibernation is fully supported. See [[Suspend and hibernate]] for more information. <br />
<br />
==Troubleshooting==<br />
<br />
=== failed to execute '/usr/sbin/inputattach' ===<br />
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.<br />
<br />
===System feels unresponsive===<br />
If your system feels unresponsive and lagging, you can try creating a file called {{ic|/etc/modprobe.d/drm_kms.conf}}:<br />
<br />
options drm_kms_helper poll=N<br />
<br />
===Backlight fails to activate after system resume ===<br />
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.<br />
<br />
===PM device: Resume from hibernation error: Failed to restore -19===<br />
<br />
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:<br />
<br />
# dmesg | grep 00:0a<br />
[ 0.377877] pnp 00:0a: Plug and Play ACPI device, IDs PNP0c31 (active)<br />
[ 10.746742] tpm_tis 00:0a: 1.2 TPM (device-id 0x1020, rev-id 6)<br />
[ 10.746751] tpm_tis 00:0a: Intel iTPM workaround enabled<br />
[ 10.866734] tpm_tis 00:0a: TPM is disabled/deactivated (0x6)<br />
<br />
To unload the module create the following executable file called {{ic|/usr/lib/systemd/system-sleep/tpm.sh}}, assuming the use of the systemd hibernation procedure:<br />
<br />
#!/bin/sh<br />
case $1/$2 in<br />
pre/*)<br />
echo "Going to $2..."<br />
modprobe -r tpm<br />
modprobe -r tpm_tis<br />
;;<br />
post/*)<br />
echo "Waking up from $2..."<br />
modprobe tpm<br />
modprobe tpm_tis<br />
;;<br />
esac<br />
<br />
=== mei_me 0000:00:03.0: suspend ===<br />
<br />
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].<br />
<br />
=== pciehp 0000:00:1c.1:pcie04: Cannot add device at 0000:03:00 ===<br />
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].<br />
<br />
=== Uhhuh. NMI received for unknown reason 30. ===<br />
The Thinkpad X200 is known to report the following error on resume from hibernation or suspension:<br />
<br />
Uhhuh. NMI received for unknown reason 30.<br />
Dazed and confused, but trying to continue<br />
Do you have a strange power saving mode enabled?<br />
<br />
In this case you can disable the high precision event timer (HPET) by adding "nohpet" to your [[GRUB]] kernel parameter line.<br />
<br />
=== High pitched noises ===<br />
The X200(s) is prone to high pitched, low volume noises originating from the CPU, usually in low power scenarios.<br />
<br />
One proved solution is to disable CPU power control in the BIOS.<br />
<br />
For more information see [http://www.thinkwiki.org/wiki/Problem_with_high_pitch_noises].<br />
<br />
==See also==<br />
* Thinkwiki: [http://www.thinkwiki.org/wiki/Category:X200 X200 Overview]<br />
* ThinkWiki: [http://www.thinkwiki.org/wiki/How_to_reduce_power_consumption How to reduce power consumption]<br />
* [https://gist.github.com/yuvadm/52b3f350293a96501478 Example installation procedure for X200s]</div>Jmaneshttps://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X200&diff=361536Lenovo ThinkPad X2002015-02-17T16:51:46Z<p>Jmanes: Merged backlight on resume issue into troubleshooting</p>
<hr />
<div>[[Category:Lenovo]]<br />
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.66GHz), an Intel Graphics Media Accelerator 4500MHD and up to 8GB of RAM whilst still maintaining impressive battery life.<br />
<br />
== Configuration ==<br />
<br />
===Wireless===<br />
<br />
The ThinkPad X200 has a Intel PRO/Wireless 5100/5300 AGN wireless adapter, supported by {{Pkg|linux-firmware}}.<br />
<br />
If you experience connectivity problems such as a slow connection or aborts, especially when connected to a [[WPA2 Enterprise]] network, then try to load the iwlwifi module with the options {{ic|11n_disable&#61;1}}, {{ic|11n_disable&#61;2}}, {{ic|swcrypto&#61;1}}, {{ic|bt_coex_active&#61;0}}. There is no clear recommendation which of these options to be used as for some users {{ic|11n_disable&#61;1}} already solves the problem sufficiently, for others {{ic|bt_coex_active&#61;0}}. See [[Wireless_network_configuration#iwlwifi]] for more detailed instructions.<br />
<br />
===TrackPoint===<br />
<br />
See [[TrackPoint]].<br />
<br />
===Fingerprint Reader===<br />
<br />
The fingerprint reader that is found in the X200/X200T is not supported.<br />
<br />
See [[fprint]] for more information.<br />
<br />
=== GRUB kernel parameter ===<br />
<br />
{{Merge|GRUB|Doesn't belong here}}<br />
<br />
Many kernel parameters usually recommended in the past to increase performance and battery conservation are obsolete or already implemented in the kernel by default. As such the actual kernel line in {{ic|/etc/default/grub}} can look very minimal:<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="acpi_osi=Linux zswap.enabled=1 zswap.compressor=lz4 resume=/dev/mapper/VolGroup00-Swap"<br />
<br />
{{ic|acpi_osi&#61;Linux}} is required to make the mute button working and {{ic|zswap.enabled&#61;1}} as well as {{ic|zswap.compressor&#61;lz4}} will increase the speed on resume from hibernation.<br />
<br />
===Disable bluetooth at boot===<br />
<br />
See [[Power saving#Bluetooth]].<br />
<br />
===Enable tap to select===<br />
<br />
{{Merge|TrackPoint}}<br />
<br />
You can enable the double click through tapping on your track point. Create the following file:<br />
<br />
{{hc|/etc/tmpfiles.d/enable-tap-to-select.conf|<br />
w /sys/devices/platform/i8042/serio1/press_to_select - - - - 1<br />
}}<br />
<br />
===Hard Disk shock protection===<br />
<br />
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]].<br />
<br />
===Mute button===<br />
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.<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_osi=Linux"<br />
<br />
===Screen calibration===<br />
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:<br />
<br />
# xinput_calibrator --device "Serial Wacom Tablet WACf004 stylus"<br />
<br />
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.<br />
<br />
===Loading the correct ICC colour profile===<br />
<br />
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:<br />
<br />
$ /usr/bin/xcalib -d :0 ~/.color/icc/x200.icc<br />
<br />
===Screen rotation===<br />
<br />
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}}.<br />
<br />
{{hc|head=/etc/systemd/system/setkeycodes.service|output=<br />
[Unit]<br />
Description=Assign each hardware button to a free keycode on boot<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/bin/setkeycodes 0x67 184 0x6c 185 0x68 186 0x66 187<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
}}<br />
<br />
{{Note| Commands like [[xmodmap]], xev, showkey, dmesg, setkeycodes can help you. See [[Extra keyboard keys]] for details.}}<br />
<br />
Then you can assign the script for screen rotation to that button.<br />
<br />
{{Style|In-code comments, see [[Help:Style]]}}<br />
<br />
{{hc|head=/usr/local/bin/screen_rotation.sh|output=<nowiki><br />
#!/bin/sh<br />
<br />
# Find the line in "xrandr -q --verbose" output that contains current screen orientation and "strip" out current orientation.<br />
rotation="$(xrandr -q --verbose | grep 'connected' | egrep -o '\) (normal|left|inverted|right) \(' | egrep -o '(normal|left|inverted|right)')"<br />
<br />
# Using current screen orientation proceed to rotate screen and input tools.<br />
case "$rotation" in<br />
normal)<br />
# rotate to the left<br />
xrandr -o left<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate ccw<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate ccw<br />
;;<br />
left)<br />
# rotate to normal<br />
xrandr -o normal<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate none<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate none<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
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.<br />
<br />
If you are using another desktop environment (such as XFCE, LXDE, Fluxbox ...) you can always use the program [[xbindkeys]].<br />
<br />
===Screen auto-rotation===<br />
<br />
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.<br />
Then the following script will enable you to use the accelerometer's data to automatically rotate your screen :<br />
<br />
{{bc|<nowiki>#!/bin/bash<br />
<br />
# (To have the exact names of these devices you should type the command : xsetwacom --list devices )<br />
stylus="Serial Wacom Tablet stylus" <br />
eraser="Serial Wacom Tablet eraser"<br />
<br />
function rotate {<br />
if [ $# -lt 1 ]; then # error ...<br />
exit 1 <br />
fi<br />
<br />
case "$1" in<br />
up)<br />
nextRotate="none"<br />
nextOrient="normal" ;;<br />
down)<br />
nextRotate="half"<br />
nextOrient="inverted" ;;<br />
right)<br />
nextRotate="ccw"<br />
nextOrient="left" ;;<br />
left)<br />
nextRotate="cw"<br />
nextOrient="right";;<br />
esac<br />
<br />
# Rotate the screen <br />
xrandr -o $nextOrient<br />
<br />
# Rotate the tablet <br />
xsetwacom set "$stylus" Rotate $nextRotate<br />
xsetwacom set "$eraser" Rotate $nextRotate<br />
}<br />
<br />
while true; do<br />
# 1) We extract data about the actual position<br />
position=$(cat /sys/devices/platform/hdaps/position)<br />
x=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\1/p") # most of time contained in [350,650]<br />
y=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\2/p") # most of time contained in [-650,-350]<br />
<br />
# 2) We work out the x value (= left and right inclination) (always between <br />
if [ $x -lt 400 ]; then<br />
rotate left<br />
elif [ $x -gt 600 ]; then<br />
rotate right<br />
fi<br />
<br />
# 3) We work out the y value (= front and back inclination)<br />
if [ $y -gt -400 ]; then<br />
rotate down<br />
elif [ $y -lt -600 ]; then<br />
rotate up<br />
fi<br />
<br />
# 4) wait before checking the value again<br />
sleep 0.5<br />
done<br />
</nowiki>}}<br />
<br />
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).<br />
<br />
===Power consumption and fan control===<br />
<br />
{{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.}}<br />
<br />
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].<br />
<br />
Fan-control software can be used to further reduce power consumption. The {{AUR|tpfanco-svn}} package from AUR provides a simplistic GTK GUI for setting up fan activation thresholds based upon the X200's multiple hardware sensors.<br />
<br />
To measure your systems power consumption, see [[Powertop]] and {{AUR|powerstat-git}}.<br />
<br />
See [[Power saving]] for additional tips.<br />
<br />
===Suspend to RAM / hibernate ===<br />
<br />
Suspend to ram and hibernation is fully supported. See [[Suspend and hibernate]] for more information. <br />
<br />
==Troubleshooting==<br />
<br />
=== failed to execute '/usr/sbin/inputattach' ===<br />
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.<br />
<br />
===System feels unresponsive===<br />
If your system feels unresponsive and lagging, you can try creating a file called {{ic|/etc/modprobe.d/drm_kms.conf}}:<br />
<br />
options drm_kms_helper poll=N<br />
<br />
===Backlight fails to activate after system resume ===<br />
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.<br />
<br />
===PM device: Resume from hibernation error: Failed to restore -19===<br />
<br />
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:<br />
<br />
# dmesg | grep 00:0a<br />
[ 0.377877] pnp 00:0a: Plug and Play ACPI device, IDs PNP0c31 (active)<br />
[ 10.746742] tpm_tis 00:0a: 1.2 TPM (device-id 0x1020, rev-id 6)<br />
[ 10.746751] tpm_tis 00:0a: Intel iTPM workaround enabled<br />
[ 10.866734] tpm_tis 00:0a: TPM is disabled/deactivated (0x6)<br />
<br />
To unload the module create the following executable file called {{ic|/usr/lib/systemd/system-sleep/tpm.sh}}, assuming the use of the systemd hibernation procedure:<br />
<br />
#!/bin/sh<br />
case $1/$2 in<br />
pre/*)<br />
echo "Going to $2..."<br />
modprobe -r tpm<br />
modprobe -r tpm_tis<br />
;;<br />
post/*)<br />
echo "Waking up from $2..."<br />
modprobe tpm<br />
modprobe tpm_tis<br />
;;<br />
esac<br />
<br />
=== mei_me 0000:00:03.0: suspend ===<br />
<br />
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].<br />
<br />
=== pciehp 0000:00:1c.1:pcie04: Cannot add device at 0000:03:00 ===<br />
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].<br />
<br />
=== Uhhuh. NMI received for unknown reason 30. ===<br />
The Thinkpad X200 is known to report the following error on resume from hibernation or suspension:<br />
<br />
Uhhuh. NMI received for unknown reason 30.<br />
Dazed and confused, but trying to continue<br />
Do you have a strange power saving mode enabled?<br />
<br />
In this case you can disable the high precision event timer (HPET) by adding "nohpet" to your [[GRUB]] kernel parameter line.<br />
<br />
=== High pitched noises ===<br />
The X200(s) is prone to high pitched, low volume noises originating from the CPU, usually in low power scenarios.<br />
<br />
One proved solution is to disable CPU power control in the BIOS.<br />
<br />
For more information see [http://www.thinkwiki.org/wiki/Problem_with_high_pitch_noises].<br />
<br />
==See also==<br />
* Thinkwiki: [http://www.thinkwiki.org/wiki/Category:X200 X200 Overview]<br />
* ThinkWiki: [http://www.thinkwiki.org/wiki/How_to_reduce_power_consumption How to reduce power consumption]<br />
* [https://gist.github.com/yuvadm/52b3f350293a96501478 Example installation procedure for X200s]</div>Jmaneshttps://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X200&diff=361535Lenovo ThinkPad X2002015-02-17T16:45:10Z<p>Jmanes: Fixed a typo in the opening sentence. life.h -> life.</p>
<hr />
<div>[[Category:Lenovo]]<br />
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.66GHz), an Intel Graphics Media Accelerator 4500MHD and up to 8GB of RAM whilst still maintaining impressive battery life.<br />
<br />
== Configuration ==<br />
<br />
===Wireless===<br />
<br />
The ThinkPad X200 has a Intel PRO/Wireless 5100/5300 AGN wireless adapter, supported by {{Pkg|linux-firmware}}.<br />
<br />
If you experience connectivity problems such as a slow connection or aborts, especially when connected to a [[WPA2 Enterprise]] network, then try to load the iwlwifi module with the options {{ic|11n_disable&#61;1}}, {{ic|11n_disable&#61;2}}, {{ic|swcrypto&#61;1}}, {{ic|bt_coex_active&#61;0}}. There is no clear recommendation which of these options to be used as for some users {{ic|11n_disable&#61;1}} already solves the problem sufficiently, for others {{ic|bt_coex_active&#61;0}}. See [[Wireless_network_configuration#iwlwifi]] for more detailed instructions.<br />
<br />
===TrackPoint===<br />
<br />
See [[TrackPoint]].<br />
<br />
===Fingerprint Reader===<br />
<br />
The fingerprint reader that is found in the X200/X200T is not supported.<br />
<br />
See [[fprint]] for more information.<br />
<br />
=== GRUB kernel parameter ===<br />
<br />
{{Merge|GRUB|Doesn't belong here}}<br />
<br />
Many kernel parameters usually recommended in the past to increase performance and battery conservation are obsolete or already implemented in the kernel by default. As such the actual kernel line in {{ic|/etc/default/grub}} can look very minimal:<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="acpi_osi=Linux zswap.enabled=1 zswap.compressor=lz4 resume=/dev/mapper/VolGroup00-Swap"<br />
<br />
{{ic|acpi_osi&#61;Linux}} is required to make the mute button working and {{ic|zswap.enabled&#61;1}} as well as {{ic|zswap.compressor&#61;lz4}} will increase the speed on resume from hibernation.<br />
<br />
===Disable bluetooth at boot===<br />
<br />
See [[Power saving#Bluetooth]].<br />
<br />
===Enable tap to select===<br />
<br />
{{Merge|TrackPoint}}<br />
<br />
You can enable the double click through tapping on your track point. Create the following file:<br />
<br />
{{hc|/etc/tmpfiles.d/enable-tap-to-select.conf|<br />
w /sys/devices/platform/i8042/serio1/press_to_select - - - - 1<br />
}}<br />
<br />
===Hard Disk shock protection===<br />
<br />
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]].<br />
<br />
===Mute button===<br />
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.<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_osi=Linux"<br />
<br />
===Screen calibration===<br />
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:<br />
<br />
# xinput_calibrator --device "Serial Wacom Tablet WACf004 stylus"<br />
<br />
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.<br />
<br />
===Loading the correct ICC colour profile===<br />
<br />
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:<br />
<br />
$ /usr/bin/xcalib -d :0 ~/.color/icc/x200.icc<br />
<br />
===Screen rotation===<br />
<br />
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}}.<br />
<br />
{{hc|head=/etc/systemd/system/setkeycodes.service|output=<br />
[Unit]<br />
Description=Assign each hardware button to a free keycode on boot<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/bin/setkeycodes 0x67 184 0x6c 185 0x68 186 0x66 187<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
}}<br />
<br />
{{Note| Commands like [[xmodmap]], xev, showkey, dmesg, setkeycodes can help you. See [[Extra keyboard keys]] for details.}}<br />
<br />
Then you can assign the script for screen rotation to that button.<br />
<br />
{{Style|In-code comments, see [[Help:Style]]}}<br />
<br />
{{hc|head=/usr/local/bin/screen_rotation.sh|output=<nowiki><br />
#!/bin/sh<br />
<br />
# Find the line in "xrandr -q --verbose" output that contains current screen orientation and "strip" out current orientation.<br />
rotation="$(xrandr -q --verbose | grep 'connected' | egrep -o '\) (normal|left|inverted|right) \(' | egrep -o '(normal|left|inverted|right)')"<br />
<br />
# Using current screen orientation proceed to rotate screen and input tools.<br />
case "$rotation" in<br />
normal)<br />
# rotate to the left<br />
xrandr -o left<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate ccw<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate ccw<br />
;;<br />
left)<br />
# rotate to normal<br />
xrandr -o normal<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate none<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate none<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
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.<br />
<br />
If you are using another desktop environment (such as XFCE, LXDE, Fluxbox ...) you can always use the program [[xbindkeys]].<br />
<br />
===Screen auto-rotation===<br />
<br />
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.<br />
Then the following script will enable you to use the accelerometer's data to automatically rotate your screen :<br />
<br />
{{bc|<nowiki>#!/bin/bash<br />
<br />
# (To have the exact names of these devices you should type the command : xsetwacom --list devices )<br />
stylus="Serial Wacom Tablet stylus" <br />
eraser="Serial Wacom Tablet eraser"<br />
<br />
function rotate {<br />
if [ $# -lt 1 ]; then # error ...<br />
exit 1 <br />
fi<br />
<br />
case "$1" in<br />
up)<br />
nextRotate="none"<br />
nextOrient="normal" ;;<br />
down)<br />
nextRotate="half"<br />
nextOrient="inverted" ;;<br />
right)<br />
nextRotate="ccw"<br />
nextOrient="left" ;;<br />
left)<br />
nextRotate="cw"<br />
nextOrient="right";;<br />
esac<br />
<br />
# Rotate the screen <br />
xrandr -o $nextOrient<br />
<br />
# Rotate the tablet <br />
xsetwacom set "$stylus" Rotate $nextRotate<br />
xsetwacom set "$eraser" Rotate $nextRotate<br />
}<br />
<br />
while true; do<br />
# 1) We extract data about the actual position<br />
position=$(cat /sys/devices/platform/hdaps/position)<br />
x=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\1/p") # most of time contained in [350,650]<br />
y=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\2/p") # most of time contained in [-650,-350]<br />
<br />
# 2) We work out the x value (= left and right inclination) (always between <br />
if [ $x -lt 400 ]; then<br />
rotate left<br />
elif [ $x -gt 600 ]; then<br />
rotate right<br />
fi<br />
<br />
# 3) We work out the y value (= front and back inclination)<br />
if [ $y -gt -400 ]; then<br />
rotate down<br />
elif [ $y -lt -600 ]; then<br />
rotate up<br />
fi<br />
<br />
# 4) wait before checking the value again<br />
sleep 0.5<br />
done<br />
</nowiki>}}<br />
<br />
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).<br />
<br />
===Power consumption and fan control===<br />
<br />
{{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.}}<br />
<br />
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].<br />
<br />
Fan-control software can be used to further reduce power consumption. The {{AUR|tpfanco-svn}} package from AUR provides a simplistic GTK GUI for setting up fan activation thresholds based upon the X200's multiple hardware sensors.<br />
<br />
To measure your systems power consumption, see [[Powertop]] and {{AUR|powerstat-git}}.<br />
<br />
See [[Power saving]] for additional tips.<br />
<br />
===Suspend to RAM / hibernate ===<br />
<br />
{{Merge|#Troubleshooting}}<br />
<br />
See [[Suspend and hibernate]]. 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.<br />
<br />
==Troubleshooting==<br />
<br />
=== failed to execute '/usr/sbin/inputattach' ===<br />
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.<br />
<br />
===System feels unresponsive===<br />
If your system feels unresponsive and lagging, you can try creating a file called {{ic|/etc/modprobe.d/drm_kms.conf}}:<br />
<br />
options drm_kms_helper poll=N<br />
<br />
===PM device: Resume from hibernation error: Failed to restore -19===<br />
<br />
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:<br />
<br />
# dmesg | grep 00:0a<br />
[ 0.377877] pnp 00:0a: Plug and Play ACPI device, IDs PNP0c31 (active)<br />
[ 10.746742] tpm_tis 00:0a: 1.2 TPM (device-id 0x1020, rev-id 6)<br />
[ 10.746751] tpm_tis 00:0a: Intel iTPM workaround enabled<br />
[ 10.866734] tpm_tis 00:0a: TPM is disabled/deactivated (0x6)<br />
<br />
To unload the module create the following executable file called {{ic|/usr/lib/systemd/system-sleep/tpm.sh}}, assuming the use of the systemd hibernation procedure:<br />
<br />
#!/bin/sh<br />
case $1/$2 in<br />
pre/*)<br />
echo "Going to $2..."<br />
modprobe -r tpm<br />
modprobe -r tpm_tis<br />
;;<br />
post/*)<br />
echo "Waking up from $2..."<br />
modprobe tpm<br />
modprobe tpm_tis<br />
;;<br />
esac<br />
<br />
=== mei_me 0000:00:03.0: suspend ===<br />
<br />
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].<br />
<br />
=== pciehp 0000:00:1c.1:pcie04: Cannot add device at 0000:03:00 ===<br />
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].<br />
<br />
=== Uhhuh. NMI received for unknown reason 30. ===<br />
The Thinkpad X200 is known to report the following error on resume from hibernation or suspension:<br />
<br />
Uhhuh. NMI received for unknown reason 30.<br />
Dazed and confused, but trying to continue<br />
Do you have a strange power saving mode enabled?<br />
<br />
In this case you can disable the high precision event timer (HPET) by adding "nohpet" to your [[GRUB]] kernel parameter line.<br />
<br />
=== High pitched noises ===<br />
The X200(s) is prone to high pitched, low volume noises originating from the CPU, usually in low power scenarios.<br />
<br />
One proved solution is to disable CPU power control in the BIOS.<br />
<br />
For more information see [http://www.thinkwiki.org/wiki/Problem_with_high_pitch_noises].<br />
<br />
==See also==<br />
* Thinkwiki: [http://www.thinkwiki.org/wiki/Category:X200 X200 Overview]<br />
* ThinkWiki: [http://www.thinkwiki.org/wiki/How_to_reduce_power_consumption How to reduce power consumption]<br />
* [https://gist.github.com/yuvadm/52b3f350293a96501478 Example installation procedure for X200s]</div>Jmaneshttps://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X200&diff=361534Lenovo ThinkPad X2002015-02-17T16:30:37Z<p>Jmanes: The fingerprint reader in the X200/X200T is not supported. (I own both)</p>
<hr />
<div>[[Category:Lenovo]]<br />
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 8GB of RAM whilst still maintaining impressive battery life.h<br />
<br />
== Configuration ==<br />
<br />
===Wireless===<br />
<br />
The ThinkPad X200 has a Intel PRO/Wireless 5100/5300 AGN wireless adapter, supported by {{Pkg|linux-firmware}}.<br />
<br />
If you experience connectivity problems such as a slow connection or aborts, especially when connected to a [[WPA2 Enterprise]] network, then try to load the iwlwifi module with the options {{ic|11n_disable&#61;1}}, {{ic|11n_disable&#61;2}}, {{ic|swcrypto&#61;1}}, {{ic|bt_coex_active&#61;0}}. There is no clear recommendation which of these options to be used as for some users {{ic|11n_disable&#61;1}} already solves the problem sufficiently, for others {{ic|bt_coex_active&#61;0}}. See [[Wireless_network_configuration#iwlwifi]] for more detailed instructions.<br />
<br />
===TrackPoint===<br />
<br />
See [[TrackPoint]].<br />
<br />
===Fingerprint Reader===<br />
<br />
The fingerprint reader that is found in the X200/X200T is not supported.<br />
<br />
See [[fprint]] for more information.<br />
<br />
=== GRUB kernel parameter ===<br />
<br />
{{Merge|GRUB|Doesn't belong here}}<br />
<br />
Many kernel parameters usually recommended in the past to increase performance and battery conservation are obsolete or already implemented in the kernel by default. As such the actual kernel line in {{ic|/etc/default/grub}} can look very minimal:<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="acpi_osi=Linux zswap.enabled=1 zswap.compressor=lz4 resume=/dev/mapper/VolGroup00-Swap"<br />
<br />
{{ic|acpi_osi&#61;Linux}} is required to make the mute button working and {{ic|zswap.enabled&#61;1}} as well as {{ic|zswap.compressor&#61;lz4}} will increase the speed on resume from hibernation.<br />
<br />
===Disable bluetooth at boot===<br />
<br />
See [[Power saving#Bluetooth]].<br />
<br />
===Enable tap to select===<br />
<br />
{{Merge|TrackPoint}}<br />
<br />
You can enable the double click through tapping on your track point. Create the following file:<br />
<br />
{{hc|/etc/tmpfiles.d/enable-tap-to-select.conf|<br />
w /sys/devices/platform/i8042/serio1/press_to_select - - - - 1<br />
}}<br />
<br />
===Hard Disk shock protection===<br />
<br />
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]].<br />
<br />
===Mute button===<br />
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.<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_osi=Linux"<br />
<br />
===Screen calibration===<br />
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:<br />
<br />
# xinput_calibrator --device "Serial Wacom Tablet WACf004 stylus"<br />
<br />
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.<br />
<br />
===Loading the correct ICC colour profile===<br />
<br />
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:<br />
<br />
$ /usr/bin/xcalib -d :0 ~/.color/icc/x200.icc<br />
<br />
===Screen rotation===<br />
<br />
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}}.<br />
<br />
{{hc|head=/etc/systemd/system/setkeycodes.service|output=<br />
[Unit]<br />
Description=Assign each hardware button to a free keycode on boot<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/bin/setkeycodes 0x67 184 0x6c 185 0x68 186 0x66 187<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
}}<br />
<br />
{{Note| Commands like [[xmodmap]], xev, showkey, dmesg, setkeycodes can help you. See [[Extra keyboard keys]] for details.}}<br />
<br />
Then you can assign the script for screen rotation to that button.<br />
<br />
{{Style|In-code comments, see [[Help:Style]]}}<br />
<br />
{{hc|head=/usr/local/bin/screen_rotation.sh|output=<nowiki><br />
#!/bin/sh<br />
<br />
# Find the line in "xrandr -q --verbose" output that contains current screen orientation and "strip" out current orientation.<br />
rotation="$(xrandr -q --verbose | grep 'connected' | egrep -o '\) (normal|left|inverted|right) \(' | egrep -o '(normal|left|inverted|right)')"<br />
<br />
# Using current screen orientation proceed to rotate screen and input tools.<br />
case "$rotation" in<br />
normal)<br />
# rotate to the left<br />
xrandr -o left<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate ccw<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate ccw<br />
;;<br />
left)<br />
# rotate to normal<br />
xrandr -o normal<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate none<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate none<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
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.<br />
<br />
If you are using another desktop environment (such as XFCE, LXDE, Fluxbox ...) you can always use the program [[xbindkeys]].<br />
<br />
===Screen auto-rotation===<br />
<br />
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.<br />
Then the following script will enable you to use the accelerometer's data to automatically rotate your screen :<br />
<br />
{{bc|<nowiki>#!/bin/bash<br />
<br />
# (To have the exact names of these devices you should type the command : xsetwacom --list devices )<br />
stylus="Serial Wacom Tablet stylus" <br />
eraser="Serial Wacom Tablet eraser"<br />
<br />
function rotate {<br />
if [ $# -lt 1 ]; then # error ...<br />
exit 1 <br />
fi<br />
<br />
case "$1" in<br />
up)<br />
nextRotate="none"<br />
nextOrient="normal" ;;<br />
down)<br />
nextRotate="half"<br />
nextOrient="inverted" ;;<br />
right)<br />
nextRotate="ccw"<br />
nextOrient="left" ;;<br />
left)<br />
nextRotate="cw"<br />
nextOrient="right";;<br />
esac<br />
<br />
# Rotate the screen <br />
xrandr -o $nextOrient<br />
<br />
# Rotate the tablet <br />
xsetwacom set "$stylus" Rotate $nextRotate<br />
xsetwacom set "$eraser" Rotate $nextRotate<br />
}<br />
<br />
while true; do<br />
# 1) We extract data about the actual position<br />
position=$(cat /sys/devices/platform/hdaps/position)<br />
x=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\1/p") # most of time contained in [350,650]<br />
y=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\2/p") # most of time contained in [-650,-350]<br />
<br />
# 2) We work out the x value (= left and right inclination) (always between <br />
if [ $x -lt 400 ]; then<br />
rotate left<br />
elif [ $x -gt 600 ]; then<br />
rotate right<br />
fi<br />
<br />
# 3) We work out the y value (= front and back inclination)<br />
if [ $y -gt -400 ]; then<br />
rotate down<br />
elif [ $y -lt -600 ]; then<br />
rotate up<br />
fi<br />
<br />
# 4) wait before checking the value again<br />
sleep 0.5<br />
done<br />
</nowiki>}}<br />
<br />
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).<br />
<br />
===Power consumption and fan control===<br />
<br />
{{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.}}<br />
<br />
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].<br />
<br />
Fan-control software can be used to further reduce power consumption. The {{AUR|tpfanco-svn}} package from AUR provides a simplistic GTK GUI for setting up fan activation thresholds based upon the X200's multiple hardware sensors.<br />
<br />
To measure your systems power consumption, see [[Powertop]] and {{AUR|powerstat-git}}.<br />
<br />
See [[Power saving]] for additional tips.<br />
<br />
===Suspend to RAM / hibernate ===<br />
<br />
{{Merge|#Troubleshooting}}<br />
<br />
See [[Suspend and hibernate]]. 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.<br />
<br />
==Troubleshooting==<br />
<br />
=== failed to execute '/usr/sbin/inputattach' ===<br />
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.<br />
<br />
===System feels unresponsive===<br />
If your system feels unresponsive and lagging, you can try creating a file called {{ic|/etc/modprobe.d/drm_kms.conf}}:<br />
<br />
options drm_kms_helper poll=N<br />
<br />
===PM device: Resume from hibernation error: Failed to restore -19===<br />
<br />
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:<br />
<br />
# dmesg | grep 00:0a<br />
[ 0.377877] pnp 00:0a: Plug and Play ACPI device, IDs PNP0c31 (active)<br />
[ 10.746742] tpm_tis 00:0a: 1.2 TPM (device-id 0x1020, rev-id 6)<br />
[ 10.746751] tpm_tis 00:0a: Intel iTPM workaround enabled<br />
[ 10.866734] tpm_tis 00:0a: TPM is disabled/deactivated (0x6)<br />
<br />
To unload the module create the following executable file called {{ic|/usr/lib/systemd/system-sleep/tpm.sh}}, assuming the use of the systemd hibernation procedure:<br />
<br />
#!/bin/sh<br />
case $1/$2 in<br />
pre/*)<br />
echo "Going to $2..."<br />
modprobe -r tpm<br />
modprobe -r tpm_tis<br />
;;<br />
post/*)<br />
echo "Waking up from $2..."<br />
modprobe tpm<br />
modprobe tpm_tis<br />
;;<br />
esac<br />
<br />
=== mei_me 0000:00:03.0: suspend ===<br />
<br />
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].<br />
<br />
=== pciehp 0000:00:1c.1:pcie04: Cannot add device at 0000:03:00 ===<br />
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].<br />
<br />
=== Uhhuh. NMI received for unknown reason 30. ===<br />
The Thinkpad X200 is known to report the following error on resume from hibernation or suspension:<br />
<br />
Uhhuh. NMI received for unknown reason 30.<br />
Dazed and confused, but trying to continue<br />
Do you have a strange power saving mode enabled?<br />
<br />
In this case you can disable the high precision event timer (HPET) by adding "nohpet" to your [[GRUB]] kernel parameter line.<br />
<br />
=== High pitched noises ===<br />
The X200(s) is prone to high pitched, low volume noises originating from the CPU, usually in low power scenarios.<br />
<br />
One proved solution is to disable CPU power control in the BIOS.<br />
<br />
For more information see [http://www.thinkwiki.org/wiki/Problem_with_high_pitch_noises].<br />
<br />
==See also==<br />
* Thinkwiki: [http://www.thinkwiki.org/wiki/Category:X200 X200 Overview]<br />
* ThinkWiki: [http://www.thinkwiki.org/wiki/How_to_reduce_power_consumption How to reduce power consumption]<br />
* [https://gist.github.com/yuvadm/52b3f350293a96501478 Example installation procedure for X200s]</div>Jmaneshttps://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X200&diff=361532Lenovo ThinkPad X2002015-02-17T15:55:36Z<p>Jmanes: Merged the tips and tricks section (which only contained redundant info on power consumption) with the power consumption section.</p>
<hr />
<div>[[Category:Lenovo]]<br />
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 8GB of RAM whilst still maintaining impressive battery life.h<br />
<br />
== Configuration ==<br />
<br />
===Wireless===<br />
<br />
The ThinkPad X200 has a Intel PRO/Wireless 5100/5300 AGN wireless adapter, supported by {{Pkg|linux-firmware}}.<br />
<br />
If you experience connectivity problems such as a slow connection or aborts, especially when connected to a [[WPA2 Enterprise]] network, then try to load the iwlwifi module with the options {{ic|11n_disable&#61;1}}, {{ic|11n_disable&#61;2}}, {{ic|swcrypto&#61;1}}, {{ic|bt_coex_active&#61;0}}. There is no clear recommendation which of these options to be used as for some users {{ic|11n_disable&#61;1}} already solves the problem sufficiently, for others {{ic|bt_coex_active&#61;0}}. See [[Wireless_network_configuration#iwlwifi]] for more detailed instructions.<br />
<br />
===TrackPoint===<br />
<br />
See [[TrackPoint]].<br />
<br />
===Fingerprint Reader===<br />
<br />
See [[fprint]].<br />
<br />
=== GRUB kernel parameter ===<br />
<br />
{{Merge|GRUB|Doesn't belong here}}<br />
<br />
Many kernel parameters usually recommended in the past to increase performance and battery conservation are obsolete or already implemented in the kernel by default. As such the actual kernel line in {{ic|/etc/default/grub}} can look very minimal:<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="acpi_osi=Linux zswap.enabled=1 zswap.compressor=lz4 resume=/dev/mapper/VolGroup00-Swap"<br />
<br />
{{ic|acpi_osi&#61;Linux}} is required to make the mute button working and {{ic|zswap.enabled&#61;1}} as well as {{ic|zswap.compressor&#61;lz4}} will increase the speed on resume from hibernation.<br />
<br />
===Disable bluetooth at boot===<br />
<br />
See [[Power saving#Bluetooth]].<br />
<br />
===Enable tap to select===<br />
<br />
{{Merge|TrackPoint}}<br />
<br />
You can enable the double click through tapping on your track point. Create the following file:<br />
<br />
{{hc|/etc/tmpfiles.d/enable-tap-to-select.conf|<br />
w /sys/devices/platform/i8042/serio1/press_to_select - - - - 1<br />
}}<br />
<br />
===Hard Disk shock protection===<br />
<br />
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]].<br />
<br />
===Mute button===<br />
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.<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_osi=Linux"<br />
<br />
===Screen calibration===<br />
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:<br />
<br />
# xinput_calibrator --device "Serial Wacom Tablet WACf004 stylus"<br />
<br />
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.<br />
<br />
===Loading the correct ICC colour profile===<br />
<br />
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:<br />
<br />
$ /usr/bin/xcalib -d :0 ~/.color/icc/x200.icc<br />
<br />
===Screen rotation===<br />
<br />
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}}.<br />
<br />
{{hc|head=/etc/systemd/system/setkeycodes.service|output=<br />
[Unit]<br />
Description=Assign each hardware button to a free keycode on boot<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/bin/setkeycodes 0x67 184 0x6c 185 0x68 186 0x66 187<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
}}<br />
<br />
{{Note| Commands like [[xmodmap]], xev, showkey, dmesg, setkeycodes can help you. See [[Extra keyboard keys]] for details.}}<br />
<br />
Then you can assign the script for screen rotation to that button.<br />
<br />
{{Style|In-code comments, see [[Help:Style]]}}<br />
<br />
{{hc|head=/usr/local/bin/screen_rotation.sh|output=<nowiki><br />
#!/bin/sh<br />
<br />
# Find the line in "xrandr -q --verbose" output that contains current screen orientation and "strip" out current orientation.<br />
rotation="$(xrandr -q --verbose | grep 'connected' | egrep -o '\) (normal|left|inverted|right) \(' | egrep -o '(normal|left|inverted|right)')"<br />
<br />
# Using current screen orientation proceed to rotate screen and input tools.<br />
case "$rotation" in<br />
normal)<br />
# rotate to the left<br />
xrandr -o left<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate ccw<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate ccw<br />
;;<br />
left)<br />
# rotate to normal<br />
xrandr -o normal<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate none<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate none<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
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.<br />
<br />
If you are using another desktop environment (such as XFCE, LXDE, Fluxbox ...) you can always use the program [[xbindkeys]].<br />
<br />
===Screen auto-rotation===<br />
<br />
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.<br />
Then the following script will enable you to use the accelerometer's data to automatically rotate your screen :<br />
<br />
{{bc|<nowiki>#!/bin/bash<br />
<br />
# (To have the exact names of these devices you should type the command : xsetwacom --list devices )<br />
stylus="Serial Wacom Tablet stylus" <br />
eraser="Serial Wacom Tablet eraser"<br />
<br />
function rotate {<br />
if [ $# -lt 1 ]; then # error ...<br />
exit 1 <br />
fi<br />
<br />
case "$1" in<br />
up)<br />
nextRotate="none"<br />
nextOrient="normal" ;;<br />
down)<br />
nextRotate="half"<br />
nextOrient="inverted" ;;<br />
right)<br />
nextRotate="ccw"<br />
nextOrient="left" ;;<br />
left)<br />
nextRotate="cw"<br />
nextOrient="right";;<br />
esac<br />
<br />
# Rotate the screen <br />
xrandr -o $nextOrient<br />
<br />
# Rotate the tablet <br />
xsetwacom set "$stylus" Rotate $nextRotate<br />
xsetwacom set "$eraser" Rotate $nextRotate<br />
}<br />
<br />
while true; do<br />
# 1) We extract data about the actual position<br />
position=$(cat /sys/devices/platform/hdaps/position)<br />
x=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\1/p") # most of time contained in [350,650]<br />
y=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\2/p") # most of time contained in [-650,-350]<br />
<br />
# 2) We work out the x value (= left and right inclination) (always between <br />
if [ $x -lt 400 ]; then<br />
rotate left<br />
elif [ $x -gt 600 ]; then<br />
rotate right<br />
fi<br />
<br />
# 3) We work out the y value (= front and back inclination)<br />
if [ $y -gt -400 ]; then<br />
rotate down<br />
elif [ $y -lt -600 ]; then<br />
rotate up<br />
fi<br />
<br />
# 4) wait before checking the value again<br />
sleep 0.5<br />
done<br />
</nowiki>}}<br />
<br />
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).<br />
<br />
===Power consumption and fan control===<br />
<br />
{{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.}}<br />
<br />
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].<br />
<br />
Fan-control software can be used to further reduce power consumption. The {{AUR|tpfanco-svn}} package from AUR provides a simplistic GTK GUI for setting up fan activation thresholds based upon the X200's multiple hardware sensors.<br />
<br />
To measure your systems power consumption, see [[Powertop]] and {{AUR|powerstat-git}}.<br />
<br />
See [[Power saving]] for additional tips.<br />
<br />
===Suspend to RAM / hibernate ===<br />
<br />
{{Merge|#Troubleshooting}}<br />
<br />
See [[Suspend and hibernate]]. 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.<br />
<br />
==Troubleshooting==<br />
<br />
=== failed to execute '/usr/sbin/inputattach' ===<br />
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.<br />
<br />
===System feels unresponsive===<br />
If your system feels unresponsive and lagging, you can try creating a file called {{ic|/etc/modprobe.d/drm_kms.conf}}:<br />
<br />
options drm_kms_helper poll=N<br />
<br />
===PM device: Resume from hibernation error: Failed to restore -19===<br />
<br />
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:<br />
<br />
# dmesg | grep 00:0a<br />
[ 0.377877] pnp 00:0a: Plug and Play ACPI device, IDs PNP0c31 (active)<br />
[ 10.746742] tpm_tis 00:0a: 1.2 TPM (device-id 0x1020, rev-id 6)<br />
[ 10.746751] tpm_tis 00:0a: Intel iTPM workaround enabled<br />
[ 10.866734] tpm_tis 00:0a: TPM is disabled/deactivated (0x6)<br />
<br />
To unload the module create the following executable file called {{ic|/usr/lib/systemd/system-sleep/tpm.sh}}, assuming the use of the systemd hibernation procedure:<br />
<br />
#!/bin/sh<br />
case $1/$2 in<br />
pre/*)<br />
echo "Going to $2..."<br />
modprobe -r tpm<br />
modprobe -r tpm_tis<br />
;;<br />
post/*)<br />
echo "Waking up from $2..."<br />
modprobe tpm<br />
modprobe tpm_tis<br />
;;<br />
esac<br />
<br />
=== mei_me 0000:00:03.0: suspend ===<br />
<br />
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].<br />
<br />
=== pciehp 0000:00:1c.1:pcie04: Cannot add device at 0000:03:00 ===<br />
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].<br />
<br />
=== Uhhuh. NMI received for unknown reason 30. ===<br />
The Thinkpad X200 is known to report the following error on resume from hibernation or suspension:<br />
<br />
Uhhuh. NMI received for unknown reason 30.<br />
Dazed and confused, but trying to continue<br />
Do you have a strange power saving mode enabled?<br />
<br />
In this case you can disable the high precision event timer (HPET) by adding "nohpet" to your [[GRUB]] kernel parameter line.<br />
<br />
=== High pitched noises ===<br />
The X200(s) is prone to high pitched, low volume noises originating from the CPU, usually in low power scenarios.<br />
<br />
One proved solution is to disable CPU power control in the BIOS.<br />
<br />
For more information see [http://www.thinkwiki.org/wiki/Problem_with_high_pitch_noises].<br />
<br />
==See also==<br />
* Thinkwiki: [http://www.thinkwiki.org/wiki/Category:X200 X200 Overview]<br />
* ThinkWiki: [http://www.thinkwiki.org/wiki/How_to_reduce_power_consumption How to reduce power consumption]<br />
* [https://gist.github.com/yuvadm/52b3f350293a96501478 Example installation procedure for X200s]</div>Jmaneshttps://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X200&diff=357688Lenovo ThinkPad X2002015-01-22T23:46:58Z<p>Jmanes: /* Power consumption and fan control */</p>
<hr />
<div>[[Category:Lenovo]]<br />
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 8GB of RAM whilst still maintaining impressive battery life.h<br />
<br />
== Configuration ==<br />
<br />
===Wireless===<br />
<br />
The ThinkPad X200 has a Intel PRO/Wireless 5100/5300 AGN wireless adapter, supported by {{Pkg|linux-firmware}}.<br />
<br />
If you experience connectivity problems such as a slow connection or aborts, especially when connected to a [[WPA2 Enterprise]] network, then try to load the iwlwifi module with the options {{ic|11n_disable&#61;1}}, {{ic|11n_disable&#61;2}}, {{ic|swcrypto&#61;1}}, {{ic|bt_coex_active&#61;0}}. There is no clear recommendation which of these options to be used as for some users {{ic|11n_disable&#61;1}} already solves the problem sufficiently, for others {{ic|bt_coex_active&#61;0}}. See [[Wireless_network_configuration#iwlwifi]] for more detailed instructions.<br />
<br />
===TrackPoint===<br />
<br />
See [[TrackPoint]].<br />
<br />
===Fingerprint Reader===<br />
<br />
See [[fprint]].<br />
<br />
=== GRUB kernel parameter ===<br />
<br />
{{Merge|GRUB|Doesn't belong here}}<br />
<br />
Many kernel parameters usually recommended in the past to increase performance and battery conservation are obsolete or already implemented in the kernel by default. As such the actual kernel line in {{ic|/etc/default/grub}} can look very minimal:<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="acpi_osi=Linux zswap.enabled=1 zswap.compressor=lz4 resume=/dev/mapper/VolGroup00-Swap"<br />
<br />
{{ic|acpi_osi&#61;Linux}} is required to make the mute button working and {{ic|zswap.enabled&#61;1}} as well as {{ic|zswap.compressor&#61;lz4}} will increase the speed on resume from hibernation.<br />
<br />
===Disable bluetooth at boot===<br />
<br />
See [[Power saving#Bluetooth]].<br />
<br />
===Enable tap to select===<br />
<br />
{{Merge|TrackPoint}}<br />
<br />
You can enable the double click through tapping on your track point. Create the following file:<br />
<br />
{{hc|/etc/tmpfiles.d/enable-tap-to-select.conf|<br />
w /sys/devices/platform/i8042/serio1/press_to_select - - - - 1<br />
}}<br />
<br />
===Hard Disk shock protection===<br />
<br />
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]].<br />
<br />
===Mute button===<br />
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.<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_osi=Linux"<br />
<br />
===Screen calibration===<br />
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:<br />
<br />
# xinput_calibrator --device "Serial Wacom Tablet WACf004 stylus"<br />
<br />
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.<br />
<br />
===Loading the correct ICC colour profile===<br />
<br />
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:<br />
<br />
$ /usr/bin/xcalib -d :0 ~/.color/icc/x200.icc<br />
<br />
===Screen rotation===<br />
<br />
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}}.<br />
<br />
{{hc|head=/etc/systemd/system/setkeycodes.service|output=<br />
[Unit]<br />
Description=Assign each hardware button to a free keycode on boot<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/bin/setkeycodes 0x67 184 0x6c 185 0x68 186 0x66 187<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
}}<br />
<br />
{{Note| Commands like [[xmodmap]], xev, showkey, dmesg, setkeycodes can help you. See [[Extra keyboard keys]] for details.}}<br />
<br />
Then you can assign the script for screen rotation to that button.<br />
<br />
{{Style|In-code comments, see [[Help:Style]]}}<br />
<br />
{{hc|head=/usr/local/bin/screen_rotation.sh|output=<nowiki><br />
#!/bin/sh<br />
<br />
# Find the line in "xrandr -q --verbose" output that contains current screen orientation and "strip" out current orientation.<br />
rotation="$(xrandr -q --verbose | grep 'connected' | egrep -o '\) (normal|left|inverted|right) \(' | egrep -o '(normal|left|inverted|right)')"<br />
<br />
# Using current screen orientation proceed to rotate screen and input tools.<br />
case "$rotation" in<br />
normal)<br />
# rotate to the left<br />
xrandr -o left<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate ccw<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate ccw<br />
;;<br />
left)<br />
# rotate to normal<br />
xrandr -o normal<br />
xsetwacom set "Serial Wacom Tablet WACf004 stylus" rotate none<br />
xsetwacom set "Serial Wacom Tablet WACf004 eraser" rotate none<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
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.<br />
<br />
If you are using another desktop environment (such as XFCE, LXDE, Fluxbox ...) you can always use the program [[xbindkeys]].<br />
<br />
===Screen auto-rotation===<br />
<br />
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.<br />
Then the following script will enable you to use the accelerometer's data to automatically rotate your screen :<br />
<br />
{{bc|<nowiki>#!/bin/bash<br />
<br />
# (To have the exact names of these devices you should type the command : xsetwacom --list devices )<br />
stylus="Serial Wacom Tablet stylus" <br />
eraser="Serial Wacom Tablet eraser"<br />
<br />
function rotate {<br />
if [ $# -lt 1 ]; then # error ...<br />
exit 1 <br />
fi<br />
<br />
case "$1" in<br />
up)<br />
nextRotate="none"<br />
nextOrient="normal" ;;<br />
down)<br />
nextRotate="half"<br />
nextOrient="inverted" ;;<br />
right)<br />
nextRotate="ccw"<br />
nextOrient="left" ;;<br />
left)<br />
nextRotate="cw"<br />
nextOrient="right";;<br />
esac<br />
<br />
# Rotate the screen <br />
xrandr -o $nextOrient<br />
<br />
# Rotate the tablet <br />
xsetwacom set "$stylus" Rotate $nextRotate<br />
xsetwacom set "$eraser" Rotate $nextRotate<br />
}<br />
<br />
while true; do<br />
# 1) We extract data about the actual position<br />
position=$(cat /sys/devices/platform/hdaps/position)<br />
x=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\1/p") # most of time contained in [350,650]<br />
y=$(echo $position | sed -n "s/(\([-0-9]*\),\([-0-9]*\).*)/\2/p") # most of time contained in [-650,-350]<br />
<br />
# 2) We work out the x value (= left and right inclination) (always between <br />
if [ $x -lt 400 ]; then<br />
rotate left<br />
elif [ $x -gt 600 ]; then<br />
rotate right<br />
fi<br />
<br />
# 3) We work out the y value (= front and back inclination)<br />
if [ $y -gt -400 ]; then<br />
rotate down<br />
elif [ $y -lt -600 ]; then<br />
rotate up<br />
fi<br />
<br />
# 4) wait before checking the value again<br />
sleep 0.5<br />
done<br />
</nowiki>}}<br />
<br />
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).<br />
<br />
===Power consumption and fan control===<br />
<br />
{{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.}}<br />
<br />
Install the {{AUR|tlp}} package from AUR to enable extensive power consumption control. <br />
<br />
Because the hardware-controlled fan speed settings are inefficient, be sure to check out the {{AUR|tpfanco-svn}} package from AUR which allows you to set up specific heat-points on multiple sensors for triggering fan speed.<br />
<br />
See [[Power saving]] for additional tips.<br />
<br />
===Suspend to RAM / hibernate ===<br />
<br />
{{Merge|#Troubleshooting}}<br />
<br />
See [[Suspend and hibernate]]. 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.<br />
<br />
== Tips and tricks==<br />
<br />
=== Power consumption ===<br />
<br />
Power consumption of an X200T can be reduced to as much as ~6.5W. This can be achieved by installing and configuring [[TLP]] and reduced monitor brightness. A detailed guide how to implement a simplistic power saving environment can be found [http://www.robert.orzanna.de/simplistic-powersaving-with-systemd-service-files-and-udev-rules/ here]. Actual power consumption can be measured by [[Powertop]] and {{AUR|powerstat-git}}.<br />
<br />
==Troubleshooting==<br />
<br />
=== failed to execute '/usr/sbin/inputattach' ===<br />
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.<br />
<br />
===System feels unresponsive===<br />
If your system feels unresponsive and lagging, you can try creating a file called {{ic|/etc/modprobe.d/drm_kms.conf}}:<br />
<br />
options drm_kms_helper poll=N<br />
<br />
===PM device: Resume from hibernation error: Failed to restore -19===<br />
<br />
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:<br />
<br />
# dmesg | grep 00:0a<br />
[ 0.377877] pnp 00:0a: Plug and Play ACPI device, IDs PNP0c31 (active)<br />
[ 10.746742] tpm_tis 00:0a: 1.2 TPM (device-id 0x1020, rev-id 6)<br />
[ 10.746751] tpm_tis 00:0a: Intel iTPM workaround enabled<br />
[ 10.866734] tpm_tis 00:0a: TPM is disabled/deactivated (0x6)<br />
<br />
To unload the module create the following executable file called {{ic|/usr/lib/systemd/system-sleep/tpm.sh}}, assuming the use of the systemd hibernation procedure:<br />
<br />
#!/bin/sh<br />
case $1/$2 in<br />
pre/*)<br />
echo "Going to $2..."<br />
modprobe -r tpm<br />
modprobe -r tpm_tis<br />
;;<br />
post/*)<br />
echo "Waking up from $2..."<br />
modprobe tpm<br />
modprobe tpm_tis<br />
;;<br />
esac<br />
<br />
=== mei_me 0000:00:03.0: suspend ===<br />
<br />
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].<br />
<br />
=== pciehp 0000:00:1c.1:pcie04: Cannot add device at 0000:03:00 ===<br />
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].<br />
<br />
=== Uhhuh. NMI received for unknown reason 30. ===<br />
The Thinkpad X200 is known to report the following error on resume from hibernation or suspension:<br />
<br />
Uhhuh. NMI received for unknown reason 30.<br />
Dazed and confused, but trying to continue<br />
Do you have a strange power saving mode enabled?<br />
<br />
In this case you can disable the high precision event timer (HPET) by adding "nohpet" to your [[GRUB]] kernel parameter line.<br />
<br />
=== High pitched noises ===<br />
The X200(s) is prone to high pitched, low volume noises originating from the CPU, usually in low power scenarios.<br />
<br />
One proved solution is to disable CPU power control in the BIOS.<br />
<br />
For more information see [http://www.thinkwiki.org/wiki/Problem_with_high_pitch_noises].<br />
<br />
==See also==<br />
* Thinkwiki: [http://www.thinkwiki.org/wiki/Category:X200 X200 Overview]<br />
* ThinkWiki: [http://www.thinkwiki.org/wiki/How_to_reduce_power_consumption How to reduce power consumption]<br />
* [https://gist.github.com/yuvadm/52b3f350293a96501478 Example installation procedure for X200s]</div>Jmanes