You are here
Home > Uncategorized >

Microsoft begins testing support for running Linux GUI applications on Windows

Microsoft announced the beginning of testing the ability to run Linux-based GUI applications in environments based on the WSL2 (Windows Subsystem for Linux), designed to run Linux executable files on Windows. Applications are fully integrated with the main Windows desktop, including support for placing shortcuts in the Start menu, playing sound, recording from a microphone, OpenGL hardware acceleration, displaying information about programs in the taskbar, switching between programs using Alt-Tab, copying data between Windows – and Linux programs via the clipboard.

To organize the output of the Linux application interface to the main Windows desktop, the RAIL-Shell composite manager developed by Microsoft is used, which uses the Wayland protocol and is based on the Weston codebase. The rendering is carried out using the RDP Remote Application Integrated Locally (RDP Remote Application Integrated Locally) backend, which differs from the RDP backend previously available in Weston in that the composite manager does not render the desktop itself, but redirects individual surfaces (wl_surface) over the RDP RAIL channel for display on your main Windows desktop. XWayland is used to run X11 applications.

Sound output is organized using the PulseAudio server, which also interacts with Windows using the RDP protocol (the rdp-sink plugin is used for audio output, and rdp-source for input). Comosite Server, XWayland and PulseAudio are packaged in the form of a universal mini-distribution WSLGd, including components for abstraction of the graphics and sound subsystem, and based on the CBL-Mariner Linux distribution, also used in the Microsoft cloud infrastructure. WSLGd is launched using virtualization mechanisms, and virtio-fs is used for sharing between the Linux guest and the Windows host.

FreeRDP is used as the RDP server launched in the WSLGd Linux environment, and mstsc acts as the RDP client on the Windows side. The WSLDVCPlugin handler has been prepared to identify the available graphical Linux applications and display them in the Windows menu. With common Linux distributions installed in the WSL2 environment, such as Ubuntu, Debian, and CenOS, the WSLGd suite of components interacts by providing sockets that handle Wayland, X11, and PulseAudio requests. The bindings prepared for WSLGd are licensed under the MIT license.

Installing WSLGd requires Windows 10 Insider Preview at least version 21362. In the future, the ability to install WSLGd will be provided for regular editions of Windows, without the need to participate in the Insider Preview program. Installation of WSLGd is carried out by executing the typical command “wsl –install”, for example, for Ubuntu – “wsl –install -d Ubuntu”. For existing WSL2 environments, WSLGd is installed via the “wsl –update” command (only WSL2 environments that use the Linux kernel are supported, not call translation). Graphical applications are installed through the regular package manager of the distribution kit.

WSLGd provides only mechanisms for rendering 2D graphics, and for accelerating 3D graphics based on OpenGL in distributions installed in WSL2, it is proposed to use a virtual GPU (vGPU). WSL vGPU drivers are provided for AMD, Intel and NVIDIA chips. Graphics acceleration is provided through the provision of a layer with the implementation of OpenGL over DirectX 12. The layer is designed in the form of the d3d12 driver, included in the main part of Mesa 21.0, and is being developed jointly with Collabora.

Testing performance on a Surface Book Gen3 device with an Intel GPU showed that in a native Win32 environment, the Geeks3D GpuTest benchmark demonstrates 19 FPS, in a Linux environment with vGPU – 18 FPS, and with software rendering in Mesa – 1 FPS. The virtual GPU is implemented in Linux using the dxgkrnl driver, which provides the / dev / dxg device with services repeating the Windows Display Driver Model (WDDM) D3DKMT of the Windows kernel. The driver organizes the connection to the physical GPU using the VM bus. Linux applications have the same level of GPU access as native Windows applications, without enforcing resource sharing between Windows and Linux.

A source:

Leave a Reply