X1 carbon lenovo linux

Lenovo ThinkPad X1 Carbon (Gen 7)

Hardware PCI/USB ID Working?
Video 8086:3ea0 Yes
Wireless 8086:9df0 Yes
Ethernet 8086:15be Yes
Mobile broadband Yes
Audio 8086:9dc8 Yes
Touchpad 06cb:cd8b Yes
TrackPoint 06cb:cd8b Yes
Camera 13d3:56ba Yes
Fingerprint reader 06cb:00bd Yes
Bluetooth 8087:0aaa Yes
NFC No

Contents

The most convenient way to install Arch Linux is by disabling «Secure Boot» Security -> Secure Boot — Set to «Disabled» . However it is possible to self-sign your kernel and boot with it enabled. For further information have a look at the Secure Boot article.

In case your efivars are not properly set it is most likely due to you not being booted into UEFI. Should the problem persist be sure to consult the UEFI#UEFI variables section.

Updates

Automatic (Linux Vendor Firmware Service)

In August of 2018 Lenovo has joined the Linux Vendor Firmware Service (LVFS) project, which enables firmware updates from within the OS. BIOS updates (and possibly other firmware such as the Thunderbolt controller) can be queried for and installed through fwupd.

If your thunderbolt port is unstable after upgrading with fwupd, you can visit the Lenovo ThinkPad X1 Carbon (Gen 7) driver website and upgrade the thunderbolt firmware manually.

Manual (fwupdmgr)

Lenovo may in the future provide cabinet files that can be directly installed with fwupdmgr. Check for Linux .cab files from the Lenovo ThinkPad X1 Carbon (Gen 7) driver website.

  1. Make sure the AC adapter is firmly connected to the target computer.
  2. Launch Terminal.
  3. Move to the directory where the cabinet file was placed.
  4. Run fwupdmgr install xxxxxxxx.cab to schedule firmware update.
  5. Restart the system.
  6. The computer will be restarted and the UEFI BIOS will be updated.

Sleep/Suspend

The BIOS has two «Sleep State» options, Windows and Linux, which you can find in at Config -> Power -> Sleep State . The Linux option is the traditional S3 power state where all hardware components are turned off except for the RAM, and it should work normally. The Windows option is a newer software-based «modern standby» which works on Linux (despite the name). One possible benefit to the Windows sleep state is faster wake up time, and one possible drawback is increased power usage.

Mark Pearson, a Lenovo employee, recommends using the «Windows» sleep state option as it is better supported on modern Intel processors. The same is true for other modern Thinkpads except for AMD models (as of November 2020).

S3 Suspend Bug with Bluetooth Devices

Occasionally your Thinkpad will wake up immediately after suspending with certain bluetooth devices added. To prevent this, remove the devices or disable bluetooth before suspending.

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.

Firmware issues

