Modern Linux on the Desktop in 2023

https://crepererum.net/linux-2023/

cover

I am using Linux in the form of various distributions for probably over 15 years now. After 8 years with my trusted Lenovo Thinkpad X1 Carbon, it was time for a hardware refresh. I got a framework which turned out pretty nice. I take this opportunity to also reflect on the current state of Linux on “Desktops”.

Upstream First & Fast

Fedora Logo Arch Linux Logo

Whatever Linux distribution you choose, do yourself and all upstream maintainers a favor and use something that releases often (or has rolling releases1) and that does not patch upstream software to death. It is an illusion that “old” means “stable” as Debian & Co tried to teach us for many years. Sometimes it is hard to keep features and bug fixes separate and backports of fixes to year old software and the resulting bug reports – both up- and downstream – are a real waste of developers time. I recommend Fedora for the average Linux user or Arch Linux for the nerds.

The “Init Wars” Are Over

systemd Logo

systemd has replaced SysVinit, Upstart & Co. It makes many things so much easier and provides features that you would expect from a reasonable operating system2:

  • Service Management: You list/restart/terminate services w/o relying on a bunch of shell scripts and PID files and hope that none of the processes ever double-fork.
  • Service Boundaries: Services are properly encapsulated into cgroups with limits, (optional) security contexts, and access limitations.
  • Service Activation: Services can be started/stopped when you need them. This includes dbus endpoints and timers.

systemd is normally criticized for being monolithic. I do not share this opinion. It provides a bunch of features that you may or may not use, but that provide proper integration. Some of these features that I do not want to miss on a modern operating system are:

  • Log Management: No per-service log file at some random location and with yet-another syntax and maybe some custom log rotation. You can finally correlate log messages.
  • DNS: systemd-resolved offers local DNS resolver that comes with DNSSEC and split DNS. It “just works”. There is no need to use systemd-networkd for this, use NetworkManager instead which is better suited for laptops that connect to different and new networks regularly.
  • Time Synchronization: You can use systemd-timesyncd to sync your computers clock using NTP. No extra software stack required.

Partitions

Everything is UEFI based nowadays. Use a GPT. You only need two partitions:

  1. EFI System: FAT32, contains all EFI binaries required to boot. Mounted under /efi.
  2. Data: LUKS2, which gets unlocked during boot (also see encryption). Contains a Btrfs file system. This in turn can have subvolumes and a swap file (if you need it).

You do not need an fstab file or kernel parameters to mount the partitions anymore. Just comply with the Discoverable Partitions Specification and systemd-gpt-auto-generator will automatically discover, decrypt, and mount your partitions.

Boot

Everything in the new UEFI world is based on PE images. You can pack a “stub” which translates from UEFI to “Linux” (use systemd-stub), your kernel, the initrd, the kernel command line, and an optional splash screen into a Unified Kernel Image – which is a specific format of an PE image.

Technically you do not need a bootloader because the UEFI can boot your Unified Kernel Image directly. However, there are still a few good reasons to do:

  • UEFI Memory: If you need multiple images for multiple kernels (e.g. as a fallback) you would need to register your different images on every update. Since apparently many UEFI mainboards use somewhat cheap persistent memory chips that should not be overwritten too often. So instead it is better to use the file system as a state store.
  • Random Seeds: You can store a random seed on disk which is then used to seed your kernel during the early boot phase. This improves security.
  • Boot Counting: The bootloader can count boot attempts and fall back to stable kernel after an update.

systemd-boot is a good bootloader that implements all nice features and is a solid but simple player within an UEFI environment.

I advise you to using an initrd that comes with systemd. This avoids having two completely different system managers (one during boot, one during runtime).

Security

We need to make a few assumption regarding security on modern systems:

  • Distro: The Linux distribution in use is trusted. Updates should be provided promptly.
  • Upstream: All system level packages are trusted.
  • Hardware: The hardware the system is running on is trusted.

Secure Boot

Especially the latter point provides us not only with some drawbacks but also with advantages. All laptops nowadays come with a TPM and allow us to use Secure Boot. This means that – even when your laptop was physically accessed – only trusted software can decrypt your data (see encryption). This is a very important property. I cannot overstate how important this combination of encryption and a trusted boot environment is. While encryption for sure provides data at rest, not having a trusted environment where you type the decryption key into is somewhat pointless3.

There has been some beef with Microsoft over Secure Boot because they claimed exclusive key access on many systems. Luckily framework allows you to install custom keys at basically every layer, so even if you want to secure your Linux installation, you can still dual-boot Windows or be sure that OpROMs still load.

So the workflow is as follows:

  1. Create key to sign your Unified Kernel Image, likely a “Signature Database (db)” key.
  2. Enroll key into UEFI. Using the framework system, just copy it to /efi and enroll it using the UEFI UI.
  3. Every time your build a new Unified Kernel Image, sign that with the aforementioned key.
  4. Make sure you have a very strong UEFI password.

Encryption

LUKS Logo

LUKS2 is used to encrypt all critical data. The Unified Kernel Image does not contain any secrets. Use cryptsetup for setup, it comes with state-of-the-art defaults. You have multiple options on how to decrypt your data:

  • Password: You use a complex password. Since cryptsetup chose proper defaults, this should be reasonably safe.
  • TPM only: Rely on the hardware to provide the decryption key if Secure Boot was successful. Note that allows attackers to boot up the system, so you then need a proper user account password and security vulnerabilities in the booted software may be exploited.
  • TPM & PIN: Same as above but requires an additional PIN4, which prevents booting the system by an attacker. The PIN is usually shorter than a full-blown password, but the TPM usually implements a lockout mechanism if there are too many failed attempts, which is nice.
  • FIDO2 with and without PIN: Same as TPM but use an external hardware token instead.

The TPM and FIDO2 options require systemd-cryptenroll.

Fingerprint Reader

fprint Logo

Many laptops come with fingerprint readers. fprint allows you to use that if your like and has a good integration with Gnome.

Firewall

FirewallD Logo

In my mind a firewall on a Laptop mostly prevents external systems and attackers from connecting to local services that accidently or by bad design open an unprotected network interface. In an ideal world this would not be required, but it is a good safety net to have. FirewallD provides good integration with NetworkManager and provides zone management, i.e. you can have different rules for your trusted home network, your office, and an open Wi-Fi.

USBGuard

USBGuard Logo

USBGuard protects you against BadUSB. It has a rudimentary integration with Gnome, so you get a desktop notification whenever a device was blocked. Sadly there is no “click here to allow new device” button, so currently the protection level is “lockscreen”, so all devices that are plugged into a locked system are blocked. This is better than the default behavior of Linux – e.g. connecting to a random network if a USB ethernet dongle is plugged in.

In my personal experience USBGuard often blocks devices that should just work, e.g. Bluetooth. So I had to disable it.

Secure Software Foundation

Your system software should be designed to sandbox applications as good as possible. This can (and has to be) archived on multiple levels:

Wayland

Wayland Logo

