适用于 WSL2 的非官方内核。fork自 Locietta/xanmod-kernel-WSL2,进行了部分修改。
- 优化了核心和进程调度、负载均衡、缓存、虚拟内存管理、CPU频率调节器(针对重型工作负载)
- 增强块层以实现高IOPS吞吐量
- 使用LLVM Clang的高级内核构建优化
- 使用ORC Unwinder改进调试
- 使用Google的多代LRU框架进行高级内存管理
- 支持实时内核(PREEMPT_RT)
- 支持进程调度器如sched_ext (SCX)
- AMD 3D V-Cache优化器驱动
- Cloudflare的TCP折叠处理(提高网络性能)
- Google的BBRv3 TCP拥塞控制
- Netfilter增强(NAT和数据包处理)
- NT同步原语仿真驱动
- PCIe ACS Override(提高硬件兼容性)
- Graysky的额外CPU选项
- 部分Clear Linux补丁集
- Android Binder IPC驱动(用于Waydroid)
- 在 MAIN 分支添加了更多 zram 压缩算法
- 增加了针对 raptorlake 和 alderlake 处理器的编译
- 停止了自动工作流,改为通过 star 或手动触发
- 保留原有 版权和许可声明
- 提供源代码
- 明确声明修改
An unofficial XanMod kernel port for Windows Subsystem for Linux 2 (WSL2), featuring:
- Microsoft's dxgkrnl patches for GPU support
- Compiled with Clang + ThinLTO for additional optimizations
- Automated builds via GitHub Actions (always up-to-date)
- Multiple CPU-optimized variants (x64v2, x64v3, Skylake, Zen3)
scoop is a command-line installer on windows that makes installation and update easy. We provide scoop manifests for this kernel in the Locietta/sniffer repository.
# Add the repository
scoop bucket add sniffer https://github.com/Locietta/sniffer
# Install kernel (alias to x64v3 variant, works for most modern CPUs)
scoop install xanmod-WSL2
# Optional: Install addons (extra modules, headers, documentation)
scoop install xanmod-WSL2-addons
# Restart WSL2 to apply
wsl --shutdownExpand all other builds
# other MAIN builds
# scoop install xanmod-WSL2-{x64v2, x64v3, skylake, zen3}
# scoop install xanmod-WSL2-addons-{x64v2, x64v3, skylake, zen3}
# LTS builds
# scoop install xanmod-WSL2-lts # alias to xanmod-WSL2-lts-x64v3
# scoop install xanmod-WSL2-lts-addons
# scoop install xanmod-WSL2-lts-{x64v2, x64v3, skylake, zen3}
# scoop install xanmod-WSL2-addons-lts-{x64v2, x64v3, skylake, zen3}That's it! Scoop automatically configures everything for you.
Run scoop update * to update all scoop installed apps including this kernel.
We recommend to run scoop update * instead of scoop update xanmod-WSL2 alone to make sure the addons package is also updated and in sync with the kernel.
NOTE: To make the kernel update applied, you have to reboot WSL2 after running scoop update!
It's also straight forward to manually install this kernel. For each arch, we release two files: the kernel image bzImage and an optional addon VHDX bzImage-addons.vhdx that contains extra modules, headers and documentation.
The manual installation steps are as follows:
- Download kernel image from releases
- optionally, download the addon vhdx if you need extra modules/headers/docs
- Place it to somewhere appropriate. (e.g.
D:\.WSL\bzImage) - Edit and save the
%UserProfile%\.wslconfigwith following content:
[wsl2]
kernel = the\\path\\to\\bzImage
kernelModules = the\\path\\to\\bzImage-addons.vhdx ; optional
; e.g.
; kernel = D:\\.WSL\\bzImage
; kernelModules = D:\\.WSL\\bzImage-addons.vhdx
;
; 注意,所有的 `\` 都需要用 `\\` 进行转义。- Reboot your WSL2 to check your new kernel and enjoy!
You must fully shut down WSL2 utill no WSL2 instances are running, then start it again to apply the new kernel.
wsl --shutdown
wsl --list --running # Should show "no running distributions"Modules VHDX support is only available with WSL version 2.5.1 or later. Try running wsl --version to check your WSL version and use wsl --update to update WSL if needed.
It doesn't exist by default. Just create it manually in your user profile folder (e.g. C:\Users\YourName\.wslconfig).
For more information about
.wslconfig, see microsoft's official documentation.
If you are unsure whether to use x64v2 or x64v3, you can visit xanmod.org. There's literally a table showing all the CPU models and their corresponding x86_64 psABI levels.
You can also get a checking script from there.
🚧WIP
- Linux community for the awesome OS kernel.
- Microsoft for WSL2 and dxgkrnl patches.
- XanMod project for various optimizations.
- LLVM/Clang for the compiler infrastructure.
We welcome contributions! You can:
- 🐛 Report bugs by opening an issue
- 💡 Suggest features via issues
- 🔧 Submit improvements through pull requests