You are not logged in.

#1 2023-01-27 13:29:54

snubs
Member
Registered: 2021-04-05
Posts: 6

[SOLVED] most programs slow to start

Hi together,

when I am starting any application it takes annoyingly long, about 30 seconds, for it to finish loading.
This is true for most programs: Firefox, Thunderbird, even gnome-calculator, gnome-calendar and nautilus.

I tried to debug it with:

strace -tf gnome-calculator 2>&1 | tee ~/.temp/calc.strace

Here is the Output

Unfortunately I can't really parse the output. Maybe someone can help me with that.

Thanks a lot in advance smile

Last edited by snubs (2023-01-27 15:35:30)

Offline

#2 2023-01-27 13:47:45

Adriik
Member
From: Argentina
Registered: 2022-03-10
Posts: 134

Re: [SOLVED] most programs slow to start

I can't understand anything about that output. (I'm stupid and noob)
I think it's better to post a journal log: journalctl -b | curl -F 'file=@-' 0x0.st


Solo soy un loco más. Please use [code] [/code] tags.
Command cheatsheetCommand not found?
If I write something wrong in English, please correct me.

Offline

#3 2023-01-27 13:55:51

snubs
Member
Registered: 2021-04-05
Posts: 6

Re: [SOLVED] most programs slow to start

That I can do. Here is the output of journalctl -b | curl -F 'file=@-' 0x0.st

Offline

#4 2023-01-27 14:26:12

seth
Member
Registered: 2012-09-03
Posts: 66,266

Re: [SOLVED] most programs slow to start

about 30 seconds

25s - it's the dbus timeout.

loginctl session-status
echo $DBUS_SESSION_BUS_ADDRESS
pacman -Qs 'flatpak|portal'

Online

#5 2023-01-27 14:26:18

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 24,584

Re: [SOLVED] most programs slow to start

About 30 seconds is a DBUS timeout and we also see some portal failures. Which graphical session are you starting and and how are you starting it? In the journal are also a bunch of portal errors, but these should be fine assuming your DBUS is ok. FWIW what do you get from

printenv DBUS_SESSION_BUS_ADDRESS

Edit: Feck...

Last edited by V1del (2023-01-27 14:26:55)

Offline

#6 2023-01-27 14:32:11

seth
Member
Registered: 2012-09-03
Posts: 66,266

Re: [SOLVED] most programs slow to start

ftr, the timeout is directly caused by flatpak/portal - quelle surprise

Jan 27 13:49:09 archlinux systemd[846]: Starting Portal service...
Jan 27 13:49:09 archlinux dbus-daemon[1167]: [session uid=1000 pid=1167] Activating via systemd: service name='org.freedesktop.impl.portal.desktop.gnome' unit='xdg-desktop-portal-gnome.service' requested by ':1.13' (uid=1000 pid=1901 comm="/usr/lib/xdg-desktop-portal")
Jan 27 13:49:09 archlinux systemd[846]: Starting Portal service (GNOME implementation)...
Jan 27 13:49:09 archlinux xdg-desktop-por[1905]: cannot open display: 
Jan 27 13:49:09 archlinux systemd[846]: xdg-desktop-portal-gnome.service: Main process exited, code=exited, status=1/FAILURE
Jan 27 13:49:09 archlinux systemd[846]: xdg-desktop-portal-gnome.service: Failed with result 'exit-code'.
Jan 27 13:49:09 archlinux systemd[846]: Failed to start Portal service (GNOME implementation).
Jan 27 13:49:34 archlinux at-spi-bus-launcher[1898]: dbus-daemon[1898]: Activating service name='org.a11y.atspi.Registry' requested by ':1.0' (uid=1000 pid=1895 comm="subl --detached")
Jan 27 13:49:34 archlinux at-spi-bus-launcher[1898]: dbus-daemon[1898]: Successfully activated service 'org.a11y.atspi.Registry'
Jan 27 13:49:34 archlinux at-spi-bus-launcher[1945]: SpiRegistry daemon is running with well-known name - org.a11y.atspi.Registry
Jan 27 13:49:59 archlinux xdg-desktop-por[1901]: Failed to create settings proxy: Fehler beim Aufruf von StartServiceByName für org.freedesktop.impl.portal.desktop.gnome: Zeitüberschreitung wurde erreicht
Jan 27 13:49:59 archlinux dbus-daemon[1167]: [session uid=1000 pid=1167] Activating via systemd: service name='org.freedesktop.impl.portal.desktop.gtk' unit='xdg-desktop-portal-gtk.service' requested by ':1.13' (uid=1000 pid=1901 comm="/usr/lib/xdg-desktop-portal")

