Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GUI applications no longer display after enabling systemd #8896

Closed
kmmiles opened this issue Sep 22, 2022 · 8 comments
Closed

GUI applications no longer display after enabling systemd #8896

kmmiles opened this issue Sep 22, 2022 · 8 comments
Labels

Comments

@kmmiles
Copy link

kmmiles commented Sep 22, 2022

Windows build number:

25201.1000

Your Distribution version:

Debian 11, Ubuntu 20.04.4, Ubuntu 22.04, and Fedora 35

Your WSL versions:

WSL version: 0.67.6.0
Kernel version: 5.15.62.1
WSLg version: 1.0.44
MSRDC version: 1.2.3401
Direct3D version: 1.606.4
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.25201.1000

Steps to reproduce:

  1. Follow the instructions from the announcement here: https://devblogs.microsoft.com/commandline/systemd-support-is-now-available-in-wsl/

  2. After modifying /etc/wsl.conf to enable systemd and restarting with wsl --shutdown, try running a GUI program e.g. xeyes

  3. Disabling systemd and restarting eliminates the issue.

WSL logs:

pulseaudio.log
stderr.log
weston.log

I also compared the logs with with systemd enabled and disabled, and found something unique in stderr.log:

  <3>WSLGd: Exception: No such file or directory @../ProcessMonitor.cpp:72 (LaunchProcess)
  <4>WSLGd: /mnt/c/Users/kenne/AppData/Local/Microsoft/WindowsApps/MicrosoftCorporationII.WindowsSubsystemForLinux_8wekyb3d8bbwe/msrdc.exe exited with status
  1.
  <3>WSLGd: Exception: No such file or directory @../ProcessMonitor.cpp:72 (LaunchProcess)
  <4>WSLGd: /mnt/c/Users/kenne/AppData/Local/Microsoft/WindowsApps/MicrosoftCorporationII.WindowsSubsystemForLinux_8wekyb3d8bbwe/msrdc.exe exited with status
  1.
  <3>WSLGd: Exception: No such file or directory @../ProcessMonitor.cpp:72 (LaunchProcess)
  <4>WSLGd: /mnt/c/Users/kenne/AppData/Local/Microsoft/WindowsApps/MicrosoftCorporationII.WindowsSubsystemForLinux_8wekyb3d8bbwe/msrdc.exe exited with status
  1.
  <3>WSLGd: Exception: No such file or directory @../ProcessMonitor.cpp:72 (LaunchProcess)
  <4>WSLGd: /mnt/c/Users/kenne/AppData/Local/Microsoft/WindowsApps/MicrosoftCorporationII.WindowsSubsystemForLinux_8wekyb3d8bbwe/msrdc.exe exited with status   1.
  <3>WSLGd: Exception: No such file or directory @../ProcessMonitor.cpp:72 (LaunchProcess)

WSL dumps:

No response

Expected behavior:

wslg-systemd-expected

Actual behavior:

wslg-systemd-actual

@kmmiles kmmiles added the bug label Sep 22, 2022
@kmmiles
Copy link
Author

kmmiles commented Sep 22, 2022

So I just noticed that 25206.1000 is available now. I'll update tonight and report whether that changes anything.

@diglateam3
Copy link

@kmmiles , do you provide result of ls -al /tmp/.X11-unix ?
Example:

$ ls -al /tmp/.X11-unix
total 4
drwxrwxrwx  2 root       root         60 Sep 23 07:01 .
drwxrwxrwt 16 root       root       4096 Sep 23 07:02 ..
srwxrwxrwx  1 diglateam3 diglateam3    0 Sep 23 07:01 X0

And, do you installed xserver on distribution?
xserver installed and systemd enabled, distribution is initialize local X socket instead provided WSLg on my environment.

$ ls -al /tmp/.X11-unix
total 4
drwxrwxrwx  2 root       root         60 Sep 23 07:01 .
drwxrwxrwt 16 root       root       4096 Sep 23 07:02 ..

Removing xserver-common solved the problem. but, this would make the X app window disappear if systemd disabled.

And, will Wayland native apps (e.g. weston-flower) work?

Windows build number:

22621.521

Your Distribution version:

Ubuntu 22.04.1 LTS

