You are not logged in.

#1 2017-04-02 08:06:38

xxxperimental
Member
Registered: 2017-04-02
Posts: 1

Gnome applications slow start due to failing services

Gnome applications started to take around 20 seconds to start. The logs show that this is the cause of the delay when starting nautilus:

Apr 02 03:36:25 daitenshi dbus-daemon[554]: Activating via systemd: service name='org.freedesktop.portal.Desktop' unit='xdg-desktop-portal.service'
Apr 02 03:36:25 daitenshi systemd[473]: Starting Portal service...
Apr 02 03:36:25 daitenshi dbus-daemon[554]: Activating via systemd: service name='org.freedesktop.impl.portal.desktop.gtk' unit='xdg-desktop-portal-gtk.service'
Apr 02 03:36:25 daitenshi systemd[473]: Starting Portal service (GTK+/GNOME implementation)...
Apr 02 03:36:25 daitenshi xdg-desktop-portal-gtk[24374]: Unable to init server: Could not connect: Connection refused
Apr 02 03:36:25 daitenshi xdg-desktop-por[24374]: cannot open display: 
Apr 02 03:36:25 daitenshi systemd[473]: xdg-desktop-portal-gtk.service: Main process exited, code=exited, status=1/FAILURE
Apr 02 03:36:25 daitenshi systemd[473]: Failed to start Portal service (GTK+/GNOME implementation).
Apr 02 03:36:25 daitenshi systemd[473]: xdg-desktop-portal-gtk.service: Unit entered failed state.
Apr 02 03:36:25 daitenshi systemd[473]: xdg-desktop-portal-gtk.service: Failed with result 'exit-code'.
Apr 02 03:36:50 daitenshi xdg-desktop-por[24331]: Failed to create file chooser proxy: Error calling StartServiceByName for org.freedesktop.impl.portal.desktop.gtk: Timeout 
Apr 02 03:36:50 daitenshi xdg-desktop-por[24331]: g_dbus_interface_skeleton_set_flags: assertion 'G_IS_DBUS_INTERFACE_SKELETON (interface_)' failed
Apr 02 03:36:50 daitenshi xdg-desktop-por[24331]: invalid (NULL) pointer instance
Apr 02 03:36:50 daitenshi xdg-desktop-por[24331]: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
Apr 02 03:36:50 daitenshi xdg-desktop-por[24331]: g_dbus_interface_skeleton_export: assertion 'G_IS_DBUS_INTERFACE_SKELETON (interface_)' failed
Apr 02 03:36:50 daitenshi kernel: xdg-desktop-por[24331]: segfault at 8 ip 00000000004070d0 sp 00007fff54d747f0 error 4 in xdg-desktop-portal[400000+57000]
Apr 02 03:36:50 daitenshi systemd[1]: Started Process Core Dump (PID 25806/UID 0).
Apr 02 03:36:50 daitenshi systemd[473]: xdg-desktop-portal.service: Main process exited, code=dumped, status=11/SEGV
Apr 02 03:36:50 daitenshi systemd[473]: Failed to start Portal service.
Apr 02 03:36:50 daitenshi systemd[473]: xdg-desktop-portal.service: Unit entered failed state.
Apr 02 03:36:50 daitenshi systemd[473]: xdg-desktop-portal.service: Failed with result 'core-dump'.
Apr 02 03:36:50 daitenshi systemd-coredump[25807]: Process 24331 (xdg-desktop-por) of user 1000 dumped core.
                                                   
                                                   Stack trace of thread 24331:
                                                   #0  0x00000000004070d0 n/a (xdg-desktop-portal)
                                                   #1  0x0000000000407195 n/a (xdg-desktop-portal)
                                                   #2  0x00007fe5ca8e9b24 n/a (libgio-2.0.so.0)
                                                   #3  0x00007fe5ca8ae303 n/a (libgio-2.0.so.0)
                                                   #4  0x00007fe5ca8ae9b6 n/a (libgio-2.0.so.0)
                                                   #5  0x00007fe5ca8dc602 n/a (libgio-2.0.so.0)
                                                   #6  0x00007fe5ca8ae303 n/a (libgio-2.0.so.0)
                                                   #7  0x00007fe5ca8ae339 n/a (libgio-2.0.so.0)
                                                   #8  0x00007fe5ca30945a g_main_context_dispatch (libglib-2.0.so.0)
                                                   #9  0x00007fe5ca309810 n/a (libglib-2.0.so.0)
                                                   #10 0x00007fe5ca309b32 g_main_loop_run (libglib-2.0.so.0)
                                                   #11 0x0000000000406a7b n/a (xdg-desktop-portal)
                                                   #12 0x00007fe5c9d1d511 __libc_start_main (libc.so.6)
                                                   #13 0x0000000000406d9a n/a (xdg-desktop-portal)
                                                   
                                                   Stack trace of thread 24338:
                                                   #0  0x00007fe5c9ddf67d poll (libc.so.6)
                                                   #1  0x00007fe5ca3097a6 n/a (libglib-2.0.so.0)
                                                   #2  0x00007fe5ca3098bc g_main_context_iteration (libglib-2.0.so.0)
                                                   #3  0x00007fe5ca309901 n/a (libglib-2.0.so.0)
                                                   #4  0x00007fe5ca331175 n/a (libglib-2.0.so.0)
                                                   #5  0x00007fe5ca0a82e7 start_thread (libpthread.so.0)
                                                   #6  0x00007fe5c9de954f __clone (libc.so.6)
                                                   
                                                   Stack trace of thread 24354:
                                                   #0  0x00007fe5c9ddf67d poll (libc.so.6)
                                                   #1  0x00007fe5ca3097a6 n/a (libglib-2.0.so.0)
                                                   #2  0x00007fe5ca3098bc g_main_context_iteration (libglib-2.0.so.0)
                                                   #3  0x00007fe5c4f4b4bd n/a (libdconfsettings.so)
                                                   #4  0x00007fe5ca331175 n/a (libglib-2.0.so.0)
                                                   #5  0x00007fe5ca0a82e7 start_thread (libpthread.so.0)
                                                   #6  0x00007fe5c9de954f __clone (libc.so.6)
                                                   
                                                   Stack trace of thread 24340:
                                                   #0  0x00007fe5c9ddf67d poll (libc.so.6)
                                                   #1  0x00007fe5ca3097a6 n/a (libglib-2.0.so.0)
                                                   #2  0x00007fe5ca309b32 g_main_loop_run (libglib-2.0.so.0)
                                                   #3  0x00007fe5ca8ef446 n/a (libgio-2.0.so.0)
                                                   #4  0x00007fe5ca331175 n/a (libglib-2.0.so.0)
                                                   #5  0x00007fe5ca0a82e7 start_thread (libpthread.so.0)
                                                   #6  0x00007fe5c9de954f __clone (libc.so.6)
