Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
25 second delay in recent update
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9732
Location: almost Mile High in the USA

PostPosted: Sat Jun 03, 2023 5:21 pm    Post subject: 25 second delay in recent update Reply with quote

Not sure what package update happened recently, but now a lot of applications have a 25 second delay before anything happens. This is happening on two systemd/gnome/xfce4 machines but I'm using xfce4 despite gnome is installed.

Pulling up firefox, eog, gnome-disks, epiphany, evince, and others take 25 seconds before the window pops up. Another thing is while Evolution comes up right away, it takes 25 seconds before I can read any mail.
There are programs that don't incur delays and work fine: pavucontrol, gnome-mines, gnome-terminal, and many more does not incur the 25 second delay.

I'm not sure what it's stopping on, it does not appear to be network related, anyone happen to know what could cause this 25 second delay? (This is exactly 25 second timeout on poll() according to strace...)

My guess is actually a dbus or local socket but can't put my finger on it... I think it's also specific to only a few specific GUI/desktop applications, I don't see it in CLI applications.

--- added more programs that exhibit this behavior and ones that do not ---
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2980
Location: Edge of marsh USA

PostPosted: Sun Jun 04, 2023 3:44 am    Post subject: Reply with quote

Launch apps in a terminal and see what might be happening. If a verbose option is available, use it.
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2751

PostPosted: Sun Jun 04, 2023 4:19 am    Post subject: Reply with quote

Afaik recent (rare) cases of this happening were related to attempts to resolve the system's hostname timing out and could be resolved by adding it to /etc/hosts.

Not that I looked closely at this, and not sure why it started happening now.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9732
Location: almost Mile High in the USA

PostPosted: Sun Jun 04, 2023 5:12 am    Post subject: Reply with quote

eog and gnome-disks I can readily reproduce, alas no diagnostic output... firefox works fine if I have it running and it forks new windows but if all windows are closed it invokes the delay.

I really don't think it's a hostname issue, I run a caching nameserver and have my caching+soa nameserver resolve all my local hostnames as I do use it to simplify operations. Also what's weird is the sole difference is the 800+ packages that were merged...

I didn't compile with debug symbols yet but the backtrace library stack appears to be libgio libgobject libhandy libgobject libhandy libgobject libgio libglib poll() for gnome-disks and is very similar for eog.

The interesting function name is g_dbus_proxy_new_for_bus_sync - but no other debug symbols or call params to discern the issue. I might have to build full debug symbols into glib to see what's going on...

------------

FSCK

Has something to do with Gnome. When I'm in Gnome it works fine. Just have a problem in xfce4. Perhaps something to do with tumbler?

Also I am using lightdm so I don't think I'm mucking with xinitrc.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1585
Location: South America

PostPosted: Sun Jun 04, 2023 2:24 pm    Post subject: Reply with quote

If this is a D-Bus-related timeout, it might be easier to run dbus-monitor on the per-login session message bus (the default).
_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9732
Location: almost Mile High in the USA

PostPosted: Sun Jun 04, 2023 4:04 pm    Post subject: Reply with quote

looks like this is the last dbus access before the hang:
Code:
method return time=1685894384.549181 sender=org.freedesktop.DBus -> destination=:1.169 serial=19 reply_serial=18
method call time=1685894384.549184 sender=:1.169 -> destination=org.freedesktop.DBus serial=19 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=StartServiceByName
   string "org.freedesktop.portal.Desktop"
   uint32 0

and it when the window pops up 25 seconds later:
Code:
method call time=1685894409.574445 sender=:1.169 -> destination=org.freedesktop.DBus serial=20 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=RemoveMatch
   string "type='signal',sender='org.freedesktop.DBus',interface='org.freedesktop.DBus',member='NameOwnerChanged',path='/org/freedesktop/DBus',arg0='org.freedesktop.portal.Desktop'"
method return time=1685894409.574461 sender=org.freedesktop.DBus -> destination=:1.169 serial=20 reply_serial=20

Now I'm not sure what service it's trying to start here but there was never a reply_serial=19 ... so indeed there was some timeout from a started service.

I said tumbler earlier as i recalled some issue while it was installing but forgot what the issue was. need something to jog my memory...
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1585
Location: South America

PostPosted: Sun Jun 04, 2023 5:05 pm    Post subject: Reply with quote

It looks like xdg-desktop-portal is not running, fails to run, or something like that. org.freedesktop.portal.Desktop is that program's well-known bus name.
_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9732
Location: almost Mile High in the USA

PostPosted: Sun Jun 04, 2023 5:26 pm    Post subject: Reply with quote

Translation needed?
Code:
$ xdg-desktop-portal
bash: xdg-desktop-portal: command not found

_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1585
Location: South America

PostPosted: Sun Jun 04, 2023 5:58 pm    Post subject: Reply with quote

eccerr0r wrote:
Translation needed?

Some application of yours seems to want (perhaps since your last update?) to 'talk' over D-Bus to a program named xdg-desktop-portal. Provided on Gentoo by the sys-apps/xdg-desktop-portal package. The program isn't there, or maybe it is but is failing to run.
_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9732
Location: almost Mile High in the USA

