6

After boot or reboot, many applications start very slow.

  • Firefox: normal
  • Android Studio (manual install, not snap): normal
  • GIMP: normal
  • Nautilus: slow, uses white theme instead (I use dark theme btw)
  • LibreOffice: slow
  • Inkscape: slow
  • Gnome Terminal: not opens at all

However everything is normal after long time, probably after 10 minutes or several hours, all applications start normally, even Nautilus uses dark theme.

I found another question but the solution is not relevant to mine, probably because it is Ubuntu 19.10 instead of 24.04.

How to solve this? Or at least, how to debug this, so I know how to report the bug.

fikr4n
  • 1,367
  • I had a similar issue that is caused by xdg-desktop-portal-gnome. Can you try to remove the package using the command sudo apt remove xdg-desktop-portal-gnome and check whether the issue persists?? – Ajay Oct 09 '24 at 06:14
  • Consider installing Preload using sudo apt install preload as outlined at tip number 3 in this itsFOSS article – graham Oct 09 '24 at 06:18
  • Preload seems irrelevant to this problem. @Ajay wow it's now back to normal, it would be great if you make your comment officially an answer along with "why it happens" and "what the impact of uninstalling xdg-desktop-portal-gnome". – fikr4n Oct 11 '24 at 10:21
  • Sounds like launchpad bug 2042301, when xorg is used instead of Wayland. Join the bug (click on upper left, "does this affect me?") to turn up the heat. – ubfan1 Dec 18 '24 at 16:27

2 Answers2

5

I had a similar issue: similar apps the question mentions take more time to open, and when they do, they simply open in Light Mode even though the system is set to Dark Mode.

After several searches and troubleshooting using journalctl -f, I found out that xdg-desktop-portal-gnome makes the GNOME apps slow. Some users have reported this issue and raised this bug but it hasn't been resolved in the update. So I simply uninstalled it using this command:

sudo apt remove xdg-desktop-portal-gnome

NOTE: It is also recommended to install KDE packages before uninstalling so that it won't break anything in GNOME.

You can refer to these bug reports for more insight regarding the issue:

Some of the comments mention that uninstalling xdg-desktop-portal-gnome caused the removal of the Nautilus package. By referring to the above bug reports, I just executed the command and my issue was resolved. As I mentioned in the "Note", installing KDE packages (which I have already installed for some other applications) might help not to cause any issues to your GNOME or Nautilus.

Ajay
  • 2,283
  • 1
    Oh my goodness! I've been trying to troubleshoot this for over a week and getting nowhere. Thank you so much for your solution. It's an instant improvement for Nautilus. I'll check back after a restart but I hope this will solve it for anything else attempting to open a file dialog – jymbob Oct 16 '24 at 15:36
  • Uninstalling xdg-desktop-portal-gnome causes my Ubuntu 24.04 to uninstall also nautilus, which is not desirable in this case – MacK Nov 08 '24 at 10:17
  • @MacK Uninstalling xdg-desktop-portal-gnome does not uninstall Nautilus. – Ajay Nov 08 '24 at 11:17
  • Definitely does for me, perhaps might be my configuration but with desktop portal goes gnome core as well and with it lists nautilus and gnome shell on the next autoremove. Commandline: apt remove xdg-desktop-portal-gnome Requested-By: mack (1000) Remove: xdg-desktop-portal-gnome:amd64 (46.2-0ubuntu1), gnome-core:amd64 (1:44+1build1) End-Date: 2024-11-08 10:13:12 – MacK Nov 15 '24 at 12:21
  • I am frankly a bit hesitant to try the suggested removal, given some of the comments here. I'd rather not bork my system further. @Ajay, would you perhaps be able to expand on the "NOTE" you added with what exact steps you did? Or, did you literally only remove xdg-desktop-portal-gnome? – Steven Dec 18 '24 at 08:43
  • @Steven, I have updated my answer. – Ajay Dec 18 '24 at 10:45
0

The answer from @Ajay solves my problem too. However, my case is slightly different: I needed to uninstall xdg-desktop-portal-gtk. I recommend using aptitude to uninstall the package as it suggests a safe solutions, including install xdg-desktop-portal-kde.