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

After Ubuntu 24.04 upgrade, GUI apps are extremely slow to open #1250

Open
amalrajan opened this issue May 30, 2024 · 23 comments
Open

After Ubuntu 24.04 upgrade, GUI apps are extremely slow to open #1250

amalrajan opened this issue May 30, 2024 · 23 comments
Labels
bug Something isn't working

Comments

@amalrajan
Copy link

amalrajan commented May 30, 2024

Windows build number:

10.0.22631.0

Your Distribution version:

Ubuntu 24.04

Your WSL versions:

2.1.5.0

Steps to reproduce:

  1. Run nohup nautilus > /dev/null 2>&1 & OR Windows Start Menu -> Launch nautilus Ubuntu app
  2. It takes 30-40 seconds for nautilus window to show up

If you simply do nautilus in terminal:

amalr@ubuntu ~ nautilus
** Message: 19:52:38.704: Connecting to org.freedesktop.Tracker3.Miner.Files
MESA: error: ZINK: failed to choose pdev
libEGL warning: egl: failed to create dri2 screen
MESA: error: ZINK: failed to choose pdev
glx: failed to create drisw screen

** (org.gnome.Nautilus:57971): WARNING **: 19:53:29.621: Unable to get contents of the bookmarks file: Error opening file /home/amalr/.gtk-bookmarks: No such file or directory

** (org.gnome.Nautilus:57971): WARNING **: 19:53:29.622: Unable to get contents of the bookmarks file: Error opening file /home/amalr/.gtk-bookmarks: No such file or directory

This applies to any app, not just nautilus.

WSL logs:

WslLogs-2024-05-30_18-12-37.zip

WSL dumps:

No response

Expected behavior:

Before upgrading to Ubuntu 24.04, launching GUI apps were instantaneous.

Actual behavior:

After upgrading to Ubuntu 24.04, launching GUI apps takes 30-40 seconds.

@amalrajan amalrajan added the bug Something isn't working label May 30, 2024
@amalrajan amalrajan changed the title GUI apps are extremely slow to open After Ubuntu 24.04 upgrade, GUI apps are extremely slow to open May 31, 2024
@amalrajan
Copy link
Author

What I've tried so far:

I tried upgrading mesa libraries as I thought this might be related to a broken version

sudo add-apt-repository ppa:kisak/kisak-mesa
sudo apt update
sudo apt upgrade

Now when I run nautilus from terminal, I see that my GPU is being detected
Even though, it still takes 40 seconds for the app to show up on my screen

For more context, I am running NVIDIA 555 drivers

amalr@ubuntu ~ nautilus
** Message: 13:39:45.834: Connecting to org.freedesktop.Tracker3.Miner.Files
WARNING: dzn is not a conformant Vulkan implementation, testing use only.
WARNING: Some incorrect rendering might occur because the selected Vulkan device (Microsoft Direct3D12 (NVIDIA GeForce RTX 3060 Laptop GPU)) doesn't support base Zink requirements: feats.features.logicOp have_EXT_custom_border_color have_EXT_line_rasterization

** (org.gnome.Nautilus:9946): WARNING **: 13:40:40.620: Unable to get contents of the bookmarks file: Error opening file /home/amalr/.gtk-bookmarks: No such file or directory

** (org.gnome.Nautilus:9946): WARNING **: 13:40:40.621: Unable to get contents of the bookmarks file: Error opening file /home/amalr/.gtk-bookmarks: No such file or directory
[1]    9946 segmentation fault  nautilus

@dolorain
Copy link

same problem
image

@cvnmlr
Copy link

cvnmlr commented Jun 19, 2024

Same problem here (Ubuntu 24.04), with evince, thunar, zenity, ... although it seems a certain kind of gui applications that have the problem.

E.g. zenity takes 40 seconds to 1 minute to start with:

$ zenity --info --text ok
MESA: error: ZINK: failed to choose pdev
libEGL warning: egl: failed to create dri2 screen
MESA: error: ZINK: failed to choose pdev
glx: failed to create drisw screen

but yad is quick, xfce4-terminal is quick, glxgears and glxdemo are quick, google-chrome is quick:

$ google-chrome
MESA: error: ZINK: failed to choose pdev
glx: failed to create drisw screen
 wsl --status
Default Distribution: Ubuntu-24.04
Default Version: 2

@linghengqian
Copy link

linghengqian commented Jun 24, 2024

  1. For the following log, there is an issue marked as Confirmed https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/2066353 .
MESA: error: ZINK: failed to choose pdev
glx: failed to create drisw screen
  1. For the following log, there is an issue marked as New https://bugs.launchpad.net/ubuntu/+source/linux-firmware/+bug/2067374 , hardware acceleration does not work on Ubuntu 24.04. Although many similar issues point to NVIDIA drivers, I can also observe this on the integrated graphics card of AMD Ryzen 7840HS.
MESA: error: ZINK: failed to choose pdev
libEGL warning: egl: failed to create dri2 screen

@ViBE-HU
Copy link

ViBE-HU commented Jun 24, 2024

@linghengqian you might be right. my system just became slow on boot after i updated a clean 24.04. then a few reboots later programs starts slow. even terminal pops up after a minute. if a program somehow starts faster it acts like i opened it first time. for example dark theme set system wide but nautilus opens with light theme and ignores user settings. but DEB version of firefox pops up instantly without any issues.

@Parsifa1
Copy link

Parsifa1 commented Jun 26, 2024

I have the same problem: the environment is wsl-nixos.
When I try to run kitty:
image

@radsaq
Copy link

radsaq commented Jul 11, 2024

Try setting the GALLIUM_DRIVER environment variable to "d3d12" as a workaround.

