Bug 441123

Summary: Dolphin does not create, save thumbnails
Product: [Frameworks and Libraries] kio-extras Reporter: Christoph <site+org.kde.bugs-2020.jf92jmm>
Component: Thumbnails and previewsAssignee: Plasma Bugs List <plasma-bugs-null>
Status: REPORTED ---    
Severity: normal CC: dolphin-bugs-null, gurtos29A, nate, openmail+kde, windows2linux
Priority: NOR    
Version First Reported In: 21.08.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Christoph 2021-08-18 09:43:29 UTC
Dolphin seems to only create thumbnails (~/.cache/thumbnails) of files that are themselves in the cache directory.


STEPS TO REPRODUCE
1. Delete ~/.cache/thumbnails
2. Open ~/Pictures/Digi (162 pictures, thumbnails are shown)


OBSERVED RESULT
No thumbnails are created in ~/.cache/thumbnails, but the "large" and "normal" directories are created, albeit remaining empty.


EXPECTED RESULT
Thumbnails are created in ~/.cache/thumbnails/{large,normal}/ in the normal fashion.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 21.08.0
KDE Plasma Version: 21.08.0
KDE Frameworks Version: 5.85.0
Qt Version: 5.15.2 (built against 5.15.2)


Interesting: When copying the aforementioned Digi directory (holding 162 pictures) into ~/.cache/ and viewing it, the thumbnails in ~/.cache/thumbnails are created.
My ~, ~/Pictures, and ~/.cache are all separate btrfs subvolumes on different physical drives, and LUKS volumes.
Comment 1 Christoph 2021-08-19 00:11:23 UTC
I did some more testing,
since kio was mentioned I used kdebugsettings to set everything to debug logging, and launching "kdeinit5 --no-fork" in a terminal, which resulted in no obvious errors.
Afterwards, I persued the filesystem aspect some more:
- new user, "/home/test1", "/home/test1/.cache", and "/home/test1/Pictures/Digi" all on the same filesystem -> Thumbnails get written
- my user, "/home/c" and "/home/c/.cache" on the same filesystem, but "/home/c/Pictures/Digi" on another filesystem -> No thumbnails get written

It seems like thumbnails in ~/.cache/thumbnails only get written when the thumbnailed data is on the same filesystem as the ~/.cache directory.
Comment 2 Schlaefer 2021-09-14 09:25:10 UTC
For me no thumbnails cache files are generated whatsoever, only the folders (large, normal, x-large) are created.

> It seems like thumbnails in ~/.cache/thumbnails only get written when the
> thumbnailed data is on the same filesystem as the ~/.cache directory.

I can confirm that observation. Since my ~/.cache is on a dedicated subvolume there were zero thumbnail files. Testing within ~/.cache do actually save thumbnails as expected.

Operating System: EndeavourOS
KDE Plasma Version: 5.22.5
KDE Frameworks Version: 5.86.0
Qt Version: 5.15.2(In reply to Christoph from comment #1)
Comment 3 flan_suse 2021-10-15 23:23:39 UTC
Are you using encryption on the locations / subvolumes in question?

> It seems like thumbnails in ~/.cache/thumbnails only get written when the
> thumbnailed data is on the same filesystem as the ~/.cache directory.

This doesn't explain why I am able to cache thumbnails from remote locations, such as CIFS (SMB) network shares.

It might have something to do with the following bug reports, the second one I filed recently to suggest the users be given an "option" to override this default behaviour:

https://bugs.kde.org/show_bug.cgi?id=411919

https://bugs.kde.org/show_bug.cgi?id=443806
Comment 4 flan_suse 2021-10-15 23:30:48 UTC
(In reply to flan_suse from comment #3)
> Are you using encryption on the locations / subvolumes in question?
> 
> > It seems like thumbnails in ~/.cache/thumbnails only get written when the
> > thumbnailed data is on the same filesystem as the ~/.cache directory.
> 
> This doesn't explain why I am able to cache thumbnails from remote
> locations, such as CIFS (SMB) network shares.
> 
> It might have something to do with the following bug reports, the second one
> I filed recently to suggest the users be given an "option" to override this
> default behaviour:
> 
> https://bugs.kde.org/show_bug.cgi?id=411919
> 
> https://bugs.kde.org/show_bug.cgi?id=443806

Also to mention, non-encrypted USB drives also have their thumbnails cached:

https://bugs.kde.org/show_bug.cgi?id=443806#c2