Fresh Win11 & Fresh WSL2 Ubuntu install, no X apps work, Xwayland process runaway (Nvidia)
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 11.9k
- Forks
- 429
- PR merge metrics
- No merged PRs in 30d
Description
Windows build number:
Microsoft Windows [Version 10.0.22621.1265]
Your Distribution version:
Ubuntu 22.04
Your WSL versions:
C:\Users\xasmo>wsl --version
WSL version: 1.0.3.0
Kernel version: 5.15.79.1
WSLg version: 1.0.47
MSRDC version: 1.2.3575
Direct3D version: 1.606.4
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22621.1265
Steps to reproduce:
- Install Windows 11
- Install Nvidia drivers
- reboot
- Install/Configure WSL2 per https://learn.microsoft.com/en-us/windows/wsl/tutorials/gui-apps
- reboot
- Install Ubuntu in WSL2 with
wsl --install Ubuntu - Launch Ubuntu
- Configure first time username/password
sudo apt updatesudo apt install x11-appsxeyes- observe that xeyes attempts to launch, but hangs, no GUI window ever appears, and no message appears
WSL logs:
stderr.log
versions.txt
weston.log
wlog.log
pulseaudio.log
WSL dumps:
No dumps generated
Expected behavior:
xeyes launches and a new window appears in Windows containing the xeyes GUI application
Actual behavior:
xeyes and all other X11/Wayland apps attempt to launch but either hang or never attach to any socket suitable for displaying graphical windows. Opening wsl --system and then top shows that process /usr/bin/Xwayland :0 -rootless -core -listen 38 -wm 39 -terminate -nolisten local -ac is pegging one CPU core at 100%
Diagnostic Logs
Show GPU hardware in Ubuntu
nvidia-smi:
Sun Feb 26 21:30:18 2023
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.89.02 Driver Version: 528.49 CUDA Version: 12.0 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce ... On | 00000000:00:09.0 On | N/A |
| 29% 33C P8 20W / 250W | 1494MiB / 11264MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 23 G /Xwayland N/A |
+-----------------------------------------------------------------------------+
Notice that Nvidia GPU card is correctly identified and we even see the XWayland process running
strace
strace -ff xeyes :
sysinfo({uptime=1668, loads=[65536, 65536, 58304], totalram=25200570368, freeram=24596684800, sharedram=2478080, bufferram=24899584, totalswap=6442450944, freeswap=6442450944, procs=187, totalhigh=0, freehigh=0, mem_unit=1}) = 0
socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0) = 3
connect(3, {sa_family=AF_UNIX, sun_path=@"/tmp/.X11-unix/X0"}, 20) = -1 ECONNREFUSED (Connection refused)
close(3) = 0
socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0) = 3
getsockopt(3, SOL_SOCKET, SO_SNDBUF, [212992], [4]) = 0
connect(3, {sa_family=AF_UNIX, sun_path="/tmp/.X11-unix/X0"}, 110
Notice strace appears to hang on the last line forever
Xwayland is running away
From Elevated cmd: wsl --system, then top

Xwayland process starts immediately after wsl --shutdown and a re-launch of Ubuntu, even without attempting to run a GUI app in Ubuntu, xwayland will peg 100% cpu after about 2 seconds
/tmp/.X11-unix is mounted and shared with WSL core
mount | grep .X11:
none on /tmp/.X11-unix type tmpfs (ro,relatime)
touch /tmp/.X11-unix/something
ls -lah /tmp/.X11-unix
total 4.0K
drwxrwxrwx 2 root root 80 Feb 26 21:00 .
drwxrwxrwt 3 root root 4.0K Feb 26 20:47 ..
srwxrwxrwx 1 xasmodeanx xasmodeanx 0 Feb 26 20:58 X0
-rw-r--r-- 1 root root 0 Feb 26 21:00 something
ls -lah /mnt/wslg/.X11-unix
total 0
drwxrwxrwx 2 root root 80 Feb 26 21:00 .
drwxrwxrwt 7 root root 280 Feb 26 20:58 ..
srwxrwxrwx 1 xasmodeanx xasmodeanx 0 Feb 26 20:58 X0
-rw-r--r-- 1 root root 0 Feb 26 21:00 something
wsl --system shows we can read/write files between Ubuntu and WSL Core
Ubuntu environment variables are unremarkable
printenv
SHELL=/bin/bash
WSL2_GUI_APPS_ENABLED=1
WSL_DISTRO_NAME=Ubuntu
NAME=win11gaming
PWD=/tmp/.X11-unix
LOGNAME=xasmodeanx
HOME=/home/xasmodeanx
LANG=C.UTF-8
WSL_INTEROP=/run/WSL/9_interop
LS_COLORS=...
WAYLAND_DISPLAY=wayland-0
LESSCLOSE=/usr/bin/lesspipe %s %s
TERM=xterm-256color
LESSOPEN=| /usr/bin/lesspipe %s
USER=xasmodeanx
DISPLAY=:0
SHLVL=1
XDG_RUNTIME_DIR=/mnt/wslg/runtime-dir
WSLENV=
XDG_DATA_DIRS=/usr/local/share:/usr/share:/var/lib/snapd/desktop
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Program Files/NVIDIA Corporation/NVIDIA NvDLISR:/mnt/c/Users/xasmo/AppData/Local/Microsoft/WindowsApps:/snap/bin
HOSTTYPE=x86_64
PULSE_SERVER=/mnt/wslg/PulseServer
OLDPWD=/home/xasmodeanx
_=/usr/bin/printenv
Other diagnostic info
cat /mnt/wslg/versions.txt
WSLg ( x86_64 ): 1.0.47+Branch.main.Sha.77aa1e2f49e1253cde9ceb9124ca0873eb3eadf2
Mariner: VERSION="2.0.20221010"
DirectX-Headers:
mesa:
pulseaudio: 2f0f0b8c3872780f15e275fc12899f4564f01bd5
FreeRDP: c574044a10003e50453acb4cf42801c5833fb572
weston: e7e91e17f370702f386c843cf9014cc4bcef4179
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the xeyes hang in the stated Windows 11, Ubuntu 22.04, WSL2, and Nvidia setup, then inspect stderr.log, weston.log, wlog.log, pulseaudio.log, versions.txt, and the provided strace output. Use wsl --system and top to confirm the Xwayland CPU behavior; done means X11 and Wayland apps open normally without a runaway Xwayland process.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, ubuntu
- Domain
- desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100