You are not logged in.

#1 2021-10-09 15:24:41

justdanyul
Member
Registered: 2011-09-29
Posts: 130

[solved] Thunar slow first startup

Thunar recently developed an recently on my system, its not my daily driver for file-management, i really just use it for some specific usecases where vifm doesn't do it for me. So, in short, I'm not quite sure when this problem first occurred.

The symptoms are pretty simple, on first start, Thunar takes a long long time to start up. I'd say, about half a minute or so, where normally, its more or less instantaneous.

I suspect it might be dbus related (maybe related to some of my samba shares that are mounted), but might very well be wrong, as I'm certainly not very well versed in dbus. But, if i use dbus-lanch thunar from the console, it seems to be slow every time i start it, and not just the first time.

Things i've tried i tried setting automount to false in gvfs as per https://forums.linuxmint.com/viewtopic.php?t=336884 and I tried adding dbus-launch to my Xsession in lightdm to ensure its used but all without luck.

Any tips on how to proceed would be appreciated.

Last edited by justdanyul (2021-10-09 16:54:11)

Offline

#2 2021-10-09 15:42:38

seth
Member
Registered: 2012-09-03
Posts: 49,992

Re: [solved] Thunar slow first startup

I tried adding dbus-launch

Don't.

Does running thunar from an interactive shell yell errors/warnings? Anything in the journal?
Also

loginctl session-status

and

ps aux | grep dbus

Offline

#3 2021-10-09 16:12:08

progandy
Member
Registered: 2012-05-17
Posts: 5,184

Re: [solved] Thunar slow first startup

The dbus timeout is about 20 seconds, so a dbus problem could be the cause. Does the same happen with other GTK3 applications?
In that case a relatively common problem is an issue with gtk and xdg-desktop-portal if you have that installed.
sway has a FAQ entry about that: https://github.com/swaywm/sway/wiki#gtk … s-to-start
Edit: For Xorg that should be done with /etc/X11/xinit/xinitrc.d/50-systemd-user.sh, and as far as I know lightdm should set it as well.

There should be DISPLAY in

systemctl --user show-environment

Last edited by progandy (2021-10-09 16:23:17)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#4 2021-10-09 16:30:37

justdanyul
Member
Registered: 2011-09-29
Posts: 130

Re: [solved] Thunar slow first startup

