Caja taking minutes to open after boot

Hello Guys,

I have been using Ubuntu MATE for a while and so far it has been smooth.
Some days ago my computer started to take long time (like to 2min) to open Caja, this only happens when i open it the first time, after that it will work normal.
So i searched in lots of places and didn’t find any topic related to this issue in any forum, that’s why I’m asking here.
So where can i start looking for Caja logs to start debugging this?

I have Ubuntu MATE 16.10 with today’s latest updates, i have padoka stable PPA and cdrtools PPA added to my updates.
Thanks in advance

Looks like an I/O problem.
As in, on startup Caja is reading a lot of files from disk. This would explain why it’s only the first time. (after that the files are cached in RAM so it’s faster)

I had a similar problem with mate-settings-daemon a while back.
Maybe you can use the same method for diagnostics?

Thanks @ouroumov for the fast reply, indeed the owner of ~/.cache/dconf was root, i changed that and i will reboot to check if that fixed it.

That was not the actual cause of the bug I had, check the last post on the thread I linked. ^^

No it didn’t fixed it.

@ouroumov Sorry I thought that was the solution.

Ok i did iotop and there is this gvfsd-trash taking 99% of all IO for minutes, when Caja opened gvfsd-trash was not there.
I looked at the man page and it says it moves files or directories to the trash. I don’t get it, why does something is moving files or directories to the trash, and why it is taking 99% of IO for minutes?

The exact line is: gvfsd-trash --spawner :1.9 /org/gtk/gvfs/exec_spaw/0

I don’t know either, the following command will list files opened by this process:

lsof -p `ps axu | grep [g]vfsd-trash | tr -s '' ' ' | cut -d' ' -f 2`

Log it to a file:

lsof -p `ps axu | grep [g]vfsd-trash | tr -s '' ' ' | cut -d' ' -f 2` > ~/Desktop/file.log

Do it twice before and during the slowdown, with different file names then compare the two files using meld (you can find meld in the software boutique)

1 Like

Thanks @ouroumov

I did what you said and the difference was it was accessing a file in: ~/.local/share/Trash/info. i went there in terminal and there were ~10600 files there. Now that I’m seeing those files i think those were the media files used by Anki, recently i deleted a huge amount of Anki cards and its media. Once Caja opened i went to trash and empty it. it took a while to get empty.
I will restart to see if this fixed it.

Thanks @ouroumov for your quick support, Clearing the trash fixed it. I always use SHIFT+DEL to delete files directly, that’s why i didn’t care about the trash.
today i learned more about Linux! i didn’t know about iotop or lsof, very useful commands!

2 Likes

Note that you do not have to use Trash. Nautilus/Caja permits a “delete” entry that bypasses trash. I don’t know how to eliminate Trash but i keep backup rather than relying on Trash. No pun intended, really. :slight_smile: