Difference between revisions of "Lenovo ThinkPad X1 Carbon (Gen 6)"

From ArchWiki
Jump to navigation Jump to search
(Formatting improvements, specify Touchpad fixes for Arch (/etc/modprobe.d/blacklist.conf is Ubuntu-specific))
Line 13: Line 13:
 
== Model description ==
 
== Model description ==
  
The Lenovo ThinkPad X1 Carbon, 6th generation is an ultrabook introduced in early 2018. It comes in several variants and features a 14" screen, 8th-gen Intel Core processors and integrated [[Intel Graphics|Intel UHD 620 graphics]].
+
The Lenovo ThinkPad X1 Carbon, 6th generation is an ultrabook introduced in early 2018. It comes in several variants({{ic|20KH*}} and {{ic|20KG*}}) and features a 14" screen, 8th-gen Intel Core processors and integrated [[Intel Graphics|Intel UHD 620 graphics]].
  
 
To ensure you have this version, [[install]] the package {{Pkg|dmidecode}} and run:
 
To ensure you have this version, [[install]] the package {{Pkg|dmidecode}} and run:
Line 51: Line 51:
 
| microSD card reader || {{Grey|Untested}}
 
| microSD card reader || {{Grey|Untested}}
 
|}
 
|}
<nowiki>*</nowiki> via workaround
+
<nowiki>*</nowiki> via [[#TrackPoint_and_Touchpad_issues|workaround]]
  
 
== Suspend issues ==
 
== Suspend issues ==
  
===Suspend-to-RAM (S3) not supported by default===
+
=== Suspend-to-RAM (S3) not supported by default ===
The 6th Generation X1 Carbon supports S0i3 (also known as Windows Modern Standby) and does not support the S3 sleep state. See https://delta-xi.net/#056 for instructions for patching ACPI DSDT tables to add S3 support.  
+
The 6th Generation X1 Carbon supports S0i3 (also known as Windows Modern Standby) and does not support the S3 sleep state. A guide exists with [https://delta-xi.net/#056 instructions for patching ACPI DSDT tables] to add S3 support.  
  
See https://bbs.archlinux.org/viewtopic.php?id=234913 for the discussion related to this issue.
+
A [https://bbs.archlinux.org/viewtopic.php?id=234913 forum thread] has further discussion related to this issue.
  
=== S0i3 support ===
+
=== S0i3 sleep support ===
From https://forums.lenovo.com/t5/Linux-Discussion/X1-Carbon-Gen-6-cannot-enter-deep-sleep-S3-state-aka-Suspend-to/m-p/4016317/highlight/true#M10682, add the kernel parameter:
+
From [https://forums.lenovo.com/t5/Linux-Discussion/X1-Carbon-Gen-6-cannot-enter-deep-sleep-S3-state-aka-Suspend-to/m-p/4016317/highlight/true#M10682 the Lenovo forums]: Add the following [[Kernel_parameters|kernel parameter]] to enable s0i3 sleep support:
 
  acpi.ec_no_wakeup=1
 
  acpi.ec_no_wakeup=1
Note that this disables wakeup/resume on lid open.
+
{{Note|This disables wakeup/resume via lid open.}}
  
 
You might also need to disable the Realtek memory card reader (which appears to use a constant 2-3 W) either via the BIOS or via  
 
You might also need to disable the Realtek memory card reader (which appears to use a constant 2-3 W) either via the BIOS or via  
Line 69: Line 69:
  
 
=== BIOS configurations ===
 
=== BIOS configurations ===
* Config -> Thunderbolt BIOS Assist Mode - Set to "Enabled". When disabled, on Linux, power usage appears to be significantly higher because of a substantial number of CPU wakeups during s2idle.
+
* {{ic|Config -> Thunderbolt BIOS Assist Mode - Set to "Enabled"}}. When disabled, on Linux, power usage appears to be significantly higher because of a substantial number of CPU wakeups during s2idle.
  
== Power Management/Throttling issues ==
+
== Power management/Throttling issues ==
Due to wrong configured power management registers the CPU may consume a lot less power than under windows and the thermal throttling occurs at 80°C (97°C when using Windows, see https://www.reddit.com/r/thinkpad/comments/870u0a/t480s_linux_throttling_bug/).
+
Due to wrong configured power management registers the CPU may consume a lot less power than under windows and the thermal throttling occurs at 80°C (97°C when using Windows, see [https://www.reddit.com/r/thinkpad/comments/870u0a/t480s_linux_throttling_bug/ T480s throttling bug]).
  
There is a post in the official Lenovo forum (https://forums.lenovo.com/t5/Linux-Discussion/T480s-low-cTDP-and-trip-temperature-in-Linux/td-p/4028489) to inform Lenovo about this issue.
+
There is a [https://forums.lenovo.com/t5/Linux-Discussion/T480s-low-cTDP-and-trip-temperature-in-Linux/td-p/4028489 post in the official Lenovo forum] to inform Lenovo about this issue.
  
 
=== Temporary fix ===
 
=== Temporary fix ===
Line 80: Line 80:
 
Until Lenovo fixes this issue, you can manually set the limit.
 
Until Lenovo fixes this issue, you can manually set the limit.
  
To begin, install '''msr-tools'''
+
To begin, install {{ic|msr-tools}}
  
Create the file ''/usr/local/bin/cpu-throttling.sh'' (making it executable) containing the following :
+
Create the file {{ic|/usr/local/bin/cpu-throttling.sh}} (making it executable) containing the following:
 
{{bc|#!/bin/bash
 
{{bc|#!/bin/bash
  
Line 89: Line 89:
 
}}
 
}}
  
Then you can create the associated service.
+
Then create the associated service file {{ic|/etc/systemd/system/cpu-throttling.service}}:
 
 
Create the file /etc/systemd/system/cpu-throttling.service :
 
 
{{bc|[Unit]
 
{{bc|[Unit]
 
Description&#61;set cpu heating limit to 97°c
 
Description&#61;set cpu heating limit to 97°c
Line 103: Line 101:
 
}}
 
}}
  
 
+
And also the timer in {{ic|/etc/systemd/system/cpu-throttling.timer}}:
Create the file /etc/systemd/system/cpu-throttling.timer :
 
 
{{bc|[Unit]
 
{{bc|[Unit]
 
Description&#61;set cpu heating limit to 97°c every minute
 
Description&#61;set cpu heating limit to 97°c every minute
Line 117: Line 114:
 
}}
 
}}
  
Then, enable it :
+
Then, enable it:
 
{{bc|# systemctl enable cpu-throttling.timer
 
{{bc|# systemctl enable cpu-throttling.timer
 
}}
 
}}
  
Reboot and check with :
+
Reboot and check with:
 
{{bc|# rdmsr -f 29:24 -d 0x1a2
 
{{bc|# rdmsr -f 29:24 -d 0x1a2
  
Line 129: Line 126:
 
== TrackPoint and Touchpad issues ==
 
== TrackPoint and Touchpad issues ==
 
On the 20KG model, the Touchpad(Synaptics) and TrackPoint(Elantech) do not work together, one has to disable the TrackPoint in BIOS to get the Touchpad to work reliably.
 
On the 20KG model, the Touchpad(Synaptics) and TrackPoint(Elantech) do not work together, one has to disable the TrackPoint in BIOS to get the Touchpad to work reliably.
The root of the issue seems to be that the default loading of the TrackPoint via ancient PS/2 drivers conflicts with Touchpad loading. Synaptics has introduced a new way of doing things named RMI(4) that fixes some those issues. Further explanation is collected [https://bbs.archlinux.org/viewtopic.php?id=236367 in this thread]. Benjamin Tissoires, kernel maintainer of peripherals, has explained how input bugs get fixed in [https://www.x.org/wiki/Events/XDC2015/Program/tissoires_input_debug_tools.html this talk], especially interesting are slides 16 onward.
+
The root of the issue seems to be that the default loading of the TrackPoint via ancient PS/2 drivers conflicts with Touchpad loading. Synaptics has introduced a new way of doing things named RMI(4) that fixes some those issues. Further explanation is collected [https://bbs.archlinux.org/viewtopic.php?id=236367 in this thread].
  
 
There are several workarounds available:
 
There are several workarounds available:
=== Remove i2c_i801 kernel module from blacklist ===
+
=== Load i2c_i801 kernel module on boot ===
Open {{ic|/etc/modprobe.d/blacklist.conf}} and comment out {{ic|blacklist i2c_i801}}. This enables loading the input devices over rmi4 with recent kernels.
+
Open {{ic|/etc/modules-load.d/touchpad.conf}} and add:
 +
  i2c_i801
 +
  elan_i2c
 +
  rmi_smbus
 +
This enables loading the input devices over rmi4 with recent kernels.
  
 
Then add {{ic|1=synaptics_intertouch=1}} to the {{ic|psmouse}} kernel options, for example in the cmdline of the [[Boot_Loader|boot loader]]:
 
Then add {{ic|1=synaptics_intertouch=1}} to the {{ic|psmouse}} kernel options, for example in the cmdline of the [[Boot_Loader|boot loader]]:
Line 144: Line 145:
 
=== Wait for patches to be included in kernel ===
 
=== Wait for patches to be included in kernel ===
 
Benjamin Tissoires from Red Hat has [https://patchwork.kernel.org/patch/10324633/ proposed patches] that enable Elantech TrackPoints to be loaded over rmi and [https://patchwork.kernel.org/patch/10330857/ whitelist X1C6 ids].
 
Benjamin Tissoires from Red Hat has [https://patchwork.kernel.org/patch/10324633/ proposed patches] that enable Elantech TrackPoints to be loaded over rmi and [https://patchwork.kernel.org/patch/10330857/ whitelist X1C6 ids].
 +
 +
 +
== References ==
 +
* [https://delta-xi.net/#056 A good night's sleep for the Lenovo X1 Carbon Gen6]: Patching ACPI DSDT tables to add S3 support
 +
* [https://forums.lenovo.com/t5/Linux-Discussion/X1-Carbon-Gen-6-cannot-enter-deep-sleep-S3-state-aka-Suspend-to/td-p/3998182/highlight/true Lenovo forums: Cannot enter deep sleep S3]
 +
* [https://bbs.archlinux.org/viewtopic.php?id=234913 Thread: No deep sleep]: Includes DSDT patching solution and further discussion
 +
* [https://www.reddit.com/r/thinkpad/comments/870u0a/t480s_linux_throttling_bug/ T480s throttling bug], affects X1C6 as well
 +
* [https://forums.lenovo.com/t5/Linux-Discussion/T480s-low-cTDP-and-trip-temperature-in-Linux/td-p/4028489 Lenovo forums: T480s low cTDP and trip temperature in Linux]
 +
* [https://bbs.archlinux.org/viewtopic.php?id=236367 Thread: TrackPoint/Touchpad issues, 20KG model]
 +
* [https://unix.stackexchange.com/a/431820 StackExchange: Success with enabling RMI4 config flags for Touchpad and TrackPoint]
 +
* [https://patchwork.kernel.org/patch/10324633/ Kernel patch - Input: elantech - add support for SMBus devices]
 +
* [https://patchwork.kernel.org/patch/10330857/ Kernel patch - Input: synaptics - add Lenovo 80 series ids to SMBus]
 +
 +
== Additional resources ==
 +
 +
* [https://www.thinkwiki.org/wiki/Category:X1_Carbon_(6th_Gen) ThinkWiki X1 Carbon 6th Gen page]
 +
* Benjamin Tissoires, kernel maintainer of peripherals, has explained how input bugs get fixed in his talk [https://www.youtube.com/watch?v=Bl_0xYxcYd8 Tools to debug a broken input device] ([https://www.x.org/wiki/Events/XDC2015/Program/tissoires_input_debug_tools.html Slides]), especially interesting are slides 16 onward.
 +
* [https://gist.github.com/greigdp/bb70fbc331a0aaf447c2d38eacb85b8f Dell XPS 13 9370 quirks]: Some pointers on getting Watt usage down to ~2W, Intel video powersaving features might be interesting, see also [[Intel_graphics#Module-based_Powersaving_Options|Intel Graphics Powersaving]]
 +
* [[Dell_XPS_13_(9360)|Dell XPS 13 (9360)]]: Shares some hardware with the X1C6

Revision as of 22:48, 26 April 2018

Tip: A great resource for thinkpads is https://www.thinkwiki.org/wiki/ThinkWiki

Model description

The Lenovo ThinkPad X1 Carbon, 6th generation is an ultrabook introduced in early 2018. It comes in several variants(20KH* and 20KG*) and features a 14" screen, 8th-gen Intel Core processors and integrated Intel UHD 620 graphics.

To ensure you have this version, install the package dmidecode and run:

# dmidecode -t system | grep Version

Version: ThinkPad X1 Carbon 6th

Support

Device Working
Intel graphics Yes
Wireless network Yes
Native Ethernet with included dongle Yes
Mobile broadband Untested
ALSA Yes
Touchpad Yes*
TrackPoint Yes
Camera Yes
Fingerprint Reader No
Power management Yes
Bluetooth Untested
microSD card reader Untested

* via workaround

Suspend issues

Suspend-to-RAM (S3) not supported by default

The 6th Generation X1 Carbon supports S0i3 (also known as Windows Modern Standby) and does not support the S3 sleep state. A guide exists with instructions for patching ACPI DSDT tables to add S3 support.

A forum thread has further discussion related to this issue.

S0i3 sleep support

From the Lenovo forums: Add the following kernel parameter to enable s0i3 sleep support:

acpi.ec_no_wakeup=1
Note: This disables wakeup/resume via lid open.

You might also need to disable the Realtek memory card reader (which appears to use a constant 2-3 W) either via the BIOS or via

echo "2-3" | sudo tee /sys/bus/usb/drivers/usb/unbind

BIOS configurations

  • Config -> Thunderbolt BIOS Assist Mode - Set to "Enabled". When disabled, on Linux, power usage appears to be significantly higher because of a substantial number of CPU wakeups during s2idle.

Power management/Throttling issues

Due to wrong configured power management registers the CPU may consume a lot less power than under windows and the thermal throttling occurs at 80°C (97°C when using Windows, see T480s throttling bug).

There is a post in the official Lenovo forum to inform Lenovo about this issue.

Temporary fix

Until Lenovo fixes this issue, you can manually set the limit.

To begin, install msr-tools

Create the file /usr/local/bin/cpu-throttling.sh (making it executable) containing the following:

#!/bin/bash

/bin/modprobe msr
wrmsr -a 0x1a2 0x3000000 # which sets the offset to 3 C, so the new trip point is 97 C 

Then create the associated service file /etc/systemd/system/cpu-throttling.service:

[Unit]
Description=set cpu heating limit to 97°c

[Service]
ExecStart=/usr/local/bin/cpu-throttling.sh
RemainAfterExit=no

[Install]
WantedBy=timers.target

And also the timer in /etc/systemd/system/cpu-throttling.timer:

[Unit]
Description=set cpu heating limit to 97°c every minute

[Timer]
OnActiveSec=60
OnUnitActiveSec=60
Unit=cpu-throttling.service

[Install]
WantedBy=timers.target

Then, enable it:

# systemctl enable cpu-throttling.timer

Reboot and check with:

# rdmsr -f 29:24 -d 0x1a2

3

TrackPoint and Touchpad issues

On the 20KG model, the Touchpad(Synaptics) and TrackPoint(Elantech) do not work together, one has to disable the TrackPoint in BIOS to get the Touchpad to work reliably. The root of the issue seems to be that the default loading of the TrackPoint via ancient PS/2 drivers conflicts with Touchpad loading. Synaptics has introduced a new way of doing things named RMI(4) that fixes some those issues. Further explanation is collected in this thread.

There are several workarounds available:

Load i2c_i801 kernel module on boot

Open /etc/modules-load.d/touchpad.conf and add:

 i2c_i801
 elan_i2c
 rmi_smbus

This enables loading the input devices over rmi4 with recent kernels.

Then add synaptics_intertouch=1 to the psmouse kernel options, for example in the cmdline of the boot loader:

 [...] root=/dev/sda1 rw psmouse.synaptics_intertouch=1 [...]

Compile kernel with CONFIG_RMI4 options enabled

Someone has reported success with enabling RMI4 config flags for kernel compilation.

Wait for patches to be included in kernel

Benjamin Tissoires from Red Hat has proposed patches that enable Elantech TrackPoints to be loaded over rmi and whitelist X1C6 ids.


References

Additional resources