Apr 02 03:36:50 daitenshi dbus[333]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service'
Apr 02 03:36:50 daitenshi systemd[1]: Starting Hostname Service...

I'm not sure what is going on. The apps start instantaneously if run by sudo. I'm running i3wm, however, if i boot into gnome-session the apps also work fine and start instantaneously.


EDIT: The app opens instantaneously as root, but according to the logs it will fails to start those services, but it just times out immediately

Last edited by xxxperimental (2017-04-02 08:29:21)

Offline

#2 2017-04-03 13:47:08

iomonad
Member
Registered: 2017-04-03
Posts: 2

Re: Gnome applications slow start due to failing services

I have this same issue. I switched to i3wm with no login manager yesterday, so I wasn't sure if that was the issue. Nautilus, calculator, etc. take 20-30s to load.

Running 4.10-8.


Apr 03 09:34:14 desktop kernel: xdg-desktop-por[958]: segfault at 8 ip 00000000004070d0 sp 00007ffe787e3d90 erro
Apr 03 09:34:14 desktop systemd[1]: Created slice system-systemd\x2dcoredump.slice.
Apr 03 09:34:14 desktop systemd[1]: Started Process Core Dump (PID 2079/UID 0).
Apr 03 09:34:14 desktop systemd[677]: xdg-desktop-portal.service: Main process exited, code=dumped, status=11/SE
Apr 03 09:34:14 desktop systemd[677]: Failed to start Portal service.
Apr 03 09:34:14 desktop systemd[677]: xdg-desktop-portal.service: Unit entered failed state.
Apr 03 09:34:14 desktop systemd[677]: xdg-desktop-portal.service: Failed with result 'core-dump'.
Apr 03 09:34:14 desktop systemd-coredump[2080]: Process 958 (xdg-desktop-por) of user 1000 dumped core.
                                               
                                                Stack trace of thread 958:
                                                #0  0x00000000004070d0 n/a (xdg-desktop-portal)
                                                #1  0x0000000000407195 n/a (xdg-desktop-portal)
                                                #2  0x00007fba6d51eb24 n/a (libgio-2.0.so.0)
                                                #3  0x00007fba6d4e3303 n/a (libgio-2.0.so.0)
                                                #4  0x00007fba6d4e39b6 n/a (libgio-2.0.so.0)
                                                #5  0x00007fba6d511602 n/a (libgio-2.0.so.0)
                                                #6  0x00007fba6d4e3303 n/a (libgio-2.0.so.0)
                                                #7  0x00007fba6d4e3339 n/a (libgio-2.0.so.0)
                                                #8  0x00007fba6cf3e45a g_main_context_dispatch (libglib-2.0.so.0
                                                #9  0x00007fba6cf3e810 n/a (libglib-2.0.so.0)
                                                #10 0x00007fba6cf3eb32 g_main_loop_run (libglib-2.0.so.0)
                                                #11 0x0000000000406a7b n/a (xdg-desktop-portal)
                                                #12 0x00007fba6c952511 __libc_start_main (libc.so.6)
                                                #13 0x0000000000406d9a n/a (xdg-desktop-portal)
                                               
                                                Stack trace of thread 959:
                                                #0  0x00007fba6ca1467d polApr 03 09:34:14 desktop kernel: xdg-deApr 03 09:34:14 desktop kernel: xdg-desktop-por[958]: segfault at 8 ip 00000000004070d0 sp 00007ffe787e3d90 erro
