Locietta / xanmod-kernel-WSL2

Xanmod kernel for WSL2, built by clang with ThinLTO enabled. Build & Release are automated by Github Action.
GNU General Public License v2.0
83 stars 15 forks source link
automated kernel linux wsl2 wsl2-kernel

xanmod-kernel-WSL2

Kernel CI Kernel LTS CI version

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.

Usage

Manual Installation

For more information about .wslconfig, see microsoft's official documentation.

Install via Scoop

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.

Update kernel

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.

Miscs

Systemd

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.

Credits

Contributing

Sending an issue to let me know bugs, missing features or anything else.

Open a PR if you'd like to improve this repo.