PostPosted: Sun Jun 04, 2023 10:12 pm    Post subject: Reply with quote

Ah.

The package is installed (binary is in /usr/libexec) and it appears that there's also a gnome version hence I don't see the same issue in gnome.
Now the question is why is it failing to run ...

Should there be a /usr/share/xdg-desktop-portal/portals specific to the non gnome version... is the gtk.portal file the generic one?
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1585
Location: South America

PostPosted: Sun Jun 04, 2023 11:29 pm    Post subject: Reply with quote

eccerr0r wrote:
Now the question is why is it failing to run ...

Any messages from dbus-daemon in the logs?

eccerr0r wrote:
Should there be a /usr/share/xdg-desktop-portal/portals specific to the non gnome version... is the gtk.portal file the generic one?

sys-apps/xdg-desktop-portal-gtk is a generic GTK backend, and sys-apps/xdg-desktop-portal-gnome, a GNOME backend (that requires xdg-desktop-portal-gtk).
_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9732
Location: almost Mile High in the USA

PostPosted: Mon Jun 05, 2023 12:20 am    Post subject: Reply with quote

Code:
Jun 04 18:11:50 fujiko systemd[2581]: graphical-session.target is inactive.
Jun 04 18:11:50 fujiko systemd[2581]: Dependency failed for xdg-desktop-portal-gnome.service.

boOOoooOoooo!!!!

Hmm...
Code:
$ systemctl list-units --type=target --user --all
  UNIT                     LOAD   ACTIVE   SUB    DESCRIPTION                   
  basic.target             loaded active   active Basic System
  default.target           loaded active   active Main User Target
  graphical-session.target loaded inactive dead   Current graphical user session
  paths.target             loaded active   active Paths
  shutdown.target          loaded inactive dead   Shutdown
  sockets.target           loaded active   active Sockets
  sound.target             loaded inactive dead   Sound Card
  timers.target            loaded active   active Timers

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.
8 loaded units listed.
To show all installed unit files use 'systemctl list-unit-files'.

Ack. Now how to resurrect this dead target...
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9732
Location: almost Mile High in the USA

PostPosted: Tue Jun 06, 2023 2:50 am    Post subject: Reply with quote

Okay I have a hack solution that seems to work: I copied the service files for xdg-desktop-portal-*service to /etc/systemd/user and changed the target requirements from graphical-session.target to just graphical.target ... so far this is working fine for xfce4 and the delay is gone, but might break other things.

The problem seems to be that gnome actually reaches graphical-session.target but xfce4 does not. I'm using gdm on one of the two boxes and lightdm on the other. Ultimately this is a systemd issue it seems, that affects just xfce4.

What would be a better, more generalized solution?
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9732
Location: almost Mile High in the USA

PostPosted: Mon Jun 19, 2023 7:13 pm    Post subject: Reply with quote

Looks like some reddit users ran into the same issue I think...

https://www.reddit.com/r/Gentoo/comments/14cy9kv/xdgdesktopportal_slowing_gtk_apps_waaaaaay_down/
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
CooSee
Veteran
Veteran


Joined: 20 Nov 2004
Posts: 1457
Location: Earth

PostPosted: Mon Jun 19, 2023 10:25 pm    Post subject: Reply with quote

there's a bug report:

https://bugs.gentoo.org/905265

8)
_________________
" Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier "
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9732
Location: almost Mile High in the USA

PostPosted: Tue Jun 20, 2023 12:00 am    Post subject: Reply with quote

at least I'm not out of my mind that I did something to cause it!
Well, other than not using Gnome with xdg-desktop-portal!
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
CooSee
Veteran
Veteran


Joined: 20 Nov 2004
Posts: 1457
Location: Earth

PostPosted: Tue Jun 20, 2023 12:32 am    Post subject: Reply with quote

i don't use gnome or xfce - never liked it, because it always annoyed me including lightdm <<< just my two cents :roll:

found something https://forum.manjaro.org/t/starting-any-program-became-very-slow/142495/2 - actual Bug https://gitlab.gnome.org/GNOME/xdg-desktop-portal-gnome/-/issues/74

hope this will help you somehow.

8)
_________________
" Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier "
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2980
Location: Edge of marsh USA

PostPosted: Tue Jun 20, 2023 1:58 am    Post subject: Reply with quote

It isn't necessary to use LightDM with xfce. Any display manager can be used, or none.
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
jwm224
Tux's lil' helper
Tux's lil' helper


Joined: 27 May 2015
Posts: 119
Location: Pennsylvania

PostPosted: Tue Jul 09, 2024 8:03 pm    Post subject: Reply with quote

I use BSPWM, and I added this line to .xinitrc file to get gvfs to work with thunar:

ck-launch-session dbus-launch thunar --daemon &

I believe this fixed the 20 second delay for me.
I know this is an old post, but I've had trouble finding a solution to using xdg-desktop-portal with thunar.
So, I hope this helps the next guy.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum