Bug 425048 - Picture of the day wallpaper is not cached in /tmp with tmpfs after reboot
Summary: Picture of the day wallpaper is not cached in /tmp with tmpfs after reboot
Status: RESOLVED FIXED
Alias: None
Product: kdeplasma-addons
Classification: Plasma
Component: Picture of the Day (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 425235 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-08-05 18:11 UTC by Siddhartha
Modified: 2020-09-04 16:12 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.20


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Siddhartha 2020-08-05 18:11:17 UTC
SUMMARY
At plasma startup, the Picture of the day wallpaper is not loaded and all the wallpapers are black. I suspect it happens because at startup, I need to unlock kwallet before the wifi can connect, which takes some time.
Meanwhile, the wallpaper plugin must be trying to access the latest wallpaper, which would fail due to the lack of working internet. The wallpaper does come up properly within 10min (exactly), which must be the next time the plugin checks for an update?

The plugin should use previously downloaded and cached wallpapers if it is unable to load one over the internet.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.19.80 (plasma-desktop-git r7774.27e1c236b-1)
KDE Frameworks Version: 5.73.0
Qt Version: 5.15.0
Kernel Version: 5.7.11-arch1-1
Comment 1 Guo Yunhe 2020-08-10 19:49:34 UTC
Cannot reproduce this issue on my computer.

Please note, we changed the cache directory in 5.73.0. If you updated the package, caching will not work next time you reboot. But it should work next next time.

Can you try the following steps:

1. turn off your network totally.
2. run "plasmashell --replace" in konsole.
3. check if the wallpaper is showing.
4. save all output in konsole in a file and attach to this bug ticket.
Comment 2 Siddhartha 2020-08-11 21:01:37 UTC
Cannot reproduce it with plasmashell --replace (wallpaper is set correctly), but can reproduce after a system restart (blank wallpaper for 10 minutes).
Comment 3 Guo Yunhe 2020-08-11 21:57:30 UTC
where your /tmp is mounted? a hard drive or ram?

can you check if 'ls /tmp/plasma*' output anything?
Comment 4 Siddhartha 2020-08-11 22:01:13 UTC
Ah that could be it. /tmp on Archlinux is mounted as tmpfs, so loses everything after a restart.

Isn't $XDG_CACHE_HOME a more appropriate place for storing such files?
Comment 5 Guo Yunhe 2020-08-12 06:41:13 UTC
The POTD cache is shared by different process:

1. plasmashell (user)
2. lockscreen (root)
3. sddm (root, support in future)

So it should be accessible by multiple users. So we cannot use $XDG_CACHE_HOME.

It is true in some distros, /tmp get clean up when you reboot. /var/tmp should be kept between reboots, according to this article https://www.fosslinux.com/41739/linux-tmp-directory-everything-you-need-to-know.htm
Comment 6 Bug Janitor Service 2020-08-12 07:12:15 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kdeplasma-addons/-/merge_requests/14
Comment 7 David Edmundson 2020-08-12 09:09:41 UTC
>2. lockscreen (root)

That's not run as root. It runs as your normal user.

> 3. sddm (root, support in future)

That's not run as root. That runs as a temporary "fake" user.
Comment 8 Guo Yunhe 2020-08-12 10:05:46 UTC
anyway, lock screen and sddm process cannot access $XDG_CACHE_HOME. this is the main reason why we moved from ~/.cache to /tmp
Comment 9 Nate Graham 2020-08-12 19:15:25 UTC
*** Bug 425235 has been marked as a duplicate of this bug. ***