Lenovo ThinkPad X1 Carbon 6th generation

These are my notes on getting my Thinkpad X1 Carbon 6th gen working under Gentoo.

If you want EFI to work use System Rescue CD and save yourself a ton of headache.

Overall you should be able to follow everything in the install guide with some minor changes. Note that this is my first install of Gentoo ever so although it's what I had to do to get things working it might not be the best or only way. Note that the following was using EFI and GRUB2 for bootloading.

Enable Suspend
This laptop on older kernels will not be able to suspend to memory due to supporting S0i3 vs S3 which is suspend to RAM. Although both can be used the ACPI table on linux doesn't think the hardware supports suspend to RAM. More about the issue can be see here. Here is also a bug about it with canonical upstream for those interested.

In order to have support for ram you will need to run on a version of the kernel using 4.13 or higher. I personally went with 4.16.9 so I can only verify that using that kernel will work. To verify that your kernel supports suspend issue the following command.

If you see "mem" listed in the output you will not need to take any further action. If you don't see if you will need to use a non stable version of the kernel which can be done by ensuring you have a file in at /etc/portage/package.accept_keywords/gentoo-sources that contains the following.

After this you can issue the following command to install the new kernel.

From here you can follow the kernel upgrade docs.

NVMe
Your drive if this is your first NVMe drive is located at /dev/nvme0 which as far as the install guide goes you can think of as /dev/sda when it comes to partitioning.

In addition to that you will want to build NVMe support into your kernel. You should be able to ensure the following two lines are in your /usr/src/linux/.config file before running make && make modules_install.

CONFIG_NVME_CORE=y CONFIG_BLK_DEV_NVME=y

If you have any trouble getting this to work check out this post.

Wireless
Wireless didn't work out of the box for me with just iwlwifi instaled. I had to manually download the following tar file extract and copy it into /lib/firmware.

Additionally you might just be able to emerge iwlwifi/linux-firmware but i didn't try this. If someone does and it works please update this wiki so people aren't manually copying around files.