Haha, ok. Made a mental note to myself, never to add dbus-launch to Xsession again (i did remove it immediately though, as it didn't seem to make any difference)

On the journal side of things, this is what i get when starting thunar the first time (the slow one)

Oct 09 17:18:51 waterdog systemd-timesyncd[435]: Initial synchronization to time server 46.227.>
Oct 09 17:18:54 waterdog dbus-daemon[671]: [session uid=1000 pid=671] Activating service name='>
Oct 09 17:18:54 waterdog dbus-daemon[671]: [session uid=1000 pid=671] Successfully activated se>
Oct 09 17:18:54 waterdog dbus-daemon[671]: [session uid=1000 pid=671] Activating via systemd: s>
Oct 09 17:18:54 waterdog systemd[632]: Starting Portal service...
Oct 09 17:18:54 waterdog dbus-daemon[671]: [session uid=1000 pid=671] Activating via systemd: s>
Oct 09 17:18:54 waterdog systemd[632]: Starting flatpak document portal service...
Oct 09 17:18:54 waterdog dbus-daemon[671]: [session uid=1000 pid=671] Activating via systemd: s>
Oct 09 17:18:54 waterdog systemd[632]: Starting sandboxed app permission store...
Oct 09 17:18:54 waterdog dbus-daemon[671]: [session uid=1000 pid=671] Successfully activated se>
Oct 09 17:18:54 waterdog systemd[632]: Started sandboxed app permission store.
Oct 09 17:18:54 waterdog dbus-daemon[671]: [session uid=1000 pid=671] Successfully activated se>
Oct 09 17:18:54 waterdog systemd[632]: Started flatpak document portal service.
Oct 09 17:18:54 waterdog dbus-daemon[671]: [session uid=1000 pid=671] Activating via systemd: s>
Oct 09 17:18:54 waterdog systemd[632]: Starting Portal service (GTK+/GNOME implementation)...
Oct 09 17:18:55 waterdog dbus-daemon[671]: [session uid=1000 pid=671] Successfully activated se>
Oct 09 17:18:55 waterdog systemd[632]: Started Portal service (GTK+/GNOME implementation).
Oct 09 17:18:55 waterdog dbus-daemon[671]: [session uid=1000 pid=671] Activating via systemd: s>
Oct 09 17:18:55 waterdog systemd[632]: Starting Thunar file manager...
Oct 09 17:19:20 waterdog dbus-daemon[671]: [session uid=1000 pid=671] Activating via systemd: s>
Oct 09 17:19:20 waterdog systemd[632]: Starting Virtual filesystem service - disk device monito>
Oct 09 17:19:20 waterdog dbus-daemon[440]: [system] Activating via systemd: service name='org.f>
Oct 09 17:19:20 waterdog systemd[1]: Starting Disk Manager...
Oct 09 17:19:20 waterdog udisksd[1152]: udisks daemon version 2.9.4 starting
Oct 09 17:19:20 waterdog Thunar[1144]: Failed to register: Timeout was reached
Oct 09 17:19:20 waterdog systemd[632]: Started PipeWire Multimedia Service.
Oct 09 17:19:20 waterdog systemd[632]: Started Thunar file manager.
Oct 09 17:19:20 waterdog rtkit-daemon[693]: Successfully made thread 1157 of process 1157 owned>
Oct 09 17:19:20 waterdog rtkit-daemon[693]: Supervising 4 threads of 2 processes of 1 users.
Oct 09 17:19:20 waterdog rtkit-daemon[693]: Supervising 4 threads of 2 processes of 1 users.
Oct 09 17:19:20 waterdog rtkit-daemon[693]: Supervising 4 threads of 2 processes of 1 users.
Oct 09 17:19:20 waterdog rtkit-daemon[693]: Successfully made thread 1159 of process 1157 owned>
Oct 09 17:19:20 waterdog rtkit-daemon[693]: Supervising 5 threads of 2 processes of 1 users.
Oct 09 17:19:20 waterdog dbus-daemon[671]: [session uid=1000 pid=671] Activating service name='>
Oct 09 17:19:20 waterdog dbus-daemon[671]: [session uid=1000 pid=671] Successfully activated se>
Oct 09 17:19:20 waterdog dbus-daemon[671]: [session uid=1000 pid=671] Successfully activated se>
Oct 09 17:19:20 waterdog systemd[632]: Started Portal service.
Oct 09 17:19:20 waterdog dbus-daemon[440]: [system] Successfully activated service 'org.freedes>
Oct 09 17:19:20 waterdog systemd[1]: Started Disk Manager.
Oct 09 17:19:20 waterdog audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg>
Oct 09 17:19:20 waterdog kernel: audit: type=1130 audit(1633796360.087:76): pid=1 uid=0 auid=42>
Oct 09 17:19:20 waterdog udisksd[1152]: Acquired the name org.freedesktop.UDisks2 on the system>
Oct 09 17:19:20 waterdog dbus-daemon[671]: [session uid=1000 pid=671] Successfully activated se>
Oct 09 17:19:20 waterdog systemd[632]: Started Virtual filesystem service - disk device monitor.
Oct 09 17:19:20 waterdog dbus-daemon[671]: [session uid=1000 pid=671] Activating via systemd: s>
Oct 09 17:19:20 waterdog systemd[632]: Starting Virtual filesystem metadata service...
Oct 09 17:19:20 waterdog dbus-daemon[671]: [session uid=1000 pid=671] Successfully activated se>
Oct 09 17:19:20 waterdog systemd[632]: Started Virtual filesystem metadata service.
Oct 09 17:19:20 waterdog appimagelauncherfs[640]: Error: could not find registered AppImage: /.>
Oct 09 17:19:20 waterdog appimagelauncherfs[640]: Error: could not find registered AppImage: /.>
Oct 09 17:19:20 waterdog appimagelauncherfs[640]: Error: could not find registered AppImage: /.>
Oct 09 17:19:20 waterdog appimagelauncherfs[640]: Error: could not find registered AppImage: /.>
Oct 09 17:19:20 waterdog appimagelauncherfs[640]: Error: could not find registered AppImage: /.>
Oct 09 17:19:20 waterdog appimagelauncherfs[640]: Error: could not find registered AppImage: /.>
Oct 09 17:19:20 waterdog dbus-daemon[671]: [session uid=1000 pid=671] Successfully activated se>
Oct 09 17:19:20 waterdog dbus-daemon[671]: [session uid=1000 pid=671] Activating service name='>
Oct 09 17:19:20 waterdog tumblerd[1202]: Failed to load plugin "tumbler-gepub-thumbnailer.so": >
Oct 09 17:19:20 waterdog org.freedesktop.thumbnails.Thumbnailer1[1202]: Registered thumbnailer >
Oct 09 17:19:20 waterdog org.freedesktop.thumbnails.Thumbnailer1[1202]: Registered thumbnailer >
Oct 09 17:19:20 waterdog org.freedesktop.thumbnails.Thumbnailer1[1202]: Registered thumbnailer >
Oct 09 17:19:20 waterdog org.freedesktop.thumbnails.Thumbnailer1[1202]: Registered thumbnailer >
Oct 09 17:19:20 waterdog org.freedesktop.thumbnails.Thumbnailer1[1202]: Registered thumbnailer >
Oct 09 17:19:20 waterdog org.freedesktop.thumbnails.Thumbnailer1[1202]: Registered thumbnailer >
Oct 09 17:19:20 waterdog org.freedesktop.thumbnails.Thumbnailer1[1202]: Registered thumbnailer >
Oct 09 17:19:20 waterdog dbus-daemon[671]: [session uid=1000 pid=671] Successfully activated se>

The line

Oct 09 17:19:20 waterdog Thunar[1144]: Failed to register: Timeout was reached

seems sinister. It looks like Thunder attempts to start and fails, then it tries again, and succeeds. I found this old bug report, but i wonder if its unrelated: https://bugs.archlinux.org/task/60229?dev=3741

@progandy I'll try and reboot and see. I haven't noticed it with any other gtk3 apps, but with that said, i rarely run gtk3 apps (other than firefox)

I do have the xdg-desktop-portal installed though, but i'll just get rid of it, I was playing around with flatpaks just for the fun of it but was incredibly underwhelmed and is hoping to live a life without ever being exposed to that again, so might as well get rid of it, it was just lazyness which made me not clean up aftermyself

Last edited by justdanyul (2021-10-09 16:45:54)

Offline

#5 2021-10-09 16:53:54

justdanyul
Member
Registered: 2011-09-29
Posts: 130

Re: [solved] Thunar slow first startup

@prograndy

That was it. Getting rid of xdg-desktop-portal fixed the issue.

Thanks a lot :-)

