CachyOS Kernel
The CachyOS Kernel is a customized kernel which utilizes enhancements, configurations and patches from upstream.
Features
Section titled “Features”Performance Optimizations
Section titled “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)
- 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
-fivoptsand-fmodulo-sched
CPU Enhancements
Section titled “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_CACHYconfiguration with scheduler and system tweaks - Low-Latency Optimizations: Patches for improved responsiveness and reduced jitter
Filesystem & Memory
Section titled “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 I/O scheduler support
- Memory Management:
- le9uo patch for preventing page thrashing under memory pressure
- Zen-kernel memory management tweaks (compaction, watermark optimization)
Additional Features
Section titled “Additional Features”Hardware Support
Section titled “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
Section titled “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
Section titled “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, the module needed for Waydroid is enabled by default in the kernel config and already set up.
Variants
Section titled “Variants”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
- 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.
- Uses the BMQ scheduler from Project C by Alfred Chen.
- 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.
- Tuned for server workloads compared to desktop usage.
- 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.
Package Naming Convention
Section titled “Package Naming Convention”linux-cachyos # Base kernel package for the default kernel. Compiled with Clang and ThinLTOlinux-cachyos-hardened # Base kernel package for the hardened kernel. Compiled with GCClinux-cachyos-hardened-lto # clang-compiled counterpart for linux-cachyos-hardenedlinux-cachyos-hardened-{,lto-}headerslinux-cachyos-hardened-{,lto-}nvidialinux-cachyos-hardened-{,lto-}nvidia-openlinux-cachyos-hardened-{,lto-}zfslinux-cachyos-hardened-{,lto-}dbgPrebuilt Kernel Modules
Section titled “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 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.
NVIDIA
Section titled “NVIDIA”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:
- Build the kernel with AutoFDO and debugging capabilities enabled.
- Create a profile meaning executing workloads in order to gather profiling data for the possible optimizations.
- 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.