Apr 03 09:34:14 desktop systemd[1]: Created slice system-systemd\x2dcoredump.slice.
Apr 03 09:34:14 desktop systemd[1]: Started Process Core Dump (PID 2079/UID 0).
Apr 03 09:34:14 desktop systemd[677]: xdg-desktop-portal.service: Main process exited, code=dumped, status=11/SE
Apr 03 09:34:14 desktop systemd[677]: Failed to start Portal service.
Apr 03 09:34:14 desktop systemd[677]: xdg-desktop-portal.service: Unit entered failed state.
Apr 03 09:34:14 desktop systemd[677]: xdg-desktop-portal.service: Failed with result 'core-dump'.
Apr 03 09:34:14 desktop systemd-coredump[2080]: Process 958 (xdg-desktop-por) of user 1000 dumped core.
                                               
                                                Stack trace of thread 958:
                                                #0  0x00000000004070d0 n/a (xdg-desktop-portal)
                                                #1  0x0000000000407195 n/a (xdg-desktop-portal)
                                                #2  0x00007fba6d51eb24 n/a (libgio-2.0.so.0)
                                                #3  0x00007fba6d4e3303 n/a (libgio-2.0.so.0)
                                                #4  0x00007fba6d4e39b6 n/a (libgio-2.0.so.0)
                                                #5  0x00007fba6d511602 n/a (libgio-2.0.so.0)
                                                #6  0x00007fba6d4e3303 n/a (libgio-2.0.so.0)
                                                #7  0x00007fba6d4e3339 n/a (libgio-2.0.so.0)
                                                #8  0x00007fba6cf3e45a g_main_context_dispatch (libglib-2.0.so.0
                                                #9  0x00007fba6cf3e810 n/a (libglib-2.0.so.0)
                                                #10 0x00007fba6cf3eb32 g_main_loop_run (libglib-2.0.so.0)
                                                #11 0x0000000000406a7b n/a (xdg-desktop-portal)
                                                #12 0x00007fba6c952511 __libc_start_main (libc.so.6)
                                                #13 0x0000000000406d9a n/a (xdg-desktop-portal)
                                               
                                                Stack trace of thread 959:
                                                #0  0x00007fba6ca1467d polApr 03 09:34:14 desktop kernel: xdg-deApr 03 09:34:14 desktop kernel: xdg-desktop-por[958]: segfault at 8 ip 00000000004070d0 sp 00007ffe787e3d90 erro