https://bbs.archlinux.org/viewtopic.php … 4#p1954864
Specifically those:

Jan 27 14:42:10 archlinux dbus-daemon[1167]: [session uid=1000 pid=1167] Failed to activate service 'org.freedesktop.portal.Desktop': timed out (service_start_timeout=120000ms)
Jan 27 14:42:10 archlinux dbus-daemon[1167]: [session uid=1000 pid=1167] Failed to activate service 'org.freedesktop.impl.portal.desktop.gnome': timed out (service_start_timeout=120000ms)
Jan 27 14:43:01 archlinux dbus-daemon[1167]: [session uid=1000 pid=1167] Failed to activate service 'org.freedesktop.impl.portal.desktop.gtk': timed out (service_start_timeout=120000ms)

Online

#7 2023-01-27 14:38:27

snubs
Member
Registered: 2021-04-05
Posts: 6

Re: [SOLVED] most programs slow to start

seth wrote:

about 30 seconds

25s - it's the dbus timeout.

loginctl session-status
echo $DBUS_SESSION_BUS_ADDRESS
pacman -Qs 'flatpak|portal'

From loginctl session-status I get:

1 - snubs (1000)
           Since: Fri 2023-01-27 13:45:15 CET; 1h 43min ago
          Leader: 657 (login)
            Seat: seat0; vc1
             TTY: tty1
         Service: login; type tty; class user
           State: active
            Unit: session-1.scope
                  ├─ 657 "login -- snubs"
                  ├─ 854 -zsh
                  ├─ 890 /bin/sh /usr/bin/startx
                  ├─ 905 xinit /home/snubs/.xinitrc -- /etc/X11/xinit/xserverrc :0 vt1 -keeptty -auth /tmp/serverauth.UGDxkmOI0Y
                  ├─ 906 /usr/lib/Xorg -nolisten tcp :0 vt1 -keeptty -auth /tmp/serverauth.UGDxkmOI0Y
                  ├─ 908 xf86-video-intel-backlight-helper intel_backlight
                  ├─ 912 i3 -V
                  ├─ 929 i3bar --bar_id=bar-0 --socket=/run/user/1000/i3/ipc-socket.912
                  ├─ 936 i3status
                  ├─ 991 xterm -fa Monospace -fs 18 -bg black -fg white
                  ├─ 993 zsh
                  ├─1153 /usr/lib/firefox/firefox
                  ├─1282 /usr/lib/firefox/firefox -contentproc -parentBuildID 20230116182017 -prefsLen 31382 -prefMapSize 240913 -appDi>
                  ├─1307 /usr/lib/firefox/firefox -contentproc -childID 1 -isForBrowser -prefsLen 31485 -prefMapSize 240913 -jsInitLen >
                  ├─1381 /usr/lib/firefox/firefox -contentproc -childID 2 -isForBrowser -prefsLen 36761 -prefMapSize 240913 -jsInitLen >
                  ├─1438 /usr/lib/firefox/firefox -contentproc -childID 4 -isForBrowser -prefsLen 36761 -prefMapSize 240913 -jsInitLen >
                  ├─1561 xterm -fa Monospace -fs 18 -bg black -fg white
                  ├─1563 zsh
                  ├─1895 subl --detached
                  ├─1982 /opt/sublime_text/plugin_host-3.3 1895 /opt/sublime_text/sublime_text /home/snubs/.config/sublime-text-3 /home>
                  ├─1985 /opt/sublime_text/plugin_host-3.8 1895 /opt/sublime_text/sublime_text /home/snubs/.config/sublime-text-3 /home>
                  ├─2527 /usr/lib/thunderbird/thunderbird
                  ├─2632 /usr/lib/thunderbird/thunderbird -contentproc -childID 1 -isForBrowser -prefsLen 14735 -prefMapSize 236623 -js>
                  ├─2689 /usr/lib/thunderbird/thunderbird -contentproc -childID 2 -isForBrowser -prefsLen 14811 -prefMapSize 236623 -js>
                  ├─3468 /usr/lib/firefox/firefox -contentproc -parentBuildID 20230116182017 -prefsLen 36761 -prefMapSize 240913 -appDi>
                  ├─3470 /usr/lib/firefox/firefox -contentproc -parentBuildID 20230116182017 -sandboxingKind 0 -prefsLen 36761 -prefMap>
                  ├─3867 /bin/bash ./Backup.sh

