Enabling the Windows Subsystem for Linux to include support for Wayland and X server related scenarios

Overview

Welcome to WSLg

WSLg is short for Windows Subsystem for Linux GUI and the purpose of the project is to enable support for running Linux GUI applications (X11 and Wayland) on Windows in a fully integrated desktop experience.

WSLg provides an integrated experience for developers, scientists or enthusiasts that prefer or need to run Windows on their PC but also need the ability to run tools or applications which works best, or exclusively, in a Linux environment. While users can accomplish this today using a multiple system setup, with individual PC dedicated to Windows and Linux, virtual machine hosting either Windows or Linux, or an XServer running on Windows and projected into WSL, WSLg provides a more integrated, user friendly and productive alternative.

WSLg strives to make Linux GUI applications feel native and natural to use on Windows. From integration into the Start Menu for launch to appearing in the task bar, alt-tab experience to enabling cut/paste across Windows and Linux applications, WSLg enables a seamless desktop experience and workflow leveraging Windows and Linux applications.

WSLg Integrated Desktop

Installing WSLg

Pre-requisites

  • Windows 10 Insider Preview build 21362+

    • WSLg is going to be generally available alongside the upcoming release of Windows. To get access to a preview of WSLg, you'll need to join the Windows Insider Program and be running a Windows 10 Insider Preview build from the dev channel.
  • It recommended to run WSLg on a system with virtual GPU (vGPU) enabled for WSL so you can benefit from hardware accelerated OpenGL rendering. You can find preview driver supporting WSL from each of our partners below.

Install instructions (Fresh Install - no prior WSL installation)

From a command prompt with administrator privileges, run the command wsl --install -d Ubuntu, then reboot when prompted.

After reboot the installation will continue. You'll be asked to enter a username and password. These will be your Linux credential, they can be anything you want and don't have to match your Windows credentials.

Voila! WSL and WSLg are installed and ready to be used!

Install instructions (Existing WSL install)

If you have an existing WSL installation without WSLg and want to update to the latest version of WSL which includes WSLg, run the command wsl --update from an elevated command prompt.

Please note that WSLg is only compatible with WSL 2 and will not work for WSL distribution configured to work in WSL 1 mode. Verify that your Linux distro is configured for running in WSL 2 mode, if not switch to WSL 2. While you can continue to run Linux distro in WSL 1 mode after installing WSLg if you so desired, a distro configured to run in WSL 1 mode will not be able to communicate with WSLg and will not be able to run GUI applications.

You can list your currently installed distro and the version of WSL they are configured for using the following command from an elevated command prompt.

   wsl --list -v

If running in version 1 mode, switch to version 2. This can take a while.

   wsl --set-version _distro_name_ 2

Restart WSL by running this command from an elevated command prompt, make sure to save any pending work first:

    wsl --shutdown

Updating WSL + WSLg

To update to the latest version of WSL and WSLg released for preview, simply run wsl --update from an elevated command prompt or powershell.

You'll need to restart WSL for the changes to take effect. You can restart WSL by running wsl --shutdown from an elevated command prompt. If WSL was currently running, it will shutdown, make sure to first save any in progress work! WSL will be automatically restarted the next time you launch a WSL application or terminal.

First Launch

If you have installed the Ubuntu Linux distro per these instructions, you'll find an Ubuntu icon in your start menu, launch it. This will launch the WSL 2 VM, launch the Ubuntu WSL distro in that VM and give you a terminal to interact with it. Voila! You're running Linux on Windows!

If you would like to explore additional Linux distributions built for WSL, you can use the wsl --list --online command from an elevated command prompt to enumerate the list of available distributions for your system. You can have multiple Linux distributions installed within WSL and they will happily coexist side-by-side, so don't be scare to experiment and try things out.

Congrats you are done and ready to use GUI apps!

Install and run GUI apps

If you want to get started with some GUI apps, you can run the following commands from your Linux terminal to download and install some popular applications. If you are using a different distribution than Ubuntu, it may be using a different package manager.

## Update all packages in your distro
sudo apt update

## Gedit
sudo apt install gedit -y

## GIMP
sudo apt install gimp -y

## Nautilus
sudo apt install nautilus -y

## VLC
sudo apt install vlc -y

## X11 apps
sudo apt install x11-apps -y

## Google Chrome
cd /tmp
sudo wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb 
sudo apt install --fix-broken -y
sudo dpkg -i google-chrome-stable_current_amd64.deb

## Microsoft Teams
cd /tmp
sudo curl -L -o "./teams.deb" "https://teams.microsoft.com/downloads/desktopurl?env=production&plat=linux&arch=x64&download=true&linuxArchiveType=deb"
sudo apt install ./teams.deb -y

## Microsoft Edge Browser
sudo curl https://packages.microsoft.com/repos/edge/pool/main/m/microsoft-edge-dev/microsoft-edge-dev_91.0.852.0-1_amd64.deb -o /tmp/edge.deb
sudo apt install /tmp/edge.deb -y

Once these applications are installed, you'll find them in your start menu under the distro name. For example Ubuntu -> Microsoft Edge. You can also launch these from your terminal window using the commands:

  • xcalc, xclock, xeyes
  • gimp
  • gedit ~/.bashrc
  • nautilus
  • vlc
  • google-chrome
  • teams
  • microsoft-edge

WSLg Architecture Overview

WSLg Architecture Overview

User Distro

The user distro is essentially the WSL distribution you are using for your Linux work. You can use the command wsl --list --online from an elevated Windows command prompt to list the WSL distributions available on your system. You can run multiple user distros side-by-side and they will peacefully coexist, so don't be afraid of trying out new distro. Each user distro will be paired with a unique instance of the system distro, but you can still interact across GUI applications running in different user distro seamlessly, such as cut/paste between them. The underlying containerization of the various userspace should be invisible to you.

All user and system distros for a particular Windows user run within the same WSL virtual machine against a single instance of the Linux kernel. Different Windows users on a PC have their own VM and instance of WSL. Your Linux environment is guaranteed to always be your own and not shared with other Windows users on the same PC.

WSLg System Distro

The system distro is where all of the magic happens. The system distro is a containerized Linux environment where the WSLg XServer, Wayland server and Pulse Audio server are running. Communication socket for each of these servers are projected into the user distro so client applications can connect to them. We preconfigure the user distro environment variables DISPLAY, WAYLAND_DISPLAY and PULSE_SERVER to refer these servers by default so WSLg lights up out of the box.

Users wanting to use different servers than the one provided by WSLg can change these environment variables. User can also choose to turn off the system distro entirely by adding the following entry in their .wslconfig file (located at c:\users\MyUser\.wslconfig). This will turn off support for GUI applications in WSL.

[wsl2]
guiApplications=false

The system distro is based on the Microsoft CBL-Mariner Linux. This is a minimal Linux environment, just enough to run the various pieces of WSLg. For details on how to build and deploy a private system distro please see our build instructions.

Every WSL 2 user distro is paired with its own instance of the system distro. The system distro runs partially isolated from the user distro to which it is paired, in it's own NS/PID/UTS namespace but shares other namespaces such as IPC, to allow for shared memory optimization across the boundary.

While a user can get a terminal into the system distro, the system distro is not meant to be used directly by users. Every instance of the system distro is loaded read-only from it's backing VHD. Any modifications, made to the in-memory instance of the system distro (such as installing new packages or creating a new file), is effectively discarded when WSL is restarted. The reason we do this is to enable a servicing model for the system distro where we replace the old one with the new one without having to worry about migrating any user data contained within. We use a read-only mapping such that the user gets a well known discard behavior on any changes, every time WSL is restarted, instead of getting a surprise when WSL is serviced.

Although the Microsoft published WSLg system distro as read-only, we do want to encourage folks to tinker with it and experiment. Although we expect very few folks to actually need or want to do that, we've shared detailed instruction on our contributing page on how to both build and deploy a private version of the system distro. Most users who just want to use GUI applications in WSL don't need to worry about those details.

WSLGd

WSLGd is the first process to launch after init. WSLGd launches Weston (with XWayland), PulseAudio and establishes the RDP connection by launching mstsc.exe on the host in silent mode. The RDP connection will remain active and ready to show a new GUI applications being launch on a moment's notice, without any connection establishment delays. WSLGd then monitors these processes and if they exit by error (say as a result of a crash), it automatically restarts them.

Weston

Weston is the Wayland project reference compositor and the heart of WSLg. For WSLg, we've extended the existing RDP backend of libweston to teach it how to remote applications rather than monitor/desktop. We've also added various functionality to it, such as support for multi-monitor, cut/paste, audio in/out, etc...

The application integration is achieved through an RDP technology called RAIL (Remote Application Integrated Locally) and VAIL (Virtualized Application Integrated Locally). The main difference between RAIL and VAIL is how pixels are transported across from the RDP server to the RDP client. In RAIL, it is assumed that the Server and Client are running on different physical systems communicating over the network and thus pixels need to be copied over the RDP transport. In VAIL, it is understood that the Server and Client are on the same physical system and can share memory across the Guest/Host VM boundary. We've added support for both RAIL and VAIL to the libweston RDP backend, although for WSLg only the VAIL support is effectively used. While building WSLg, we first implemented RAIL while the necessary pieces enabling the switch to VAIL were being developed in parallel. We decided to keep that support in as it could reuse in other interesting scenarios outside of WSLg, for example for remoting application from a Pi running Linux. To share memory between the Linux guest and Windows host we use virtio-fs.

RAIL-Shell

Weston is modular and has various shells today, such as the desktop shell, fullscreen shell (aka kiosk), and automative shell. For WSLg we introduced a new shell called the RAIL Shell. The purpose of the RAIL Shell is to help with the remoting of individual windows from Linux to Windows, as such the shell is very simplistic and doesn't involve any actual widgets or shell owned pixels.

FreeRDP

Weston leverages FreeRDP to implement its backend RDP Server. FreeRDP is used to encode all communications going from the RDP Server (in Weston) to the RDP Client (mstsc on Windows) according to the RDP protocol specifications. It is also used to decode all traffic coming from the RDP Client into the RDP server.

Pulse Audio Plugin

For audio in (microphone) and out (speakers/headphone) WSLg runs a PulseAudio server. WSLg uses a sink plugin for audio out, and a source plugin for audio in. These plugins effectively transfer audio samples between the PulseServer and the Weston RDP Server. The audio streams are merged by the Weston RDP Server onto the RDP transport, effectively enabling audio in/out in the Weston RDP backend across all scenarios (Desktop/RAIL/VAIL style remoting), including WSLg.

WSL Dynamic Virtual Channel Plugin (WSLDVCPlugin)

WSLg makes use of a custom RDP virtual channel between the Weston RDP Server and the mstsc RDP Client running on the Windows host. This channel is used by Weston to enumerate all Linux GUI applications (i.e. applications which have a desktop file entry of type gui) along with their launch command line and icon. The open source WSLDVCPlugin processes the list of Linux GUI applications sent over this channel and creates links for them in the Windows start menu.

OpenGL accelerated rendering in WSLg

While WSLg works with or without virtual GPU support, if you intend to run graphics intensive applications such as Blender or Gazebo, it is best to be running on a system with a GPU and driver that can support WSL. An overview of our vGPU architecture and how we make it possible for Linux applications to access the GPU in WSL is available at our DirectX blog.

Support for OpenGL accelerated rendering is made possible through the work our D3D team has done with Collabora and the Mesa community on creating a d3d12 Gallium driver.

Support for Linux, including support for WSLg, has been upstream and part of the Mesa 21.0 release. To take advantage of this acceleration, you'll need to update the version of Mesa installed in your user distro. It also requires that your distro vendor chose to build and publish the new d3d12 Gallium driver to their package repository. We're working with the various WSL distro publishers to inform them of these changes.

Please note that for the first release of WSLg, vGPU interops with the Weston compositor through system memory. If running on a discrete GPU, this effectively means that the rendered data is copied from VRAM to system memory before being presented to the compositor within WSLg, and uploaded onto the GPU again on the Windows side. As a result, there is a performance penalty proportionate to the presentation rate. At very high frame rates such as 600fps on a discrete GPU, that overhead can be as high as 50%. At lower frame rate or on integrated GPU, performance much closer to native can be achieved depending on the workload. Using a vGPU still provides a very significant performance and experience improvement over using a software renderer despite this v1 limitation.

WSLg Code Flow

WSLg builds on the great work of the Linux community and makes use of a large number of open source projects. Most components are used as-is from their upstream version and didn't require any changes to light up in WSLg. Some components at the heart of WSLg, in particular Weston, FreeRDP and PulseAudio, required changes to enable the rich WSLg integration. These changes aren't yet upstream. Microsoft is working with the community to share these contributions back with each project such that overtime WSLg can be built from upstream component directly, without the need for any WSLg specific modifications.

All of these in-flight contributions are kept in Microsoft mirror repos. We keep these mirrors up to date with upstream releases and stage our WSLg changes in those repos. WSLg pulls and builds code from these mirror repos as part of our Insider WSLg Preview releases. These mirrors are public and accessible to everyone. Curious developers can take a peek at early stages of our contribution by looking at code in those mirrors, keeping in mind that the final version of the code will likely look different once the contribution reaches the upstream project and is adapted based on the feedback receives by the various project owners. All of our mirrors follow the same model. There is a main branch which correspond to the upstream branch at our last synchronization point. We update the main branch from time to time to pick update from the upstream project. There is also a working branch that contains all of our in-flight changes. WSLg is built using the working branch from each of the mirror projects.

The projects that WSLg maintains mirrors for will change over time as in-flight contributions evolve. Once some contributions are upstream, it may no longer be necessary to maintain a mirror, at which point it will be removed and WSLg will start to leverage the upstream version of the component directly. As we light up new functionality in WSLg, new mirrors may be introduced to stage contributions to new components. As such, expect the list of mirrors to change overtime.

At this point in time, we have the following project mirrors for currently in-flight contributions.

Project Upstream Repo WSLg Mirror
Weston https://github.com/wayland-project/weston https://github.com/microsoft/Weston-mirror
FreeRDP https://github.com/FreeRDP/FreeRDP https://github.com/microsoft/FreeRDP-mirror
PulseAudio https://github.com/pulseaudio/pulseaudio https://github.com/microsoft/PulseAudio-mirror

The following is a high level overview of the currently in-flight contributions to each project contained within these mirrors.

Weston

WSLg leverages Weston as the Wayland compositor bridging the Linux and Windows worlds using RDP technology to remote application content between them. Weston already had an RDP backend, but it was limited to single-monitor-desktop remoting. We've greatly enhanced that RDP backend to include advanced functionality, such as multi-monitor support, clipboard integration for copy/paste, and audio in/out. We've enabled new remoting modes called RAIL (Remote Application Integrated Locally) and VAIL (Virtualized Application Integrated Locally), where individual applications, rather than desktops/monitors, are remoted. These changes are not specific to WSLg; they add functionality to the existing RDP backend and are reusable in other scenarios as well (i.e. using the new Weston RDP backend to remote application running on a Raspberry Pi to another device running an RDP client).

To enable rich integration in WSLg, we've also added a small plugin to the RDP backend specific to WSLg. In Weston, the plugin is responsible for attaching to the user distro and searching for installed applications (aka the desktop file). The plugin sends the Windows host a list of all applications found along with their launch commands and icons. On the Windows host, an open source mstsc plugin part of the WSLg project uses that information to create shortcuts for these Linux applications to the Windows Start Menu.

We've also fixed several bugs impacting various applications. Generally, these were problems that impacted Weston in all modes and were not specific to WSLg.

FreeRDP

Weston currently uses FreeRDP for its RDP Backend. WSLg continues to leverage FreeRDP and we have added support for a new RDP Protocol/Channel to enable VAIL optimized scenario as well as support for the WSLg plugin. We've also fixed various bugs that were impacting interops with mstsc or causing instability.

PulseAudio

For PulseAudio, our contributions focused on a sink and a source plugin that shuffle audio data between PulseAudio and the Weston RDP backend such that the audio data can be integrated over the RDP connection back to the host. There are no changes to the core of PulseAudio outside of adding these new plugins.

Contributing

If you would like to tinker with or contribute to WSLg, please see our CONTRIBUTING page for details, including how to build and run private a version of WSLg.

Reporting a non-security issues

For non-security related issues, such as reporting a bug or making a suggestion for a new feature, please use this project's issues tracker.

Reporting security issues

To report security issues with WSLg or any other Microsoft products, please follow the instructions detailed here.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

