0

I need to increase the directory viewer refresh rate. I believe this application is or was called Nautilus or nautilus.

Here is the scenario that is causing me problems. I scanned a document and I believe I saved it but I couldn't find it. Browsing around in search of it, I find that sometimes folders are empty but when I browse into it again it is not empty so there is a refresh rate problem.

H2ONaCl
  • 9,693
  • 1
    Which file system is being used for the location where your scanned images are going? Nautilus (and other file managers) tend to monitor the file system’s journal, which will allow files to appear and disappear in near real-time. If the scan is being saved to a network location or NTFS partition, there is no journal to read. Pressing [F5] should re-read the directory contents in this case. – matigo May 07 '22 at 20:41
  • @matigo It is an SSD in a laptop and it is formatted as ext4. After further consideration I think the fact that I increased the scan to high resolution and the file ended up being 56 MB might explain the slow refresh rate but I'm not certain. – H2ONaCl May 07 '22 at 20:47
  • 1
    @H2ONaCl it does But 56Mb is not a lot. I have scans of 200, 300 Mb instantly showing up on my system. ssd too, ext4 too. – Rinzwind May 07 '22 at 20:52
  • @Rinzwind This is a link to my other possibly related Nautilus problem on completely different hardware (a Dell server with RAID) ... https://askubuntu.com/questions/1080205/nautilus-not-starting-promptly – H2ONaCl May 07 '22 at 21:13
  • @Rinzwind This is not the first time I've had slow directories. Right now I see a busy circle animation under the mouse pointer in a directory showing 1 file of 57 MB. I am quite certain this directory has 2 files, one of 57 MB and another of about 20 MB. Pressing F5 does not help. If i browse to the parent and back down to the child folder I am pretty sure I will see 2 files. Hold on while I do that. Thank you for waiting. I did it and now I see 2 files. – H2ONaCl May 07 '22 at 21:42
  • I can see several possibilities here: 1) maybe the application is actually taking a while to create the file and it isn't nautilus being slow 2) possibly nautilus is getting stuck in a device wait, either from a hung or dying device that may or may not be related, or from the target device just having too much I/O done at once and it taking a while to respond or 3) nautilus is trying to create a thumbnail of the file and it doesn't show up until the thumbnailing is done – user10489 May 08 '22 at 00:32
  • @H2ONaCl I am puzzled and intriged :=) Linux gets slow when there are 10k+ files in a directory (sometimes software does an ls in such a directory and more files will take more time). Could that be the case? Something to try: install thunar and see if that is quicker and the problem narrow down. If it is slow too you know it is not nautilus but something else. Point 3 from @user10489 is a good one: disable thumbnails to test this one – Rinzwind May 08 '22 at 04:16
  • A big write to a slow SSD might cause all other I/O to the device to stall too, or at least seem like it is. For instance, if something like ls or nautilus is doing a stat on every file in the directory while something else is writing a big file continuously, there might be a lot of lag for all those stats to finish. – user10489 May 08 '22 at 06:10
  • No idea what version of Ubuntu is involved here. Nautilus has massively improved since 18.04, so if this would be in 18.04, chances are good this works much better in recent versions. – vanadium May 08 '22 at 10:05
  • @Rinzwind there were literally only 2 files in the directory. There was nothing directly invoked by the user to account for delays; in other words, I had long quit the scanner software. I am only dealing with the 57 MB file already written by the scanner and a 20 MB cropped version exported by GIMP. The scanner reader is not running and GIMP is not running. In the case of the laptop Skype is in the background minimized but I've seen Nautilus problems before on a server where Skype is never installed. – H2ONaCl May 08 '22 at 21:21
  • @user10489 I don't know what you mean by thumbnail creation because on Ubuntu 20.04 the thumbnails look like generic icons so they don't need to be compute intensive. – H2ONaCl May 08 '22 at 21:25

2 Answers2

0

1. To be certain that you save the file. first try to find it in terminal

find ~/ -type f -name "*name_of_file*"
  • ~/ argument for home directory like /home/alex
  • -type is for telling find to search for files only
  • -name is to specify your name. but in case you only remember some part, then use globing * at the beginning and end, so finds everything with name before and after, example nautilus vs nautilus-admin or rabbitvcs-nautilus

2. check for inotify max_user_watches file

Nautilus uses inotify to detect file changes

cat /proc/sys/fs/inotify/max_user_watches
65536 #returns

change it to 90,000 or more

3. check packages for scanned documents

if the above doesn't work check out a list of packages installed in your system. you may need a package to render a document, this comes from nautilus:

Several icon themes and components for viewing different kinds of files are available in separate packages.

apt search nautilus | grep "installed" 

here is a list of mine, working fine.

gir1.2-nautilus-3.0/jammy,now 1:42.0-1ubuntu2 amd64 [installed,automatic]
gnome-control-center/jammy-updates,jammy-security,now 1:41.4-1ubuntu13 amd64 [installed,automatic]
gnome-shell-extension-gsconnect/jammy,jammy,now 50-0ubuntu1 all [installed]
gnome-sushi/jammy,now 41.1-1 amd64 [installed]
libnautilus-extension1a/jammy,now 1:42.0-1ubuntu2 amd64 [installed,automatic]
nautilus/jammy,now 1:42.0-1ubuntu2 amd64 [installed,automatic]
nautilus-data/jammy,jammy,now 1:42.0-1ubuntu2 all [installed,automatic]
nautilus-extension-gnome-terminal/jammy,now 3.44.0-1ubuntu1 amd64 [installed,automatic]
nautilus-sendto/jammy,now 3.8.6-4 amd64 [installed,automatic]
nautilus-share/jammy,now 0.7.3-2ubuntu6 amd64 [installed,automatic]
p7zip/jammy,now 16.02+dfsg-8 amd64 [installed,automatic]
p7zip-full/jammy,now 16.02+dfsg-8 amd64 [installed,automatic]
python3-nautilus/jammy,now 1.2.3-3.1build1 amd64 [installed,automatic]
totem/jammy,now 42.0-1ubuntu1 amd64 [installed,automatic]

enter image description here

AlexPixel
  • 587
  • 1
  • 3
  • 11
0

Just use F5 to refresh the Nautilus view.

H2ONaCl
  • 9,693
  • Sometimes that works, sometimes there are other things between Nautilus and the OS caching the old answer. – user10489 Mar 12 '23 at 13:59
  • @user10489 That's true as I discovered today. This problem is disgusting. The fact I don't see a lot of discussion about it has me thinking it's my SSD that is the problem but since I've had the problem for years on different machines suggests it is not the SSD. – H2ONaCl Mar 13 '23 at 15:07
  • Caching is a trade off between overall performance and latency. There are many ways to try to mitigate it, but generally the latency is better than the slower performance you would have without it. And sometimes it reduces latency, so... – user10489 Mar 13 '23 at 21:58