Offline

#6 2021-10-09 17:40:58

justdanyul
Member
Registered: 2011-09-29
Posts: 130

Re: [solved] Thunar slow first startup

progandy wrote:

The dbus timeout is about 20 seconds, so a dbus problem could be the cause. Does the same happen with other GTK3 applications?
In that case a relatively common problem is an issue with gtk and xdg-desktop-portal if you have that installed.
sway has a FAQ entry about that: https://github.com/swaywm/sway/wiki#gtk … s-to-start
Edit: For Xorg that should be done with /etc/X11/xinit/xinitrc.d/50-systemd-user.sh, and as far as I know lightdm should set it as well.

There should be DISPLAY in

systemctl --user show-environment

Just out of curiosity, I don't run Wayland, so what would i actually do if I wanted to fix this? Set manually set WAYLAND_DISPLAY to my X display? And i have DISPLAY in systemctl --user show-environment

Offline

#7 2021-10-09 19:25:32

progandy
Member
Registered: 2012-05-17
Posts: 5,184

Re: [solved] Thunar slow first startup

justdanyul wrote:

Just out of curiosity, I don't run Wayland, so what would i actually do if I wanted to fix this? Set manually set WAYLAND_DISPLAY to my X display? And i have DISPLAY in systemctl --user show-environment

Without wayland, you don't need WAYLAND_DISPLAY, only DISPLAY.

Maybe newer versions of xdg-desktop-portal need something more or are bugged, there is a new report for sway that the environment variables may not be enough either. It does work for me, I use i3 with xdg-desktop-portal and xdg-desktop-portal-gtk installed, but I haven't rebooted for more than a week.
Edit: This might be the bugfix (looks like it only occurs if you have a gtk filemanager that implements a specific dbus interface like Thunar): https://github.com/flatpak/xdg-desktop- … issues/636

Last edited by progandy (2021-10-09 19:58:03)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

Board footer

Powered by FluxBB