Issues
  • Keyboard layout messed up for KBD_PORTUGUESE_BRAZILIAN_ABNT2.

    Keyboard layout messed up for KBD_PORTUGUESE_BRAZILIAN_ABNT2.

    When I try to type any text on any of the GUI applicatuins, the letter doesnt matches the keyboard layout (it works just fine from the command prompt).

    keyboard-layout fixinbound 
    opened by tb110188 86
  • Buffered keyboard inputs are continue to be dispatched to newly started application in X

    Buffered keyboard inputs are continue to be dispatched to newly started application in X

    Environment

    Windows build number: 21382
    Your Distribution version: Ubuntu 20.04, 20.10 and 21.04
    Your WSLg version: 1.0.19
    

    Steps to reproduce

    Open emacs from a terminal, such as Windows Terminal

    Use ctrl-x ctrl-c to close emacs

    Reopen the terminal, and click the text-entry butter and "c" will repeat over and over until you press "ctrl-c"

    This will persist upon reopening, until: You press "ctrl-c again" or
    you restart WSL with wsl --shutdown

    Expected behavior

    I expect "ctrl-x ctrl-c" to gracefully exit the program, without resulting in something being hung, which waits for the next ctrl-c to stop the key entry.

    Actual behavior

    See attached screenshot

    image

    bug duplicate fixinbound 
    opened by EricPell 42
  • Attempting to run GUI apps returns an error

    Attempting to run GUI apps returns an error

    Environment

    Windows build number: Microsoft Windows [Version 10.0.21364.1]
    Your Distribution version: Ubuntu 20.04
    Your WSLg version: 1.0.17.1
    

    Steps to reproduce

    1. Update to Windows build 21364.
    2. Install special NVIDIA 470.14 driver.
    3. Run wsl --update.
    4. Reboot.
    5. Create new Ubuntu 20.04 WSL2 instance.
    6. Install GUI applications (x11-apps, Chrome, etc.).
    7. Attempt to run the applications.

    WSL logs:

    pulseaudio.log weston.log versions.txt

    Expected behavior

    GUI applications should open when run.

    Actual behavior

    Attempting to launch from the CLI returns the error: Error: Can't open display: :0.

    bug fixinbound 
    opened by zacharee 42
  • After most recent WSL update, WSL won't start

    After most recent WSL update, WSL won't start

    Environment

    Windows build number: 10.0.21364.0
    Your Distribution version: Ubuntu 18.04
    Your WSLg version: 1.0.17.1
    WSL Update Version: 5.10.16
    

    Steps to reproduce

    1. Update WSL to support WSLg
    2. Run the distro

    WSL logs:

    wsl.zip

    Expected behavior

    WSL should start

    Actual behavior

    WSL fails to start with:

    The parameter is incorrect.
    
    [process exited with code 4294967295]
    

    The solutions is to disable WSLg as per: https://github.com/microsoft/WSL/issues/6839 by disabling it in .wslconfig file via

    [wsl2]
    guiapplications=false
    
    bug fixinbound 
    opened by hajekj 35
  • Unable to init server: Could not connect: Connection refused (gedit:1859): Gtk-WARNING :  cannot open display:)

    Unable to init server: Could not connect: Connection refused (gedit:1859): Gtk-WARNING : cannot open display:)

    Can anyone help-me with this issue: **Unable to init server: Could not connect: Connection refused (gedit:1859): Gtk-WARNING : 18:14:00.048: cannot open display:

    wsl --update Checking for updates... There are no updates available. Versão do kernel: 5.10.60.1

    wsl -l -v

    NAME                            STATE           VERSION
    * Ubuntu                        Running          2
     docker-desktop            Running          2
     docker-desktop-data    Running          2
    

    in PowerShell 7 I have this result When I try found CBL Mariner PS C:\Users\neuberfran> wsl --system There is no distribution with the given name.

    wslG-ubuntu2004-ISSUE

    I tried this:

    https://stackoverflow.com/questions/60284542/wsl-gedit-unable-to-init-server-could-not-connect-connection-refused

    But not solved

    bug 
    opened by neuberfran 26
  • X-11 problem

    X-11 problem

    [email protected]:~$ sudo apt install x-11 apps -y Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package x-11 E: Unable to locate package apps

    opened by bayvista170 25
  • Too aggressive downwards scrolling, and resists upwards scrolling

    Too aggressive downwards scrolling, and resists upwards scrolling

    Environment

    Windows build number: 21364.1
    Your Distribution version: Ubuntu 20.10
    Your WSLg version: unknown
    

    Steps to reproduce

    1. apt install firefox -y (or epiphany-browser or nautilus)
    2. firefox (or epiphany-browser or nautilus)
    3. Visit any tall webpage
    4. Scroll downwards the smallest amount possible
    5. Scroll upwards the smallest amount possible

    Expected behavior

    It should scroll down by about 40-50px, and up by about 40-50px.

    Actual behavior

    It scrolls ~2000px downwards per tick. It resists scrolling upwards, and need to repeat it multiple times before it finally scrolls ~10px upwards.

    Hardware:

    Synaptics Precision TouchPad (Lenovo)

    WSL logs:

    https://aka.ms/AAc0u5v (feedbackid b6a23cbb-c7f7-4d6e-a2b1-66d85f95bc0c)

    bug fixinbound 
    opened by da2x 24
  • Building the WSLg System Distro, It is not work.

    Building the WSLg System Distro, It is not work.

    Environment

    Windows build number: 10.0.21376.0
    Your Distribution version: 20.04
    Your WSLg version: 1.0.19
    

    Steps to reproduce

    CONTRIBUTING.md system distro in accordance with the following rules, but it does not work. It's up and running on docker, so it's not created correctly.

    WSL

    PS D:\Users\noria> wsl --list --all
    Linux 用 Windows サブシステム ディストリビューション:
    Ubuntu (既定)
    docker-desktop
    docker-desktop-data
    Ubuntu-CommPrev
    PS D:\Users\noria>
    
    PS D:\Users\noria> type .wslconfig
    [wsl2]
    systemDistro=D:\\Users\\noria\\system.vhd
    PS D:\Users\noria>
    
    PS D:\Users\noria> dir D:\\Users\\noria\\system.vhd
    
        Directory: D:\Users\noria
    
    Mode                 LastWriteTime         Length Name
       ----                 -------------         ------ ----
    -a---          2021/05/15    17:59      364352000 system.vhd
    
    PS D:\Users\noria>
    
    PS D:\Users\noria> wsl --system
    指定された名前のディストリビューションはありません。
    PS D:\Users\noria>
    
    PS D:\Users\noria> wsl --system Ubuntu
    指定された名前のディストリビューションはありません。
    PS D:\Users\noria>
    

    "指定された名前のディストリビューションはありません。" tranlate "There is no distribution with the specified name."

    "wsl --system [DistroName]" in CONTRIBUTING.md This part of the "DistroName" doesn't know what you need to do.

    Docker

    I checked the image made of docker.

    PS D:\Users\noria> docker images
    REPOSITORY                 TAG         IMAGE ID       CREATED        SIZE
    system-distro-x64          latest      b265d8c1d0d5   3 hours ago    375MB
    ~~~~~~~~
    PS D:\Users\noria>
    
    PS D:\Users\noria> docker run --rm -it system-distro-x64 uname -a
    Linux 1d8d69b40d7d 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
    PS D:\Users\noria>
    
    PS D:\Users\noria> docker run --rm -it system-distro-x64 cat /etc/os-release
    NAME="Common Base Linux Mariner"
    VERSION="1.0.20210224"
    ID=mariner
    VERSION_ID=1.0
    PRETTY_NAME="CBL-Mariner/Linux"
    ANSI_COLOR="1;34"
    HOME_URL="https://aka.ms/cbl-mariner"
    BUG_REPORT_URL="https://aka.ms/cbl-mariner"
    SUPPORT_URL="https://aka.ms/cbl-mariner"
    PS D:\Users\noria>
    

    WSL logs:

    • Attach WSLg logs from /mnt/wslg

    You can access the wslg logs using explorer at: \\wsl$\<Distro-Name>\mnt\wslg (e.g.: \\wsl$\Ubuntu-20.04\mnt\wslg)

    • puseaudio.log
    • weston.log
    • versions.txt

    Expected behavior

    Private version of the system distro works correctly.

    Actual behavior

    Private version of the system distro does not work properly.

    bug 
    opened by noriakia 22
  • GUI apps hang up on start when `/etc/wsl.conf` has `root=/`

    GUI apps hang up on start when `/etc/wsl.conf` has `root=/`

    Environment

    Windows build number: 10.0.21364.0
    Your Distribution version: Ubuntu 20.04
    Your WSLg version: I don't have 'Windows Subsystem for Linux GUI app support', but I do have this: 
    

    image

    Steps to reproduce

    1. Set host mount point to root: /etc/wsl.conf -> [automount] -> root=/
    2. Enable WSLg:
      • Remove guiApplications=false from .wslconfig
      • wsl --shutdown
    3. Run any GUI app.
      • In my example I use gnome-system-monitor and firefox, but it also works with everything else I tried.

    WSL logs:

    • Attach WSLg logs from /mnt/wslg
      • I don't have a /mnt/wslg directory, which I'm assuming is because I changed the host mount point from /mnt to /.
      • I do indeed have a /wslg directory, but it's empty.

    Expected behavior

    The app should start normally and display a window. See below a recording of how that happens with VcXsrv.

    Actual behavior

    1. The app doesn't print any errors.
    2. But it also doesn't print any of its normal output, which would indicate that it's working, but invisible.
    3. No new windows appear on the screen.
    4. No second instance of vmmem in the process list (as reported by Windows Task Manager).
      • I'm assuming a second instance of vmmem should appear, because the docs say the whole thing works by starting a second WSL2 distro.
    5. DISPLAY and WAYLAND_DISPLAY variables are present and look fine.

    Issue in WSLg

    doesnt

    Working normally via VcXsrv

    works

    bug 
    opened by fsoikin 22
  • Linux GUI apps aren't showing up in Start menu (shell script support in start menu shortcut)

    Linux GUI apps aren't showing up in Start menu (shell script support in start menu shortcut)

    Environment

    Windows build number: Microsoft Windows [Version 10.0.21343.1010]
    Your Distribution version: Ubuntu 20.04
    Your WSLg version: 0.2.13
    
    
    

    Steps to reproduce

    Commands I ran to install Jet Brains Rider:

    curl https://download-cf.jetbrains.com/rider/JetBrains.Rider-2020.3.4.tar.gz -o /tmp/rider.tar.gz
    sudo tar -xzf /tmp/rider.tar.gz -C /opt
    cd /opt/JetBrains\ Rider-2020.3.4/bin
    bash ./rider.sh
    

    WSL logs: pulseaudio.log weston.log versions.txt

    Expected behavior

    I would see the Jet Brains Rider app under the Ubuntu folder in the Start Menu

    Actual behavior

    There is no Ubuntu folder in the Star Menu

    enhancement fixinbound start-menu-integration 
    opened by stevenbrix 22
  • WSLg keeps display always awake (application keeps caret blinking).

    WSLg keeps display always awake (application keeps caret blinking).

    I am not 100% sure that it's connected, but have checked it a few times and only when app under WSLg was running my displays wouldn't go off.

    Environment

    Windows build number: 21364 Your Distribution version: Ubuntu 20.04 / 21.04 Your WSLg version: 1.0.19

    Steps to reproduce

    Setup display to go off after 1 minute. Run any gui app (PHPStorm in my case). Lock your PC (wait 1 minute).

    Expected behavior

    Display should go off after specified time when WSLg app is running.

    Actual behavior

    Display won't go off.

    If I can provide any logs that might help troubleshoot - happy to do so.

    bug 
    opened by fliespl 20
  • WSLg finger scroll on touch screen doesn't work

    WSLg finger scroll on touch screen doesn't work

    Version

    10.0.22000.652

    WSL Version

    • [X] WSL 2
    • [ ] WSL 1

    Kernel Version

    5.10.102.1

    Distro Version

    Ubuntu 21.10

    Other Software

    No response

    Repro Steps

    Open a wayland graphical application in wsl, for example xournallpp, finger scroll does not work with touchscreen, finger left click works.

    Expected Behavior

    finger scroll works

    Actual Behavior

    Only finger left click works.

    Diagnostic Logs

    No response

    enhancement 
    opened by yashamon 1
  • Strange artefact in fyne GL application when using wslg

    Strange artefact in fyne GL application when using wslg

    Environment

    Windows build number: 10.0.22000.0
    Your Distribution version: Ubuntu 22.04
    Your WSLg version: 1.0.26
    

    Steps to reproduce

    sudo apt-get install golang gcc libgl1-mesa-dev xorg-dev
    go install fyne.io/fyne/v2/cmd/[email protected]develop
    ~/go/bin/fyne_demo
    

    WSL logs:

    • Attach WSLg logs from /mnt/wslg

    versions.txt weston.log

    Expected behavior

    When running fyne_demo or any fyne application on Windows natively we would get the following visual result:

    fyne_demo-windows

    This is the result we get on every platform where fyne is running (Windows, Linux, BSD, MacOS, Android and iOS).

    Actual behavior

    When running in wslg environment, we instead get this stripe artefacts on screen: fyne_demo-wslg

    It might be something at the shader level in OpenGL, as it looks like maybe something going on with one of the triangle used for rendering each primitive on screen. It does happen in wslg with both wayland and X (but fyne X support is more mature than its Wayland support, so the bug report steps to reproduce trigger the X code path). On exactly the same machine, the windows binary would just work as expected.

    Other users have reported the same issue, I don't know what GPU they were using, but I am using an AMD Radeon Vega 3 with latest drivers.

    bug 
    opened by Bluebugs 1
  • Incompatibility with remote credential guard/restricted admin

    Incompatibility with remote credential guard/restricted admin

    Environment

    Windows build number: 10.0.22616.0
    Your Distribution version: Ubuntu 20.04.4 LTS
    Your WSLg version: 1.0.33
    

    Steps to reproduce

    1. Have remote credential guard required by group policy. Software\Policies\Microsoft\Windows\CredentialsDelegation\RestrictedRemoteAdministration=1 Software\Policies\Microsoft\Windows\CredentialsDelegation\RestrictedRemoteAdministrationType=2 Administrative Templates->System->Credentials Delegation->Restrict delegation of credentials to remote computer = Require Remote Credential Guard

    2. Launch WSL

    WSL logs:

    • versions.txt:
    WSLg ( x86_64 ): 1.0.33+Branch.main.Sha.d57addbe6309d0a453123c91e6117fc21871496c
    Mariner: VERSION="1.0.20220226"
    FreeRDP: c574044a10003e50453acb4cf42801c5833fb572
    weston: 651d33374f9b9e93e1cf1210faff13bcd339f132
    pulseaudio: 2f0f0b8c3872780f15e275fc12899f4564f01bd5
    mesa:
    

    Expected behavior

    For WSLg to not need user credentials to be delegated to it and to launch with this policy set.

    Actual behavior

    The RDP client gets stuck in a reconnect loop until wsl --shutdown. In Windows logs TerminalServices-ClientActiveXCore/Microsoft-Windows-TerminalServices-RDPClient/Operational, event ID 1033 repeatedly reports "Component name:OnDisconnected, :: SL::OnDisconnected, Error code:0xE09". I found the text for 0xE09 to be "The remote PC doesn't support Restricted Administration mode."

    bug rdp-client-connection 
    opened by conatsera 0
  • Poor Performance Running Unigine Valley

    Poor Performance Running Unigine Valley

    Environment

    Windows build number: 10.0.22000.0
    Your Distribution version: Ubuntu 22.04
    Your WSLg version: 1.0.26
    

    glxinfo

    Extended renderer info (GLX_MESA_query_renderer):
        Vendor: Microsoft Corporation (0xffffffff)
        Device: D3D12 (NVIDIA GeForce RTX 2080 SUPER) (0xffffffff)
        Version: 22.2.0
        Accelerated: yes
        Video memory: 24357MB
        Unified memory: no
        Preferred profile: core (0x1)
        Max core profile version: 4.2
        Max compat profile version: 4.2
        Max GLES1 profile version: 1.1
        Max GLES[23] profile version: 3.1
    OpenGL vendor string: Microsoft Corporation
    OpenGL renderer string: D3D12 (NVIDIA GeForce RTX 2080 SUPER)
    OpenGL core profile version string: 4.2 (Core Profile) Mesa 22.2.0-devel (git-cfec9a5 2022-05-06 jammy-oibaf-ppa)
    OpenGL core profile shading language version string: 4.20
    OpenGL core profile context flags: (none)
    OpenGL core profile profile mask: core profile
    

    Steps to reproduce

    Download Unigine Valley and run it on Ubuntu 22.04. Optionally also run Unigine Heaven to compare.

    Expected behavior

    Unigine Heaven runs fine as in screenshot:

    Heaven Result

    Actual behavior

    Unigine Valley have very poor performance:

    Valley Result

    bug 
    opened by blitzcaster 5
  • WSLg crashes after a time, when closing chromium windows, dxgk invalid handle error

    WSLg crashes after a time, when closing chromium windows, dxgk invalid handle error

    Environment

    Windows build number: 10.0.22000.0
    Your Distribution version: Arch Linux, using distrod, kernel 5.10.102.1-microsoft-standard-WSL2
    Your WSLg version: Windows Subsystem for Linux WSLg Preview 1.0.26
    

    Steps to reproduce

    Run and close chromium (I'm running Chromium 101.0.4951.41 Arch Linux) multiple times

    WSL logs:

    pulseaudio.log versions.txt weston.log

    dmesg: (The previous dmesg message was at [10471.680700])

    [21961.411301] potentially unexpected fatal signal 5.
    [21961.411774] CPU: 3 PID: 174141 Comm: chromium Not tainted 5.10.102.1-microsoft-standard-WSL2 #1
    [21961.412101] RIP: 0033:0x5567782c9f78
    [21961.412218] Code: ff 0f 57 c0 0f 11 05 c7 7b 3d 06 0f 11 05 b0 7b 3d 06 48 8d 3d c9 7b 3d 06 ff 15 63 58 31 06 e9 85 fd ff ff e8 79 2f b5 05 cc <0f> 0b cc 0f 0b cc 0f 0b 55 48 89 e5 41 57 41 56 41 55 41 54 53 48
    [21961.412744] RSP: 002b:00007fff3de48420 EFLAGS: 00000246
    [21961.412890] RAX: 0000000000000000 RBX: 00007fff3de48470 RCX: 0000000000000000
    [21961.413163] RDX: 0000000000000100 RSI: 000037f2010c7500 RDI: 000055677e6a1b30
    [21961.413190] potentially unexpected fatal signal 5.
    [21961.413371] RBP: 00007fff3de488c0 R08: 0000000000000000 R09: 0000000000000000
    [21961.413372] R10: 0000000000000000 R11: 0000000000000293 R12: 000037f2010c7500
    [21961.413373] R13: 00007fff3de488d0 R14: 00007fff3de48880 R15: 00007f5e90b56720
    [21961.413373] FS:  00007f5e81d9f180 GS:  0000000000000000
    [21961.413557] CPU: 2 PID: 173828 Comm: chromium Not tainted 5.10.102.1-microsoft-standard-WSL2 #1
    [21961.414891] RIP: 0033:0x55ff83acff78
    [21961.415027] Code: ff 0f 57 c0 0f 11 05 c7 7b 3d 06 0f 11 05 b0 7b 3d 06 48 8d 3d c9 7b 3d 06 ff 15 63 58 31 06 e9 85 fd ff ff e8 79 2f b5 05 cc <0f> 0b cc 0f 0b cc 0f 0b 55 48 89 e5 41 57 41 56 41 55 41 54 53 48
    [21961.415559] RSP: 002b:00007fffa53ccab0 EFLAGS: 00000246
    [21961.415708] RAX: 0000000000000000 RBX: 00007fffa53ccb00 RCX: 0000000000000000
    [21961.415949] RDX: 0000000000000100 RSI: 0000255c017d9200 RDI: 000055ff89ea7b30
    [21961.416170] RBP: 00007fffa53ccf50 R08: 0000000000000000 R09: 0000000000000000
    [21961.416414] R10: 0000000000000000 R11: 0000000000000293 R12: 0000255c017d9200
    [21961.416641] R13: 00007fffa53ccf60 R14: 00007fffa53ccf10 R15: 00007f194473f720
    [21961.416900] FS:  00007f1935988180 GS:  0000000000000000
    [23947.109389] dxgk:err: is_handle_valid Entry is freed 40000080 2
    [23947.109390] dxgk:err: hmgrtable_get_object_by_type invalid handle 40000080
    [23947.109865] dxgk:err: adapter_by_handle failed 40000080
    [23947.112728] dxgk:err: is_handle_valid Entry is freed 40000080 2
    [23947.112729] dxgk:err: hmgrtable_get_object_by_type invalid handle 40000080
    [23947.113101] dxgk:err: adapter_by_handle failed 40000080
    [23947.116372] dxgk:err: is_handle_valid Entry is freed 40000080 2
    [23947.116373] dxgk:err: hmgrtable_get_object_by_type invalid handle 40000080
    [23947.116746] dxgk:err: adapter_by_handle failed 40000080
    [23947.118573] dxgk:err: is_handle_valid Entry is freed 40000080 2
    [23947.118573] dxgk:err: hmgrtable_get_object_by_type invalid handle 40000080
    [23947.119070] dxgk:err: adapter_by_handle failed 40000080
    [23947.816776] dxgk:err: is_handle_valid Entry is freed 40000080 2
    [23947.816777] dxgk:err: hmgrtable_get_object_by_type invalid handle 40000080
    [23947.817523] dxgk:err: adapter_by_handle failed 40000080
    [23964.528648] dxgk:err: is_handle_valid Entry is freed 40000080 2
    [23964.528649] dxgk:err: hmgrtable_get_object_by_type invalid handle 40000080
    [23964.529305] dxgk:err: adapter_by_handle failed 40000080
    [23964.530394] dxgk:err: is_handle_valid Entry is freed 40000080 2
    [23964.530395] dxgk:err: hmgrtable_get_object_by_type invalid handle 40000080
    [23964.530808] dxgk:err: adapter_by_handle failed 40000080
    [23964.533869] dxgk:err: is_handle_valid Entry is freed 40000080 2
    [23964.533870] dxgk:err: hmgrtable_get_object_by_type invalid handle 40000080
    [23964.534292] dxgk:err: adapter_by_handle failed 40000080
    [23964.535979] dxgk:err: is_handle_valid Entry is freed 40000080 2
    [23964.535979] dxgk:err: hmgrtable_get_object_by_type invalid handle 40000080
    [23964.536594] dxgk:err: adapter_by_handle failed 40000080
    [23964.803901] dxgk:err: is_handle_valid Entry is freed 40000080 2
    [23964.803903] dxgk:err: hmgrtable_get_object_by_type invalid handle 40000080
    [23964.804530] dxgk:err: adapter_by_handle failed 40000080
    [24069.016140] dxgk:err: is_handle_valid Entry is freed 40000080 2
    [24069.016141] dxgk:err: hmgrtable_get_object_by_type invalid handle 40000080
    [24069.016757] dxgk:err: adapter_by_handle failed 40000080
    [24069.017923] dxgk:err: is_handle_valid Entry is freed 40000080 2
    [24069.017924] dxgk:err: hmgrtable_get_object_by_type invalid handle 40000080
    [24069.018325] dxgk:err: adapter_by_handle failed 40000080
    [24069.021500] dxgk:err: is_handle_valid Entry is freed 40000080 2
    [24069.021500] dxgk:err: hmgrtable_get_object_by_type invalid handle 40000080
    [24069.021942] dxgk:err: adapter_by_handle failed 40000080
    [24069.023642] dxgk:err: is_handle_valid Entry is freed 40000080 2
    [24069.023643] dxgk:err: hmgrtable_get_object_by_type invalid handle 40000080
    [24069.024138] dxgk:err: adapter_by_handle failed 40000080
    [24069.320611] dxgk:err: is_handle_valid Entry is freed 40000080 2
    [24069.320613] dxgk:err: hmgrtable_get_object_by_type invalid handle 40000080
    [24069.321192] dxgk:err: adapter_by_handle failed 40000080
    

    chromium stdout:

    [271089:271110:0506/133557.180694:ERROR:bus.cc(398)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
    [271089:271110:0506/133557.180745:ERROR:bus.cc(398)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
    [271089:271110:0506/133557.189518:ERROR:bus.cc(398)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
    [271089:271110:0506/133557.189576:ERROR:bus.cc(398)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
    [271089:271110:0506/133557.204677:ERROR:bus.cc(398)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
    [271089:271110:0506/133557.204737:ERROR:bus.cc(398)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
    [271089:271185:0506/133557.238982:ERROR:object_proxy.cc(623)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files
    [271089:271185:0506/133557.239143:ERROR:object_proxy.cc(623)] Failed to call method: org.freedesktop.UPower.GetDisplayDevice: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files
    [271089:271185:0506/133557.239272:ERROR:object_proxy.cc(623)] Failed to call method: org.freedesktop.UPower.EnumerateDevices: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files
    libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
    [271119:271119:0506/133558.882850:ERROR:gpu_memory_buffer_support_x11.cc(44)] dri3 extension not supported.
    

    Expected behavior

    WSLg to not crash,

    Actual behavior

    Eventually, I see the chromium process exit, but the window remains, is un-interactable (no dragging, etc) and does not respond to standard hotkeys such as Alt+F4

    Future GUI applications launched within the environment will silently not appear, with dxgk errors in dmesg

    Notes

    I often see this happen when launching / closing many instances in parallel, e.g. when running large webapp integration test suites through selenium.

    The only way I've found to recover WSLg at this point is to call wsl.exe --shutdown and relaunch the environments.

    GUI applications do still function in the background, our test runner is able to continue interacting with new browsers.

    bug GPU 
    opened by kageurufu 7
Releases(v1.0.28)
Owner
Microsoft
Open source projects and samples from Microsoft
Microsoft
Simple useful interoperability tests for WebRTC libraries. If you are a WebRTC library developer we'd love to include you!

Overview This project aims to be a convenient location for WebRTC library developers to perform interoperability tests. Who can Participate The projec

Aaron Clauson 89 Apr 29, 2022
A cross-platform SDK enabling developers to integrate real-time chat technology into their projects

4Players ODIN SDK ODIN is a cross-platform software development kit (SDK) that enables developers to integrate real-time chat technology into multipla

4Players 4 Feb 20, 2022
wl-mirror - a simple Wayland output mirror client

wl-mirror - a simple Wayland output mirror client wl-mirror attempts to provide a solution to sway's lack of output mirroring by mirroring an output o

Ferdinand Bachmann 66 May 11, 2022
designed for debug Espressif's ESP series chips, include ESP32/ESP32-S2/ESP32-C3/ESP32-S3...

ESPLink 中文 ESPLink Introduce Features Pin Description esplink-tool Product Link Reference ESPLink Introduce ESPLink is a debug tool build for Expressi

wuxx 14 May 17, 2022
Windows named pipe server that forwards connections to given TCP server

PipeTcp An asynchronous Windows named pipe server that forwards connections to given TCP server. Pre-built binaries can be found in Releases. Invocati

Jinoh Kang 3 Nov 16, 2021
Free Media Player for Windows and Linux with Youtube support.

SMPLAYER SMPlayer is a free media player for Windows and Linux with Youtube support.

Ricardo 235 May 15, 2022
C++ FTP Server Library for Windows, Linux & more

fineFTP Server FineFTP is a minimal FTP server library for Windows and Unix flavors. The project is CMake based and only depends on asio, which is int

Continental 158 May 10, 2022
Cross-platform, single .h file HTTP server (Windows, Linux, Mac OS X)

EWS - Single .h File C Embeddable Web Server Latest Version: 1.1.4 released September 9, 2021 Supported platforms: Linux, Mac OS X, Windows License: B

Forrest Heller 74 May 18, 2022
Ultra fast and low latency asynchronous socket server & client C++ library with support TCP, SSL, UDP, HTTP, HTTPS, WebSocket protocols and 10K connections problem solution

CppServer Ultra fast and low latency asynchronous socket server & client C++ library with support TCP, SSL, UDP, HTTP, HTTPS, WebSocket protocols and

Ivan Shynkarenka 834 May 18, 2022
Gromox - Groupware server backend with MAPI/HTTP, RPC/HTTP, IMAP, POP3 and PHP-MAPI support for grommunio

Gromox is the central groupware server component of grommunio. It is capable of serving as a replacement for Microsoft Exchange and compatibles. Conne

grommunio 115 Apr 2, 2022
9front http server with basic CGI support

tcp80x tcp80x is an HTTP server with some pseudo-CGI support. This is a merger of execfs and tcp80, both written by cinap_lenrek. Installation: Instal

phil9 4 Nov 27, 2021
LAppS - Lua Application Server for micro-services with default communication over WebSockets. The fastest and most vertically scalable WebSockets server implementation ever. Low latency C++ <-> Lua stack roundtrip.

LAppS - Lua Application Server This is an attempt to provide very easy to use Lua Application Server working over WebSockets protocol (RFC 6455). LApp

null 47 Apr 25, 2022
A project designed for the esp8266 D1 Mini or the esp8266 D1 Mini PRO to provide a wifi http server and dns server.

PS4 Server 9.00 This is a project designed for the esp8266 D1 Mini or the esp8266 D1 Mini PRO to provide a wifi http server and dns server. this is fo

null 12 May 1, 2022
Realtime Client/Server app for Linux allowing joystick (and other HID) data to be transferred over a local network

netstick What is it? Netstick enables HID devices to be remotely connected between a "client" and "server" over a network connection. It allows the ke

null 26 Apr 18, 2022
Event-driven network library for multi-threaded Linux server in C++11

Muduo is a multithreaded C++ network library based on the reactor pattern. http://github.com/chenshuo/muduo Copyright (c) 2010, Shuo Chen. All righ

Shuo Chen 11.3k May 15, 2022
web server that will print hello world on the screen only for linux users

a simple http server side lib only for linux users Note: This lib is currently under development you can check the source code and even use it but dn'

notaweeb 11 Mar 14, 2021
Dolphin is an emulator for running GameCube and Wii games on Windows, Linux, macOS, and recent Android devices.

Dolphin is a GameCube / Wii emulator, allowing you to play games for these two platforms on PC with improvements.

Dolphin Emulator 8.6k May 11, 2022
Header-only C++14 library for getting network addresses associated with network interface without name lookups on Windows, macOS, Linux, and FreeBSD

NetIF Get addresses associated with network interfaces on a system without using name lookups. Header-only, requires C++14. Usage Add the header file

GMLC-TDC 9 Feb 4, 2022
Graphical small-internet client for windows, linux, MacOS X and BSDs. Supports gemini, http, https, gopher, finger.

Graphical small-internet client for windows, linux, MacOS X and BSDs. Supports gemini, http, https, gopher, finger.

Felix Queißner 531 May 15, 2022