Unoffical XanMod port with dxgkrnl patched for WSL2, compiled by clang with ThinLTO enabled.
This repo holds an automated GitHub Action workflow to build and release WSL kernel images. It checks if newer upstream version is available everyday, and trigger the build&release process accordingly.
We are currently releasing both latest stable (MAIN) and LTS Xanmod kernels, LTS kernel builds are released with extra -lts
suffix.
D:\.WSL\bzImage
) .wslconfig
in current user's home directory with following content:
[wsl2]
kernel = the\\path\\to\\bzImage
; e.g.
; kernel = D:\\.WSL\\bzImage
;
; Note that all `\` should be escaped with `\\`.
For more information about
.wslconfig
, see microsoft's official documentation.
scoop is a command-line installer on windows. If you have scoop installed, then you can install this kernel with following commands:
scoop bucket add sniffer https://github.com/Locietta/sniffer
scoop install xanmod-WSL2 # alias to xanmod-WSL2-x64v3
# other builds
# scoop install xanmod-WSL2-x64v2
# scoop install xanmod-WSL2-x64v4
# scoop install xanmod-WSL2-skylake
# LTS builds
# scoop install xanmod-WSL2-lts # alias to xanmod-WSL2-lts-x64v3
# scoop install xanmod-WSL2-lts-x64v2
# scoop install xanmod-WSL2-lts-x64v3
# scoop install xanmod-WSL2-lts-x64v4
# scoop install xanmod-WSL2-lts-skylake
Scoop will automatically set .wslconfig
for you, but you still need a reboot of WSL2.
To update kernel for WSL2, you can use scoop update *
if installed by scoop. Or you can just manually replace your kernel image with newer one.
NOTE: To make the kernel update applied, you have to reboot WSL2 (namely, wsl --shutdown
and open a fresh WSL2 instance).
If you are interested in how we handle install and update with scoop, see scoop manifest for this kernel.
Compatible with built-in systemd support since WSL 0.67.6 and wsl-distrod for older WSL versions.
But sorah/subsystemd and arkane-systems/genie will refuse to work due to modified kernel version string (they demand "microsoft" in it...).
I'll not add "microsoft" back into the version string (it's quite long now), since "WSL2" is sufficient, see WSL#423. And you can check it with systemd-detect-virt
, it should return wsl
. I'll make a change if there's any update.
Sending an issue to let me know bugs, missing features or anything else.
Open a PR if you'd like to improve this repo.