WSLg aka the killer feature of Windows 11

One of the great things about Windows 11 was the inclusion of the Windows Subsystem for Linux or WSL. It wasn’t available at launch but it started with v1 a simple ELF loader and an implementation of the Linux kernel on the NTOS kernel. Being a re-implementation of Linux it was great for what did work, however many things did not. Compared to other Unix subsystems for NT over the years however WSLv1 was the best no question.

Not being enough however, Microsoft took a page out of the old WinOS/2 days and stubbed a Linux kernel to run under Hyper-V, allowing it to run far more applications, and for me giving the ability to use applications that alter memory space, and allowing i386/x32 applications to run. You could happily export your X-11 display to a Windows based X server, and get applications that way. But this isn’t 1993 so it was very limiting.

Enter WSLg

The big change is the ability to use RDP to hook both Wayland and Pulse Audio bringing Linux ‘desktop’ X11 applications to the Windows desktop. Also added in is virtual GPU capabilities allowing accelerated 3D, along with CUDA applications to run (although with a performance penalty.

The downshot for me, is that my existing Debian 10 install was not picking this up, and was somehow picking up a VMware

VMware llvmpipe

I have no idea how or why it was picking this up. While I did have the VMware Player installed, the newer versions backend through Hyper-V.

I did find this article, which gave me a path to get where I wanted, although the transition of an existing v2 instance didn’t work for me. Maybe Debian 10 is too weird. I don’t know.

Not sure where how to proceed I backed up my home directory and un-installed VMware Player and purged my existing Debian 10. I installed that Ubuntu Community Preview which promises to include all the new and exciting features.

$ glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Microsoft Corporation (0xffffffff)
    Device: D3D12 (NVIDIA GeForce RTX 2070) (0xffffffff)
    Version: 21.0.3
    Accelerated: yes
    Video memory: 40710MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 3.3
    Max compat profile version: 3.1
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.0
OpenGL vendor string: Microsoft Corporation
OpenGL renderer string: D3D12 (NVIDIA GeForce RTX 2070)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 21.0.3
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 3.1 Mesa 21.0.3
OpenGL shading language version string: 1.40
OpenGL context flags: (none)

OpenGL ES profile version string: OpenGL ES 3.0 Mesa 21.0.3
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00

Now this is looking MUCH better.

224FPS! FurMark

Now compare this to a native version of FuMark:

500 FPS

So it’s a 50% haircut. Ouch.

Gaming however using steam (yes steam runs!) reveals some other deeper issues. The mouse tracking is WAY off. So for FPS stuff you’ll spend a lot of time staring at the ceiling or the floors. The next issue is there is no mouselock, so things that rely on being able to move the mouse far beyond a screen length is impossible to play. To be fair it’s a preview, and so far I have to admit Windows 11 feels more like a technical preview. Also I don’t know what the deal is or anything about profiling it but KOTOR2 is insanely slow. Although at least with 3d acceleration running it’s not 1 frame every 5 seconds.

2 thoughts on “WSLg aka the killer feature of Windows 11

  1. Earlier this year Craig Loewen (WSL developer at Microsoft) tweeted that WSLg would be available in “the next major Windows release” which at the time would’ve been Windows 10 21H2. Then Windows 11 was subsequently announced and has now been released. So there’s now some confusion as to whether WSLg will ever be available in Windows 10.

    I assume it will be, since most PCs will still be running Windows 10 for at least the next couple of years, if not longer.

    https://twitter.com/craigaloewen/status/1384921120541978627

    WSL itself is incredibly handy but the irony is that all the GUI apps listed on the WSLg GitHub page (gedit, gimp, vlc…) already have native Windows versions, so I’m kind of left wondering what the point is.

    https://github.com/microsoft/wslg

    I can’t imagine people running the Linux version of VLC under Windows being huge on most users’ wishlists, and it will never outperform Linux running natively on the same PC. In any case Microsoft’s fight with Linux is in server space, not on the desktop, and is one they’ve already surrendered.

    All that aside, WSLg is an impressive technical achievement.

    I’m curious what Microsoft’s future plans are for it.

    This is completely speculation but maybe behind the scenes WSLg is more about Microsoft wanting to run Android apps on the Windows desktop – a feature that was announced as part of Windows 11, but not delivered upon release. Though it’s kind of a moot point since I honestly can’t see a huge user demand for regular users wanting to run Android apps under Windows either.

    Both things (WSLg and Android apps on Windows) are niche features only available on a niche OS (Win11) that Microsoft themselves evidently don’t want many people to run (due to CPU, TPM, etc requirements).

    It’s all very odd but is keeping this Ubuntu user amused.

    • I found notes somwhere that only you wont’ get graphical GPU apps on 10, just CUDA style stuff.

      Don’t forget that way back in the Windows Phone days there was a version which could run Android 4x apps. Although I have a few phones I don’t have the one that is the easiest to run this, but initial reports were that it worked surprisingly well until google broke stuff. It’s back to the WinOS/2 days where there was always a new 3.x version to break OS/2. It’s funny how things come full circle.

      Just like me running steam on Linux on Windows, sure it’s overall “pointless” but for things like SheepShaver that demand to have that 0x00000000 base pointer to mimc the PowerPC memory layout, Linux can still do it (running as root……) but Windows has long since trapped this as a NULL pointer protection which you really cannot opt out of. Like address randomization you don’t want this as a ‘best practice’ but sometimes for the sake of optimizations it sure made sense.

      So for some system style emulation having this is pretty desirable! Like QEMU, it’s so much easier to build & use on Linux.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.