Skip to content

CachyOS Kernel

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

  • 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)
  • 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
  • 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
  • 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 I/O scheduler support
  • Memory Management:
    • le9uo patch for preventing page thrashing under memory pressure
    • Zen-kernel memory management tweaks (compaction, watermark optimization)
  • 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)
  • 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

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, the module needed for Waydroid is enabled by default in the kernel config and already set up.

CachyOS offers a diverse range of kernel options. All of the kernels we provide are shipped with the CachyOS Base Patchset. For each of the kernels, there is a corresponding -lto variant that is built with clang instead of GCC.

  • 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 profile for improved performance. Script used to profile the kernel.
  • linux-cachyos-bore
    • Uses the BORE scheduler.
  • linux-cachyos-bmq
    • Uses the BMQ scheduler from Project C 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 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 scheduler.
    • Minimally patched compared to other kernels to ensure maximum stability.
  • linux-cachyos-hardened
    • Uses the BORE scheduler.
    • Includes linux-hardened patchset.
    • Kernel config based on linux-hardened 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.
    • Uses the BORE 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 scheduler.

Please open an issue in linux-cachyos GitHub for suggestions and improvements that can be added to the default kernel.

Terminal window
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

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 is one of the many filesystems that is supported in CachyOS. Due to it being licensed under CDDL, 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.

CachyOS ships both precompiled versions of the close-sourced and open-sourced 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.

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

Section titled “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 variant for now.

For more information about AutoFDO, click here.

Does the realtime kernel improve gaming performance?

Section titled “Does the realtime kernel improve gaming performance?”

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