Apr 03 09:34:14 desktop systemd[1]: Created slice system-systemd\x2dcoredump.slice.
Apr 03 09:34:14 desktop systemd[1]: Started Process Core Dump (PID 2079/UID 0).
Apr 03 09:34:14 desktop systemd[677]: xdg-desktop-portal.service: Main process exited, code=dumped, status=11/SE
Apr 03 09:34:14 desktop systemd[677]: Failed to start Portal service.
Apr 03 09:34:14 desktop systemd[677]: xdg-desktop-portal.service: Unit entered failed state.
Apr 03 09:34:14 desktop systemd[677]: xdg-desktop-portal.service: Failed with result 'core-dump'.
Apr 03 09:34:14 desktop systemd-coredump[2080]: Process 958 (xdg-desktop-por) of user 1000 dumped core.
                                               
                                                Stack trace of thread 958:
                                                #0  0x00000000004070d0 n/a (xdg-desktop-portal)
                                                #1  0x0000000000407195 n/a (xdg-desktop-portal)
                                                #2  0x00007fba6d51eb24 n/a (libgio-2.0.so.0)
                                                #3  0x00007fba6d4e3303 n/a (libgio-2.0.so.0)
                                                #4  0x00007fba6d4e39b6 n/a (libgio-2.0.so.0)
                                                #5  0x00007fba6d511602 n/a (libgio-2.0.so.0)
                                                #6  0x00007fba6d4e3303 n/a (libgio-2.0.so.0)
                                                #7  0x00007fba6d4e3339 n/a (libgio-2.0.so.0)
                                                #8  0x00007fba6cf3e45a g_main_context_dispatch (libglib-2.0.so.0
                                                #9  0x00007fba6cf3e810 n/a (libglib-2.0.so.0)
                                                #10 0x00007fba6cf3eb32 g_main_loop_run (libglib-2.0.so.0)
                                                #11 0x0000000000406a7b n/a (xdg-desktop-portal)
                                                #12 0x00007fba6c952511 __libc_start_main (libc.so.6)
                                                #13 0x0000000000406d9a n/a (xdg-desktop-portal)
                                               
                                                Stack trace of thread 959:
                                                #0  0x00007fba6ca1467d poll (libc.so.6)
                                                #1  0x00007fba6cf3e7a6 n/a (libglib-2.0.so.0)
                                                #2  0x00007fba6cf3e8bc g_main_context_iteration (libglib-2.0.so.
                                                #3  0x00007fba6cf3e901 n/a (libglib-2.0.so.0)
                                                #4  0x00007fba6cf66175 n/a (libglib-2.0.so.0)
                                                #5  0x00007fba6ccdd2e7 start_thread (libpthread.so.0)
                                                #6  0x00007fba6ca1e54f __clone (libc.so.6)
                                               
                                                Stack trace of thread 979:
                                                #0  0x00007fba6ca1467d poll (libc.so.6)
                                                #1  0x00007fba6cf3e7a6 n/a (libglib-2.0.so.0)
                                                #2  0x00007fba6cf3e8bc g_main_context_iteration (libglib-2.0.so.
                                                #3  0x00007fba5bbf54bd n/a (libdconfsettings.so)
                                                #4  0x00007fba6cf66175 n/a (libglib-2.0.so.0)
                                                #5  0x00007fba6ccdd2e7 start_thread (libpthread.so.0)
                                                #6  0x00007fba6ca1e54f __clone (libc.so.6)
                                               
                                                Stack trace of thread 962:
                                                #0  0x00007fba6ca1467d poll (libc.so.6)
                                                #1  0x00007fba6cf3e7a6 n/a (libglib-2.0.so.0)
                                                #2  0x00007fba6cf3eb32 g_main_loop_run (libglib-2.0.so.0)
                                                #3  0x00007fba6d524446 n/a (libgio-2.0.so.0)
                                                #4  0x00007fba6cf66175 n/a (libglib-2.0.so.0)
                                                #5  0x00007fba6ccdd2e7 start_thread (libpthread.so.0)
                                                #6  0x00007fba6ca1e54f __clone (libc.so.6)

