microsoft / wslg

Enabling the Windows Subsystem for Linux to include support for Wayland and X server related scenarios
MIT License
10.1k stars 304 forks source link

WSLg does not open any window / register any GUI apps on start #1191

Closed gyutaepark closed 7 months ago

gyutaepark commented 8 months ago

Windows build number:

22631.0

Your Distribution version:

22.04

Your WSL versions:

WSL version: 2.0.14.0 Kernel version: 5.15.133.1-1 WSLg version: 1.0.59 MSRDC version: 1.2.4677 Direct3D version: 1.611.1-81528511 DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows version: 10.0.22631.3007

Steps to reproduce:

  1. Run gui app (e.g. glxgears, firefox, xcalc)
  2. Wait for GUI to open
  3. No GUI window spawns

For glxgears, no window launches, but the frame rate readings will start printing nevertheless.

WSL logs:

weston.log

WSL dumps:

No response

Expected behavior:

GUI window opens when running apps such as firefox, glxgears, xcalc, etc. GUI apps in WSL gets registered to Windows Start

As per the Diagnosing "cannot open display" type issues with WSLg, I'm attaching the results for the various WSLg versions.

(base) (15:57) user@park ~ $ cat /mnt/wslg/versions.txt
WSLg ( x86_64 ): 1.0.59+Branch.main.Sha.2bffa4a1867601b1fd0e3c7bb59ada9f6131c28e
Mariner: VERSION="2.0.20230630"
DirectX-Headers:
mesa:
pulseaudio: 6f045ff0dca233a939a2aba815f84d177e294122
FreeRDP: c4030980b29322a9cb2190711a5fadeeeb8b6a33
weston: 1c19fc5ecdd4552f36f77256e1fb53225801aff0

(base) (15:57) user@park ~ $ echo $DISPLAY
:0

(base) (15:57) user@park ~ $ ls -la /tmp/.X11-unix
total 12K
drwxrwxrwx  2 root root  60 Feb  3 15:36 .
drwxrwxrwt 14 root root 12K Feb  3 15:36 ..
srwxrwxrwx  1 user user   0 Feb  3 15:36 X0

(base) (15:58) user@park ~ $ ls -la /tmp/.X11-unix/
total 12K
drwxrwxrwx  2 root root  60 Feb  3 15:36 .
drwxrwxrwt 14 root root 12K Feb  3 15:36 ..
srwxrwxrwx  1 user user   0 Feb  3 15:36 X0

Actual behavior:

No window opens, but the program seems to run anyway.

image

(to add, no wslg.exe was found to be running on my Task Manager when I ran the glxgears)

gyutaepark commented 7 months ago

Managed to fix it. Although, windows snapping still doesn't work.

EDIT: issue had been a setting on my group policy with regards to remote connection security or device guard. Since I naively changed both and restarted WSL, I'm not too sure which.