Microsoft begins testing support for running Linux GUI applications on Windows

Microsoft announced few days ago the beginning of testing the ability to run Linux-based GUI applications in WSL2-based environments (Windows Subsystem for Linux).

Applications are fully integrated with the main Windows desktop, including support for placing shortcuts on the Start menu, playing sound, recording from a microphone, OpenGL hardware acceleration, displaying information about programs on the taskbar, switching between programs using Alt-Tab, copy data between Windows and Linux programs via clipboard.

To organize the output of the Linux application interface to the main Windows desktop, the RAIL-Shell composite manager is used developed by Microsoft, It 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 from Weston in that the composite manager does not render the desktop itself, but instead redirects the individual surfaces (wl_surface) via the RDP RAIL channel to display on your main Windows desktop. XWayland is used to run X11 applications.

The sound output is organized by the PulseAudio server, which also interacts with Windows using the RDP protocol (the rdp-sink plugin is used for sound output and rdp-source for input).

Composite Server, XWayland and PulseAudio are packaged in the form of a universal mini-distribution WSLGd, which includes components for the abstraction of the graphics and sound subsystem, and are based on the CBL-Mariner Linux distribution, also used in the Microsoft cloud infrastructure. . WSLGd is started 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 driver has been prepared to identify 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 set of components interacts by providing sockets that handle requests from Wayland, X11, and PulseAudio. 

The virtual GPU is implemented on Linux using the / dev / dxg device with services that mimic the Windows display driver model (WDDM) D3DKMT of the Windows kernel.

The controller organizes the connection to the physical GPU through the VM bus, plus Linux applications have the same level of GPU access as native Windows applications without forcing resource sharing between Windows and Linux.

Performance tests 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 on Mesa - 1 FPS.

The WSLGd installation requires Windows 10 Insider Preview at least version 21362, even if en the future, the ability to install WSLGd will be provided for regular editions Windows, without the need to participate in the Insider Preview program.

WSLGd provides only mechanisms for rendering 2D graphics, and for accelerating OpenGL-based 3D graphics on distributions installed on WSL2, it is proposed to use a virtual GPU (vGPU).

Graphics acceleration is provided by providing a layer with the implementation of OpenGL over DirectX 12. The layer is designed in the form of the d3d12 driver, which was included in the main part of Mesa 21.0 and is being developed in conjunction with Collabora.

WSLGd installation is carried out by running the typical command "wsl –install", for example for Ubuntu - "wsl –install -d Ubuntu".

For existing WSL2 environments, WSLGd is installed using the "wsl –update" command (only WSL2 environments using the Linux kernel are supported, not call translation). The graphical applications are installed through the usual package manager of the distribution kit.

Source: https://devblogs.microsoft.com/


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: AB Internet Networks 2008 SL
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Frank said

    Apparently Linux is very uncomfortable for certain people, or companies. From what I see, the point is to get Linux out of the way.