microsoft / wslg

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

GNOME desktop freezes when using X forwarding to connect #1162

Closed Heng-Zhou closed 6 months ago

Heng-Zhou commented 6 months ago

Windows Version

Microsoft Windows [Version 10.0.19045.3693]

WSL Version

WSL version: 2.0.9.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.19045.3693

Are you using WSL 1 or WSL 2?

Kernel Version

Default Distribution: Ubuntu Default Version: 2

Distro Version

Ubuntu 22.04

Other Software

VcXsrv 1.20.14.0

Repro Steps

After installing WSL2 using wsl --install -d ubuntu, I run the following commands:

Next I follow the scripts wsl2-setup-desktop-gnome.sh here. Note that there is a typo in line 24 of this script: --fil> should be --file=/etc/sudoers.d/$USER. Instead of running the scripts as a whole, I run it command by command so that I can have a better control of the execution. I add export LIBGL_ALWAYS_INDIRECT=1 to 02_start_desktop.sh and run sudo systemctl start dbus before gnome-session as suggested by the author, but these changes make no difference.

Before running gnome-session, I started VcXsrv. During starting (running XLaunch), I unchecked "Native opengl" and checked "Disable access control".

Please let me know if you have any questions in reproducing the issue.

Expected Behavior

There is no window frozen on GNOME desktop. Activities menu shows up.

Actual Behavior

GNOME desktop in Ubuntu 22.04 freezes, so the "Authentication required" dialog for creating a color managed device, the Ubuntu Pro dialog that opens at the start of GNOME, and some other window I opened in GNOME like geditor cover the desktop and I have no way to move or remove them. Activities including docker works well at first, but after a few restart, it disappeared, and the whole desktop is an error "Oh, No! Something has gone wrong." In the "Authentication required" dialog and search bar of Activities, I cannot type anything.

The script wsl2-setup-desktop-gnome.sh which starts GNOME works on a normal Ubuntu machine. It has so many problems in the guest Ubuntu inside WSL, so I think it is the WSL's problem.

WslLogs-2023-12-11_04-23-37.zip

Diagnostic Logs

No response