From echo $DBUS_SESSION_BUS_ADDRESS I get:

unix:path=/run/user/1000/bus

From pacman -Qs 'flatpak|portal' I get:

local/flatpak 1:1.15.1-1
    Linux application sandboxing and distribution framework (formerly xdg-app)
local/libportal 0.6-1
    GIO-style async APIs for most Flatpak portals
local/libportal-gtk3 0.6-1
    GIO-style async APIs for most Flatpak portals - GTK 3 backend
local/libportal-gtk4 0.6-1
    GIO-style async APIs for most Flatpak portals - GTK 4 backend
local/xdg-desktop-portal 1.16.0-1
    Desktop integration portals for sandboxed apps
local/xdg-desktop-portal-gnome 43.1-1
    A backend implementation for xdg-desktop-portal for the GNOME desktop environment
local/xdg-desktop-portal-gtk 1.14.1-1
    A backend implementation for xdg-desktop-portal using GTK

Offline

#8 2023-01-27 14:43:02

seth
Member
Registered: 2012-09-03
Posts: 66,266

Re: [SOLVED] most programs slow to start

This looks all sane.
As a sanity check

ps aux | grep dbus
cat ~/.xinitrc

and certainly

systemctl --user status xdg-desktop-portal-gtk.service

But if you don't need "want" flatpak, the easiest way is it get rid of that and the portal packages.

Online

#9 2023-01-27 14:51:57

snubs
Member
Registered: 2021-04-05
Posts: 6

Re: [SOLVED] most programs slow to start

ps aux | grep dbus:

dbus         552  0.0  0.0   8792  5100 ?        Ss   13:45   0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
snubs       1167  0.0  0.0   8620  4824 ?        Ss   13:45   0:00 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
snubs       1898  0.0  0.0   8184  4116 ?        S    13:49   0:00 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 11 --address=unix:path=/run/user/1000/at-spi/bus
snubs       7195  0.0  0.0   6592  2436 pts/1    S+   15:47   0:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox dbus

cat ~/.xinitrc

exec i3 -V
#exec gnome-session
#

systemctl --user status xdg-desktop-portal-gtk.service

I think I do need flatpak. First time I hear of it, but as I read it I need it to open links in other programs and share my screen. Both I want to do.
 xdg-desktop-portal-gtk.service - Portal service (GTK/GNOME implementation)
     Loaded: loaded (/usr/lib/systemd/user/xdg-desktop-portal-gtk.service; static)
     Active: failed (Result: exit-code) since Fri 2023-01-27 15:26:30 CET; 23min ago
    Process: 6732 ExecStart=/usr/lib/xdg-desktop-portal-gtk (code=exited, status=1/FAILURE)
   Main PID: 6732 (code=exited, status=1/FAILURE)
        CPU: 22ms

Jan 27 15:26:30 archlinux systemd[846]: Starting Portal service (GTK/GNOME implementation)...
Jan 27 15:26:30 archlinux xdg-desktop-por[6732]: cannot open display: 
Jan 27 15:26:30 archlinux systemd[846]: xdg-desktop-portal-gtk.service: Main process exited, code=exited, status=1/FAILURE
Jan 27 15:26:30 archlinux systemd[846]: xdg-desktop-portal-gtk.service: Failed with result 'exit-code'.
Jan 27 15:26:30 archlinux systemd[846]: Failed to start Portal service (GTK/GNOME implementation).

Offline

#10 2023-01-27 14:55:08

seth
Member
Registered: 2012-09-03
Posts: 66,266

Re: [SOLVED] most programs slow to start

No dbus-launch, but your xinitrc is broken, see the last link below and the note about what to at least include there.
Then try again.

