Bug 469260 - Sometimes new files created in ~/Desktop not using Folder View don't show up
Summary: Sometimes new files created in ~/Desktop not using Folder View don't show up
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Desktop icons & Folder View widget (show other bugs)
Version: 5.27.4
Platform: Other Linux
: HI major
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
: 472648 472698 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-05-02 12:06 UTC by php4fan
Modified: 2023-11-28 15:24 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description php4fan 2023-05-02 12:06:49 UTC
SUMMARY

STEPS TO REPRODUCE
1.  After hitting bug 469256, I created two new files in ~/Desktop: one was a certificate I exported from Chrome, another one I created from the commandline with "cd ~/desktop" and then "touch wtf.txt".

OBSERVED RESULT
The new files are not visible in my desktop. They are not there. As if they didn't exist. I went to a terminal and checked that the files do exist in ~/Desktop.

EXPECTED RESULT
The desktop should always be up to date. If new files are created, they should instantly become visible. Duh.

I wonder if this is related to bug 469256. Perhaps plasmashell has just gone completely berserk and is now going to exhibit all kinds of nonsensical behavior until I restart it?


Operating System: Manjaro Linux 
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.8
Kernel Version: 6.1.23-1-MANJARO (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-1065G7 CPU @ 1.30GHz
Memory: 7.3 GiB of RAM
Graphics Processor: Mesa Intel® Iris® Plus Graphics
Manufacturer: LENOVO
Product Name: 81WE
System Version: IdeaPad 3 15IIL05
Comment 1 Patrick Silva 2023-05-02 14:27:04 UTC
I use one screen and sometimes this bug occurs on my system. Possibly related to bug 387663

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.105.0
Qt Version: 5.15.9
Graphics Platform: Wayland
Comment 2 php4fan 2023-05-12 16:20:09 UTC
I'm not sure this is bug 387663.

Even when I manually do Right Click -> Refresh Desktop, the newly created files don't appear.

If it was just Dolphin failing to watch for updates (assuming it's Dolphin that takes care of the desktop), I would expect a manual refresh to do work.
Comment 3 Nate Graham 2023-05-14 22:55:39 UTC
In both cases probably the issue is the same: that your system is out of inodes so directory watching fails. If your distro packages kde-inotify-survey (https://invent.kde.org/system/kde-inotify-survey), I'd recommend installing it running `kde-inotify-survey` in a terminal window and seeing if it complains. Can you do that?
Comment 4 php4fan 2023-05-16 14:20:55 UTC
Below is the output of kde-inotify-survey. However, this is after a restart, and I'm not observing the issue right now. So I don't know if this helps.

> In both cases probably the issue is the same: that your system is out of inodes so directory watching fails

What I don't understand is why directory watching would be needed for a manual refresh. Isn't "watching" the process of automatically being notified when something happens to the directory (e.g. a file gets created or deleted)? In my case, even a manual refresh failed, meaning I would do right-click -> "Refresh Resktop" and the desktop would fail to be updated. I would not expect that to depend on the ability to watch (otherwise, why does "refresh desktop" even exist, if it works under the assumption that the directory is being watched, then it wouldn't be needed in the first place). But I may be missing something.





```
kde-inotify-survey                                                                                                                           127 ✘  22s  
{
    "processes": [
        {
            "cmdline": "/usr/lib/systemd/systemd",
            "instances": 3,
            "pid": 608,
            "uid": 1000,
            "watches": 79
        },
        {
            "cmdline": "/usr/bin/kwalletd5",
            "instances": 1,
            "pid": 620,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/usr/bin/startplasma-x11",
            "instances": 1,
            "pid": 621,
            "uid": 1000,
            "watches": 0
        },
        {
            "cmdline": "/usr/bin/dbus-daemon",
            "instances": 1,
            "pid": 633,
            "uid": 1000,
            "watches": 2
        },
        {
            "cmdline": "/usr/lib/baloo_file",
            "instances": 3,
            "pid": 662,
            "uid": 1000,
            "watches": 29461
        },
        {
            "cmdline": "/usr/lib/xdg-desktop-portal",
            "instances": 1,
            "pid": 666,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/usr/bin/kded5",
            "instances": 1,
            "pid": 706,
            "uid": 1000,
            "watches": 46
        },
        {
            "cmdline": "/usr/lib/kactivitymanagerd",
            "instances": 1,
            "pid": 821,
            "uid": 1000,
            "watches": 4
        },
        {
            "cmdline": "/usr/bin/gmenudbusmenuproxy",
            "instances": 1,
            "pid": 830,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/usr/bin/pipewire-media-session",
            "instances": 1,
            "pid": 905,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/usr/bin/telegram-desktop",
            "instances": 1,
            "pid": 989,
            "uid": 1000,
            "watches": 6
        },
        {
            "cmdline": "/usr/bin/pamac-tray-plasma",
            "instances": 1,
            "pid": 997,
            "uid": 1000,
            "watches": 2
        },
        {
            "cmdline": "/usr/bin/pulseaudio",
            "instances": 2,
            "pid": 1106,
            "uid": 1000,
            "watches": 2
        },
        {
            "cmdline": "/opt/google/chrome/chrome",
            "instances": 6,
            "pid": 1239,
            "uid": 1000,
            "watches": 10
        },
        {
            "cmdline": "/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mo...",
            "instances": 1,
            "pid": 1293,
            "uid": 1000,
            "watches": 2
        },
        {
            "cmdline": "/usr/bin/dbus-daemon",
            "instances": 1,
            "pid": 1348,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/usr/bin/konsole",
            "instances": 2,
            "pid": 1534,
            "uid": 1000,
            "watches": 2
        },
        {
            "cmdline": "/bin/zsh",
            "instances": 1,
            "pid": 1552,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/bin/zsh",
            "instances": 1,
            "pid": 1577,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/bin/zsh",
            "instances": 1,
            "pid": 1585,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/bin/zsh",
            "instances": 1,
            "pid": 1587,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/usr/share/zsh-theme-powerlevel10k/gitstatus/usrbin/gitstatusd",
            "instances": 1,
            "pid": 1588,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/usr/bin/plasmashell",
            "instances": 4,
            "pid": 1662,
            "uid": 1000,
            "watches": 18
        },
        {
            "cmdline": "/usr/bin/systemsettings",
            "instances": 5,
            "pid": 1904,
            "uid": 1000,
            "watches": 5
        },
        {
            "cmdline": "/usr/lib/thunderbird/thunderbird",
            "instances": 3,
            "pid": 3136,
            "uid": 1000,
            "watches": 11
        },
        {
            "cmdline": "kde-inotify-survey",
            "instances": 1,
            "pid": 3687,
            "uid": 1000,
            "watches": 1
        }
    ],
    "totals": {
        "instancePercent": 4,
        "instances": 46,
        "maxInstances": 1024,
        "maxWatches": 524288,
        "watchPercent": 5,
        "watches": 29661
    }
}
```
Comment 5 Nate Graham 2023-05-16 16:18:38 UTC
Ok, I guess it's not an :out of file watches" situation, then.
Comment 6 Jing Mi 2023-07-27 13:54:11 UTC
I also observed this bug, after re-enabling folder view this problem is solved, I really wish "refresh desktop" can actually do something useful here.

Dolphin works fine, I don't think it's responsible for desktop icons.
Comment 7 Nate Graham 2023-09-07 20:31:57 UTC
*** Bug 472698 has been marked as a duplicate of this bug. ***
Comment 8 Nate Graham 2023-09-07 20:32:00 UTC
*** Bug 472648 has been marked as a duplicate of this bug. ***
Comment 9 Nate Graham 2023-09-07 20:34:38 UTC
For people affected by this bug, can you install the kde-inotify-survey package if it's not installed (might have a slightly different name in your distro; search for "inotify"), then reboot, and then see if it warns you that you're nearly out of filesystem watches or notifies? If so, do the thing it tells you to do, then reboot again, then see if the bug has stopped happening.

Thanks!
Comment 10 Stephane Travostino 2023-09-08 08:18:28 UTC
I have just installed it, not rebooted yet, but it doesn't seem to be an inotify limit issue for me either:

```
    "totals": {
        "instancePercent": 37,
        "instances": 48,
        "maxInstances": 128,
        "maxWatches": 524288,
        "watchPercent": 0,
        "watches": 567
    }
```
Comment 11 Nate Graham 2023-09-08 17:00:38 UTC
Ok, so then at least in your case, that's not the problem.
Comment 12 Stephane Travostino 2023-09-09 08:32:30 UTC
I've opened a separate issue for the Refresh Desktop option not actually refreshing the desktop icons, which would at least provide a passable workaround until this is fixed.

Because at the moment the Folder View is completely unusable, and files are refreshed, at least on my machine, only after a reboot.
Comment 13 Stephane Travostino 2023-09-09 08:32:51 UTC
Forgot to link the issue, sorry: https://bugs.kde.org/show_bug.cgi?id=474322
Comment 14 Peter Petersen 2023-10-13 13:56:33 UTC
I experience the same bug quite often.
Comment 15 Peter Petersen 2023-10-13 13:58:25 UTC
(In reply to atx from comment #14)
> I experience the same bug quite often.

I forgot to add some details:

Debian 12 running KDE plasma 5.27.5
Comment 16 Stephane Travostino 2023-10-29 12:03:41 UTC
Still an issue. In fact now I have duplicate items showing up on my Desktop.

Anyway, if I create a new file in ~/Desktop, I get these three lines in the journal: 

```
Oct 28 09:12:54 tranquility kioslave5[2667]: QObject::connect: No such slot DesktopProtocol::_k_slotRedirection(KIO::Job *, QUrl)
Oct 28 09:12:54 tranquility kioslave5[2667]: QObject::connect: No such slot DesktopProtocol::_k_slotRedirection(KIO::Job *, QUrl)
Oct 28 09:12:54 tranquility kioslave5[2689]: QObject::connect: No such slot DesktopProtocol::_k_slotRedirection(KIO::Job *, QUrl)
```

Not sure if it's relevant to the bug at hand.
Comment 17 Harald Sitter 2023-11-24 15:15:44 UTC
Between https://invent.kde.org/frameworks/kio/-/merge_requests/1444 and https://bugs.kde.org/show_bug.cgi?id=467951 I expect this to be fixed. I'm closing this for now. Should the problem still appear with plasma6 we'll have to take another look, please file a new bug for that.
Comment 18 php4fan 2023-11-24 15:25:41 UTC
Plasma 6?
When will we get that?
Comment 19 Nate Graham 2023-11-24 15:27:01 UTC
If all goes according to plan, February 28th of next year.
Comment 20 php4fan 2023-11-24 15:32:04 UTC
Can't the fix get backported? It's a tremendously crippling bug and a ridiculous amount of time to wait for the desktop to be usable again.
Comment 21 Fushan Wen 2023-11-28 15:24:07 UTC
Git commit 75fac6bd1709a6cea057877a1cfc0338a61b2900 by Fushan Wen.
Committed on 28/11/2023 at 16:18.
Pushed by fusionfuture into branch 'master'.

appiumtests: add folder view test

1. Can list files immediately without the need to refresh
2. Can show image previews

M  +1    -0    .kde-ci.yml
M  +6    -0    appiumtests/CMakeLists.txt
M  +46   -27   appiumtests/desktoptest.py
A  +116  -0    appiumtests/folderviewtest.py

https://invent.kde.org/plasma/plasma-desktop/-/commit/75fac6bd1709a6cea057877a1cfc0338a61b2900