Microsoft ‘WSL 2’ supports Linux GUI apps, gpu usage

“Linux System for Windows” in Windows 10 will allow Linux apps to run in the near future. The linux side of the guest OS also adds the ability to use GPU hardware acceleration.

Offer: Microsoft
Current WSL can only be used in the console, but WSL 2 allows linux GUI applications to run without a third-party X server. WSL 2 will be released with a Windows 10 feature update scheduled for release in May 2020.

Microsoft uses the DirectX graphics API, which is typically used to run games on Windows PCs, to make GPU hardware acceleration available to Linux-based machine learning workloads running on WSL 2.

To achieve this, the company introduced a DirectX-based Linux kernel driver (linux version of dxgkrnl) in the WSL 2 Linux kernel. This driver is intended to connect to supported GPU hardware.

According to Microsoft, this is in response to the demands of developers who want to test workloads deployed in the cloud using Linux containers on their PCs using WSL 2.

As Microsoft explains, gpu virtualization so far has been for Windows running in VMs and containers, not linux on the guest OS. However, version 2.9 of WDDM and Windows Display Driver Model also enables linux on the guest OS to use virtualized GPUs.

Steve Pronovost, Microsoft’s partner development lead, said, “Applications running in a Linux environment can access the GPU just like native Windows applications.”

“There is no division of resources between Linux and Windows, and there are no restrictions on Linux applications. Resource sharing is completely determined dynamically depending on which one is what you need.

Basically, there is no difference between two Windows applications that share a GPU, a Linux application that shares the same GPU, and a Windows application. If only Linux applications use the GPU, they can monopolize all resources.”