X115 might have been nice back in the 90s, but it is a pile of hack and a security issue – every application can wiretap everything. Wayland is here to clean up the messy display stack (Mir tried that as well but lost). Apps that still rely on X11 are bridged via Xwayland. Screensharing works (see PipeWire).

See “Wayland Limitations”, because not everything is roses at the moment.

PipeWire

PipeWire Logo

PipeWire replaced PulseAudio. It has proper Bluetooth support and is super stable. It also allows JACK clients, so you only need one audio solution. One may wonder why we need an audio daemon and cannot use ALSA directly. There are multiple good reasons for PipeWire:

  • Virtual Hardware: Sometimes your “hardware” is not physically connected to your system. This includes Bluetooth speakers, loopback devices, network streaming devices, etc.
  • Central Controls: Have a central and easy way to reroute audio, select default devices, mute applications, and set application-specific levels without clicking through menus of every single application.
  • Filters: Using apps like EasyEffects you can add filters to input and output devices like noise cancellation, EQ, compressors, deessers, etc. For the framework laptop, the community offers EQ presets which improve audio quality significantly.
  • Video & Screensharing: PipeWire is not only for audio but can also manage webcams and screensharing.
  • Sandboxing: Flatpak plays very well with it.

Flatpak

Flatpak Logo

Flatpak allows application developers to package and distribute (e.g. through Flathub) their work without learning yet another package manager or without fighting all your distribution weirdness. Furthermore, Flatpak comes with some form of sandboxing, even though this aspect can be improved in the future. The combination of unified packaging and sandboxing makes it easier to consume proprietary software like Discord, Steam, or Zoom; but I also find myself consuming many open source applications through it. It has become my go-to way to install GUI applications. Use Flatseal to manage permissions.

Currently, Canonical tries to push their own format called Snap. I wonder if they again overestimate their market position after the Upstart and Mir disasters.

See “Flatpak & GPU” for current limitations.

Backups

Restic Logo Kopia Logo

Backups should be standard these days – not just any backup, but a good backup. To be precise, a backup should have the following properties:

  • Automated: We are all lazy and forgetful, so backups should run automated in regular intervals.
  • Opt-out: All files should be automatically included if they are not explicitly excluded. Otherwise, you are going to forget to include new data.
  • Off-site: A NAS or a hard drive under your bed will not help you when your house is on fire. So store your data at a distant location.
  • Raid-safe: The physical location of your data should ideally be owned by someone who is disconnected to yourself as good as possible. If the police (or whoever) is raiding your home, you want your backups to be safe.
  • End-to-End Encrypted: Nobody without credentials should be able to read your data. Encryption makes sure you can include even sensitive information without having to worry. Encryption must include metadata like file names.
  • Incremental: You do not want to upload / transfer your whole data again every day.
  • Minimal Management: If it is set up it should just work. Especially the storage location should not require you to perform weekly checkups. This requirement mostly eliminates private servers as storage locations.
  • Snapshots: There should be multiple snapshots, not only the last one. A virus or yourself may delete or overwrite certain files, and it might take you a while until you realize that.
  • Easy Access: It should be simple to access individual files or whole directories for a given snapshot. Mounting a virtual file system is a very good way.
  • Compression: Ideally data is compressed at least to a certain extent to safe transfer and storage costs.

There are programs that handle these requirements: Restic and Kopia. The latter has the better UI but I am using Restic for a while now, and it just works. You can choose multiple cloud providers for storage. Backblaze B2 is my personal choice, but there might be better options.

Power Management & Fan Control

I somewhat feel that not draining your battery, heating up the keyboard to fry eggs, and being able to hear your own voice through the fan noise is still one of the biggest struggles Linux has.

To get a base level of sane behavior, I suggest you install power-profiles-daemon which also comes with Gnome integration6. You can add powertop on top to debug the current drainage but also to use its auto tune option for even better battery life.

On top there seem to be a few magic kernel arguments that for some reason are not the default but help a lot: mem_sleep_default=deep and nvme.noacpi=1.

Now you have all the requirements to be power efficient, but some apps like your browser may still insist on roasting your CPU instead of your GPU. Use intel_gpu_top from Intel GPU Tools to debug this. Firefox for example required the media.ffmpeg.vaapi.enabled config to be set to use GPU decoding.

Even though software and hardware are as power efficient as possible, your fans may still run on full speed. I do not know why the kernel or whatever driver does not handle this by default, but you may use thermald with dptfxtract to fix that.

Desktop Environment

Gnome Logo KDE Logo

Use a Desktop Environment that supports the aforementioned technologies and works without requiring editing config files just to change the resolution of an external monitor. Gnome and KDE are both reasonable choices. In this post I often refer to Gnome because this is my daily driver.

Non-native Software

Sometimes you want to run software that is not available for your distribution or even for Linux. Depending on the software there are a few ways to achieve that.

Containers

Podman Logo

For OCI containers use Podman. It can run “rootless”, i.e. without requiring a system-wide daemon with root privileges that may backdoor your entire system. It also integrates better with the rest of a modern Linux system than Docker.

Windows Games

Steam Logo

For Windows games your may just use Steam. It uses Proton which is based on Wine and mostly just works.

Other Windows Software

Bottles Logo

If you have other software that only runs on Windows you may try Bottles. It is a tool to configure and run Wine but easier to use than prefixes, manual hacks, or winetricks.

Virtual Machines

Quickemu Logo

If you need a real Windows or even a macOS use Quickemu, which is an easy frontend for QEMU.

Firmware Updates

fwupd Logo

There is more to a laptop / desktop than the operating system. The UEFI has a software version, different embedded controllers like SSD run mini operating systems on their own. Traditionally vendors either provided software updates via Windows programs or via FreeDOS-based update disks. Recently the LVFS (Linux Vendor Firmware Service) and the client program fwupd allow Linux users to update all kinds of embedded controllers and connected devices like webcams. This is a game changer.

What Does Not Work (Yet)

Here a few things that I tried to get to work, but that did not.

iwd

iwd aims to replace wpa_supplicant with a clean implementation and improved kernel interfaces. Sadly on three machines that I tested it on the Wi-Fi connection just stops working after a while with pretty unclear log messages mostly blaming the access point. wpa_supplicant however just works, so I keep using that.

Flatpak & GPU

If your Flatpak application want to use GPGPU interfaces like OpenCL or oneAPI you are pretty much out of luck at the moment, and you have to use non-sandboxed applications. Interfaces like OpenGL, Vulkan, and CUDA seem to work though. This affects for example Blender and darktable.

Wayland Limitations

Even years after its appearance Wayland still has some limitations. Now before we get into them, you may wonder if this is a heavy regression because X11 had all of that sorted out. To be honest I do not think it did. It somehow allowed all kinds of features but the way they were implemented was likely more a hack than a proper solution.

First is HDR and color management. The protocols (color-representation-v1, color-management-v1) for that are currently under discussion and reading through all the details makes one aware that the complexity is probably justified and that we hopefully will have a very solid solution soon.7

