-
Notifications
You must be signed in to change notification settings - Fork 310
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 will no longer launch in Wayland after updating #1032
Comments
@c4artisan, would you please share WSL version from |
Is it somehow related to #1030 ? Google-chrome and other electron apps failed to open with error
symlinking wayland-0 from /mnt/wslg/runtime-dir
Now chrome and electron based apps open. Also gedit / gnome apps also open instantly. |
pulseaudio.log wsl version 1.2.0.0 |
chrome has no problems booting up for me at least |
Same here, emacs (pure gtk) stopped working in wayland since this morning. The symlink trick seems to fix it. |
the symlink trick did it. now we have to wait for an official fix |
@c4artisan, thanks for info, but I do not observe this issue with the WSL version you have noted. But it's possible some of Ubuntu systemd unit might be deleting them. As a matter of fact, their gdm unit deletes X11 sockets, so WSL is monitoring that to restablish if that's happen, so it's possible that same is required for Wayland socket. Would you please share output from
|
systemctl -t service
ls -l /run/user/1000/
Interesting thing is pipewire socket is present here. But not wayland. Ubuntu 22.04.2 LTS.
I forgot to mention, I had ozone-platform=wayland etc flags set in both chrome and electron apps. By default these run on X, but I run these on wayland, that why I get error if wayland socket is not present. |
I had the same issue on Debian 11. Symlink did the trick: |
Same issue here. Ubuntu 22.04 |
Thanks for all reporting the issue, would you please try if this still occurs if systemd is disabled? thanks! |
@hideyukn88 without systemd, With systemd enabled |
LOAD = Reflects whether the unit definition was properly loaded. have no idea if the symlink thing changed anything so don't trust this log too much |
Thanks all for sharing the info, now we understood the issue and working on the fix, thanks! |
FYI: https://github.com/microsoft/WSL/releases/tag/1.2.2 contains the fix. |
yep after updating it's fixed |
After updating, wayland socket is created in correct /run/user/1000 and gedit starts instantly too. so Fixed.
Hopefully in future more testing would be done before changing something as important as /run/user/ :) Many service and stuff has things in there. |
If I want the fix here, am I good to install Microsoft.WSL_1.2.2.0_x64_ARM64.msixbundle and I'll still continue to get updates automatically from Windows in the future, or should I just wait for Windows Update to roll around with a fix? |
@pkkid, yes, you can manually download, or you can try |
This problem seems to have reappeared in the latest version, I tried using ln to fix it |
Also can confirm that I am dealing with this issue as well, the link fixes it. |
this issue exists in the latest version of wsl. I dealt with it by adding the following to my if grep -qEi "(Microsoft|WSL)" /proc/version &>/dev/null; then
find "/mnt/wslg/runtime-dir/" -name 'wayland*' -exec basename {} \; | xargs -r -I {} ln -sf /mnt/wslg/runtime-dir/{} /run/user/$(id -u)/{}
fi I also had issues with X11 mount which I fixed by updating my ❯ cat /etc/tmpfiles.d/wslg.conf
# Type Path Mode UID GID Age Argument
L+ /tmp/.X11-unix/X0 - - - - /mnt/wslg/.X11-unix/X0
❯ wsl --version
WSL version: 2.3.17.0
Kernel version: 5.15.153.1-2
WSLg version: 1.0.64
MSRDC version: 1.2.5326
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.26120.1542
❯ cat /mnt/wslg/versions.txt
WSLg ( x86_64 ): 1.0.64+Branch.main.Sha.8159bf9e5c474075665850afea5c60bdd34afd98
Built at: Mon Jul 29 22:52:44 UTC 2024
Mariner: VERSION="2.0.20240609"
DirectX-Headers:
mesa:
pulseaudio: 6f045ff0dca233a939a2aba815f84d177e294122
FreeRDP: c4030980b29322a9cb2190711a5fadeeeb8b6a33
weston: f227edd681479ec3cb2290a25d84d2d3462aebfa |
WSL Symlink FixSummarySo , to sum up, it seems like there are two issues at least based on my
X11 Symlink Fixuse
Wayland Symlink Fixcreate a systemd oneshot user service that setsup the symlinks: mkdir -p "${HOME}/.config/systemd/user"
cat <<"EOF" > "${HOME}/.config/systemd/user/wsl-wayland-symlink.service"
[Unit]
Description=Create Wayland symlinks for WSL
After=default.target
[Service]
Type=oneshot
ExecStart=/bin/sh -c 'USER_ID=$(id -u); find /mnt/wslg/runtime-dir -name "wayland-*" -type s -exec ln -sf {} /run/user/$USER_ID/ \;'
[Install]
WantedBy=default.target
EOF
systemctl --user daemon-reload
systemctl --user enable wsl-wayland-symlink.service
systemctl --user start wsl-wayland-symlink.service run additional context
❯ Get-ComputerInfo | Select-Object OsName, OsVersion, WindowsVersion, OsBuildNumber
OsName OsVersion WindowsVersion OsBuildNumber
------ --------- -------------- -------------
Microsoft Windows 11 Pro 10.0.26120 2009 26120
❯ wsl --version
WSL version: 2.3.17.0
Kernel version: 5.15.153.1-2
WSLg version: 1.0.64
MSRDC version: 1.2.5326
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.26120.1542
❯ wsl cat /mnt/wslg/versions.txt
WSLg ( x86_64 ): 1.0.64+Branch.main.Sha.8159bf9e5c474075665850afea5c60bdd34afd98
Built at: Mon Jul 29 22:52:44 UTC 2024
Mariner: VERSION="2.0.20240609"
DirectX-Headers:
mesa:
pulseaudio: 6f045ff0dca233a939a2aba815f84d177e294122
FreeRDP: c4030980b29322a9cb2190711a5fadeeeb8b6a33
weston: f227edd681479ec3cb2290a25d84d2d3462aebfa
❯ wsl freshfetch
-` damoon@zenbook-duo
.o+`
`ooo/ OS: Arch Linux x86_64
`+oooo: Kernel: Linux 5.15.153.1-microsoft-standard-WSL2
`+oooooo: Uptime: 16 minutes
-+oooooo+: Packages: 959 (pacman)
`/:-:++oooo+: Shell: bash
`/++++/+++++++: CPU: Intel Core Ultra 9 185H (22) @ 3.0719990730286MHz
`/++++++++++++++: Memory: 737MB / 15675MB
`/+++ooooooooooooo/`
./ooosssso++osssssso+`
.oossssso-````/ossssss+`
-osssssso. :ssssssso.
:osssssss/ osssso+++.
/ossssssss/ +ssssooo/-
`/ossssso+/:- -:/+osssso+-
`+sso+:-` `.-/+oso:
`++:. `-/+/
.` `/ |
worked |
The symlink trick did it for me on WSL 2.3.24.0 |
I liked the tmpfiles approach, so I used it instead of the system service method
|
Fixed all my problems. |
Windows Version
Microsoft Windows [Versión 10.0.22624.1537]
WSL Version
1.1.7.0
Are you using WSL 1 or WSL 2?
Kernel Version
Linux version 6.1.21.1-microsoft-standard-WSL2+ (root@40c8f3c2f8c6) (gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.37) microsoft/WSL#1 SMP Tue Mar 28 20:13:51 UTC 2023
Distro Version
Ubuntu 22.04 (Jammy Jellyfish/jammy)
Other Software
GNOME Files (nautilus)
Repro Steps
Update to the latest version of WSL (and maybe have used CMake or GCC tools before?)
Launch Ubuntu
Type in "nautilus" (to launch Files)
Expected Behavior
The application would load in the fancy Wayland window style.
Actual Behavior
The window appears to load in X11?
Diagnostic Logs
appxpackage.txt
HKCU.txt
HKLM.txt
P9NP.txt
Winsock2.txt
wsl.wprp.txt
The text was updated successfully, but these errors were encountered: