Since about a day (after a system update I think) GTK applications take 25s to start. I already figured out that it is a dbus issue: running as root works fine. launching with
dbus-launch <program> (under the affected user) works fine. the program does nothing in the 25s besides waiting. 25s is the dbus timeout
I am currently developing a GTK application which I have to debug. So this situation is slowing me down by an insane margin
Edit: btw I use arch
How can I figure out what exactly causes this problem and fix it?
yeah, that dbus hang issue is there for like 15 years… trully a feature
if you bork your installation enough, you can easily replicate it… i remmember running e16 wm and looking for an ultra slim installation, removing dbus something-something and then GTK apps going wild… they are not even hanging, they are just patiently waiting in the background
never found a fix, probably because it’s not a bug… current user has to be able too launch dbus properly ( or was it to have a running instance in the background, can’t remmember ) and then it’s all good. without that, they hang…
If dbus times out, it means you’re asking it to do something it can’t handle. As you state that running under root works fine, you need to look in the direction of file/user permissions.
I got the idea of looking into the pacman logs (
/var/log/pacman.log), since that system update appeared to be the starting point of the issues. Turned out at the same day I installed Flatpak, which in turn installed a dependency called
xdg-dbus-proxy - which looked suspicious to me for being the culprit. I then removed Flatpak incl. orphaned dependencies (using
pacman -Rs flatpak) and rebootet. Everything is now back to normal, GTK-based applications are no longer waiting for 25s at startup.
Since I only installed Flatpak for trying out an application I have no issues removing it. A more precise solution would probably be removing just xdg-dbus-proxy or diving into its configuration.
Thanks for your help