Your WSL versions:

WSL Version: 0.67.6.0
Kernel version: 5.15.62.1
WSLg version: 1.0.44
MSRDC version: 1.2.3401
Direct3D version: 1.606.4
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22621.521

@kmmiles
Copy link
Author

kmmiles commented Sep 23, 2022

Thanks for ideas @diglateam3

I ended up installing the latest windows update (25206.1000), then installed a clean Ubuntu 22.04 and sudo apt install weston x11-apps. Now both xeyes and weston-flower work, and they work regardless of whether or not systemd is enabled. More interesting is that x11-common is indeed installed, and to note:

wsl@IDEAPAD:~$ /bin/ls -al /tmp/.X11-unix
total 4
drwxrwxrwx 2 root root   60 Sep 22 19:11 .
drwxrwxrwt 7 root root 4096 Sep 22 19:11 ..
srwxrwxrwx 1 wsl  wsl     0 Sep 22 19:11 X0

I'm glad it works now, but not really sure what the root cause was.

@tusharsnx
Copy link

tusharsnx commented Sep 23, 2022

I am not sure if it really solved the issue, as you just installed Weston within the user distro (ubuntu). So now when you enable systemd it runs Weston inside the user distro while if it's disabled then Weston is running inside the system distro. GUI apps are working fine with systemd disabled as you mentioned.

We need to make sure that you are using wslg's weston. Run ps aux | grep weston within your distro and see if it produces any result.

@Gerdya
Copy link

Gerdya commented Sep 23, 2022

On my system the issue is as follows:

Without systemd (X is working):

:~$ ls -al /tmp/.X11-unix/
total 4
drwxrwxrwx  2 root   root     60 Sep 23 17:46 .
drwxrwxrwt 19 root   root   4096 Sep 23 17:46 ..
srwxrwxrwx  1 gerdya gerdya    0 Sep 23 17:46 X0

i:~$ ls -al /mnt/wslg/.X11-unix/
total 0
drwxrwxrwx 2 root   root    60 Sep 23 17:46 .
drwxrwxrwt 7 root   root   280 Sep 23 17:46 ..
srwxrwxrwx 1 gerdya gerdya   0 Sep 23 17:46 X0

With systemd (X is not working):

:/$ ls -al /tmp/.X11-unix/
total 4
drwxrwxrwx  2 root root   60 Sep 23 15:22 .
drwxrwxrwt 19 root root 4096 Sep 23 15:28 ..
lrwxrwxrwx  1 root root   22 Sep 23 15:22 X0 -> /mnt/wslg/.X11-unix/X0

:/$ ls -al /mnt/wslg/.X11-unix/
total 0
drwxrwxrwx 2 root root  60 Sep 23 15:22 .
drwxrwxrwt 7 root root 280 Sep 23 15:23 ..
lrwxrwxrwx 1 root root  22 Sep 23 15:22 X0 -> /mnt/wslg/.X11-unix/X0

The symbolic links look dubious to me when systemd is enabled.

@hideyukn88 hideyukn88 transferred this issue from microsoft/wslg Sep 26, 2022
@Anutrix
Copy link

Anutrix commented Dec 20, 2022

Same issue. I use kali-linux WSL on latest slow-ring/stable available Windows version 22621.963.
WSL version:

> 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.963

Issue seen after systemd was turned on. The following is with systemd enabled but GUI not working:

> ls -la /tmp/.X11-unix
total 4
drwxrwxrwx  2 root    root      60 Dec 20 17:02 .
drwxrwxrwt 29 root    root    4096 Dec 20 18:36 ..
srwxrwxrwx  1 xxxxxxx xxxxxxx    0 Dec 20 17:02 X0
> ls -al /mnt/wslg/.X11-unix/
total 0
drwxrwxrwx 2 root    root     60 Dec 20 17:02 .
drwxrwxrwt 7 root    root    260 Dec 20 17:03 ..
srwxrwxrwx 1 xxxxxxx xxxxxxx   0 Dec 20 17:02 X0

@nullbyto
Copy link

Same problem when trying to start GUI apps on my Ubuntu 20.04.
WSL:

> 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.19045.2486

Copy link
Contributor

This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants