Original link: http://ipotato.me/article/75
Yes, as a person who has never used a laptop other than a Mac since 2017, I bought this Lenovo ThinkPad X1 Carbon Gen 11 after 6 years. The motivation to buy is actually very simple, that is Fight against Apple’s tyranny macOS is really tired, urgently needed Consumption The freshness brought by tossing.
Why Arch Linux
Although I am more or less familiar with the relatively more popular Linux distributions such as Ubuntu and Debian, since I have the original intention of “tossing”, I hope to try something new. “ism” and very KISS (Keep It Simple and Stupid) design principles, plus I was amazed at the completeness and detail of ArchWiki during the pre-purchase equipment research, so I finally decided to take this opportunity to directly experience it and see if it can be used as my main force The main OS of the machine.
Installing & Configuring
When installing, I basically only refer to these two guides:
- https://ift.tt/QjgxzW5
- https://ift.tt/Od0NGnc
The former has some simple deletions and modifications based on the latter, which is more suitable for novices, but it also leads to some vague descriptions in it. If you don’t know much about Linux itself or the principles of the OS, you need to operate with caution, especially pay attention to hard disk partitions and boot installation steps like this.
At present, mainstream hardware manufacturers have perfect support for Linux, so the installation, configuration and use process will be relatively smooth, but it is best to know about Arch Linux’s support for your device before starting, such as my ThinkPad X1 Carbon (Gen 11) compatibility , we can see that except for the front camera, most other hardware has no problem in use.
Troubleshooting
Most of the installation and configuration problems I encountered have relatively direct solutions after Google (most of them eventually point to ArchWiki, which shows that its content is reliable and rich), here is a list of what I encountered during the configuration process some of the more unique issues.
AUR installs old version of GCC very slowly
Originally, I wanted to compile TiKV to “bake” the machine, but because the GCC version that comes with Arch Linux is too new, various warnings and errors occur when compiling RocksDB, so I need to install an old version of GCC to use. After investigating related Issues and PRs of TiKV and RocksDB, I decided to install GCC 9.
yay -S gcc9
Little did I know that after typing this line of command, since the AUR package needs to be compiled manually by running PKGBUILD and then installed, this compilation took several hours, and I couldn’t bear to kill it before it was completed. Also according to ArchWiki’s suggestion , I did these two operations to speed up the whole process:
nproc # Look at the maximum number of processes supported by your device, for example, here is 16 MAKEFLAGS= '-j16' BUILDDIR=/tmp/makepkg yay -S gcc9
Parameter explanation:
-
-j16
is used to specify the number of parallel jobs for make, which is generally equal to the maximum number of threads supported by the CPU -
BUILDDIR
is used to specify the compilation directory and throw it into tmpfs to make full use of memory to speed up compilation
The recipe is very good, and the original compilation time of several hours was completed in less than half an hour.
Enable Secure Boot
Since the computer came with Windows 11 system when I got it, I followed the guide to enable the face and PIN code recognition of Windows Hello when I started the configuration, but because I turned off Secure Boot when I installed Arch Linux later, I waited until I installed it. After the end, I entered Windows 11 again, and found that because the TPM was involved in the previous setting of Windows Hello, facial recognition and PIN codes were unavailable after closing Secure Boot.
Use sbctl to sign the kernel and boot items
The idea to solve it is also very straightforward. It would be best if Arch Linux can be booted correctly even when Secure Boot is turned on. After some searching, I found a tutorial in the archlinux community of reddit to use it. The sbctl
tool performs signature authentication on boot files. After trying some of the operations, I started GRUB again and found that it could not be booted normally, prompting a kernel loading error. After some searching, I saw this paragraph in the introduction to sbctl in ArchWiki:
Now sign all unsigned files. Usually the kernel and bootloader need to be signed. for example:
sbctl sign -s /boot/vmlinuz-linux
sbctl sign -s /boot/EFI/BOOT/BOOTX64.EFI
It seems that there is a high probability that it is caused by not signing the vmlinuz-linux
kernel boot file. Re-do the above operation and try to start Secure Boot again, successfully enter Arch Linux, and complete the configuration of Secure Boot.
Reset Windows Hello
Since the sbctl tool may not be available on all hardware, if you fail in the above operation, but want to use face/fingerprint unlocking without enabling Secure Boot, there is actually a way. According to the official Windows documentation , we will find that Windows Hello does not rely on TPM to work.
So you only need to re-set Windows Hello on the premise of closing Secure Boot, and you can use face/fingerprint to unlock normally without using TPM.
Bluetooth device can’t wake up Arch Linux
The solution to this is actually very simple, just follow the instructions in the section ” Wake from Suspend ” under the Bluetooth interface in ArchWiki. But I have a problem in the first step, the Bluetooth device of ThinkPad X1 Carbon is not so obvious after lsusb
:
❯ lsusb Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 006: ID 30c9:0052 Luxvisions Innotech Limited Integrated RGB Camera Bus 003 Device 005: ID 06cb:00fc Synaptics, Inc. Bus 003 Device 003: ID 2c7c:0310 Quectel Wireless Solutions Co., Ltd. Quectel EM05-CN Bus 003 Device 004: ID 0451:82ff Texas Instruments, Inc. Bus 003 Device 002: ID 0451:8442 Texas Instruments, Inc. Bus 003 Device 007: ID 8087:0033 Intel Corp. Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 002: ID 0451:8440 Texas Instruments, Inc. Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
After some searching, I finally saw in the output of lsusb -v
that Bluetooth and other words belong to the Device 003, and I successfully obtained idVendor
and idProduct
for subsequent configuration.
Bus 003 Device 007: ID 8087:0033 Intel Corp. ... Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 3 bInterfaceClass 224 Wireless bInterfaceSubClass 1 Radio Frequency bInterfaceProtocol 1 Bluetooth
This article is transferred from: http://ipotato.me/article/75
This site is only for collection, and the copyright belongs to the original author.