Offline

#3 2017-04-17 12:44:17

dumblob
Member
Registered: 2013-08-08
Posts: 4
Website

Re: Gnome applications slow start due to failing services

I opened an issue https://github.com/flatpak/xdg-desktop- … /issues/72 and the solution seems to be adding

dbus-update-activation-environment --systemd DBUS_SESSION_BUS_ADDRESS DISPLAY XAUTHORITY

to .xinitrc or .xsession .

Offline

#4 2017-04-20 01:20:46

iomonad
Member
Registered: 2017-04-03
Posts: 2

Re: Gnome applications slow start due to failing services

dumblob wrote:

I opened an issue https://github.com/flatpak/xdg-desktop- … /issues/72 and the solution seems to be adding

dbus-update-activation-environment --systemd DBUS_SESSION_BUS_ADDRESS DISPLAY XAUTHORITY

to .xinitrc or .xsession .

Thanks, dumblob! This resolves the issue for me.

Offline

#5 2020-07-10 13:18:50

defeo
Member
Registered: 2017-01-22
Posts: 10

Re: Gnome applications slow start due to failing services

Thanks, dumblob! After stumbling upon this 2 years later, I wonder: who should fix this? The packager?

At the very least, this should be documented in https://wiki.archlinux.org/index.php/Flatpak, shouldn't it?

Offline

#6 2021-10-20 15:34:29

matt-3
Member
Registered: 2020-06-09
Posts: 17

Re: Gnome applications slow start due to failing services

defeo, you can add

source /etc/X11/xinit/xinitrc.d/50-systemd-user.sh

to the appropriate file to handle these variables. I think this is what you lose when you switch to a window manager from a desktop environment.

Or better, source all the xinit scripts, with

for f in /etc/X11/xinit/xinitrc.d/*.sh; do
  source "$f"
done

“In science it often happens that scientists say, ‘You know that's a really good argument; my position is mistaken,’ and then they actually change their minds and you never hear that old view from them again… I cannot recall the last time something like that happened in politics or religion.” —Carl Sagan, 1987 CSICOP keynote address

Offline

#7 2022-10-03 20:11:59

ecloud
Member
Registered: 2010-09-15
Posts: 20

Re: Gnome applications slow start due to failing services

This has been annoying me for a long time too.  Thanks for the hint: that fixes it.  (But... why not fix it in GTK?  plain X11 sessions really ought to be ok)

Offline

#8 2022-10-03 20:53:02

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,252

Re: Gnome applications slow start due to failing services

You need to have a working DBUS session in general, this isn't really something to be fixed in GTK. Or you'd do these kind of workarounds for every utility and toolkit wanting to use DBUS

Last edited by V1del (2022-10-03 20:53:41)

Offline

Board footer

Powered by FluxBB