Install ARCH Linux on ThinkPad X1 Carbon Gen 7 with encrypted filesystem and UEFI

In this article we will be installing Arch Linux on ThinkPad X1 Carbon Gen 7 Laptop. This tutorial contains installation instructions, basic configuration as well as some post-install tuning of Arch Linux to get you started.

Most of the instructions are Arch Linux installation generic hence with a simple modifications this tutorial can be used for any UEFI system installations. However, some points are specific to ThinkPad X1 Carbon Gen 7 therefore basic Linux Administration skills are required in case you are installing Arch Linux PC/Laptop other then ThinkPad X1 Carbon Gen 7.

PLEASE NOTE
This guide will only get you started. If you have some additional tips and tricks on how to improve performance please use the comments below so we can incorporate them into this guide.
Thank you.

After completing this tutorial you will end up with:

  • Installed Arch Linux with GNOME desktop
  • Encrypted / directory using luks encryption
  • Configured Linux boot loader using systemd-boot
  • Created Logical Volumes and partitions to host your swap and / directory
  • Configured EFI parition for your /boot directory
  • Basic System configuration and fine-tuning
  • Ability to use wireless to connect to your WiFi from GNOME desktop
  • Functioning Bluetooth and Thunderbolt controller
  • Ability up upgrade a firmware on your ThinkPad X1 Carbon Gen 7

ARCH Linux on ThinkPad X1 Carbon Gen 7  Laptop

ARCH Linux on ThinkPad X1 Carbon Gen 7 Laptop

Software Requirements and Conventions Used

Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Arch Linux
Software N/A
Other Access to WiFi connection. Privileged access to any Linux system as root or via the sudo command.
Conventions # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ – requires given linux commands to be executed as a regular non-privileged user

Install ARCH Linux on ThinkPad X1 Carbon Gen 7 step by step instructions

[FIRST SECTION OF CONTENT UNCHANGED]

Lastly, in this step format the new `root` and use mkswap to format the swap partition:



# mkfs.ext4 -L root /dev/mapper/vol_grp-root
# mkswap /dev/mapper/vol_grp-swap

[REMAINING CONTENT UNCHANGED]
For microphone and any other further readings in regards to more deep configuration and tuning of the Lenovo ThinkPad X1 Carbon Gen 7 can be found on the official Arch Linux wiki page .

Firmware upgrades

Since the Lenovo joined the The Linux Vendor Firmware Service, it is now possible to upgrade some of the Lenovo hardware firmware directly from Linux command line. To do so forst install the fwupd package:

# pacman -S fwupd

To upgrade the firmware execute:

WARNING
Please note that upgrading the firmware always comes with unexpected risks! If unsure you are better NOT to proceed!
$ fwupdmgr refresh
$ fwupdmgr get-updates
$ fwupdmgr update

Example of upgrading thunderbolt controller on ThinkPad X1 Carbon Gen 7 using the fwupdmgr:

$ fwupdmgr get-updates
20QDCTO1WW
│
└─ThinkPad X1 Yoga 4th / Carbon 7th Thunderbolt Controller:
  │   Device ID:           f388b1939351229f5cd3016ff13b2df354e9d38e
  │   Summary:             Unmatched performance for high-speed I/O
  │   Current version:     41.00
  │   Vendor:              Lenovo (TBT:0x0109)
  │   Flags:               internal|updatable|require-ac|supported|registered
  │   GUID:                c7920601-0cda-507f-851e-92129eb1d470
  │ 
  └─ThinkPad X1 Carbon 7th / X1 Yoga 4th Thunderbolt Controller:
        New version:       43.00
        Remote ID:         lvfs
        Summary:           Lenovo ThinkPad X1 Carbon 7th / X1 Yoga 4th Thunderbolt Firmware
        License:           proprietary
        Size:              262.1 kB
        Vendor:            Lenovo Ltd.
        Flags:             is-upgrade
        Description:       Lenovo ThinkPad X1 Carbon 7th / X1 Yoga 4th Thunderbolt Firmware
        
         • Before update, set the Thunderbolt BIOS Assist Mode to "Disable" in BIOS setup under Config > Thunderbolt 3.
         • DO NOT FORCE UPDATE Thunderbolt Controller. This may damage the firmware.

From the output above we can see that the Thunderbolt Controller firmware upgrade from version 41 to 43 is available. The Thunderbolt Controller will restart/disconnect after update so if you have anything connected to this port it would be wise to disconnect it.

To perform the actual Thunderbolt Firmware upgrade execute:

# fwupdmgr update
Downloading 43.00 for ThinkPad X1 Yoga 4th / Carbon 7th Thunderbolt Controller...
Fetching firmware https://fwupd.org/downloads/c656c45c56fe417ac38dab5a57f451c8340292e7-Lenovo-ThinkPad-X1Carbon5th-Thunderbolt-Firmware-N1MTF28W-Secured.cab
Downloading…             [***************************************] Less than one minute remaining…
Decompressing…           [***************************************]
Authenticating…          [***************************************]
Updating ThinkPad X1 Yoga 4th / Carbon 7th Thunderbolt Controller…
Restarting device…       [***************************************]

To confirm that the upgrade was performed successfully execute:

$ fwupdmgr get-updates
No upgrades for ThinkPad X1 Yoga 4th / Carbon 7th Thunderbolt Controller, current is 43.00: 43.00=same
________________________________________________

Devices that have been updated successfully:

 • ThinkPad X1 Yoga 4th / Carbon 7th Thunderbolt Controller (41.00 → 43.00)

Uploading firmware reports helps hardware vendors to quickly identify failing and successful updates on real devices.
Upload report now? (Requires internet connection) [Y|n]:

Thunderbolt Controller



The Thunderbolt controller should work after the Arch Linux installation out of the box.

Lenovo Thunderbolt 3 dock connected to ThinkPad X1 Carbon Gen 7 on Arch Linux

Lenovo Thunderbolt 3 dock connected to ThinkPad X1 Carbon Gen 7 on Arch Linux

However, There are some caveats you might experience. For example it suddenly stopped working and I could not get past the following error message:

"No Thunderbolt support - Thunderbolt security level could not be determined"

I’m using the Thunderbolt 3 in combination with the Lenovo thunderbolt 3 dock. It worked for weeks and suddenly it stopped working as there was no way to get it recognised by the system. After various troubleshooting attempts involving various configurations, software upgrades, I have also realised that the HDMI port on the on my ThinkPad X1 Carbon is not working at all.

Simply this could not be coincidence and I resorted to the Lenovo emergency reset. ( see below video ) on how to reset your Lenovo ThinkPad X1 Carbon Gen 7 Laptop. After that, the thunderbolt and the HDMI started to work once again as expected.

Emergency Reset of Lenovo ThinkPad X1 Carbon Gen 7


Comments and Discussions
Linux Forum