Fractional scaling is when you want to scale your applications to your display, but this conversion is not a whole number. Now you cannot squeeze a fraction of a pixel into another, so this is far from trivial if you want to avoid a super blurry or otherwise broken result. The protocol fractional-scale-v1 was recently accepted and also merged into Gnome/Mutter so it should be available soon – if you ignore legacy X11 apps.

Summary and The Future

The Linux ecosystem provides a solid base of a Desktop operating system and the current projects are moving things into the right direction. I personally like Linux, and it is the right choice for many techy people. However, I think 2023 is not “The Year of the Linux Desktop”. There are too many gaps compared to what I would call a “state of the art” operating system.

Hardware Interaction

Distributions are very conservative when it comes to hardware requirements and default configurations. Energy saving could be way more aggressive by default. The fact that hardware-based video decoding is still opt-in for many applications is frustrating. Software is often compiled for processors released decades ago without using new instruction set extensions by default. On the other hand, commercial competitors like Microsoft require you to have at least a somewhat up-to-date hardware configuration. I am not saying that Linux has to be equally aggressive, but it should be more progressive.

Software Delivery

The fact that installing a Linux distribution (with exceptions like Fedora Silverblue) requires a package manager is arcane and error prone. We have plenty of disk space nowadays and it would be way more streamlined and secure to use an immutable installation / image-based OS – either via libostree or mkosi.

Applications should be sandboxed via Flatpak and if a developer needs some specialized tooling or a build environment that is not provided by the installation, they can still use OCI containers or Nix.

Security

The fact that the security measurements discussed in this blog post are not the default is just wild. People often claim that Linux is more secure than Windows which might be true, but the bar is actually way higher if you look at a vanilla Android or macOS for example.


Image: by Mariola Grobelska on Unsplash

