Kernel
According to Wikipedia:
- The Linux kernel is an open-source monolithic Unix-like computer operating system kernel.
Arch Linux is based on the Linux kernel. There are various alternative Linux kernels available for Arch Linux in addition to the latest stable kernel. This article lists some of the options available in the repositories with a brief description of each. There is also a description of patches that can be applied to the system's kernel. The article ends with an overview of custom kernel compilation with links to various methods.
Kernel packages are installed onto the file system under /boot/
. To be able to boot into kernels, the boot loader has to be configured appropriately.
Officially supported kernels
Community support on forum and bug reporting is available for officially supported kernels.
- Stable — Vanilla Linux kernel and modules, with a few patches applied.
- Hardened — A security-focused Linux kernel applying a set of hardening patches to mitigate kernel and userspace exploits. It also enables more upstream kernel hardening features than linux.
- Longterm — Long-term support (LTS) Linux kernel and modules.
- Zen Kernel — Result of a collaborative effort of kernel hackers to provide the best Linux kernel possible for everyday systems. Some more details can be found on https://liquorix.net (which provides kernel binaries based on Zen for Debian).
Compilation
Following methods can be used to compile your own kernel:
- /Arch Build System
- Takes advantage of the high quality of existing linux PKGBUILD and the benefits of package management.
- /Traditional compilation
- Involves manually downloading a source tarball, and compiling in your home directory as a normal user.
- Using custom kernels may cause all kinds of stability and reliability issues, including data loss. Having backups is strongly advised.
- Arch Linux only has official support for #Officially supported kernels. When using a different kernel, please mention so in support requests.
- Best way to increase the speed of your system is to first tailor your kernel config to your architecture and processor type.
- You can reduce the size of your kernel (and therefore build time) by not including support for things you do not have or use. For example support for things like bluetooth, video4linux, 1000Mbit ethernet, etc.
/proc/config.gz
if the CONFIG_IKCONFIG_PROC
kernel option is enabled.Some of the listed packages may also be available as binary packages via Unofficial user repositories.
kernel.org kernels
- Git — Linux kernel and modules built using sources from Linus Torvalds' Git repository
- Mainline — Kernels where all new features are introduced, released every 2-3 months.
- Next — Bleeding edge kernels with features pending to be merged into next mainline release.
- Longterm 4.4 — Long-term support (LTS) Linux 4.4 kernel and modules.
- Longterm 4.9 — Long-term support (LTS) Linux 4.9 kernel and modules.
- Longterm 4.14 — Long-term support (LTS) Linux 4.14 kernel and modules.
- Longterm 4.19 — Long-term support (LTS) Linux 4.19 kernel and modules.
- Longterm 5.4 — Long-term support (LTS) Linux 5.4 kernel and modules.
Unofficial kernels
- Aufs — The aufs-compatible linux kernel and modules, useful when using docker.
- Ck — Contains patches by Con Kolivas (including the MuQSS scheduler) designed to improve system responsiveness with specific emphasis on the desktop, but they are suitable to any workload.
- Clear — Patches from Intel's Clear Linux project. Provides performance and security optimizations.
- GalliumOS — The Linux kernel and modules with GalliumOS patches for Chromebooks.
- Libre — Without proprietary or obfuscated device drivers.
- Liquorix — Kernel replacement built using Debian-targeted configuration and the Zen kernel sources. Designed for desktop, multimedia, and gaming workloads, it is often used as a Debian Linux performance replacement kernel. Damentz, the maintainer of the Liquorix patchset, is a developer for the Zen patchset as well.
- MultiPath TCP — The Linux Kernel and modules with Multipath TCP support.
- pf-kernel — Provides a handful of awesome features which are not merged into a kernel mainline. Maintained by a kernel engineer. If the port for the included patch for new kernels was not released officially, the patchset provides and supports patch ports to new kernels. The current most prominent patches of linux-pf are PDS CPU scheduler and UKSM.
-
https://gitlab.com/post-factum/pf-kernel/wikis/README || Packages:
- Repository by pf-kernel developer post-factum
- Repository, linux-pfAUR, linux-pf-preset-defaultAUR by pf-kernel fork developer Thaodan
- linux-pf-gitAUR by yurikoles
- Realtime kernel — Maintained by a small group of core developers led by Ingo Molnar. This patch allows nearly all of the kernel to be preempted, with the exception of a few very small regions of code ("raw_spinlock critical regions"). This is done by replacing most kernel spinlocks with mutexes that support priority inheritance, as well as moving all interrupt and software interrupts to kernel threads.
- tkg — A highly customizable kernel build system that provides a selection of patches and tweaks aiming for better desktop and gaming performance. It is maintained by Etienne Juvigny. Amongst other patches, it offers various CPU schedulers: CFS, Project C PDS, Project C BMQ, MuQSS and CacULE.
- https://github.com/Frogging-Family/linux-tkg || not packaged? search in AUR
- VFIO — The Linux kernel and a few patches written by Alex Williamson (acs override and i915) to enable the ability to do PCI Passthrough with KVM on some machines.
- XanMod — Aiming to take full advantage in high-performance workstations, gaming desktops, media centers and others and built to provide a more rock-solid, responsive and smooth desktop experience. This kernel uses the MuQSS or Task Type scheduler, BFQ I/O scheduler, UKSM realtime memory data deduplication, TCP BBR congestion control, x86_64 advanced instruction set support, and other default changes.
- https://xanmod.org/ || linux-xanmodAUR, linux-xanmod-ttAUR
Debugging regressions
See General troubleshooting#Debugging regressions.
Try linux-mainlineAUR to check if the issue is already fixed upstream. The stickied comment also mentions a repository which contains already built kernels, so it may not be necessary to build it manually, which can take some time.
It may also be worth considering trying the LTS kernel (linux-lts) to debug issues which did not appear recently. Older versions of the LTS kernel can be found in the Arch Linux Archive.
If the issue still persists, bisect linux-gitAUR and report the bug on the kernel bugzilla. It is important to try the "vanilla" version without any patches to make sure it is not related to them. If a patch causes the issue, report it to the author of the patch.
See also
- O'Reilly - Linux Kernel in a Nutshell (free ebook)
- What stable kernel should I use? by Greg Kroah-Hartman
- Linux kernel documentation