Score:0

snap application run takes too long

cn flag

helo i am running ubuntu 22.04 LTS desktop. and not sure why snap application like gimp, firefox, kolourpaint, remmina and more takes too long time (maybe 1-2minutes) to open their application. i have reboot the computer and still same..

here is the log i found under /var/log/syslog/

Aug 18 10:55:07 komp systemd[2294]: snap.firefox.firefox.ed49cd3a-04b3-4403-b0ef-25692ef4c7c1.scope: Consumed 51.143s CPU time.
Aug 18 10:55:11 komp systemd[2294]: Started Application launched by gnome-shell.
Aug 18 10:55:11 komp dbus-daemon[2314]: [session uid=1000 pid=2314] Activating via systemd: service name='org.freedesktop.portal.Documents' unit='xdg-document-portal.service' requested by ':1.845' (uid=1000 pid=68462 comm="/snap/bin/firefox " label="unconfined")
Aug 18 10:55:11 komp systemd[2294]: Starting flatpak document portal service...
Aug 18 10:55:11 komp xdg-document-portal[68486]: /usr/libexec/xdg-document-portal: /usr/local/lib/libfuse3.so.3: version `FUSE_3.2' not found (required by /usr/libexec/xdg-document-portal)
Aug 18 10:55:11 komp systemd[2294]: xdg-document-portal.service: Main process exited, code=exited, status=1/FAILURE
Aug 18 10:55:11 komp systemd[2294]: xdg-document-portal.service: Failed with result 'exit-code'.
Aug 18 10:55:11 komp systemd[2294]: Failed to start flatpak document portal service.



Aug 18 10:57:11 komp firefox_firefox.desktop[68462]: cmd_run.go:1055: WARNING: cannot start document portal: Failed to activate service 'org.freedesktop.portal.Documents': timed out (service_start_timeout=120000ms)

detail snap version:

@komp:~$ snap version
snap    2.59.5
snapd   2.59.5
series  16
ubuntu  22.04
kernel  5.19.0-50-generic

i have read another similar issue : https://forum.snapcraft.io/t/snaps-only-run-after-a-long-timeout/9201/9

https://forum.snapcraft.io/t/extremely-slow-startup-for-snaps/22478/20

still no luck.

i am not sure, maybe someone can give me the clue? thanks

guiverc avatar
cn flag
I'll suggest applying all security fixes to your system asap, as your provided details show you behind on security fixes (*still using the EOL 5.19 kernel from 22.10, where HWE is now using 6.2 from 23.04*). Snap packages are compressed (*reducing size on disk*) & initial run require decompression which takes time, as well as setting up app for running in *confinement*, but it shouldn't take as long as you mention - but upgrade asap if your box is online. (https://fridge.ubuntu.com/2023/08/11/ubuntu-22-04-3-lts-released/ shows ISO release date, but installed systems upgraded week+ before then)
guiverc avatar
cn flag
When pasting from logs, please use {code} tags & not textual-quoting; the latter doesn't preserve the textual alignment as paragraphs of text are expected. Your *syslog* quote is difficult to read...
Hendranata Saputra avatar
cn flag
previously it was okay..snap application running normally not too slow.. and still acceptable.. but right now the application running too slow..really slow for first start the app.. in our ubuntu also have mainline kernel, it shows installed kernel 6.2.0-26-generic.. when we boot to that kernel, it turns to kernel panic.. not sure why.. even i want to uninstall kernel 6.2 also cant..
Hendranata Saputra avatar
cn flag
i believe there is something missing in my ubuntu 22.04 LTS.. but i am not sure which part that cause snap application so slow to startup..
Hendranata Saputra avatar
cn flag
according to the log, they are waiting almost 2 minutes. Failed to activate service 'org.freedesktop.portal.Documents': timed out (service_start_timeout=120000ms).. how to fix that? maybe that is the case
vanadium avatar
cn flag
Indeed it appears as problems with the xdg-portal are the issue: that fails to be initialized. Not sure how to fix that apart from reinstalling some system components. On first launch, a snap may take 2 or 3 seconds more, but certainly not minutes. There is also a message of a library, version `FUSE_3.2' not found, so your system definitely is in an inconsistent state.
Hendranata Saputra avatar
cn flag
@vanadium do u have any idea how to reduce the timeout? default 120 seconds (2minutes).. maybe u have any tricky method.. appreciate your help.
vanadium avatar
cn flag
I would have answered. Diagnosing the problem is one important step, then a next step is to find the cure. A specific cure, I do not know. Lacking that, I myself would probably attempt reinstall without erasing the disk, or perhaps reinstall anything related to xdg-desktop-portal.
Hendranata Saputra avatar
cn flag
reinstall without erasing the disk? u mean reinstall os?
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.