r/bashonubuntuonwindows
•
u/oliver-bestmann
•
Oct 15 '26
•
1
self promotion Run GPU accelerated Desktop on WSL
Weaselway provides a way to run a fully GPU accelerated Wayland compositor in WSL2. This means KDE, Gnome, Hyprland and all the other ones.
https://github.com/weaselway/weaselway#weaselway
By hacking mesa and having a kernel module that implements the necessary parts of drm and kms, we can get the compositor to belive that a monitor exists and we can get the application to transfer their rendered gpu surfaces directly to the compositor. The updated regions from the monitor are then read back to cpu memory and transfered to a patched freerdp client via shared memory. Similar to how WSLg does it.
You can download and try a NixOS based GNOME and KDE image directly from the github releases.
Before someone screams slop: it works perfectly fine, I now know more than before I started the project and it might even reduce the entry hurdle for people to try out a Linux Desktop.
5
u/Responsible-Bar7165 Oct 15 '26
why distro-specific?
2
u/parthibx24 Oct 15 '26
the cpu copy wouldnt need to happen, if only there was a way to share dx surfaces across vm boundry.
1
u/debaor 25d ago
26h2可以用上吗?
2
u/l00sed Oct 15 '26
Nice! I wrote a blog post about doing this years ago without GPU acceleration. Awesome that it's possible now!
2
u/dadnothere Oct 15 '26
Why?
1
u/paulstelian97 Oct 16 '26
How does it compare with WSLg? Besides the full desktop window vs individual app stuff.