{
"by": "Flimm",
"descendants": 29,
"id": 40241142,
"kids": [
40243937,
40242944,
40241570,
40241701,
40243387,
40243313,
40243553,
40245070,
40242358,
40243570,
40242941,
40243504,
40248756,
40243401,
40241192,
40241194,
40244676
],
"score": 81,
"time": 1714682504,
"title": "Modern Linux on the Desktop in 2023",
"type": "story",
"url": "https://crepererum.net/linux-2023/"
}
{
"author": null,
"date": "2023-05-22T00:00:00.000Z",
"description": null,
"image": "https://crepererum.net/processed_images/cover.61040b91651421be.jpg",
"logo": "https://logo.clearbit.com/crepererum.net",
"publisher": "Marco Neumann",
"title": "crepererum - Linux On Desktop In 2023",
"url": "https://crepererum.net/linux-2023/"
}
{
"url": "https://crepererum.net/linux-2023/",
"title": "crepererum - Linux On Desktop In 2023",
"description": "I am using Linux in the form of various distributions for probably over 15 years now. After 8 years with my trusted Lenovo Thinkpad X1 Carbon, it was time for a hardware refresh. I got a framework which...",
"links": [
"https://crepererum.net/linux-2023/"
],
"image": "",
"content": "<article><div><p><img srcset=\"https://crepererum.net/processed_images/cover.5f8db86880e11536.jpg 100w, https://crepererum.net/processed_images/cover.f72f877aa3dab1f3.jpg 200w, https://crepererum.net/processed_images/cover.f3be72fee887ddb0.jpg 400w, https://crepererum.net/processed_images/cover.f1a2c9fd810dbfa0.jpg 800w, https://crepererum.net/processed_images/cover.61040b91651421be.jpg 1200w, https://crepererum.net/processed_images/cover.0c546dabc0b87ff4.jpg 1600w, https://crepererum.net/processed_images/cover.7255f0d02580002b.jpg 2400w, https://crepererum.net/processed_images/cover.1eb8c2fe20fcb24e.jpg 3200w\" alt=\"cover\" src=\"https://crepererum.net/processed_images/cover.61040b91651421be.jpg\" /></p><p>I am using Linux in the form of various distributions for probably over 15 years now. After 8 years with my trusted Lenovo Thinkpad X1 Carbon, it was time for a hardware refresh. I got a <a target=\"_blank\" href=\"https://frame.work/\">framework</a> which turned out pretty nice. I take this opportunity to also reflect on the current state of Linux on “Desktops”.</p><h2 id=\"upstream-first-fast\">Upstream First &amp; Fast</h2> <img alt=\"Fedora Logo\" src=\"https://crepererum.net/linux-2023/fedora-logo.svg\" /> <img alt=\"Arch Linux Logo\" src=\"https://crepererum.net/linux-2023/archlinux-logo.svg\" /> <p>Whatever Linux distribution you choose, do yourself and all upstream maintainers a favor and use something that releases often (or has rolling releases<sup><a target=\"_blank\" href=\"https://crepererum.net/linux-2023/#rolling\">1</a></sup>) and that does not patch upstream software to death. It is an illusion that “old” means “stable” as <a target=\"_blank\" href=\"https://www.debian.org/\">Debian</a> &amp; Co tried to teach us for many years. Sometimes it is hard to keep features and bug fixes separate and backports of fixes to year old software and the resulting bug reports – both up- and downstream – are a real waste of developers time. I recommend <a target=\"_blank\" href=\"https://getfedora.org/\">Fedora</a> for the average Linux user or <a target=\"_blank\" href=\"https://archlinux.org/\">Arch Linux</a> for the nerds.</p><h2 id=\"the-init-wars-are-over\">The “Init Wars” Are Over</h2><p><img alt=\"systemd Logo\" src=\"https://crepererum.net/linux-2023/systemd-logo.svg\" /></p><p><a target=\"_blank\" href=\"https://systemd.io/\">systemd</a> has replaced <a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Init#SysV-style\">SysVinit</a>, <a target=\"_blank\" href=\"https://upstart.ubuntu.com/\">Upstart</a> &amp; Co. It makes many things so much easier and provides features that you would expect from a reasonable operating system<sup><a target=\"_blank\" href=\"https://crepererum.net/linux-2023/#operating_system\">2</a></sup>:</p><ul><li><strong>Service Management:</strong> You list/restart/terminate services w/o relying on a bunch of shell scripts and PID files and hope that none of the processes ever double-fork.</li><li><strong>Service Boundaries:</strong> Services are properly encapsulated into cgroups with limits, (optional) security contexts, and access limitations.</li><li><strong>Service Activation:</strong> Services can be started/stopped when you need them. This includes <a target=\"_blank\" href=\"https://www.freedesktop.org/wiki/Software/dbus/\">dbus</a> endpoints and timers.</li></ul><p><a target=\"_blank\" href=\"https://systemd.io/\">systemd</a> is normally criticized for being monolithic. I do not share this opinion. It provides a bunch of features that you may or may not use, but that provide proper integration. Some of these features that I do not want to miss on a modern operating system are:</p><ul><li><strong>Log Management:</strong> No per-service log file at some random location and with yet-another syntax and maybe some custom log rotation. You can finally correlate log messages.</li><li><strong><abbr>DNS</abbr>:</strong> <a target=\"_blank\" href=\"https://www.freedesktop.org/software/systemd/man/systemd-resolved.service.html\">systemd-resolved</a> offers local <abbr><a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Domain_Name_System\">DNS</a></abbr> resolver that comes with <abbr><a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Domain_Name_System_Security_Extensions\">DNSSEC</a></abbr> and <a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Split-horizon_DNS\">split <abbr>DNS</abbr></a>. It “just works”. There is no need to use <a target=\"_blank\" href=\"https://www.freedesktop.org/software/systemd/man/systemd-networkd.service.html#\">systemd-networkd</a> for this, use <a target=\"_blank\" href=\"https://networkmanager.dev/\">NetworkManager</a> instead which is better suited for laptops that connect to different and new networks regularly.</li><li><strong>Time Synchronization:</strong> You can use <a target=\"_blank\" href=\"https://www.freedesktop.org/software/systemd/man/systemd-timesyncd.service.html\">systemd-timesyncd</a> to sync your computers clock using <abbr><a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Network_Time_Protocol\">NTP</a></abbr>. No extra software stack required.</li></ul><h2 id=\"partitions\">Partitions</h2><p>Everything is <abbr><a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/UEFI\">UEFI</a></abbr> based nowadays. Use a <abbr><a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/GUID_Partition_Table\">GPT</a></abbr>. You only need two partitions:</p><ol><li><strong>EFI System:</strong> <abbr><a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/File_Allocation_Table#FAT32\">FAT32</a></abbr>, contains all EFI binaries required to boot. Mounted under <code>/efi</code>.</li><li><strong>Data:</strong> <abbr><a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Linux_Unified_Key_Setup\">LUKS2</a></abbr>, which gets unlocked during boot (also see <a target=\"_blank\" href=\"https://crepererum.net/linux-2023/#encryption\">encryption</a>). Contains a <a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Btrfs\">Btrfs</a> file system. This in turn can have subvolumes and a swap file (if you need it).</li></ol><p>You do not need an <a target=\"_blank\" href=\"https://wiki.archlinux.org/title/Fstab\">fstab</a> file or kernel parameters to mount the partitions anymore. Just comply with the <a target=\"_blank\" href=\"https://uapi-group.org/specifications/specs/discoverable_partitions_specification/\">Discoverable Partitions Specification</a> and <a target=\"_blank\" href=\"https://www.freedesktop.org/software/systemd/man/systemd-gpt-auto-generator.html\">systemd-gpt-auto-generator</a> will automatically discover, decrypt, and mount your partitions.</p><h2 id=\"boot\">Boot</h2><p>Everything in the new <abbr><a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/UEFI\">UEFI</a></abbr> world is based on <abbr><a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Portable_Executable\">PE</a></abbr> images. You can pack a “stub” which translates from <abbr><a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/UEFI\">UEFI</a></abbr> to “Linux” (use <a target=\"_blank\" href=\"https://www.freedesktop.org/software/systemd/man/systemd-stub.html\">systemd-stub</a>), your kernel, the <a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Initial_ramdisk\">initrd</a>, the kernel command line, and an optional splash screen into a <a target=\"_blank\" href=\"https://uapi-group.org/specifications/specs/unified_kernel_image/\">Unified Kernel Image</a> – which is a specific format of an <abbr><a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Portable_Executable\">PE</a></abbr> image.</p><p>Technically you do not need a bootloader because the <abbr><a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/UEFI\">UEFI</a></abbr> can boot your <a target=\"_blank\" href=\"https://uapi-group.org/specifications/specs/unified_kernel_image/\">Unified Kernel Image</a> directly. However, there are still a few good reasons to do:</p><ul><li><strong><abbr><a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/UEFI\">UEFI</a></abbr> Memory:</strong> If you need multiple images for multiple kernels (e.g. as a fallback) you would need to register your different images on every update. Since apparently many <abbr><a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/UEFI\">UEFI</a></abbr> mainboards use somewhat cheap persistent memory chips that should not be overwritten too often. So instead it is better to use the file system as a state store.</li><li><strong>Random Seeds:</strong> You can store a random seed on disk which is then used to seed your kernel during the early boot phase. This improves security.</li><li><strong>Boot Counting:</strong> The bootloader can count boot attempts and fall back to stable kernel after an update.</li></ul><p><a target=\"_blank\" href=\"https://www.freedesktop.org/software/systemd/man/systemd-boot.html\">systemd-boot</a> is a good bootloader that implements all nice features and is a solid but simple player within an <abbr><a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/UEFI\">UEFI</a></abbr> environment.</p><p>I advise you to using an <a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Initial_ramdisk\">initrd</a> that comes with <a target=\"_blank\" href=\"https://systemd.io/\">systemd</a>. This avoids having two completely different system managers (one during boot, one during runtime).</p><h2 id=\"security\">Security</h2><p>We need to make a few assumption regarding security on modern systems:</p><ul><li><strong>Distro:</strong> The Linux distribution in use is trusted. Updates should be provided promptly.</li><li><strong>Upstream:</strong> All system level packages are trusted.</li><li><strong>Hardware:</strong> The hardware the system is running on is trusted.</li></ul><h3 id=\"secure-boot\">Secure Boot</h3><p>Especially the latter point provides us not only with some drawbacks but also with advantages. All laptops nowadays come with a <abbr><a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Trusted_Platform_Module\">TPM</a></abbr> and allow us to use <a target=\"_blank\" href=\"https://wiki.archlinux.org/title/Unified_Extensible_Firmware_Interface/Secure_Boot\">Secure Boot</a>. This means that – even when your laptop was physically accessed – only trusted software can decrypt your data (see <a target=\"_blank\" href=\"https://crepererum.net/linux-2023/#encryption\">encryption</a>). This is a very important property. I cannot overstate how important this combination of encryption and a trusted boot environment is. While encryption for sure provides data at rest, not having a trusted environment where you type the decryption key into is somewhat pointless<sup><a target=\"_blank\" href=\"https://crepererum.net/linux-2023/#lockup_laptop\">3</a></sup>.</p><p>There has been some beef with <a target=\"_blank\" href=\"https://www.microsoft.com/\">Microsoft</a> over <a target=\"_blank\" href=\"https://wiki.archlinux.org/title/Unified_Extensible_Firmware_Interface/Secure_Boot\">Secure Boot</a> because they claimed exclusive key access on many systems. Luckily <a target=\"_blank\" href=\"https://frame.work/\">framework</a> allows you to install custom keys at basically every layer, so even if you want to secure your Linux installation, you can still dual-boot <a target=\"_blank\" href=\"https://www.microsoft.com/en-us/windows\">Windows</a> or be sure that <a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Option_ROM#UEFI_Option_ROMs\">OpROMs</a> still load.</p><p>So the workflow is as follows:</p><ol><li>Create key to sign your <a target=\"_blank\" href=\"https://uapi-group.org/specifications/specs/unified_kernel_image/\">Unified Kernel Image</a>, likely a “Signature Database (db)” key.</li><li>Enroll key into <abbr><a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/UEFI\">UEFI</a></abbr>. Using the <a target=\"_blank\" href=\"https://frame.work/\">framework</a> system, just copy it to <code>/efi</code> and enroll it using the <abbr><a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/UEFI\">UEFI</a></abbr> <abbr>UI</abbr>.</li><li>Every time your build a new <a target=\"_blank\" href=\"https://uapi-group.org/specifications/specs/unified_kernel_image/\">Unified Kernel Image</a>, sign that with the aforementioned key.</li><li>Make sure you have a very strong <abbr><a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/UEFI\">UEFI</a></abbr> password.</li></ol><h3 id=\"encryption\">Encryption</h3><p><img alt=\"LUKS Logo\" srcset=\"https://crepererum.net/processed_images/luks-logo.011a2f382ecf4d31.png 100w, https://crepererum.net/processed_images/luks-logo.ec0e8e1af70fb2fd.png 200w\" src=\"https://crepererum.net/processed_images/luks-logo.847579790e9e0ad8.png\" /></p><p><abbr><a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Linux_Unified_Key_Setup\">LUKS2</a></abbr> is used to encrypt all critical data. The <a target=\"_blank\" href=\"https://uapi-group.org/specifications/specs/unified_kernel_image/\">Unified Kernel Image</a> does not contain any secrets. Use <a target=\"_blank\" href=\"https://gitlab.com/cryptsetup/cryptsetup\">cryptsetup</a> for setup, it comes with state-of-the-art defaults. You have multiple options on how to decrypt your data:</p><ul><li><strong>Password:</strong> You use a complex password. Since <a target=\"_blank\" href=\"https://gitlab.com/cryptsetup/cryptsetup\">cryptsetup</a> chose proper defaults, this should be reasonably safe.</li><li><strong><abbr><a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Trusted_Platform_Module\">TPM</a></abbr> only:</strong> Rely on the hardware to provide the decryption key if <a target=\"_blank\" href=\"https://wiki.archlinux.org/title/Unified_Extensible_Firmware_Interface/Secure_Boot\">Secure Boot</a> was successful. Note that allows attackers to boot up the system, so you then need a proper user account password and security vulnerabilities in the booted software may be exploited.</li><li><strong><abbr><a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Trusted_Platform_Module\">TPM</a></abbr> &amp; <abbr>PIN</abbr>:</strong> Same as above but requires an additional <abbr>PIN</abbr><sup><a target=\"_blank\" href=\"https://crepererum.net/linux-2023/#pin\">4</a></sup>, which prevents booting the system by an attacker. The <abbr>PIN</abbr> is usually shorter than a full-blown password, but the <abbr><a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Trusted_Platform_Module\">TPM</a></abbr> usually implements a lockout mechanism if there are too many failed attempts, which is nice.</li><li><strong><abbr><a target=\"_blank\" href=\"https://gitlab.com/cryptsetup/cryptsetup\">FIDO2</a></abbr> with and without <abbr>PIN</abbr>:</strong> Same as <abbr><a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Trusted_Platform_Module\">TPM</a></abbr> but use an external hardware token instead.</li></ul><p>The <abbr><a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Trusted_Platform_Module\">TPM</a></abbr> and <abbr><a target=\"_blank\" href=\"https://gitlab.com/cryptsetup/cryptsetup\">FIDO2</a></abbr> options require <a target=\"_blank\" href=\"https://www.freedesktop.org/software/systemd/man/systemd-cryptenroll.html\">systemd-cryptenroll</a>.</p><h3 id=\"fingerprint-reader\">Fingerprint Reader</h3><p><img alt=\"fprint Logo\" srcset=\"https://crepererum.net/processed_images/fprint-logo.997f44ddf110cd1f.png 100w, https://crepererum.net/processed_images/fprint-logo.6dec3133582acbe3.png 200w\" src=\"https://crepererum.net/processed_images/fprint-logo.5415ea1a19dbf590.png\" /></p><p>Many laptops come with fingerprint readers. <a target=\"_blank\" href=\"https://fprint.freedesktop.org/\">fprint</a> allows you to use that if your like and has a good integration with <a target=\"_blank\" href=\"https://www.gnome.org/\">Gnome</a>.</p><h3 id=\"firewall\">Firewall</h3><p><img alt=\"FirewallD Logo\" src=\"https://crepererum.net/linux-2023/firewalld-logo.svg\" /></p><p>In my mind a firewall on a Laptop mostly prevents external systems and attackers from connecting to local services that accidently or by bad design open an unprotected network interface. In an ideal world this would not be required, but it is a good safety net to have. <a target=\"_blank\" href=\"https://firewalld.org/\">FirewallD</a> provides good integration with <a target=\"_blank\" href=\"https://networkmanager.dev/\">NetworkManager</a> and provides zone management, i.e. you can have different rules for your trusted home network, your office, and an open Wi-Fi.</p><h3 id=\"usbguard\">USBGuard</h3><p><img alt=\"USBGuard Logo\" src=\"https://crepererum.net/linux-2023/usbguard-logo.svg\" /></p><p><a target=\"_blank\" href=\"https://usbguard.github.io/\">USBGuard</a> protects you against <a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/BadUSB\">BadUSB</a>. It has a rudimentary integration with <a target=\"_blank\" href=\"https://www.gnome.org/\">Gnome</a>, so you get a desktop notification whenever a device was blocked. Sadly there is no “click here to allow new device” button, so currently the protection level is “lockscreen”, so all devices that are plugged into a locked system are blocked. This is better than the default behavior of Linux – e.g. connecting to a random network if a USB ethernet dongle is plugged in.</p><p>In my personal experience <a target=\"_blank\" href=\"https://usbguard.github.io/\">USBGuard</a> often blocks devices that should just work, e.g. Bluetooth. So I had to disable it.</p><h3 id=\"secure-software-foundation\">Secure Software Foundation</h3><p>Your system software should be designed to sandbox applications as good as possible. This can (and has to be) archived on multiple levels:</p><ul><li><strong>System Services:</strong> See <a target=\"_blank\" href=\"https://crepererum.net/linux-2023/#the-init-wars-are-over\">systemd</a>.</li><li><strong>Applications:</strong> See <a target=\"_blank\" href=\"https://crepererum.net/linux-2023/#flatpak\">Flatpak</a>.</li><li><strong>Resources &amp; <abbr>IPC</abbr>:</strong> See <a target=\"_blank\" href=\"https://crepererum.net/linux-2023/#wayland\">Wayland</a>, and <a target=\"_blank\" href=\"https://crepererum.net/linux-2023/#pipewire\">PipeWire</a>. <a target=\"_blank\" href=\"https://www.freedesktop.org/wiki/Software/dbus/\">D-Bus</a> and <a target=\"_blank\" href=\"https://gitlab.freedesktop.org/polkit/polkit/\">polkit</a> help on the <abbr>IPC</abbr> front.</li></ul><h2 id=\"wayland\">Wayland</h2><p><img alt=\"Wayland Logo\" src=\"https://crepererum.net/linux-2023/wayland-logo.svg\" /></p><p><abbr><a target=\"_blank\" href=\"https://www.x.org/\">X11</a></abbr><sup><a target=\"_blank\" href=\"https://crepererum.net/linux-2023/#x11\">5</a></sup> might have been nice back in the 90s, but it is a pile of hack and a security issue – every application can wiretap everything. <a target=\"_blank\" href=\"https://wayland.freedesktop.org/\">Wayland</a> is here to clean up the messy display stack (<a target=\"_blank\" href=\"https://mir-server.io/\">Mir</a> tried that as well but lost). Apps that still rely on <abbr><a target=\"_blank\" href=\"https://www.x.org/\">X11</a></abbr> are bridged via <a target=\"_blank\" href=\"https://wayland.freedesktop.org/xserver.html\">Xwayland</a>. Screensharing works (see <a target=\"_blank\" href=\"https://crepererum.net/linux-2023/#pipewire\">PipeWire</a>).</p><p>See <a target=\"_blank\" href=\"https://crepererum.net/linux-2023/#wayland-limitations\">“Wayland Limitations”</a>, because not everything is roses at the moment.</p><h2 id=\"pipewire\">PipeWire</h2><p><img alt=\"PipeWire Logo\" src=\"https://crepererum.net/linux-2023/pipewire-logo.svg\" /></p><p><a target=\"_blank\" href=\"https://pipewire.org/\">PipeWire</a> replaced <a target=\"_blank\" href=\"https://www.freedesktop.org/wiki/Software/PulseAudio/\">PulseAudio</a>. It has proper Bluetooth support and is super stable. It also allows <abbr><a target=\"_blank\" href=\"https://jackaudio.org/\">JACK</a></abbr> clients, so you only need one audio solution. One may wonder why we need an audio daemon and cannot use <abbr><a target=\"_blank\" href=\"https://www.alsa-project.org/wiki/Main_Page\">ALSA</a></abbr> directly. There are multiple good reasons for <a target=\"_blank\" href=\"https://pipewire.org/\">PipeWire</a>:</p><ul><li><strong>Virtual Hardware:</strong> Sometimes your “hardware” is not physically connected to your system. This includes Bluetooth speakers, loopback devices, network streaming devices, etc.</li><li><strong>Central Controls:</strong> Have a central and easy way to reroute audio, select default devices, mute applications, and set application-specific levels without clicking through menus of every single application.</li><li><strong>Filters:</strong> Using apps like <a target=\"_blank\" href=\"https://github.com/wwmm/easyeffects\">EasyEffects</a> you can add filters to input and output devices like noise cancellation, <abbr>EQ</abbr>, compressors, deessers, etc. For the <a target=\"_blank\" href=\"https://frame.work/\">framework</a> laptop, the community offers <abbr>EQ</abbr> presets which improve audio quality significantly.</li><li><strong>Video &amp; Screensharing:</strong> <a target=\"_blank\" href=\"https://pipewire.org/\">PipeWire</a> is not only for audio but can also manage webcams and screensharing.</li><li><strong>Sandboxing:</strong> <a target=\"_blank\" href=\"https://crepererum.net/linux-2023/#flatpak\">Flatpak</a> plays very well with it.</li></ul><h2 id=\"flatpak\">Flatpak</h2><p><img alt=\"Flatpak Logo\" src=\"https://crepererum.net/linux-2023/flatpak-logo.svg\" /></p><p><a target=\"_blank\" href=\"https://flatpak.org/\">Flatpak</a> allows application developers to package and distribute (e.g. through <a target=\"_blank\" href=\"https://flathub.org/\">Flathub</a>) their work without learning yet another package manager or without fighting all your distribution weirdness. Furthermore, <a target=\"_blank\" href=\"https://flatpak.org/\">Flatpak</a> comes with some form of sandboxing, even though this aspect can be improved in the future. The combination of unified packaging and sandboxing makes it easier to consume proprietary software like <a target=\"_blank\" href=\"https://discord.com/\">Discord</a>, <a target=\"_blank\" href=\"https://store.steampowered.com/\">Steam</a>, or <a target=\"_blank\" href=\"https://zoom.us/\">Zoom</a>; but I also find myself consuming many open source applications through it. It has become my go-to way to install <abbr>GUI</abbr> applications. Use <a target=\"_blank\" href=\"https://flathub.org/apps/com.github.tchx84.Flatseal\">Flatseal</a> to manage permissions.</p><p>Currently, <a target=\"_blank\" href=\"https://canonical.com/\">Canonical</a> tries to push their own format called <a target=\"_blank\" href=\"https://snapcraft.io/\">Snap</a>. I wonder if they again overestimate their market position after the <a target=\"_blank\" href=\"https://upstart.ubuntu.com/\">Upstart</a> and <a target=\"_blank\" href=\"https://mir-server.io/\">Mir</a> disasters.</p><p>See <a target=\"_blank\" href=\"https://crepererum.net/linux-2023/#flatpak-gpu\">“Flatpak &amp; GPU”</a> for current limitations.</p><h2 id=\"backups\">Backups</h2> <img alt=\"Restic Logo\" srcset=\"https://crepererum.net/processed_images/restic-logo.a7ede2ffccead55d.png 100w, https://crepererum.net/processed_images/restic-logo.09eea8d404ff2c17.png 200w, https://crepererum.net/processed_images/restic-logo.ff40822ec75a8df4.png 400w\" src=\"https://crepererum.net/processed_images/restic-logo.af691223087bee3d.png\" /> <img alt=\"Kopia Logo\" src=\"https://crepererum.net/linux-2023/kopia-logo.svg\" /> <p>Backups should be standard these days – not just any backup, but a good backup. To be precise, a backup should have the following properties:</p><ul><li><strong>Automated:</strong> We are all lazy and forgetful, so backups should run automated in regular intervals.</li><li><strong>Opt-out:</strong> All files should be automatically included if they are not explicitly excluded. Otherwise, you are going to forget to include new data.</li><li><strong>Off-site:</strong> A <abbr><a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Network-attached_storage\">NAS</a></abbr> or a hard drive under your bed will not help you when your house is on fire. So store your data at a distant location.</li><li><strong>Raid-safe:</strong> The physical location of your data should ideally be owned by someone who is disconnected to yourself as good as possible. If the police (or whoever) is raiding your home, you want your backups to be safe.</li><li><strong>End-to-End Encrypted:</strong> Nobody without credentials should be able to read your data. Encryption makes sure you can include even sensitive information without having to worry. Encryption must include metadata like file names.</li><li><strong>Incremental:</strong> You do not want to upload / transfer your whole data again every day.</li><li><strong>Minimal Management:</strong> If it is set up it should just work. Especially the storage location should not require you to perform weekly checkups. This requirement mostly eliminates private servers as storage locations.</li><li><strong>Snapshots:</strong> There should be multiple snapshots, not only the last one. A virus or yourself may delete or overwrite certain files, and it might take you a while until you realize that.</li><li><strong>Easy Access:</strong> It should be simple to access individual files or whole directories for a given snapshot. Mounting a virtual file system is a very good way.</li><li><strong>Compression:</strong> Ideally data is compressed at least to a certain extent to safe transfer and storage costs.</li></ul><p>There are programs that handle these requirements: <a target=\"_blank\" href=\"https://restic.net/\">Restic</a> and <a target=\"_blank\" href=\"https://kopia.io/\">Kopia</a>. The latter has the better <abbr>UI</abbr> but I am using <a target=\"_blank\" href=\"https://restic.net/\">Restic</a> for a while now, and it just works. You can choose multiple cloud providers for storage. <a target=\"_blank\" href=\"https://www.backblaze.com/b2/cloud-storage.html\">Backblaze B2</a> is my personal choice, but there might be better options.</p><h2 id=\"power-management-fan-control\">Power Management &amp; Fan Control</h2><p>I somewhat feel that not draining your battery, heating up the keyboard to fry eggs, and being able to hear your own voice through the fan noise is still one of the biggest struggles Linux has.</p><p>To get a base level of sane behavior, I suggest you install <a target=\"_blank\" href=\"https://gitlab.freedesktop.org/hadess/power-profiles-daemon\">power-profiles-daemon</a> which also comes with <a target=\"_blank\" href=\"https://www.gnome.org/\">Gnome</a> integration<sup><a target=\"_blank\" href=\"https://crepererum.net/linux-2023/#tlp\">6</a></sup>. You can add <a target=\"_blank\" href=\"https://github.com/fenrus75/powertop\">powertop</a> on top to debug the current drainage but also to use its auto tune option for even better battery life.</p><p>On top there seem to be a few magic kernel arguments that for some reason are not the default but help a lot: <code>mem_sleep_default=deep</code> and <code>nvme.noacpi=1</code>.</p><p>Now you have all the requirements to be power efficient, but some apps like your browser may still insist on roasting your <abbr>CPU</abbr> instead of your <abbr>GPU</abbr>. Use <code>intel_gpu_top</code> from <a target=\"_blank\" href=\"https://gitlab.freedesktop.org/drm/igt-gpu-tools\">Intel <abbr>GPU</abbr> Tools</a> to debug this. <a target=\"_blank\" href=\"https://www.mozilla.org/en-US/firefox/\">Firefox</a> for example required the <code>media.ffmpeg.vaapi.enabled</code> config to be set to use <abbr>GPU</abbr> decoding.</p><p>Even though software and hardware are as power efficient as possible, your fans may still run on full speed. I do not know why the kernel or whatever driver does not handle this by default, but you may use <a target=\"_blank\" href=\"https://github.com/intel/thermal_daemon\">thermald</a> with <a target=\"_blank\" href=\"https://github.com/intel/dptfxtract\">dptfxtract</a> to fix that.</p><h2 id=\"desktop-environment\">Desktop Environment</h2> <img alt=\"Gnome Logo\" src=\"https://crepererum.net/linux-2023/gnome-logo.svg\" /> <img alt=\"KDE Logo\" src=\"https://crepererum.net/linux-2023/kde-logo.svg\" /> <p>Use a <a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Desktop_environment\">Desktop Environment</a> that supports the aforementioned technologies and works without requiring editing config files just to change the resolution of an external monitor. <a target=\"_blank\" href=\"https://www.gnome.org/\">Gnome</a> and <a target=\"_blank\" href=\"https://kde.org/\">KDE</a> are both reasonable choices. In this post I often refer to <a target=\"_blank\" href=\"https://www.gnome.org/\">Gnome</a> because this is my daily driver.</p><h2 id=\"non-native-software\">Non-native Software</h2><p>Sometimes you want to run software that is not available for your distribution or even for Linux. Depending on the software there are a few ways to achieve that.</p><h3 id=\"containers\">Containers</h3><p><img alt=\"Podman Logo\" src=\"https://crepererum.net/linux-2023/podman-logo.svg\" /></p><p>For <abbr><a target=\"_blank\" href=\"https://opencontainers.org/\">OCI</a></abbr> containers use <a target=\"_blank\" href=\"https://podman.io/\">Podman</a>. It can run “rootless”, i.e. without requiring a system-wide daemon with root privileges that may backdoor your entire system. It also integrates better with the rest of a modern Linux system than <a target=\"_blank\" href=\"https://www.docker.com/\">Docker</a>.</p><h3 id=\"windows-games\">Windows Games</h3><p><img alt=\"Steam Logo\" src=\"https://crepererum.net/linux-2023/steam-logo.svg\" /></p><p>For <a target=\"_blank\" href=\"https://www.microsoft.com/en-us/windows\">Windows</a> games your may just use <a target=\"_blank\" href=\"https://store.steampowered.com/\">Steam</a>. It uses <a target=\"_blank\" href=\"https://github.com/ValveSoftware/Proton\">Proton</a> which is based on <a target=\"_blank\" href=\"https://www.winehq.org/\">Wine</a> and mostly just works.</p><h3 id=\"other-windows-software\">Other Windows Software</h3><p><img alt=\"Bottles Logo\" src=\"https://crepererum.net/linux-2023/bottles-logo.svg\" /></p><p>If you have other software that only runs on <a target=\"_blank\" href=\"https://www.microsoft.com/en-us/windows\">Windows</a> you may try <a target=\"_blank\" href=\"https://usebottles.com/\">Bottles</a>. It is a tool to configure and run <a target=\"_blank\" href=\"https://www.winehq.org/\">Wine</a> but easier to use than prefixes, manual hacks, or <a target=\"_blank\" href=\"https://wiki.winehq.org/Winetricks\">winetricks</a>.</p><h3 id=\"virtual-machines\">Virtual Machines</h3><p><img alt=\"Quickemu Logo\" src=\"https://crepererum.net/linux-2023/quickemu-logo.svg\" /></p><p>If you need a real <a target=\"_blank\" href=\"https://www.microsoft.com/en-us/windows\">Windows</a> or even a <a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/MacOS\">macOS</a> use <a target=\"_blank\" href=\"https://github.com/quickemu-project/quickemu\">Quickemu</a>, which is an easy frontend for <abbr><a target=\"_blank\" href=\"https://www.qemu.org/\">QEMU</a></abbr>.</p><h2 id=\"firmware-updates\">Firmware Updates</h2><p><img alt=\"fwupd Logo\" src=\"https://crepererum.net/linux-2023/fwupd-logo.svg\" /></p><p>There is more to a laptop / desktop than the operating system. The <abbr><a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/UEFI\">UEFI</a></abbr> has a software version, different embedded controllers like <abbr>SSD</abbr> run mini operating systems on their own. Traditionally vendors either provided software updates via <a target=\"_blank\" href=\"https://www.microsoft.com/en-us/windows\">Windows</a> programs or via <a target=\"_blank\" href=\"https://www.freedos.org/\">FreeDOS</a>-based update disks. Recently the <abbr><a target=\"_blank\" href=\"https://fwupd.org/\">LVFS</a></abbr> (Linux Vendor Firmware Service) and the client program <a target=\"_blank\" href=\"https://github.com/fwupd/fwupd\">fwupd</a> allow Linux users to update all kinds of embedded controllers and connected devices like webcams. This is a game changer.</p><h2 id=\"what-does-not-work-yet\">What Does Not Work (Yet)</h2><p>Here a few things that I tried to get to work, but that did not.</p><h3 id=\"iwd\">iwd</h3><p><a target=\"_blank\" href=\"https://iwd.wiki.kernel.org/\">iwd</a> aims to replace <a target=\"_blank\" href=\"https://w1.fi/wpa_supplicant/\">wpa_supplicant</a> with a clean implementation and improved kernel interfaces. Sadly on three machines that I tested it on the Wi-Fi connection just stops working after a while with pretty unclear log messages mostly blaming the access point. <a target=\"_blank\" href=\"https://w1.fi/wpa_supplicant/\">wpa_supplicant</a> however just works, so I keep using that.</p><h3 id=\"flatpak-gpu\">Flatpak &amp; <abbr>GPU</abbr></h3><p>If your <a target=\"_blank\" href=\"https://flatpak.org/\">Flatpak</a> application want to use <abbr><a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/General-purpose_computing_on_graphics_processing_units\">GPGPU</a></abbr> interfaces like <a target=\"_blank\" href=\"https://www.khronos.org/opencl/\">OpenCL</a> or <a target=\"_blank\" href=\"https://www.oneapi.io/\">oneAPI</a> you are pretty much out of luck at the moment, and you have to use non-sandboxed applications. Interfaces like <a target=\"_blank\" href=\"https://www.opengl.org/\">OpenGL</a>, <a target=\"_blank\" href=\"https://www.vulkan.org/\">Vulkan</a>, and <abbr><a target=\"_blank\" href=\"https://developer.nvidia.com/cuda-zone\">CUDA</a></abbr> seem to work though. This affects for example <a target=\"_blank\" href=\"https://www.blender.org/\">Blender</a> and <a target=\"_blank\" href=\"https://www.darktable.org/\">darktable</a>.</p><h3 id=\"wayland-limitations\">Wayland Limitations</h3><p>Even years after its appearance <a target=\"_blank\" href=\"https://wayland.freedesktop.org/\">Wayland</a> still has some limitations. Now before we get into them, you may wonder if this is a heavy regression because <abbr><a target=\"_blank\" href=\"https://www.x.org/\">X11</a></abbr> had all of that sorted out. To be honest I do not think it did. It somehow allowed all kinds of features but the way they were implemented was likely more a hack than a proper solution.</p><p>First is <abbr><a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/High_dynamic_range\">HDR</a></abbr> and color management. The protocols (<a target=\"_blank\" href=\"https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/183\">color-representation-v1</a>, <a target=\"_blank\" href=\"https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/14\">color-management-v1</a>) for that are currently under discussion and reading through all the details makes one aware that the complexity is probably justified and that we hopefully will have a very solid solution soon.<sup><a target=\"_blank\" href=\"https://crepererum.net/linux-2023/#hdr\">7</a></sup></p><p>Fractional scaling is when you want to scale your applications to your display, but this conversion is not a whole number. Now you cannot squeeze a fraction of a pixel into another, so this is far from trivial if you want to avoid a super blurry or otherwise broken result. The protocol <a target=\"_blank\" href=\"https://wayland.app/protocols/fractional-scale-v1\">fractional-scale-v1</a> was recently accepted and also merged into <a target=\"_blank\" href=\"https://www.gnome.org/\">Gnome</a>/<a target=\"_blank\" href=\"https://gitlab.gnome.org/GNOME/mutter\">Mutter</a> so it should be available soon – if you ignore legacy <abbr><a target=\"_blank\" href=\"https://www.x.org/\">X11</a></abbr> apps.</p><h2 id=\"summary-and-the-future\">Summary and The Future</h2><p>The Linux ecosystem provides a solid base of a Desktop operating system and the current projects are moving things into the right direction. I personally like Linux, and it is the right choice for many techy people. However, I think 2023 is <strong>not</strong> “The Year of the Linux Desktop”. There are too many gaps compared to what I would call a “state of the art” operating system.</p><h3 id=\"hardware-interaction\">Hardware Interaction</h3><p>Distributions are very conservative when it comes to hardware requirements and default configurations. Energy saving could be way more aggressive by default. The fact that hardware-based video decoding is still opt-in for many applications is frustrating. Software is often compiled for processors released decades ago without using new instruction set extensions by default. On the other hand, commercial competitors like <a target=\"_blank\" href=\"https://www.microsoft.com/\">Microsoft</a> require you to have at least a somewhat up-to-date hardware configuration. I am not saying that Linux has to be equally aggressive, but it should be more progressive.</p><h3 id=\"software-delivery\">Software Delivery</h3><p>The fact that installing a Linux distribution (with exceptions like <a target=\"_blank\" href=\"https://silverblue.fedoraproject.org/\">Fedora Silverblue</a>) requires a package manager is arcane and error prone. We have plenty of disk space nowadays and it would be way more streamlined and secure to use an <a target=\"_blank\" href=\"https://0pointer.net/blog/fitting-everything-together.html\">immutable installation</a> / image-based OS – either via <a target=\"_blank\" href=\"https://ostreedev.github.io/ostree/\">libostree</a> or <a target=\"_blank\" href=\"https://0pointer.net/blog/mkosi-a-tool-for-generating-os-images.html\">mkosi</a>.</p><p>Applications should be sandboxed via <a target=\"_blank\" href=\"https://flatpak.org/\">Flatpak</a> and if a developer needs some specialized tooling or a build environment that is not provided by the installation, they can still use <abbr><a target=\"_blank\" href=\"https://opencontainers.org/\">OCI</a></abbr> containers or <a target=\"_blank\" href=\"https://nixos.org/\">Nix</a>.</p><h3 id=\"security-1\">Security</h3><p>The fact that the security measurements discussed in this blog post are not the default is just wild. People often claim that Linux is more secure than <a target=\"_blank\" href=\"https://www.microsoft.com/en-us/windows\">Windows</a> which might be true, but the bar is actually way higher if you look at a vanilla <a target=\"_blank\" href=\"https://www.android.com/\">Android</a> or <a target=\"_blank\" href=\"https://en.wikipedia.org/wiki/MacOS\">macOS</a> for example.</p><p><br /> <strong>Image: by <a target=\"_blank\" href=\"https://unsplash.com/@mariolagr\">Mariola Grobelska</a> on <a target=\"_blank\" href=\"https://unsplash.com/photos/wkH63fOsWwM\">Unsplash</a></strong></p></div></article>",
"author": "",
"favicon": "",
"source": "crepererum.net",
"published": "",
"ttr": 603,
"type": ""
}