I need it to open links in other programs and share my screen.

No.

Online

#11 2023-01-27 15:18:13

snubs
Member
Registered: 2021-04-05
Posts: 6

Re: [SOLVED] most programs slow to start

Thank You!!!
That fixed it.

If anyone has the same problem, see this link: https://wiki.archlinux.org/title/Xinit#xinitrc

Last edited by snubs (2023-01-27 15:18:56)

Offline

#12 2023-01-27 15:24:33

snubs
Member
Registered: 2021-04-05
Posts: 6

Re: [SOLVED] most programs slow to start

One more thing big_smile,
I can't figure out how to mark this thread as [SOLVED]

Offline

#13 2023-01-27 15:28:30

seth
Member
Registered: 2012-09-03
Posts: 66,266

Re: [SOLVED] most programs slow to start

Mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Online

#14 2023-07-20 06:33:50

mukl
Member
From: Vienna, Austria
Registered: 2008-01-30
Posts: 55

Re: [SOLVED] most programs slow to start

snubs wrote:

Thank You!!!
That fixed it.

If anyone has the same problem, see this link: https://wiki.archlinux.org/title/Xinit#xinitrc

*What* exactly solved it?

Offline

#15 2023-07-20 06:36:28

seth
Member
Registered: 2012-09-03
Posts: 66,266

Re: [SOLVED] most programs slow to start

seth wrote:

the last link below and the note about what to at least include there

However I assume you ask because you just recently w/ a recent update ran into similar-ish symptoms which might be cause by a different problem?

loginctl session-status
pacman -Qs portal

Online

#16 2023-07-20 06:50:23

mukl
Member
From: Vienna, Austria
Registered: 2008-01-30
Posts: 55

Re: [SOLVED] most programs slow to start

seth wrote:
seth wrote:

the last link below and the note about what to at least include there

However I assume you ask because you just recently w/ a recent update ran into similar-ish symptoms which might be cause by a different problem?

loginctl session-status
pacman -Qs portal

loginctl session-status

2 - xxxx (NNNN)
           Since: Thu 2023-07-20 08:42:59 CEST; 1min 4s ago
          Leader: 1160 (sddm-helper)
            Seat: seat0; vc1
             TTY: tty1
         Service: sddm; type wayland; class user
         Desktop: KDE
           State: active
            Unit: session-2.scope
                  ├─1160 /usr/lib/sddm/sddm-helper --socket /tmp/sddm-auth-caa5100d-690e-4ef9-9cb1-3d4050ae0a5e --i>
                  ├─1181 /usr/bin/kwalletd5 --pam-login 12 14
                  └─1182 /usr/bin/startplasma-wayland

Jul 20 08:43:00 HHHH systemd[1]: Started Session 2 of User xxxx.
Jul 20 08:43:00 HHHH sddm-helper[1180]: pam_kwallet5: final socket path: /run/user/1000/kwallet5.socket
Jul 20 08:43:00 HHHH sddm-helper[1182]: Jumping to VT 1
Jul 20 08:43:00 HHHH sddm-helper[1182]: VT mode didn't need to be fixed
Jul 20 08:43:01 HHHH kwalletd5[1181]: kf.wallet.kwalletd: Wallet failed to get opened by PAM, error code is -9

$ pacman -Qs portal

local/xdg-desktop-portal 1.16.0-3
    Desktop integration portals for sandboxed apps
local/xdg-desktop-portal-gtk 1.14.1-1
    A backend implementation for xdg-desktop-portal using GTK
local/xdg-desktop-portal-kde 5.27.6-1 (plasma)
    A backend implementation for xdg-desktop-portal using Qt/KF5

....meanwhile I uninstalled xdg-desktop-portal-gnome, rebooted and now Firefox starts quick again. I don't remember, why I installed xdg-desktop-portal-gnome, but I guess it was because of a flatpak, probably com.usebottles.bottles.

Offline

#17 2023-07-20 06:56:47

seth
Member
Registered: 2012-09-03
Posts: 66,266

Re: [SOLVED] most programs slow to start

meanwhile I uninstalled xdg-desktop-portal-gnome

seth wrote:

a recent update ran into similar-ish symptoms

Cause that's the main issue of the last month…

Online

Board footer

Powered by FluxBB