From ArchWiki
(Redirected from Kernels/Compilation)
Jump to navigation Jump to search

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. || linux
  • 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. || linux-hardened
  • Longterm — Long-term support (LTS) Linux kernel and modules. || linux-lts
  • 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 (which provides kernel binaries based on Zen for Debian). || linux-zen


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.
The config files for the Arch kernel packages are in the Arch package source files (for example, [1] linked from linux). The config file of your currently running kernel may also be available in your file system at /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. kernels

  • Git — Linux kernel and modules built using sources from Linus Torvalds' Git repository || linux-gitAUR
  • Mainline — Kernels where all new features are introduced, released every 2-3 months. || linux-mainlineAUR
  • Next — Bleeding edge kernels with features pending to be merged into next mainline release. || linux-next-gitAUR
  • Longterm 4.4 — Long-term support (LTS) Linux 4.4 kernel and modules. || linux-lts44AUR
  • Longterm 4.9 — Long-term support (LTS) Linux 4.9 kernel and modules. || linux-lts49AUR
  • Longterm 4.14 — Long-term support (LTS) Linux 4.14 kernel and modules. || linux-lts414AUR
  • Longterm 4.19 — Long-term support (LTS) Linux 4.19 kernel and modules. || linux-lts419AUR
  • Longterm 5.4 — Long-term support (LTS) Linux 5.4 kernel and modules. || linux-lts54AUR

Unofficial kernels

  • Aufs — The aufs-compatible linux kernel and modules, useful when using docker. || linux-aufsAUR
  • Ck — Contains patches by Con Kolivas designed to improve system responsiveness with specific emphasis on the desktop, but they are suitable to any workload. || linux-ckAUR
  • Clear — Patches from Intel's Clear Linux project. Provides performance and security optimizations. || linux-clearAUR
  • GalliumOS — The Linux kernel and modules with GalliumOS patches for Chromebooks. || linux-galliumosAUR || linux-libreAUR
  • 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. || linux-lqxAUR
  • MultiPath TCP — The Linux Kernel and modules with Multipath TCP support. || linux-mptcpAUR
  • 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. || Packages:
  • 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. || linux-rtAUR, linux-rt-ltsAUR
  • Tkg — A custom Linux kernel with specific PDS and Project C / BMQ CPU schedulers related patchsets selector (stock CFS is also an option) and added tweaks for a nice interactivity/performance balance, aiming for the best gaming experience. Maintained by Etienne Juvigny (Tk-Glitch). Pre-compiled kernels are available in the Unofficial user repositories#chaotic-aur repository. || 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. || linux-vfioAUR, linux-vfio-ltsAUR
  • 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 scheduler, BFQ I/O scheduler, UKSM realtime memory data deduplication, TCP BBR congestion control, x86_64 advanced instruction set support, and other default changes. || linux-xanmodAUR

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.

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.

Note: Bisecting the kernel can take a lot of time since it may need to be rebuilt many times.

See also