The following issues can all be resolved by upgrading the firmware with fwupdmgr (see #BIOS Updates), but there may be alternative manual/temporary fixes.

Читайте также:  1с предприятие windows server 2012

Touchpad issues

Due to a bug in a touchpad firmware, the touchpad might not work with following logs in dmesg:

Freeze when suspending

There are reports of the system freezing after initiating a suspend or hibernate. A temporary fix is to add snd_hda_intel.dmic_detect=0 to your kernel parameters. see [1]. This temporary fix is somehow disable the microphone, use this at your own risk

Power management/Throttling issues

A bug causes the CPU to consume less power than under Windows and throttle at 80°C instead of 97°.

The alternative fix is to install throttled , then run

Audio

This laptop requires firmware in order for the soundcard to work. See Advanced Linux Sound Architecture#ALSA firmware.

Clicking/cracking noise when using headphones

If you are hearing clicking/cracking noises when using headphones, this command helped me. I have to run it after each restart.

Clicking/cracking noise when using speakers

The newest alsa-ucm-conf is missing the speakers configuration. Downgrade it to 1.2.3-2.

Microphone

On version 5.3 and newer the SOF firmware can be enabled, see Talk#Microphone.

Function Keys

In the firmware configuration it is possible to swap the Ctrl and Fn keys.

Key Visible? 1 Marked? 2 Effect
Fn+Esc No Yes Toggles Fn lock
Fn+F1 Yes Yes XF86AudioMute
Fn+F2 Yes Yes XF86AudioLowerVolume
Fn+F3 Yes Yes XF86AudioRaiseVolume
Fn+F4 Yes Yes XF86AudioMicMute
Fn+F5 Yes Yes XF86MonBrightnessDown
Fn+F6 Yes Yes XF86MonBrightnessUp
Fn+F7 Yes Yes XF86Display
Fn+F8 Yes Yes XF86WLAN
Fn+F9 Yes Yes XF86Tools
Fn+F10 Yes Yes XF86Bluetooth
Fn+F11 No Yes No Effect
Fn+F12 Yes Yes XF86Favorites
  1. The key is visible to xev and similar tools.
  2. The physical key has a symbol on it, which describes its function.

Fingerprint sensor

An official Lenovo firmware with Linux support is available from fwupd. After installing fwupd, you can update the Synaptics Prometheus driver for the fingerprint sensor:

To use the fingerprint sensor, follow the instructions from Fprint.

If you had previously installed the testing version of this driver from lvfs-testing, there should be no issues updating to this driver version from the main repository.

Ethernet

The internal NIC combined with the Thinkpad Ethernet Extension Adapter Gen 2 that comes with the Gen 7 works just fine. Although some users seems to be having problems: The built-in ethernet adapter no longer works, approximately since kernel 5.0.

Mobile broadband

The Fibocom LTE module has Linux support once switched to USB mode; see [2] and [3]

You can temporarily disable the red LED in the ThinkPad logo on the cover:

1. Enable writing to the embedded controller registers by adding the kernel parameter ec_sys.write_support=1 . If you use UEFI boot, you can add this parameter in /boot/efi/loader/entries/arch.conf under «options».

2. Disable the LED with this command:

This would need to be run after each suspend/reboot to be permanent.

Источник

X1 carbon lenovo linux

Linux configuration guide for Thinkpad x1 Carbon 6th Gen (2018)

This guide workable for Lenovo ThinkPad Ultrabook X1 Carbon Gen6 (20KH006HRT) and Ubuntu 18.04. After these steps, laptop works around 8-10 hourse on medium load.

If you follow this guide, no one is responsible for any damage to your hardware or any other kind of harming your machine.

Читайте также:  Как создать резервную копию iphone mac os

As a result of these actions I get power statistic like this:

Install Ubuntu 18.04

If touchpad andr/or trackpoint don’t work on Ubuntu installer, add ‘psmouse.synaptics_intertouch=1’ to loader.

Install latest version of Linux Kernel

Firstly, after instalation, update Linux Kernel (because in kernels 4.17.x power management has improved) using UKUU:

  1. Edit the /etc/modprobe.d/blacklist.conf file and comment out following line:
  1. Edit the /etc/default/grub file and change line:
  1. Copy wakeup-control script from this repo to /lib/systemd/system-sleep/ for wakeup touchpad/trackpoint after sleep.

Reboot, enter your BIOS/UEFI. Go to Config — Thunderbolt (TM) 3 — set Thunerbolt BIOS Assist Mode to Enabled. It has also been reported that Security — Secure Boot must be disabled.

Install iasl (Intel’s compiler/decompiler for ACPI machine language) and cpio from your distribution.

Get a dump of your ACPI DSDT table.

  1. Decompile the dump, which will generate a .dsl source based on the .aml ACPI machine language dump.
  1. Apply X1Y3_S3_DSDT.patch it against dsdt.dsl:

Note: Hunk 6 may fail due to different specified memory regions. In this case, simply edit the (almost fully patched) dsdt.dsl file, search for and entirely delete the two lines reading solely the word «One». You can look at hunk 6 in the patch file to see how the lines above and below look like if you’re unsure.

Plan B: If this does not work (patch is rejected): It has been the case, that certain UEFI settings may lead to different DSDT images. This means that it may be possible that the above patch doesn’t work at all with your decompiled DSL. If that is the case, don’t worry: Go through the .patch file in your editor, and change your dsdt.dsl by hand. This means locating the lines which are removed in the patch and removing them in your dsl. The patch contains only one section at the end which adds a few lines — these are important and make the sleep magic happen.

Make sure that the hex number at the end of the first non-commented line is incremented by one (reading DefinitionBlock, should be around line 21). E.g., if it was 0x00000000 change it to 0x00000001. Otherwise, the kernel won’t inject the new DSDT table.

Recompile your patched version of the .dsl source.

  1. There shouldn’t be any errors. When recompilation was successful, iasl will have built a new binary .aml file including the S3 patch. Now we have to create a CPIO archive with the correct structure, which GRUB can load on boot (much like initrd is loaded). We name the final image acpi_override and copy it into /boot/.
  1. We yet have to tell GRUB to load our new DSDT table on boot in its configuration file. In Ubuntu, to allow this change to persist through kernel updates, you should add this to linux_entry() function initrd call in /etc/grub.d/10_linux:

Note: GRUB updates might still overwrite this file (haven’t had a GRUB update yet), but maybe it’ll help to move this to eg. 11_linux to simply redefine linux_entry() function.

  1. Moreover, GRUB needs to boot the kernel with a parameter setting the deep sleep state as default. The best place to do this is /etc/default/grub, since that file is not going to be overwritten when the GRUB config becomes regenerated. Simply add mem_sleep_default=deep to the GRUB_CMDLINE_LINUX_DEFAULT configuration option. It should look somewhat like that:
Читайте также:  Windows 10 нет окна копирования файлов

If everything worked, you shouldn’t see any boot errors and the kernel will confirm that S3 is working. The output of the following commands should look the same on your machine:

In most setups, simply closing the lid will probably trigger deep sleep. If you’re using a systemd-based distribution (most of which are), you can also verify if it works on the command line:

Once again, many thanks to Ranguvar for the great collaboration on the Arch forums, and to fiji-flo for managing to hack the first fully working patch. Also, to whomever wrote the article on DSDT patching in the glorious Arch Wiki. And the entire Arch community in general, you’re wonderful.

low cTDP and trip temperature in Linux

This problem is related to thermal throttling on Linux, that is set much below the Windows values. This will cause your laptop to run much slower than it could under heavy stress.

Before you attempt to apply this solution, please make sure that the problem still exists when you read it. To do so, open a Linux terminal and run following commands:

If you see 3 as a result value (or 15 when running on battery), you don’t have to do anything. Otherwise:

  1. Disable Secure Boot in the BIOS (won’t work otherwise)
  2. Run this command:

Check again, that the result from running the rdmsr command is 3

Personally, I use a bit lower temperature levels to preserve battery life in favor of performance. If you want to change the default values, you need to edit the /etc/lenovo_fix file and set the Trip_Temp_C for both battery and AC the way you want:

The amazing Lenovo Throttling fix script supports also the undervolting. To enable it, please edit the /etc/lenovo_fix.conf again and update the [UNDERVOLT] section. In my case, this settings proven to be stable:

Battery charging thresholds

There are a lot of theories and information about ThinkPad charging thresholds. Some theories say thresholds are needed to keep the battery healthy, some think they are useless and the battery will work the same just as it is. In this article I will try not to settle that argument. 🙂 Instead I try to tell how and why I use them, and then proceed to show how they can be changed in different versions of Windows, should you still want to change these thresholds.

I always stick with following settings for my laptops (and somehow I feel that it works):

  • Start threshold: 45%
  • Stop threshold: 95%

This means that the charging will start only if the battery level goes down below 45% and will stop at 95%. This prevents battery from being charged too often and from being charged beyond a recommended level.

To achieve this for Linux based machines you need to install some packages by running:

After that just edit the /etc/default/tlp file and edit following values:

and check if the values are as you expect:

You can change these thresholds anytime, and apply changes using command:

Note, that if you need to have your laptop fully charged, you can achieve that by running following command while connected to AC:

About

Linux configuration guide for Thinkpad x1 Carbon 6th Gen (2018)

Источник

Оцените статью