Recently, at Build Conference 2020, Microsoft announced a new feature for its Windows subsystem for Linux 2 (WSL2). This time, it came up with ‘DirectX loves Linux‘ tagline that aims to further extend the computation capability of WSL2 instances.
After huge demand from developers, Microsoft brought the GPU hardware acceleration support to the Linux system running on WSL2. For the same, Microsoft submitted the first draft of its new DirectX driver to the Linux kernel. But it does not seem like an easy way for Microsoft to upstream code to Linux.
Greg Kroah-Hartman, a Lead Kernel maintainer, first reviewed the driver patch. Though he appreciated great work, he pointed out some mistakes and gave suggestions to fix in the next version. Next, Daniel Vetter came up with loads of questions and a fundamental issue.
Referring to the requirements for submitting API for the DRM (Direct rendering manager) subsystem, Daniel pointed to their closed userspace. Hence, he said it would be hard to get upstream without knowing some required part of the driver.
He also referred to device enumeration asking why it’s not exposed to /dev/dri/card0 that could integrate DirectX with Linux desktop as well. Shooting up the questions he further goes on with querying the plan, and why DX12 for Linux?
In return, Sasha Levin from Microsoft replied with plans to enable the interaction of Linux userspace with DX12 by piping it all the way into Linux guest. He further added that Microsoft aims at WSL2 developer who wants to run machine learning or heavy workloads on its GPU attached to their Windows host.
Dave Airlie from Intel also put forward his thought that the patch would only add burden on upstream rather than adding any value to the Linux ecosystem. In his latest blog, he also expressed that it doesn’t enhance the Linux graphics ecosystem in any useful direction. Dave even declined to review the code.
Well, it is quite clear that ‘DirectX on Linux’ has nothing to do with native Linux desktop support. It is not available for bare metal Linux systems but rather only for Linux VM running on WSL2 Windows. As Microsoft’s developer states, currently the driver code strives to add GPU resource sharing capability to Linux guests on WSL2.
So if you don’t want a dual boot Linux alongside your Windows but still use Linux, you can go for the WSL2 that will soon support the GPU compute. Also check out our article on best desktop environment for linux users here!