@cvnmlr
Copy link

cvnmlr commented Jul 12, 2024

export GALLIUM_DRIVER=d3d12 does not change the behavior for me, still wait for about 45 seconds

@dheera
Copy link

dheera commented Jul 19, 2024

Same problem, nautilus and gnome-terminal take 30 seconds to start, and nautilus is loaded with the wrong theme.

@runningnak3d
Copy link

amalrajan what kernel version are you running?

Since you don't have a custom kernel defined in your .wslconfig, this may be a completely separate issue, or Microsoft may have backported some of the new security.

I am using https://github.com/Nevuly/WSL2-Linux-Kernel-Rolling and when I upgraded to 6.10 any application that uses the GPU (Firefox, Kitty) started taking around 30 seconds to load. I finally tracked it down to the fact that when they were trying to get access to the GPU they were throwing exceptions. I rolled back to kernel 6.9.9 and the problem went away.

I don't have definitive proof that my problem was related to the new security that has been added in 6.10 or I would post it. All I can say for certain is that only apps that use the GPU were affected, and only rolling back the kernel solved my problem.

@NanoNM
Copy link

NanoNM commented Jul 31, 2024

same windows11 home version and 2404

@awanka
Copy link

awanka commented Aug 30, 2024

Same symptoms for me, slow with 24.04, fast with 22.04.
I also noticed that running under root in 24.04 was fast.

@amalrajan
Copy link
Author

amalrajan what kernel version are you running?

Since you don't have a custom kernel defined in your .wslconfig, this may be a completely separate issue, or Microsoft may have backported some of the new security.

I am using https://github.com/Nevuly/WSL2-Linux-Kernel-Rolling and when I upgraded to 6.10 any application that uses the GPU (Firefox, Kitty) started taking around 30 seconds to load. I finally tracked it down to the fact that when they were trying to get access to the GPU they were throwing exceptions. I rolled back to kernel 6.9.9 and the problem went away.

I don't have definitive proof that my problem was related to the new security that has been added in 6.10 or I would post it. All I can say for certain is that only apps that use the GPU were affected, and only rolling back the kernel solved my problem.

the default kernel. I believe it was 5.15.153.1-microsoft-standard-WSL2 across all vanilla installations

@avlec
Copy link

avlec commented Sep 11, 2024

Please see what I've reported here #1244 as what your experiencing sounds exactly the same

@dolorain
Copy link

amalrajan你运行的是哪个内核版本?

由于您的 .wslconfig 中没有定义自定义内核,这可能是一个完全独立的问题,或者微软可能已经反向移植了一些新的安全性。

我正在使用https://github.com/Nevuly/WSL2-Linux-Kernel-Rolling,当我升级到 6.10 时,任何使用 GPU 的应用程序(Firefox、Kitty)都开始需要大约 30 秒才能加载。我最终发现,当他们试图访问 GPU 时,他们会抛出异常。我回滚到内核 6.9.9,问题就消失了。

我没有确凿的证据证明我的问题与 6.10 中新增的安全功能有关,否则我会发布它。我唯一能肯定的是,只有使用 GPU 的应用程序才会受到影响,只有回滚内核才能解决我的问题。

image

6.9.9 invalid

@Edge-coordinates
Copy link

I meet the same problem and I realized that I can't resize the application window

@cvnmlr
Copy link

cvnmlr commented Oct 8, 2024

> Please see what I've reported here #1244 as what your experiencing sounds exactly the same

@avlec yes, looks like it, from your report I got to Cannot use GUI apps/tools as Wayland socket doesn't exist in XDG_RUNTIME_DIR, which led me to trying:
ln -s /mnt/wslg/runtime-dir/wayland-0* /run/user/$(id -u)/
which works for me to get all gui apps to start quickly now (for all users in my ubuntu 24.04 wsl).

@ViBE-HU
Copy link

ViBE-HU commented Oct 8, 2024

> Please see what I've reported here #1244 as what your experiencing sounds exactly the same

@avlec yes, looks like it, from your report I got to Cannot use GUI apps/tools as Wayland socket doesn't exist in XDG_RUNTIME_DIR, which led me to trying: ln -s /mnt/wslg/runtime-dir/wayland-0* /run/user/$(id -u)/ which works for me to get all gui apps to start quickly now (for all users in my ubuntu 24.04 wsl).

does this workaround help on X sessions too?

@avlec
Copy link

avlec commented Oct 8, 2024

@ViBE-HU read the issue I linked. It sounds like it might work from the viruscamp's repo with the workarounds. If you try please post here or on the other thread with your successes or failures.

@VjayMathad
Copy link

I am C++/Qt-QML developer recently started using WSL2 with Win-11 23H2.

The fix given by virus camp addressed in #1244 seems to work.
Simply followed the steps at https://github.com/viruscamp/wslg-links

Now only thing is still that 'Zink' error exists:
Image

But no worries, work gets done, able to open the nautilus in very few secs instead of waiting it for a minute ! applies for other GUI apps !
cc: @avlec @viruscamp - Thanks a lot!

@LambdaScorpii
Copy link

+1, it seems to cure some symptoms only, as the ZINK Error is still present, so I do believer, there needs to be a more general fix to the issue.

@czirok
Copy link

czirok commented Oct 31, 2024

Hello,

solved all issues for me.

To do this, first follow the steps at https://github.com/viruscamp/wslg-links, and then follow these steps:

sudo add-apt-repository ppa:oibaf/graphics-drivers
sudo apt update
sudo apt upgrade
Screenshot

@leimao
Copy link

leimao commented Dec 14, 2024

Should this become an OS patch?

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