Difference between revisions of "Lenovo ThinkPad X1 Extreme"

From ArchWiki
Jump to navigation Jump to search
(Add ACPI kernel paramaters that resolve slow restarts and shutdowns.)
(update Pkg/AUR templates)
(Tag: wiki-scripts)
 
(29 intermediate revisions by 6 users not shown)
Line 29: Line 29:
 
The [https://www.lenovo.com/us/en/laptops/thinkpad/thinkpad-x/ThinkPad-X1-Extreme/p/20MF000DUS ThinkPad X1 Extreme] is a thin-and-light 15.6" workstation/multimedia laptop from Lenovo's 2018 ThinkPad X lineup.
 
The [https://www.lenovo.com/us/en/laptops/thinkpad/thinkpad-x/ThinkPad-X1-Extreme/p/20MF000DUS ThinkPad X1 Extreme] is a thin-and-light 15.6" workstation/multimedia laptop from Lenovo's 2018 ThinkPad X lineup.
  
This page specifically concerns the specifics of running Arch Linux on this laptop. See [[Laptop]] for generic laptop-related information, or [[ThinkPad]] for other ThinkPad laptops.  
+
This page specifically concerns the specifics of running Arch Linux on this laptop. See [[Laptop]] for generic laptop-related information, or [[ThinkPad]] for other ThinkPad laptops. The [https://certification.ubuntu.com/certification/hardware/201809-26479/ Ubuntu certification page] may also be useful.
  
{{Note|The ThinkPad P1 is a workstation version of the same laptop which uses extremely similar hardware. Most of the information on this page should be applicable to P1 models as well.}}
+
{{Note|The [[Lenovo ThinkPad P1]] is a workstation version of the same laptop which uses extremely similar hardware. Most of the information on this page should be applicable to P1 models as well.}}
  
 
== Hardware compatibility ==
 
== Hardware compatibility ==
Line 41: Line 41:
 
BIOS updates are available via [[fwupd]], the Lenovo Vantage application on Windows, or from [https://pcsupport.lenovo.com/en/en/products/laptops-and-netbooks/thinkpad-x-series-laptops/thinkpad-x1-extreme/downloads Lenovo's website].
 
BIOS updates are available via [[fwupd]], the Lenovo Vantage application on Windows, or from [https://pcsupport.lenovo.com/en/en/products/laptops-and-netbooks/thinkpad-x-series-laptops/thinkpad-x1-extreme/downloads Lenovo's website].
  
The latest version, v1.19, is highly recommended, and can be installed by running {{ic|fwupdmgr install https://download.lenovo.com/pccbbs/mobiles/n2eet37w.cab}} as root. This will download the firmware directly from Lenovo. The firmware updates are digitally signed, so there is no additional risk caused by the direct download.
+
The latest version, v1.23, is highly recommended. All information on this page generally assumes the latest BIOS unless explicitly stated.
  
The latest version available on the LVFS as of early March 2019 is v1.17 (listed as 0.1.17). While that version resolves all known critical (read: hard bricking) issues, it still contains multiple bugs, particularly related to power management and early boot, that are fixed in the later versions, so v1.19 should be preferred when possible.
+
=== Hybrid graphics ===
 +
 
 +
Hybrid mode works via [[Bumblebee]], [[nvidia-xrun]] or [https://github.com/Askannz/optimus-manager optimus-manager]. Both the HDMI port and DisplayPort outputs created when using either a USB-C adapter or Thunderbolt dock are wired to the Nvidia dGPU. After installing bumblebee, the HDMI port works after modifying the following files, rebooting, and executing {{ic|intel-virtual-output -f}} from an X server running on the iGPU. See [[Bumblebee#Output wired to the NVIDIA chip]] for details.
 +
 
 +
{{hc|/etc/X11/xorg.conf.d/20-intel.conf|
 +
Section "Device"
 +
    Identifier "intelgpu0"
 +
    # pick between "modesetting" and "intel" here (intel requires xf86-video-intel)
 +
    #Driver "modesetting"
 +
    Driver "intel"
 +
EndSection
 +
}}
 +
 
 +
{{hc|/etc/bumblebee/xorg.conf.nvidia|
 +
Section "ServerLayout"
 +
    Identifier  "Layout0"
 +
    Option      "AutoAddDevices" "true"
 +
    Option      "AutoAddGPU" "false"
 +
EndSection
 +
 
 +
Section "Device"
 +
    Identifier  "DiscreteNvidia"
 +
    Driver      "nvidia"
 +
    VendorName  "NVIDIA Corporation"
 +
    Option "ProbeAllGpus" "false"
 +
    Option "AllowEmptyInitialConfiguration"
 +
EndSection
 +
 
 +
Section "Screen"
 +
    Identifier "Screen0"
 +
    Device "DiscreteNVidia"
 +
EndSection
 +
}}
 +
 
 +
While optimus-manager requires logging out to switch graphics, its NVIDIA performance is better than bumblebee's and it may also be the right choice for using external displays. This is because it does not require bumblebee's intel-virtual-output, which is plagued with performance issues. The following configuration has been found to work well:
  
All information on this page generally assumes the latest BIOS unless explicitly stated.
+
{{hc|/etc/optimus-manager/optimus-manager.conf|
 +
<nowiki>
 +
[intel]
 +
driver=intel
 +
modeset=yes
  
=== Hybrid graphics ===
+
[nvidia]
 +
modeset=yes
  
Hybrid mode works via [[Bumblebee]] or [[nvidia-xrun]]. The HDMI port is wired to the Nvidia chip, see [[Bumblebee#Output wired to the NVIDIA chip]] for details.
+
[optimus]
 +
switching=bbswitch
 +
</nowiki>
 +
}}
  
 
Nvidia-only mode works fine with the default configuration produced by {{ic|nvidia-xconfig}}, including HDMI output.
 
Nvidia-only mode works fine with the default configuration produced by {{ic|nvidia-xconfig}}, including HDMI output.
Line 56: Line 98:
  
 
Thunderbolt works out of the box (tested with ThinkPad Thunderbolt 3 Dock); see [[Thunderbolt]] for details on security. DisplayPort/HDMI port seems to be attached to the NVIDIA GPU only.
 
Thunderbolt works out of the box (tested with ThinkPad Thunderbolt 3 Dock); see [[Thunderbolt]] for details on security. DisplayPort/HDMI port seems to be attached to the NVIDIA GPU only.
 +
 +
=== Fan control ===
 +
 +
The fan on the right side of the laptop can be controlled by [[Fan speed control#ThinkPad laptops|thinkpad_acpi]]. It seems that the fan on the left side can't be controlled yet; see [https://devtalk.nvidia.com/default/topic/1052110/linux/can-t-control-gtx-1050-ti-max-q-fan-on-thinkpad-x1-extreme-laptop/post/5340658/#5340658 this Nvidia forum post]. If noise is an issue, the fan can be turned off manually by unplugging it from the motherboard, or [https://www.reddit.com/r/thinkpad/comments/acesmt/x1_extremes_jet_engine_noise_reduced_after_mesh/ the dust mesh can be removed].
  
 
=== Other hardware ===  
 
=== Other hardware ===  
Line 79: Line 125:
 
{{Warning|The safety of the settings mentioned in this section is still being investigated. The firmware limits the temperature to 80C maximum, even with the correct DPTF policy applied. This may or may not be a bug. Please don't use these settings unless you're confident you know what you're doing or the behavior is validated more.}}
 
{{Warning|The safety of the settings mentioned in this section is still being investigated. The firmware limits the temperature to 80C maximum, even with the correct DPTF policy applied. This may or may not be a bug. Please don't use these settings unless you're confident you know what you're doing or the behavior is validated more.}}
  
A stress test using {{AUR|s-tui}} indicates that CPU power limit is capped at 38W, keeping CPU temperature at 81C and resulting in maximum sustained frequency around 2850 MHz on i7-8750H. Similar to other modern Thinkpad laptops, this can be worked around by using {{AUR|throttled}} (previously known as {{AUR|lenovo-throttling-fix-git}}) or {{ic|intel-undervolt}} (see below). It raises the power limit to 44W, which, combined with the {{ic|performance}} [[CPU_frequency_scaling#Scaling_governors|CPU frequency scaling governor]], allows the same CPU to run at 3100 MHz with the temperature of 95C.
+
A stress test using {{AUR|s-tui}} indicates that CPU power limit is capped at 38W, keeping CPU temperature at 81C and resulting in maximum sustained frequency around 2850 MHz on i7-8750H.
  
See the [https://github.com/erpalma/throttled throttled homepage] for more info about the temporary fix; a [https://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux.git/commit/?h=next&id=bcd8aa670b74c026759cd6c06019d98b7b28bfd6 proper solution] is incoming, and likely to appear in Linux 5.1.
+
It should be possible to modify those settings by [https://lkml.org/lkml/2018/10/10/328 applying the correct DPTF policy], however, as of BIOS 1.23, the policies seem to be ignored by the firmware.
 +
 
 +
This can be worked around by using {{Pkg|throttled}} (previously known as {{AUR|lenovo-throttling-fix-git}}{{Broken package link|package not found}}) or {{ic|intel-undervolt}} (see below). It raises the power limit to 44W, which, combined with the {{ic|performance}} [[CPU_frequency_scaling#Scaling_governors|CPU frequency scaling governor]], allows the CPU to run at 3100 MHz with the temperature of 95C.
  
 
=== CPU undervolting ===  
 
=== CPU undervolting ===  
Line 91: Line 139:
 
As of March 2019, the following commonly used kernel parameters are known to work:
 
As of March 2019, the following commonly used kernel parameters are known to work:
  
* {{ic|1=i915.enable_psr=1}} - enables panel self-refresh on Intel graphics, likely power savings; will be enabled by default starting with Linux 5.1
+
* {{ic|1=i915.enable_guc=2}} - enables [[Intel_graphics#Enable_GuC_/_HuC_firmware_loading|GuC/HuC firmware loading]], allowing additional hardware acceleration for some video encoding configurations (likely to be default starting with Linux 5.4)
* {{ic|1=i915.fastboot=1}} - skips mode setting on startup, prevents flickering on compatible boot loaders (rEFInd, GRUB2 with resolution set, etc.); will be enabled by default starting with Linux 5.1
 
* {{ic|1=i915.enable_guc=2}} - enables [[Intel_graphics#Enable_GuC_/_HuC_firmware_loading|GuC/HuC firmware loading]], allowing additional hardware acceleration for some video encoding configurations
 
* {{ic|1=acpi=force acpi_osi=Linux}} - resolves issue where the system can hang for minutes on restart/shutdown
 
 
 
=== ACPI settings ===
 
 
 
If shutdowns and restarts are slow, make sure the following ACPI settings are applied at boot.
 
 
 
  
 
== Specifications ==
 
== Specifications ==

Latest revision as of 17:49, 24 August 2019

Device Status Modules
Intel UHD 630 Graphics Working i965
Nvidia GTX 1050 Ti (Max-Q) Working nvidia
Intel I219-V Ethernet Working e1000e
Intel 9560 wireless Working iwlwifi
Realtek ALC285 audio Working snd_hda_intel
Synaptics touchpad Working synaptics + libinput
SunplusIT camera Working uvcvideo
Card reader Working xhci_hcd
Intel 9560 Bluetooth Working btusb
Intel JHL7540 Thunderbolt Working thunderbolt
Synaptics fingerprint reader Not working

The ThinkPad X1 Extreme is a thin-and-light 15.6" workstation/multimedia laptop from Lenovo's 2018 ThinkPad X lineup.

This page specifically concerns the specifics of running Arch Linux on this laptop. See Laptop for generic laptop-related information, or ThinkPad for other ThinkPad laptops. The Ubuntu certification page may also be useful.

Note: The Lenovo ThinkPad P1 is a workstation version of the same laptop which uses extremely similar hardware. Most of the information on this page should be applicable to P1 models as well.

Hardware compatibility

BIOS update

Despite not being strictly required for an Arch Linux install, a BIOS update is strongly recommended for general use of the laptop - the initial 1.13 version devices seem to ship with contains multiple bugs that can result in bricking the laptop: Reddit thread discussing the issue; another Reddit thread discussing a different bricking issue.

BIOS updates are available via fwupd, the Lenovo Vantage application on Windows, or from Lenovo's website.

The latest version, v1.23, is highly recommended. All information on this page generally assumes the latest BIOS unless explicitly stated.

Hybrid graphics

Hybrid mode works via Bumblebee, nvidia-xrun or optimus-manager. Both the HDMI port and DisplayPort outputs created when using either a USB-C adapter or Thunderbolt dock are wired to the Nvidia dGPU. After installing bumblebee, the HDMI port works after modifying the following files, rebooting, and executing intel-virtual-output -f from an X server running on the iGPU. See Bumblebee#Output wired to the NVIDIA chip for details.

/etc/X11/xorg.conf.d/20-intel.conf
Section "Device"
    Identifier "intelgpu0"
    # pick between "modesetting" and "intel" here (intel requires xf86-video-intel)
    #Driver "modesetting"
    Driver "intel"
EndSection
/etc/bumblebee/xorg.conf.nvidia
Section "ServerLayout"
    Identifier  "Layout0"
    Option      "AutoAddDevices" "true"
    Option      "AutoAddGPU" "false"
EndSection

Section "Device"
    Identifier  "DiscreteNvidia"
    Driver      "nvidia"
    VendorName  "NVIDIA Corporation"
    Option "ProbeAllGpus" "false"
    Option "AllowEmptyInitialConfiguration"
EndSection

Section "Screen"
    Identifier "Screen0"
    Device "DiscreteNVidia"
EndSection

While optimus-manager requires logging out to switch graphics, its NVIDIA performance is better than bumblebee's and it may also be the right choice for using external displays. This is because it does not require bumblebee's intel-virtual-output, which is plagued with performance issues. The following configuration has been found to work well:

/etc/optimus-manager/optimus-manager.conf

[intel]
driver=intel
modeset=yes

[nvidia]
modeset=yes

[optimus]
switching=bbswitch

Nvidia-only mode works fine with the default configuration produced by nvidia-xconfig, including HDMI output.

Thunderbolt

Thunderbolt works out of the box (tested with ThinkPad Thunderbolt 3 Dock); see Thunderbolt for details on security. DisplayPort/HDMI port seems to be attached to the NVIDIA GPU only.

Fan control

The fan on the right side of the laptop can be controlled by thinkpad_acpi. It seems that the fan on the left side can't be controlled yet; see this Nvidia forum post. If noise is an issue, the fan can be turned off manually by unplugging it from the motherboard, or the dust mesh can be removed.

Other hardware

The webcam works out of the box, though it appears connected at all times, no matter the slider state (the camera reports a "disconnected" placeholder image in Windows when the protective slider is closed) - however, when the slider is closed, a completely black image is reported by the camera.

The fingerprint scanner is currently not supported in libfprint - a reverse engineering effort was ongoing here, but seems to have stalled. Upstream libfprint bug is tracked here.

Everything else works correctly out of the box.

Software tweaks

Dolby Atmos Effect on Linux

In order to get the same speaker sound quality/effect as on Dolby Atmos with Windows install & configure PulseAudio and pulseeffects. You can then download the Dolby Atmos preset from JackHack96's Github and enable it in the "Convolver" tab of the PulseEffects GUI.

Battery charge thresholds

Battery charging thresholds can be configured via sysfs nodes /sys/class/power_supply/BAT0/charge_start_threshold and /sys/class/power_supply/BAT0/charge_stop_threshold, or using TLP.

CPU throttling workaround

Warning: The safety of the settings mentioned in this section is still being investigated. The firmware limits the temperature to 80C maximum, even with the correct DPTF policy applied. This may or may not be a bug. Please don't use these settings unless you're confident you know what you're doing or the behavior is validated more.

A stress test using s-tuiAUR indicates that CPU power limit is capped at 38W, keeping CPU temperature at 81C and resulting in maximum sustained frequency around 2850 MHz on i7-8750H.

It should be possible to modify those settings by applying the correct DPTF policy, however, as of BIOS 1.23, the policies seem to be ignored by the firmware.

This can be worked around by using throttled (previously known as lenovo-throttling-fix-gitAUR[broken link: package not found]) or intel-undervolt (see below). It raises the power limit to 44W, which, combined with the performance CPU frequency scaling governor, allows the CPU to run at 3100 MHz with the temperature of 95C.

CPU undervolting

Undervolting the CPU/Intel GPU works well with intel-undervolt. Generally -150mV seems to be a safe choice on the i7-8750H and i7-8850H CPUs, but your mileage may vary.

Kernel parameters

As of March 2019, the following commonly used kernel parameters are known to work:

  • i915.enable_guc=2 - enables GuC/HuC firmware loading, allowing additional hardware acceleration for some video encoding configurations (likely to be default starting with Linux 5.4)

Specifications

All information on this page has been tested on laptop part number 20MF000BUS and 20MFCTO1WW, with the following specifications:

  • CPU: Intel Core i7-8750H / i7-8850H
  • Graphics: Hybrid Intel UHD 630 + Nvidia GTX 1050 Ti Max-Q
  • Display: Innolux N156HCE-EN1 1920x1080/60Hz IPS (other vendors may be used)
  • RAM: 16GB / 32GB
  • SSD: Intel 7600p series 512GB NVMe / Samsung 970 Pro 1TB NVMe