Bug 422006 - [Dolphin] Emptying trash does not trigger view refresh
Summary: [Dolphin] Emptying trash does not trigger view refresh
Status: REPORTED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 20.04.0
Platform: Manjaro Linux
: HI normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
: 431034 442202 443602 472978 482852 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-05-24 10:25 UTC by medin
Modified: 2024-03-08 19:34 UTC (History)
16 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Emptying trash does not trigger refresh (462.46 KB, video/mp4)
2020-05-24 10:25 UTC, medin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description medin 2020-05-24 10:25:14 UTC
Created attachment 128741 [details]
Emptying trash does not trigger refresh

When I click on Empty Trash inside Dolphin, the folder view is not updated to reflect the deleted content. See my video for more info.

Operating System: Manjaro Linux 
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.70.0
Qt Version: 5.14.2
Kernel Version: 5.6.12-1-MANJARO
OS Type: 64-bit
Processors: 2 × Pentium® Dual-Core CPU T4400 @ 2.20GHz
Memory: 5.7 GiB of RAM
Comment 1 Méven Car 2020-05-25 14:26:57 UTC
I don't reproduce.

Do you have inotify installed and working ?

When you move files using the terminal, is it reflected in dolphin automatically ?
Comment 2 medin 2020-05-25 20:07:08 UTC
(In reply to Méven Car from comment #1)
> I don't reproduce.
> 
> Do you have inotify installed and working ?
> 
> When you move files using the terminal, is it reflected in dolphin
> automatically ?

By inotify do you mean the package inotify-tools I don't have it installed and I never removed it. And in settings I have some service called "Directory Watcher" which is reported to be running.

When I move/rename files by command line the change is reflected to dolphin opened window. 

This problem is not present when I select files in Trash folder and click on delete keyboard then Delete, it's only present when using "Empty Trash" button from Dolphin.
Comment 3 medin 2020-05-25 20:14:03 UTC
Even after installing  inotify-tools package then rebooting, the problem is still persistent.
This bug is probably introduced in the latest Manjaro KDE stable update of 19/05/2020.
Comment 4 enenou 2020-06-20 16:26:17 UTC
Same for me on Fedora 30 and now on 32 after an upgrade.
Comment 5 medin 2020-07-01 13:54:49 UTC
(In reply to enenou from comment #4)
> Same for me on Fedora 30 and now on 32 after an upgrade.

What solved the problem for me is to do 
rm -rf ~/.local/share/Trash/
then reboot
Comment 6 jbn 2020-07-11 01:54:33 UTC
I can confirm this on Debian GNU/Linux testing:

Operating System: Debian GNU/Linux 
KDE Plasma Version: 5.17.5
KDE Frameworks Version: 5.70.0
Qt Version: 5.14.2
Kernel Version: 5.7.0-1-amd64
OS Type: 64-bit
Processors: 8 × AMD FX(tm)-8150 Eight-Core Processor
Memory: 31.3 GiB of RAM
Dolphin version: 20.04.2

As for the inotify-tools package I installed:
Package: inotify-tools
Version: 3.14-8.1
Priority: optional
Section: misc
Maintainer: Dmitry Bogatov <KAction@debian.org>

I have been able to see the described trash behavior without inotify-tools package installed and with inotify-tools package installed. Nothing was fixed after installing inotify-tools and rebooting.

I can reproduce this with:
- a new volume (a HD formatted with ext4)
- a local SMB-mounted network volume

I can get the proper trash+auto-refresh behavior to work once the first time I empty the trash in a session. After that, it fails in exactly the same way as shown in the attached screengrab.

I'll try what was mentioned in comment 5 ("rm -rf ~/.local/share/Trash/ then reboot") and report back if that fixes things, but I don't understand why that would work at all.
Comment 7 Terrance Brown 2020-11-12 02:10:02 UTC
I can also confirm this:

Operating System: Arch Linux
KDE Plasma Version: 5.20.3
KDE Frameworks Version: 5.75.0
Qt Version: 5.15.1
Kernel Version: 5.9.8-arch1-1
OS Type: 64-bit
Processors: 4 × Intel® Core™ i5-4300M CPU @ 2.60GHz
Memory: 7,7 GiB of RAM
Graphics Processor: Mesa DRI Intel® HD Graphics 4600
Dolphin version: 20.08.3

I am able to resolve the problem using the command mentioned in comment 5.

In my case I do not have inotify installed.
Comment 8 Adam Clouthier 2020-11-18 18:46:51 UTC
Currently not able to reproduce with my setup. Can send a few files to the trash, delete, view refreshes. Also able to repeat this several times and the view refreshes.

Operating System: Fedora 33
KDE Plasma Version: 5.19.5
KDE Frameworks Version: 5.75.0
Qt Version: 5.15.1
Kernel Version: 5.9.8-300.fc33.x86_64
OS Type: 64-bit
Dolphin Version: 20.8.3
Comment 9 medin 2021-01-30 09:49:47 UTC
This happens again with 5.20.5, It's tiring to always remove ~/.local/share/Trash/ by hand after certain usage time.
Comment 10 Méven Car 2021-02-01 07:04:56 UTC
(In reply to medin from comment #9)
> This happens again with 5.20.5, It's tiring to always remove
> ~/.local/share/Trash/ by hand after certain usage time.

Have you checked your inotify capacities ?
Its default value is quite low and some programs like IDE or VM need of lot of inofity resources.

See for instance
https://unix.stackexchange.com/questions/13751/kernel-inotify-watch-limit-reached
Comment 11 medin 2021-02-01 18:59:11 UTC
(In reply to Méven Car from comment #10)
> (In reply to medin from comment #9)
> > This happens again with 5.20.5, It's tiring to always remove
> > ~/.local/share/Trash/ by hand after certain usage time.
> 
> Have you checked your inotify capacities ?
> Its default value is quite low and some programs like IDE or VM need of lot
> of inofity resources.
> 
> See for instance
> https://unix.stackexchange.com/questions/13751/kernel-inotify-watch-limit-
> reached

I set :
fs.inotify.max_user_watches = 524288
then rebooted, but the same problem persists.
Comment 12 Patrick Silva 2021-06-11 12:55:37 UTC
possibly duplicate of bug 387663
Comment 13 Jack Hill 2021-09-28 11:17:52 UTC
*** Bug 442202 has been marked as a duplicate of this bug. ***
Comment 14 Méven Car 2021-09-29 13:21:12 UTC
(In reply to medin from comment #11)
> (In reply to Méven Car from comment #10)
> > (In reply to medin from comment #9)
> > > This happens again with 5.20.5, It's tiring to always remove
> > > ~/.local/share/Trash/ by hand after certain usage time.
> > 
> > Have you checked your inotify capacities ?
> > Its default value is quite low and some programs like IDE or VM need of lot
> > of inofity resources.
> > 
> > See for instance
> > https://unix.stackexchange.com/questions/13751/kernel-inotify-watch-limit-
> > reached
> 
> I set :
> fs.inotify.max_user_watches = 524288
> then rebooted, but the same problem persists.

Can you check which process are consuming the inotify watches resources, this stack overflow answer provides a handy script inotify-consumers.sh that does just that :

https://unix.stackexchange.com/questions/15509/whos-consuming-my-inotify-resources/502812#502812

If that is dolphin, then there must be some particular circumstances due to your systems, how many tabs and instances are opened.
Comment 15 Patrick Silva 2021-10-11 23:21:58 UTC
*** Bug 443602 has been marked as a duplicate of this bug. ***
Comment 16 Pete 2022-09-03 07:39:30 UTC
Still happening for me too after so long. Dolphin 22.08.0
Comment 17 Méven Car 2023-04-08 14:48:37 UTC
I don't reproduce this in Dolphin 22.12.

Can anyone still reproduce it ?
Comment 18 Méven Car 2023-04-08 16:00:33 UTC
*** Bug 431034 has been marked as a duplicate of this bug. ***
Comment 19 adec2011.ac 2023-04-08 16:28:10 UTC
(In reply to Méven Car from comment #17)
> I don't reproduce this in Dolphin 22.12.
> 
> Can anyone still reproduce it ?

It is still happening for me.

In an open dolphin windows I have a wastebin icon under the places list. WHen i right click and select empty wastebin the bin doesnt empty and the icon doesnt change unless i physically click the icon to open it in the dolphin window and refresh the contents

Operating System: KDE neon Testing Edition
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.105.0
Qt Version: 5.15.8
Kernel Version: 6.2.10-1-liquorix-amd64 (64-bit)
Graphics Platform: X11
Processors: 4 × Intel® Core™ i5-4460 CPU @ 3.20GHz
Memory: 15.6 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 1050 Ti/PCIe/SSE2
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: H81M-S2H
Comment 20 adec2011.ac 2023-04-08 16:30:38 UTC
(In reply to adec2011.ac from comment #19)
> (In reply to Méven Car from comment #17)
> > I don't reproduce this in Dolphin 22.12.
> > 
> > Can anyone still reproduce it ?
> 
> It is still happening for me.
> 
> In an open dolphin windows I have a wastebin icon under the places list.
> WHen i right click and select empty wastebin the bin doesnt empty and the
> icon doesnt change unless i physically click the icon to open it in the
> dolphin window and refresh the contents
> 
> Operating System: KDE neon Testing Edition
> KDE Plasma Version: 5.27.4
> KDE Frameworks Version: 5.105.0
> Qt Version: 5.15.8
> Kernel Version: 6.2.10-1-liquorix-amd64 (64-bit)
> Graphics Platform: X11
> Processors: 4 × Intel® Core™ i5-4460 CPU @ 3.20GHz
> Memory: 15.6 GiB of RAM
> Graphics Processor: NVIDIA GeForce GTX 1050 Ti/PCIe/SSE2
> Manufacturer: Gigabyte Technology Co., Ltd.
> Product Name: H81M-S2H

Just to add my dolphin is Version 23.03.90
Comment 21 argonel 2023-04-08 19:30:28 UTC
(In reply to adec2011.ac from comment #20)
> (In reply to adec2011.ac from comment #19)
> > (In reply to Méven Car from comment #17)
> > > I don't reproduce this in Dolphin 22.12.
> > > 
> > > Can anyone still reproduce it ?
> > 
> > It is still happening for me.
> > 
> > In an open dolphin windows I have a wastebin icon under the places list.
> > WHen i right click and select empty wastebin the bin doesnt empty and the
> > icon doesnt change unless i physically click the icon to open it in the
> > dolphin window and refresh the contents
> > 
> > Operating System: KDE neon Testing Edition
> > KDE Plasma Version: 5.27.4
> > KDE Frameworks Version: 5.105.0
> > Qt Version: 5.15.8
> > Kernel Version: 6.2.10-1-liquorix-amd64 (64-bit)
> > Graphics Platform: X11
> > Processors: 4 × Intel® Core™ i5-4460 CPU @ 3.20GHz
> > Memory: 15.6 GiB of RAM
> > Graphics Processor: NVIDIA GeForce GTX 1050 Ti/PCIe/SSE2
> > Manufacturer: Gigabyte Technology Co., Ltd.
> > Product Name: H81M-S2H
> 
> Just to add my dolphin is Version 23.03.90

It looks like you're running Neon, which has kde-inotify-survey packaged. That package installs a notifier module, but also a commandline utility that outputs the current inotify usage as a json file. If you were to run kde-inotify-survey in Konsole immediately after reproducing the issue and paste the results into a reply here, it might help diagnose the problem.
Comment 22 Tyson Tan 2023-04-08 19:42:19 UTC
It's still happening for me too.

Operating System: Arch Linux 
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.8
Kernel Version: 6.2.10-arch1-1 (64-bit)
Dolphin: 22.12.3
Comment 23 adec2011.ac 2023-04-08 19:49:45 UTC
OK, I have run kde-notify-survey just after i try to empty the trash from within dolphin and i get this output

{
    "processes": [
        {
            "cmdline": "/lib/systemd/systemd",
            "instances": 3,
            "pid": 1835,
            "uid": 1000,
            "watches": 85
        },
        {
            "cmdline": "/usr/bin/gamemoded",
            "instances": 1,
            "pid": 1852,
            "uid": 1000,
            "watches": 4
        },
        {
            "cmdline": "/usr/bin/pulseaudio",
            "instances": 2,
            "pid": 1854,
            "uid": 1000,
            "watches": 2
        },
        {
            "cmdline": "/usr/bin/dbus-daemon",
            "instances": 1,
            "pid": 1865,
            "uid": 1000,
            "watches": 6
        },
        {
            "cmdline": "/usr/bin/startplasma-x11",
            "instances": 1,
            "pid": 1875,
            "uid": 1000,
            "watches": 0
        },
        {
            "cmdline": "/usr/bin/ibus-daemon",
            "instances": 1,
            "pid": 1974,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/usr/libexec/ibus-dconf",
            "instances": 1,
            "pid": 1985,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/usr/libexec/ibus-ui-gtk3",
            "instances": 1,
            "pid": 1991,
            "uid": 1000,
            "watches": 2
        },
        {
            "cmdline": "/usr/libexec/ibus-extension-gtk3",
            "instances": 1,
            "pid": 1993,
            "uid": 1000,
            "watches": 2
        },
        {
            "cmdline": "/usr/libexec/ibus-x11",
            "instances": 1,
            "pid": 1996,
            "uid": 1000,
            "watches": 2
        },
        {
            "cmdline": "/usr/libexec/ibus-portal",
            "instances": 1,
            "pid": 1999,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/usr/bin/dbus-daemon",
            "instances": 1,
            "pid": 2015,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/usr/libexec/xdg-desktop-portal",
            "instances": 1,
            "pid": 2021,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/usr/libexec/ibus-engine-simple",
            "instances": 1,
            "pid": 2031,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/usr/libexec/xdg-desktop-portal-gtk",
            "instances": 1,
            "pid": 2053,
            "uid": 1000,
            "watches": 58
        },
        {
            "cmdline": "/usr/lib/x86_64-linux-gnu/libexec/xdg-desktop-portal-kde",
            "instances": 1,
            "pid": 2065,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/usr/bin/plasma_session",
            "instances": 1,
            "pid": 2095,
            "uid": 1000,
            "watches": 0
        },
        {
            "cmdline": "/usr/lib/x86_64-linux-gnu/libexec/kf5/klauncher",
            "instances": 1,
            "pid": 2102,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/usr/bin/kded5",
            "instances": 4,
            "pid": 2114,
            "uid": 1000,
            "watches": 497
        },
        {
            "cmdline": "/usr/bin/kwin_x11",
            "instances": 1,
            "pid": 2117,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/usr/bin/ksmserver",
            "instances": 2,
            "pid": 2121,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/usr/bin/kglobalaccel5",
            "instances": 1,
            "pid": 2122,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/usr/bin/xembedsniproxy",
            "instances": 1,
            "pid": 2128,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/usr/lib/x86_64-linux-gnu/libexec/baloo_file",
            "instances": 3,
            "pid": 2129,
            "uid": 1000,
            "watches": 20771
        },
        {
            "cmdline": "/usr/bin/kaccess",
            "instances": 1,
            "pid": 2130,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/usr/bin/plasmashell",
            "instances": 4,
            "pid": 2132,
            "uid": 1000,
            "watches": 20
        },
        {
            "cmdline": "/usr/lib/x86_64-linux-gnu/libexec/kactivitymanagerd",
            "instances": 2,
            "pid": 2144,
            "uid": 1000,
            "watches": 5
        },
        {
            "cmdline": "/usr/lib/x86_64-linux-gnu/libexec/DiscoverNotifier",
            "instances": 3,
            "pid": 2153,
            "uid": 1000,
            "watches": 3
        },
        {
            "cmdline": "/usr/lib/x86_64-linux-gnu/libexec/kdeconnectd",
            "instances": 4,
            "pid": 2155,
            "uid": 1000,
            "watches": 5
        },
        {
            "cmdline": "/usr/bin/gmenudbusmenuproxy",
            "instances": 2,
            "pid": 2158,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/usr/lib/x86_64-linux-gnu/libexec/kf5/kscreen_backend_launcher",
            "instances": 1,
            "pid": 2293,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/home/ade/.dropbox-dist/dropbox-lnx.x86_64-171.4.6182/dropbox",
            "instances": 2,
            "pid": 2319,
            "uid": 1000,
            "watches": 126
        },
        {
            "cmdline": "/usr/bin/python3",
            "instances": 3,
            "pid": 2361,
            "uid": 1000,
            "watches": 9
        },
        {
            "cmdline": "/usr/bin/python3",
            "instances": 1,
            "pid": 2375,
            "uid": 1000,
            "watches": 3
        },
        {
            "cmdline": "/usr/libexec/gvfs-udisks2-volume-monitor",
            "instances": 1,
            "pid": 2507,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/usr/libexec/gvfs-afc-volume-monitor",
            "instances": 1,
            "pid": 2531,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/usr/libexec/gvfsd-trash",
            "instances": 1,
            "pid": 2551,
            "uid": 1000,
            "watches": 44
        },
        {
            "cmdline": "/usr/lib/insync/insync",
            "instances": 4,
            "pid": 2570,
            "uid": 1000,
            "watches": 161
        },
        {
            "cmdline": "/lib/x86_64-linux-gnu/libexec/kf5/kioslave5",
            "instances": 1,
            "pid": 2584,
            "uid": 1000,
            "watches": 1
        },
        {
            "cmdline": "/usr/bin/dolphin",
            "instances": 5,
            "pid": 2930,
            "uid": 1000,
            "watches": 13
        },
        {
            "cmdline": "/bin/bash",
            "instances": 2,
            "pid": 2945,
            "uid": 1000,
            "watches": 2
        },
        {
            "cmdline": "/lib/x86_64-linux-gnu/libexec/kf5/kioslave5",
            "instances": 4,
            "pid": 18463,
            "uid": 1000,
            "watches": 3
        },
        {
            "cmdline": "/lib/x86_64-linux-gnu/libexec/kf5/kioslave5",
            "instances": 4,
            "pid": 18566,
            "uid": 1000,
            "watches": 5
        },
        {
            "cmdline": "/lib/x86_64-linux-gnu/libexec/kf5/kioslave5",
            "instances": 5,
            "pid": 18589,
            "uid": 1000,
            "watches": 5
        },
        {
            "cmdline": "kde-inotify-survey",
            "instances": 2,
            "pid": 18690,
            "uid": 1000,
            "watches": 2
        }
    ],
    "totals": {
        "instancePercent": 33,
        "instances": 86,
        "maxInstances": 256,
        "maxWatches": 1048576,
        "watchPercent": 2,
        "watches": 21853
    }
}
Comment 24 Méven Car 2023-04-09 09:13:55 UTC
(In reply to adec2011.ac from comment #19)
> (In reply to Méven Car from comment #17)
> > I don't reproduce this in Dolphin 22.12.
> > 
> > Can anyone still reproduce it ?
> 
> It is still happening for me.
> 
> In an open dolphin windows I have a wastebin icon under the places list.
> WHen i right click and select empty wastebin the bin doesnt empty and the
> icon doesnt change unless i physically click the icon to open it in the
> dolphin window and refresh the contents
> 

I wasn't using the places panel context menu to empty the trash.
With this method, I don't reproduce either with dolpin 22.12 or 23.08 (dev).
Maybe there is more to it.

Does it happen for files and folders ? any file sizes ? On any of your disk drives if you are using multiple ones ?
Can you think of something particular in your situation ?
Comment 25 adec2011.ac 2023-04-09 09:21:00 UTC
It happens with any files or folders from any drive.

If i right click the places wastebin and select empty trash the action will not automatically empty the trash only when i left click on the same wastebin icon in places to open the wastebin folder in the dolphin window (after selecting empty trash with right click originally) and keep left pressing the icon in places will the trash refresh and the icon changes to an empty icon
Comment 26 Patrick Silva 2023-04-23 23:22:32 UTC
I have just seen this bug with a small .jpg file sent to Trash from /Home/Download/subfolder.

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 27 Patrick Silva 2023-08-04 10:20:32 UTC
*** Bug 472978 has been marked as a duplicate of this bug. ***
Comment 28 Patrick Silva 2024-03-08 19:19:48 UTC
*** Bug 482852 has been marked as a duplicate of this bug. ***