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

Starting GUI apps takes longer with new version #1030

Open
castorfou opened this issue Apr 4, 2023 · 4 comments
Open

Starting GUI apps takes longer with new version #1030

castorfou opened this issue Apr 4, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@castorfou
Copy link

Windows build number:

10.0.19045.0

Your Distribution version:

22.04

Your WSL versions:

wsl --version
Version WSL : 1.1.7.0
Version du noyau : 6.1.21.1-1
Version WSLg : 1.0.51
Version MSRDC : 1.2.3770
Version direct3D : 1.608.2-61064218
Version de DXCore : 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Version de Windows : 10.0.19045.2728

Steps to reproduce:

  1. start WSL
  2. from ubuntu shell: nautilus&

I have tested with several applications: tilix, nautilus, firefox, sublime-text. Same behaviour.

WSL logs:

No response

WSL dumps:

No response

Expected behavior:

No response

Actual behavior:

  1. start nautilus
  2. wait ~1 min, and then it appears
  3. With previous version (WSL 1.1.6), this action took ~1 sec

And this is the same if I open a text file from nautilus for example. (launching sublime-text in my case, and if this app is not already launched, it takes ~1 min)

Graphical aspect of apps have changed with WSL 1.1.6, and I guess this is due to update of WSLg?

@castorfou castorfou added the bug Something isn't working label Apr 4, 2023
@sarim
Copy link

sarim commented Apr 10, 2023

Here is a strace https://gist.github.com/sarim/1169acffed9ec9f84decf516541bc9c9.

Its getting stuck at poll([{fd=11, events=POLLIN}], 1, 25000 . But if what 11 fd? What is other side of it? Seems like its a event polling something, created by eventfd.

Update; its hanging on dbus call.

method call time=1681149790.655386 sender=:1.6 -> destination=org.freedesktop.DBus serial=40 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=StartServiceByName
   string "org.freedesktop.impl.portal.desktop.gtk"
   uint32 0

Similar thread from 2020: issue with xdg-desktop-portal : https://bbs.archlinux.org/viewtopic.php?pid=1934134#p1934134

Removing it solved it for me: sudo apt remove xdg-desktop-portal*.

@castorfou can you check if it solves for you too?

@hideyukn88 Is xdg-desktop-portal somehow used for populating start menu entries with linux gui apps? Maybe it timing out from windows side? If not I have no idea what xdg-desktop-portal doing in wsl :/

@sarim
Copy link

sarim commented Apr 10, 2023

Okey Ignore my previous comment. I reinstalled xdg-desktop-portal and xdg-desktop-portal-gtk. Now it seems like the issue missing wayland-0 socket?

~ ➤ ls -l /run/user/1000/
total 0
srw-rw-rw- 1 gittu gittu   0 Apr 11 00:20 bus
drwx------ 3 gittu gittu  60 Apr 11 00:20 dbus-1
drwx------ 2 gittu gittu 140 Apr 11 00:20 gnupg
srw-rw-rw- 1 gittu gittu   0 Apr 11 00:20 pipewire-0
-rw-rw---- 1 gittu gittu   0 Apr 11 00:20 pipewire-0.lock
srw-rw-rw- 1 gittu gittu   0 Apr 11 00:20 pk-debconf-socket
drwxr-xr-x 2 gittu gittu  60 Apr 11 00:20 podman
drwxr-xr-x 4 gittu gittu 120 Apr 11 00:20 systemd
↪ ~ ➤ ln -s /mnt/wslg/runtime-dir/
dbus-1/         pulse/          wayland-0       wayland-0.lock
↪ ~ ➤ ln -s /mnt/wslg/runtime-dir/wayland-0* /run/user/1000/

Manually symlinking wayland-0* solves it too. gedit and other apps now open instantly. :/ :/

@castorfou
Copy link
Author

thank you @sarim

ln -s /mnt/wslg/runtime-dir/wayland-0* /run/user/1000/ helped me to open instantly gui apps as before.
But I had side effects. From time to time, I was unable to interact with app (move, close, ...), app icon in taskbar replaced by Tux,
...

I have then deleted the symlinks, and it continus to open instantly (even after a reboot) without any side effect. I am confused because I don't understand why, but happy as well;)

image

@sarim
Copy link

sarim commented Apr 13, 2023

The issue I linked #1032 and this seems to caused by same underlying issue. New wsl version 1.2.2 contains a fix. And after updating, wayland socket is created in correct /run/user/1000 and gedit starts instantly too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants