Ext. NTFS HDD drive, caja all ways open on the last directory will hang up

Mate 22.04, caja is all ways open. I leave it on the last open directory.
But if the last open window was on a ext. NTFS HDD, and if the ext. HDD falls asleep after a time, no further reaction of caja anymore is possible (close caja ...)
It is not possible to open a sec. caja instance to awake the ext. HDD, also it is difficult to start a system monitor to kill the process (last choice).
Only a workaround I have found : I use DLNA and I did awake the ext. HDD via TV.

Is it possible to do that by the linux system ?

Sounds like a bug. I can't really imagine why the file manager would 'hang' since any action involving the drive should wake it up again, e.g. F5 to refresh or listing the folders. Unless it is just specific to NTFS.

If you're looking for other workarounds, try:

  • ALT+F2 and type killall -9 caja
    • caja -q would be more graceful, but may not work
  • ALT+F2 and type ls /media/** (path to the drive mount point)
    • That may trigger the wake up call.
    • To find the path, open the HDD and press CTRL+L.

You can also use CTRL+ALT+T for the terminal instead of ALT+F2.

If either one works, you could create a launcher onto the panel so it's just a one-click away.

2 Likes

Thank you, I will check it.
I would prefer ls to the respective mounting point.
But I am not sure now, whether it was possible to open a terminal.
A launcher for a respective script is a good idea.
A working result I will give.

I agree with Luke, in that it doesn't sound right for it to be behaving that way.

There are so many layers between Caja and low-level hardware, it is hard to conceive a condition which would lock Caja thru all those layers !!!

This may again be the result of you specific hardware/software context, which has led to a build that is misbehaving.

Providing the community with specifics regarding

  • the type of drive
  • the type of drive interface (USB or other)
  • the mount options reported after the drive is mounted

might help those who are the "founts of wisdom" to rationalize the source and cause of the issue you are experiencing.

Maybe someone can offer a command which could perform some kind of probe on just what is making Caja ignore any GUI interactions upon the NTFS sleep.

Hope that helps.

2 Likes

That's a good point! An underlying system issue could also cause such behaviour, like a bad USB connection, faulty port or maybe the NTFS driver.

Prior to the issue happening, you could monitor the kernel log by opening a terminal (CTRL+ALT+T) and running:

sudo dmesg -w

When Caja starts hanging, it might spit out a bunch of red errors that can highlight the underlying cause - if any!

2 Likes

There is a chance that the bug is the NTFS3 driver
It could be the same issue that @Crotchety encountered:

It might be worth to try:

echo "blacklist ntfs3" | sudo tee /etc/modprobe.d/disable-ntfs3.conf

and reboot.

2 Likes

I have no further problems with my external drives.
Only the wake up by "caja"will be not possible (sometimes)-

A script did help :

#!/bin/bash
cd /
cd /media/mnt/Samsung_2T_Ext
ls &
cd /
cd /media/mnt/WD_3T_Ext
ls &
cd /
cd /media/mnt/WD_8T_Ext  
ls &
cd /
cd /media/mnt/WDMyBook_8T_Ext
ls &
echo ready
read pause

I hear the HDDs will wake up, but I wonder me, because I get first :
The echo "ready" and after a time the "ls output".
Obviously "ls" and "&" does not work (& - wait until command will be complete)

That is as expexted. it executes the code correctly.

No,

  1. '& ' starts 'ls' in the background, the script continues
    and without waiting for 'ls' output or anything related
  2. 'wait' pauses the execution of the current shell/script until all the background processes (started in this script) have ended
  3. '$!' is a variable that contains the PID of the last started process.
  4. 'wait <pid>' pauses the execution of the current shell/script until the background by pid given background process, has ended

If you want the 'ls' outputs first, place a 'wait' after the last 'ls' command.

2 Likes

Thank you, it works.

2 Likes

I only just thought of this now.

It seems rather simplistic, but what if you typed in "sync" at the command line. Would that trigger a wake up of processes, that would in turn cause the external USB drive to spin up?

2 Likes