The title is imprecise but I can't reproduce the problem reliably. However, I've been noticing it for a while, typically after starting my Xfce session (which runs thunar --daemon):
new files don't have a thumbnail (typically new downloads made since the start of the session, without having yet opened Thunar once);
reloading the view has no effect;
Tumbler's logs show that no requests are sent to it.
Running thunar -q then restarting Thunar (in daemon mode or not) solves the problem.
I hadn't opened an issue until then because a lot of changes were taking place about thumbnailing, but now that !416 (merged) has been merged I think it's time.
Eh, more thumbnailing issues ... so you already noticed it again, even with !416 (merged) applied / there is no hope that the MR fixed it ?
I fail to reproduce the bug (tried to download 5 different wallpapers while having the download folder open in thunar) ... though yea, you already mentioned that you as well cannot reproduce reliably.
reloading the view briefly displayed the thumbnails before they were replaced by the default icon (unlike usual);
no requests were sent to Tumbler (as usual).
My typical use case is not to use Thunar (but it is started by xfce4-session in daemon mode), and to download videos from youtube on the command line. At some point I open Thunar to watch one of these videos, and then I notice that thumbnailing fails, and that Tumbler receives no requests.
In fact, it was a bit worse than usual, but I think that was a coincidence
It wasn't a coincidence, I just had exactly the same behavior (typical use case described above). It seems that !416 (merged) has made this problem more obvious, without really changing it. The workaround is simple though: thunar -q when necessary.
Meh ... not sure what could trigger such a crazy effect.
Maybe something session-related / tumbler possibly launched in a wrong systemd unit or something similar ?
Maybe you have tumblerd in the xfce4-session-settings in the application autostart ? (I don't have it there) Found that forum post, where the fix for the user was, to add it to autostart: https://forum.xfce.org/viewtopic.php?id=16603
Just tried to dowload some youtube videos via yt-dlp directly after session start ... so far, no sucess to reproduce. (It's downloading in webm format ... that is what you as well have ?)
Maybe something session-related / tumbler possibly launched in a wrong systemd unit or something similar ? Maybe you have tumblerd in the xfce4-session-settings in the application autostart ? (I don't have it there) Found that forum post, where the fix for the user was, to add it to autostart: https://forum.xfce.org/viewtopic.php?id=16603
No I don't think so, besides in this thread thunar -q doesn't solve the problem whereas for me it does.
Just tried to dowload some youtube videos via yt-dlp directly after session start ... so far, no sucess to reproduce.
Downloading videos is not necessary, I had the case this morning without prior download. It seems that I just need a certain amount of time to elapse after the start of my session (typically 2-3 hours). I guess the time itself doesn't matter, but it allows something to take place that triggers this behavior.
Here are the traces left by Thunar and Tumbler in my logs this morning:
# session startnov. 23 08:59:45 pc kernel: Linux version 6.6.2-arch1-1 (linux@archlinux) (gcc (GCC) 13.2.1 20230801, GNU ld (GNU Binutils) 2.41.0) #1 SMP PREEMPT_DYNAMIC Mon, 20 Nov 2023 23:18:21 +0000[…]# I'm opening Thunar for the first time herenov. 23 10:39:12 pc dbus-daemon[604]: [session uid=1000 pid=604] Activating via systemd: service name='org.freedesktop.thumbnails.Thumbnailer1' unit='tumblerd.service' requested by ':1.19' (uid=1000 pid=737 comm="/opt/bin/thunar.orig --daemon")nov. 23 10:39:13 pc systemd[587]: Starting Thumbnailing service...nov. 23 10:39:26 pc thunar.orig[737]: Failed to set the tree-view cursor in less than 5 seconds. Aborting the operation.nov. 23 10:39:38 pc dbus-daemon[604]: [session uid=1000 pid=604] Successfully activated service 'org.freedesktop.thumbnails.Thumbnailer1'nov. 23 10:39:38 pc systemd[587]: Started Thumbnailing service.[…]# Tumbler kills itself after 5 minutes of inactivitynov. 23 10:44:39 pc systemd[587]: tumblerd.service: Consumed 4.043s CPU time.[…]
Tumbler is started by Thunar, but no request is sent to it. I checked this again this morning (later i.e. after 10:44:39 above) by killing Tumbler and then starting it interactively with debug logs: I see that no requests are sent to it by Thunar when I reload the view, or change directory, or even close Thunar and reopen it.
If you want to further look into it, maybe you can reproduce as well with gdb --args thunar/.libs/thunar --daemon, so you could add some breakpoints.
Here some 'fishing in the dark':0001-dont-giveup-after-thumbnailer-proxy-failed.patch... could be that some dbus call fails during startup. Per default, thunar only tries to start the proxy once (On the other hand, one would notice that directly, not only after 2 hours waiting).
Where did you find the traces / and how they are logged ? Wonder if it might make sense to as well log some messages for the thunar (thumbnailer) startup.
Edit: 23 10:39:26 pc thunar.orig[737]: Failed to set the tree-view cursor in less than 5 seconds. Aborting the operation. ... ah, this one was just filed by g_warning
If you want to further look into it, maybe you can reproduce as well with gdb --args thunar/.libs/thunar --daemon, so you could add some breakpoints.
Not sure I have the motivation to do that to be honest :) On the other hand, I'm okay with testing any patch, including if you want to add debug traces. I redirect all my logs to journald by running xfce4-session via systemd-cat in xinitrc, so normally I have trace of everything. I've applied the patch above, we'll see if it's better tomorrow :)
I couldn't reproduce the bug this morning (session start 09:08, thunar start 10:37), though no warning from your patch either, so I guess I was lucky. To be confirmed in the next few days...
Huh, looks promising, maybe I was on the right track … but better let's wait another day or two.
If the bug does not show again, I'll prepare a proper fix. (Maybe with some g_timeout to at least wait ~1sec between attempts to create the Thumbnailer Proxy)
Yea, that hour in between the messages is indeed pretty weird. I actually don't understand how that line can be called if thunar only runs as daemon ... in theory, requests only should happen when something is rendered
It wasn't demonized at the time, I had done thunar -q for my Tumbler tests earlier in the afternoon. More logs:
nov. 25 17:50:08 pc dbus-daemon[598]: [session uid=1000 pid=598] Activating via systemd: service name='org.freedesktop.thumbnails.Thumbnailer1' unit='tumblerd.service' requested by ':1.384' (uid=1000 pid=133122 comm="/opt/bin/thunar.orig")nov. 25 17:50:09 pc systemd[581]: Starting Thumbnailing service...nov. 25 17:50:41 pc dbus-daemon[598]: [session uid=1000 pid=598] Successfully activated service 'org.freedesktop.thumbnails.Thumbnailer1'nov. 25 17:50:41 pc systemd[581]: Started Thumbnailing service.nov. 25 17:50:47 pc thunar.orig[133122]: Thumbnailer Proxy Failed ... starting attempt to re-initializenov. 25 18:53:04 pc dbus-daemon[598]: [session uid=1000 pid=598] Activating via systemd: service name='org.freedesktop.thumbnails.Thumbnailer1' unit='tumblerd.service' requested by ':1.413' (uid=1000 pid=135520 comm="/opt/bin/thunar.orig")nov. 25 18:53:05 pc systemd[581]: Starting Thumbnailing service...nov. 25 18:53:10 pc thunar.orig[135520]: Failed to set the tree-view cursor in less than 5 seconds. Aborting the operation.nov. 25 18:53:29 pc unknown[133122]: ThunarThumbnailer: failed to create proxy: Erreur lors de l’appel de StartServiceByName pour org.freedesktop.thumbnails.Thumbnailer1 : Le délai d’attente est dépassénov. 25 18:53:31 pc dbus-daemon[598]: [session uid=1000 pid=598] Activating via systemd: service name='org.freedesktop.thumbnails.Cache1' unit='tumblerd.service' requested by ':1.413' (uid=1000 pid=135520 comm="/opt/bin/thunar.orig")nov. 25 18:53:31 pc thunar.orig[135520]: Thumbnailer Proxy Failed ... starting attempt to re-initialize
Huh, looks promising, maybe I was on the right track … but better let's wait another day or two.
It could indeed be the right track. I had the bug again just now (no thumbnails when I displayed my images folder), but only for a moment, then the thumbnails came back. And I've got the patch warning in the logs. So I think that without the patch I would have remained in the state without thumbnails.
Incidentally, I've also had these messages several times recently:
nov. 26 20:53:31 pc thunar.orig[755]: ThunarThumbnailer: Queue failed: Le délai d’attente est dépassénov. 27 11:24:05 pc thunar.orig[731]: ThunarThumbnailer: failed to create proxy: Erreur lors de l’appel de StartServiceByName pour org.freedesktop.thumbnails.Thumbnailer1 : Le délai d’attente est dépassé
Yay Still no idea why the proxy fails for you from time to time, though here a more official solution, which prevents flooding if proxy creation always fails: !420 (merged)
After proxi failure a F5 will be required to trigger a reload of the thumbnails which got dropped. Though I suppose that is acceptable, since it's a border-case situation.
I had the bug again just now (no thumbnails when I displayed my images folder), but only for a moment, then the thumbnails came back. And I've got the patch warning in the logs.
I had the case again this morning, so I think !420 (merged) solves at least part of the problem, by at least allowing a proxy to be recreated.
However, I found myself in a bizarre state where Thunar refused to send a thumbnail request for my downloads folder, even though it had just sent one for my videos or images folder (I had Tumbler logs and journalctl open during this time). Reloading the view made no difference.
Closing and reopening Thunar (but not doing thunar -q), it finally sent a request for my downloads folder, but missing a file. Again, reloading the view didn't help (no new request sent to Tumbler).
Finally, by doing thunar -q and reopening Thunar, a complete request was sent for my downloads folder, and all my thumbnails were displayed. And I was also able to verify that, at that point, every time the view was refreshed, a new request was sent to Tumbler, as you'd expect.
This is all a bit confusing and probably difficult to reproduce, but I think there are still some "caching" problems, or something like that, with thunar --daemon that only thunar -q can remedy.
The files in the download folder for which no thumbnails were requested, did you just download them in the same session? (To rule out that it could be related to the recent creation of these files)
Alright, so for thefirst I'll just re-sort/squash the commits a bit and then merge this MR.
The files in the download folder for which no thumbnails were requested, did you just download them in the same session?
I think I'd downloaded them the day before, but the weird thing is that a request was sent for one of the files and not the other (it was a two-part documentary).
Perhaps an important thing: my downloads, images, videos, etc. folders are symbolic links (my home is on a small partition and these data folders are on another). I remember there were problems with this in the past...
Anyway if I find something reproducible/actionable I'll open new issues :)