Notes on getting the Lenovo X1 Carbon Working with Fedora

Checking Which Generation:

You need to check which generation it is so you can make sure you are following the right instructions

1
dmidecode -t system | grep Version

For example, 4th Gen or 5th Gen

Sources

Arch (all generations)

eg 5th Gen

BIOS

  • You might need to enable UEFI only mode in the BIOS to be able to install

  • You should consider switching the [ctrl] and [fn] keys which is under the keyboard settings

Wifi

There can be some niggles with the Intel Wifi cards which result in intermittent issues, dropped connections, generally flakiness.

The X1 Carbon is using Intel cards and the iwlwifi driver: https://wireless.wiki.kernel.org/en/users/Drivers/iwlwifi

Info

TLDR, doing the following is probably the right answer:

1
2
3
su
echo "options iwlwifi bt_coex_active=0 11n_disable=1"  >  /etc/modprobe.d/iwlwifi.conf
modprobe -r iwlmvm; modprobe -r iwlwifi; modprobe iwlmvm; modprobe iwlwifi

Check which Wifi Card

To get a basic info on which card is installed

1
lspci | grep Wireless

Get Full Details

Very verbose full details about the card

1
lspci -vv -s $(lspci | grep Wireless | cut -d ' ' -f 1)

Module Info

Information about the iwlwifi module which is being used

1
modinfo iwlwifi

List Available Firmwares

All available firmwares in the filesystem

1
ll /lib/firmware/ | grep iwlwifi

Check Firmware Being Used and Check for Errors

Dmesg output which indicates the firmware

Note

This will also show if there are any errors

1
dmesg | grep iwlwifi

Getting Bleeding Edge Firmwares

You can download iwlwifi firmware as a tarbal from

https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/linux-firmware.git/

In the root of this tarball are the files we are looking for, basically the same file as we are already using as a firmware but with higher version numbers.

To download these, first go the above page and get the find the latest version. Then do the following:

This assumes the latest version is linux-firmware-iwlwifi-fw-2017-10-13.tar.gz

Warning

This is potentially dangerous, the below is an example, not just a copy paste solution. You have been warned

1
2
3
4
5
6
su
cd ~
wget https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/linux-firmware.git/snapshot/linux-firmware-iwlwifi-fw-2017-10-13.tar.gz
tar -xf linux-firmware-iwlwifi-fw-2017-10-13.tar.gz
\cp linux-firmware-iwlwifi-fw-2017-10-13/iwlwifi-*.ucode /lib/firmware
reboot now

Adjusting Parameters for iwlwifi

See this full article

In a nutshell, we can see the parameters we can pass to the module by running

1
modinfo iwlwifi | grep 'parm:'

And specifically

1
modinfo iwlwifi | grep 'parm:' | grep 11n_disable
for example:
1
parm:           11n_disable:disable 11n functionality, bitmap: 1: full, 2: disable agg TX, 4: disable agg RX, 8 enable agg TX (uint)

You can test this temporarily with, for example:

1
2
3
su
disableOption=8
modprobe -r iwlmvm; modprobe -r iwlwifi; modprobe iwlwifi 11n_disable=$disableOption; modprobe iwlmvm

And you can make this permanent with, for example:

1
2
3
4
su
disableOption=8
echo "options iwlwifi 11n_disable=$disableOption"  >  /etc/modprobe.d/iwlwifi.conf
sudo reboot now
Some articles suggest turning off some parameters around bluetooth and also enabling software crypto. It's worth trying different options. for example
1
2
su
echo "options iwlwifi bt_coex_active=0 swcrypto=1 11n_disable=8"  >  /etc/modprobe.d/iwlwifi.conf

Disabling Hardware

It is possible to totally disable hardware in the BIOS. This is worth considering for:

  • Bluetooth
  • Fingerprint Scanner

5th Gen Stuff

Thinkfan

https://gist.github.com/abn/de81ba413f860b00c2db3ee4aa83e035

Thunderbolt Dock

For the thunderbolt dock to work, you need to disable Thunderbolt securty in the BIOS