---
title: CachyOS Kernel
description: Features and changes on the CachyOS kernel
tableOfContents:
  minHeadingLevel: 1
  maxHeadingLevel: 4
---

The CachyOS Kernel is a customized kernel which utilizes enhancements, configurations and patches from upstream.

## Features

### Performance Optimizations

- **Advanced Compilation**: Highly customizable PKGBUILD with support for both GCC and Clang compilers
- **Link Time Optimization (LTO)**: Thin LTO enabled by default for better performance
- **Profile-Guided Optimization**: AutoFDO + Propeller profiling for optimal code generation ([Learn more](https://cachyos.org/blog/2411-kernel-autofdo/))
- **Kernel Control Flow Integrity (kCFI)**: Available when using LLVM for enhanced security
- **Timer Frequency Options**: Configurable between 300Hz, 500Hz, 600Hz, 750Hz, and 1000Hz (default: 1000Hz)
- **Architecture Optimizations**: Support for x86-64-v3, x86-64-v4, and AMD Zen4 specific builds
- **Compiler Optimizations**: Advanced GCC flags including `-fivopts` and `-fmodulo-sched`

### CPU Enhancements

- **Multiple Schedulers**: BORE, EEVDF, and BMQ schedulers for different workload optimization
- **AMD P-State Enhancements**: Preferred Core support and latest amd-pstate improvements from linux-next
- **Real-Time Support**: RT kernel builds available with BORE scheduler integration
- **CachyOS Sauce**: Custom `CONFIG_CACHY` configuration with scheduler and system tweaks
- **Low-Latency Optimizations**: Patches for improved responsiveness and reduced jitter

### Filesystem & Memory

- **ZFS Support**: Built-in ZFS filesystem support with pre-compiled modules
- **NVIDIA Integration**:
  - Proprietary NVIDIA driver modules with patches
  - Open-source NVIDIA driver support
  - Ready-to-use modules in repository
- **I/O Scheduler Improvements**:
  - Enhanced BFQ and mq-deadline performance
  - Alternative [ADIOS](https://github.com/firelzrd/adios) I/O scheduler support
- **Memory Management**:
  - [le9uo](https://github.com/firelzrd/le9uo) patch for preventing page thrashing under memory pressure
  - Zen-kernel memory management tweaks (compaction, watermark optimization)

### Additional Features

#### Hardware Support
- **Gaming Hardware**: Steam Deck patches (Audio, HW Quirks, HID) and ROG Ally support
- **Apple Hardware**: T2 MacBook support included by default
- **ASUS Hardware**: Extended ASUS hardware compatibility patches
- **Graphics**: HDR support enabled, AMDGPU min_powercap override (`amdgpu_ignore_min_pcap`)

#### System Enhancements
- **Multimedia**: v4l2loopback modules included by default
- **Virtualization**: ACS Override support for VFIO/GPU passthrough
- **Upstream Integration**: Cherry-picked patches from Clear Linux and linux-next

#### Miscellaneous

The CachyOS kernel also has some other notable features that are subtle yet improve the user experience:

- Includes a debug variant of the kernel that provides an unstripped kernel binary for debugging purposes. This package is needed to profile the kernel with AutoFDO.
- [Binder](https://developer.android.com/reference/android/os/Binder), the module needed for [Waydroid](https://waydro.id/) is enabled by default in the kernel config
and already [set up](https://github.com/CachyOS/linux-cachyos/blob/2f380e2b35c4ad9acda98296f638f93af3742533/linux-cachyos/config#L11037).

## Variants

CachyOS offers a diverse range of kernel options. All of the kernels we provide are shipped with the [CachyOS Base Patchset](https://github.com/CachyOS/kernel-patches).
For each of the kernels, there is a [corresponding -lto variant](#package-naming-convention) that
is built  with [clang](https://clang.llvm.org/) instead of [GCC](https://gcc.gnu.org/).

- **linux-cachyos**
  - The default kernel. This is the recommended kernel if you're unsure which one to use.
  - 1000Hz tickrate for improved responsiveness.
  - Built with Clang and ThinLTO.
  - Profiled with our own [AutoFDO](https://cachyos.org/blog/2411-kernel-autofdo/) profile for improved performance. [Script](https://github.com/CachyOS/cachyos-benchmarker/blob/master/kernel-autofdo.sh) used to profile the kernel.
- **linux-cachyos-bore**
  - Uses the [BORE](https://github.com/firelzrd/bore-scheduler) scheduler.
- **linux-cachyos-bmq**
  - Uses the BMQ scheduler from [Project C](https://gitlab.com/alfredchen/projectc/) by Alfred Chen.
    - `Does not support sched-ext.`
- **linux-cachyos-deckify**
  - The default kernel for handhelds. It is **not recommended** and **unsupported** to use any other kernel on handhelds.
  - Uses the [BORE](https://github.com/firelzrd/bore-scheduler) scheduler.
  - Handheld specific patches on top of the base patchset to improve compatibility and overall experience on handheld devices.
- **linux-cachyos-eevdf**
  - Tweaks the default kernel scheduler for improved responsiveness.
- **linux-cachyos-lts**
  - Based on the latest Long Term Support kernel.
  - Uses the [BORE](https://github.com/firelzrd/bore-scheduler) scheduler.
  - Minimally patched compared to other kernels to ensure maximum stability.
- **linux-cachyos-hardened**
  - Uses the [BORE](https://github.com/firelzrd/bore-scheduler) scheduler.
  - Includes [linux-hardened](https://github.com/anthraxx/linux-hardened) patchset.
  - Kernel config based on [linux-hardened config](https://gitlab.archlinux.org/archlinux/packaging/packages/linux-hardened/-/blob/main/config).
    - Contains very aggressive hardening that significantly stifles performance and user experience.
    - `Does not support sched-ext.`
- **linux-cachyos-rc**
  - Based on the latest mainline kernel from [Linus's tree](https://github.com/torvalds/linux/).
  - Uses the [BORE](https://github.com/firelzrd/bore-scheduler) scheduler.
  - Main kernel to introduce new features in our patchset.
- **linux-cachyos-server**
  - Tuned for server workloads compared to desktop usage.
    - 300Hz tickrate.
    - No preemption.
    - Stock EEVDF.
- **linux-cachyos-rt-bore**
  - Real-time preemption.
  - Uses the [BORE](https://github.com/firelzrd/bore-scheduler) scheduler.

:::note
Unless otherwise specified, it is safe to assume that all other kernel variants
have the same configuration as the default kernel.
:::

Please open an issue in [linux-cachyos GitHub](https://github.com/CachyOS/linux-cachyos) for suggestions and improvements that can be added to the default kernel.

### Package Naming Convention

```sh
linux-cachyos # Base kernel package for the default kernel. Compiled with Clang and ThinLTO
linux-cachyos-hardened # Base kernel package for the hardened kernel. Compiled with GCC
linux-cachyos-hardened-lto # clang-compiled counterpart for linux-cachyos-hardened
linux-cachyos-hardened-{,lto-}headers
linux-cachyos-hardened-{,lto-}nvidia
linux-cachyos-hardened-{,lto-}nvidia-open
linux-cachyos-hardened-{,lto-}zfs
linux-cachyos-hardened-{,lto-}dbg
```

## Prebuilt Kernel Modules

To accommodate a larger userbase, CachyOS ships some well-known and highly used kernel modules along with the kernel. This means that users will no longer
have to recompile those modules after every kernel update or on every new kernel install, but will only have to install them from the repository as they
are already precompiled. This effectively obsoletes any `-dkms` packages a user might have that provides the same module as the precompiled version.

### ZFS

[ZFS](https://openzfs.org/wiki/Main_Page) is one of the many filesystems that is supported in CachyOS. Due to it being licensed under
[CDDL](https://opensource.org/license/cddl-1-0), it is incompatible with Linux kernel's license and therefore cannot be merged in-tree. The shipped module includes
the latest upstream features and fixes to ensure compatibility with the latest kernel.

### NVIDIA

CachyOS ships both precompiled versions of the close-sourced and [open-sourced](https://github.com/NVIDIA/open-gpu-kernel-modules/) kernel modules. Due to the development
of NVIDIA's kernel module being out-of-tree and thus does not follow the kernel's release cadence, the stock configuration can sometimes be incompatible with the latest
kernel. As a workaround, CachyOS patches the modules with community-created patches or patches shared by NVIDIA directly.

## FAQ

### Why is AutoFDO not being used for all the other kernel variants?

Because it's expensive to build since it basically requires building the kernel twice, resulting in more time and resources dedicated to the compilation. The process of building a kernel with AutoFDO involves the following steps:

1) Build the kernel with AutoFDO and debugging capabilities enabled.
2) Create a profile meaning executing workloads in order to gather profiling data for the possible optimizations.
3) Rebuild the kernel with the AutoFDO profile.

Therefore it's only present in the [linux-cachyos](/features/kernel#variants) variant for now.

For more information about AutoFDO, click [here.](https://cachyos.org/blog/2411-kernel-autofdo/)

### Does the realtime kernel improve gaming performance?

No, it does not. The realtime kernel makes much more code preemptible compared to a normal preemptible (PREEMPT) kernel. This means that much more tasks (gaming processes
included) are frequently preempted and will forcefully yield system resources, leading to worse performance.
