Linux on a Lenovo Thinkpad X1 Carbon Gen 11
This post details my experience installing and running Linux on a Lenovo Thinkpad X1 Carbon Gen 11.
This is no longer a living document as my X1 Gen 11 was stolen. I have purchased a Lenovo Thinkpad X1 Carbon Gen 12 which I am currently using.
I recently got a Lenovo Thinkpad X1 Carbon Gen 11 with Ubuntu Linux pre-installed and decided to install Opensuse Tumbleweed on it. Here are some notes on my setup and tweaks I did to get it to work the way I wanted. I use Hyprland as my window manager so much of it will concern this setup.
My needs are that of a university professor, i.e., I need to interact with colleagues using Microsoft products etc., I need to write papers, do data analysis, and run simulations.
Hardware
Most things just worked out of the box.
$ lspci
00:00.0 Host bridge: Intel Corporation Raptor Lake-P/U 2p+8e cores Host Bridge/DRAM Controller (rev 01)
00:02.0 VGA compatible controller: Intel Corporation Raptor Lake-P [Iris Xe Graphics] (rev 04)
00:04.0 Signal processing controller: Intel Corporation Raptor Lake Dynamic Platform and Thermal Framework Processor Participant (rev 01)
00:06.0 PCI bridge: Intel Corporation Raptor Lake PCIe 4.0 Graphics Port (rev 01)
00:07.0 PCI bridge: Intel Corporation Raptor Lake-P Thunderbolt 4 PCI Express Root Port #0 (rev 01)
00:07.2 PCI bridge: Intel Corporation Raptor Lake-P Thunderbolt 4 PCI Express Root Port #2 (rev 01)
00:08.0 System peripheral: Intel Corporation GNA Scoring Accelerator module (rev 01)
00:0a.0 Signal processing controller: Intel Corporation Raptor Lake Crashlog and Telemetry (rev 01)
00:0d.0 USB controller: Intel Corporation Raptor Lake-P Thunderbolt 4 USB Controller (rev 01)
00:0d.2 USB controller: Intel Corporation Raptor Lake-P Thunderbolt 4 NHI #0 (rev 01)
00:0d.3 USB controller: Intel Corporation Raptor Lake-P Thunderbolt 4 NHI #1 (rev 01)
00:14.0 USB controller: Intel Corporation Alder Lake PCH USB 3.2 xHCI Host Controller (rev 01)
00:14.2 RAM memory: Intel Corporation Alder Lake PCH Shared SRAM (rev 01)
00:14.3 Network controller: Intel Corporation Raptor Lake PCH CNVi WiFi (rev 01)
00:15.0 Serial bus controller: Intel Corporation Alder Lake PCH Serial IO I2C Controller #0 (rev 01)
00:15.1 Serial bus controller: Intel Corporation Alder Lake PCH Serial IO I2C Controller #1 (rev 01)
00:16.0 Communication controller: Intel Corporation Alder Lake PCH HECI Controller (rev 01)
00:16.3 Serial controller: Intel Corporation Alder Lake AMT SOL Redirection (rev 01)
00:1f.0 ISA bridge: Intel Corporation Raptor Lake LPC/eSPI Controller (rev 01)
00:1f.3 Audio device: Intel Corporation Raptor Lake-P/U/H cAVS (rev 01)
00:1f.4 SMBus: Intel Corporation Alder Lake PCH-P SMBus Host Controller (rev 01)
00:1f.5 Serial bus controller: Intel Corporation Alder Lake-P PCH SPI Controller (rev 01)
04:00.0 Non-Volatile memory controller: KIOXIA Corporation NVMe SSD Controller XG8 (rev 01)
Fingerprint reader
works perfectly out of the box
# install fprintd et al
$ sudo zypper install fprintd*
# save and verify that the scan works
$ fprintd-enroll -f right-index-finger
$ fprintd-verify
Helpful links:
Partitioning
I separated /home
and made a separate boot partition. I also made a swap partition with 50GB for hibernation etc.
$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/nvme0n1p2 196G 20G 166G 11% /
/dev/nvme0n1p4 1.6T 507G 1.1T 33% /home
/dev/nvme0n1p1 500M 5.8M 494M 2% /boot/efi
$ cat /proc/swaps
Filename Type Size Used Priority
/dev/nvme0n1p3 partition 52428796 2048 -2
Desktop
I use Hyprland with waybar as the status bar. I only recommend this for relatively experienced Linux users, there is a lot of tweaking necessary to it to get it to work the way you want.
I like it, because it is very fast and does not come with all the GNOME/KDE clutter, yet it is easy to configure. Most configuration files are under ~/.config/hypr
. To install it, I added the repository
zypper addrepo https://download.opensuse.org/repositories/X11:Wayland/openSUSE_Tumbleweed/X11:Wayland.repo
zypper refresh
zypper install hyprland waybar hyprpaper hyprlock
Also, Hyprland can be “remote controlled” through a tool called hyprctl
which is very useful.
My config files are here: https://github.com/ihrke/dotfiles
Application switcher
I use wofi. This is the script I fixed up to use it with Hyprland: https://github.com/ihrke/dotfiles/blob/main/hypr/scripts/window_switcher.sh.
Switching keyboard languages
I regularly work with multiple languages and wanted a quick way to switch between them.
I added a custom block to the waybar config file:
"custom/layout": {
"exec": "~/.config/waybar/modules/kblayout.sh",
"interval": 1,
"format": "{} "
}
This block calls a script ~/.config/waybar/modules/kblayout.sh
.
Media keys
I added the following to hyprland.conf
to control the volume with the media keys:
bindel=, XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 6%+
bindel=, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
bindl=, XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
It works the same way for brightness using brightnessctl
, see the config file.
Specific software
E-mail software
I use Thunderbird as my e-mail client but want to be able to accept invitations through the MS Office 365 system. It kind of works through the “Owl” plugin Owl for Exchange (I installed it and payed the fee which is around 10 EUR a year - I hate subscriptions, so I made sure to stop the subscription at once after the payment). I am not super happy with the functionality as I had some trouble with accepting invitations etc. Also, it does not seem to support multiple calendars on the O365 account as well as managing delegate calendars. I therefore also use the web interface for outlook at https://outlook.office.com/mail/.
Cisco VPN client
Installation of the Linux client went without any problems, however, I could not connect to our VPN server because vpnagentd
was not running.
The client is installed into
/opt/cisco/secureclient
and the GUI can be started with
/opt/cisco/secureclient/bin/vpnui
The configuration for vpnagentd
is in
/etc/systemd/system/vpnagent.service
I followed advice from this blog post.
To make the vpnagentd
agent start, I had to change a setting in /opt/cisco/secureclient/AnyConnectLocalPolicy.xml
:
<BypassDownloader>true</BypassDownloader>
and edit /etc/systemd/system/vpnagent.service
and change EnvironmentFile=/etc/environment
to EnvironmentFile=-/etc/environment
(the minus sign ignores the file if it does not exist - it doesn’t on openSUSE TW).
After that, I could start the service with
sudo systemctl start vpnagentd
You can check the status with
sudo systemctl status vpnagentd
RStudio
There was an issue when using the latest RStudio version downloaded from https://rstudio.com/products/rstudio/download/ (there is an rpm
intended for OpenSuse 15). It did not start but complained about a missing version of OpenSSL. I had to install sudo zypper install libopenssl1_1
to make it work.
Obsidian
I use Obsidian for note-taking and it works perfectly on Linux. The only issue I had was getting it to sync with my iPhone. Before, when using a MacBook, I was syncing through iCloud which worked perfectly. On Linux, I was not able to find a syncing client for iCloud that I trusted and I therefore decided to use Dropbox. Unfortunately, the iPhone app cannot directly work on the Dropbox folder and I had to use a plugin called Remotely Save which syncs the Obsidian vault from the iPhone to a Dropbox folder.
On Linux, I simply use the vault synced to by this plugin (it is under /Apps/Obsidian/<my-vault>
) directly. This setup seems to work without hickups, so far. Under the plugin settings, I had to turn on “sync on open” and “sync on save” to make it work.
Tweaks
Get back /var/log/messages
sudo zypper install rsyslog
Random things
Things that just work perfectly as they should
- dropbox
- nordvpn
- slack
- zoom
- chrome
- libreoffice
- zotero
Small problems encountered and solved
R: installing V8
fails (rstan
, gt
, … dependency)
This package requires a package like libv8-dev
which is not available on OpenSuse. Fortunately, the V8
maintainer provides an option to compile a static version of this library.
This is the post: https://ropensci.org/blog/2020/11/12/installing-v8/ and the steps are:
# For Linux: download libv8 during installation
Sys.setenv(DOWNLOAD_STATIC_LIBV8=1)
install.packages("V8")
Signing up to iCloud calendar in Thunderbird
There is a phantastic walkthrough which worked perfectly for me.