A recent problem has appeared with the Nautilus file manager on a Jetson 4GB running an updated (apt-get upgrade during october 2021) generic NVIDIA Jetpack Ubuntu 18.04 LTS. I am deploying this to an internal customer and they do not know how to use any CLI tools.
Symptom: Nautilus does not display new filenames or icons on a removable USB drive. Folders do appear. Plain, undecorated “ls” on the terminal shows the files. Most of these files are .png snapshots from an image stream.
Attempted solutions: A post on stack exchange in 2016 describes a similar problem. I have tried refresh(Ctrl+R), switching views, and turning off file previews. I have not tried to check the filesystem on the USB drive since physical and remote access are restricted.
I’m posting this here because I have only seen this problem on the Jetson platform. My other bare metal and VM copies of Ubuntu do not exhibit this problem. That may be because of user behavior differences. Note that the post in SE remains unresolved.
@WayneWWW I can only re-iterate “physical and remote access are restricted.”
I need to develop a plan, and then I can report back observations from the diagnostics. If I had to guess, the cause is user error and the symptoms are aggravated by the file manager GUI not reporting back an error condition. IDK if Nautilus file manager keeps logs. I am primarily a CLI user.
I have made some progress. The USB drive was formatted in FAT32. It looks like two events are happening that result in similar outcomes. Discovered by interviewing a user and running fsck and mount on the drive:
the USB drive is pulled without unmounting first
A similar problem is described in Automount usb stick to /media/<LABEL> on jetson nano - #5 by rachase . The FAT32 drive suffers corruption in these events because the write cache isn’t flushed (despite being mounted with flush turned on). In the configuration, the flush might be defeated by the relatime option which can take 24h or longer to complete on a damaged filesystem. Subsequent use of the Nautilus file manager is further defeated by new temp files being created by Nautilus.
Note that if you inspect /etc/udev/rules.d/99-nv-ufs-mount.rules which runs to automount a flash drive, there is an NVIDIA copyright statement. I now suspect that the symptoms described in the first post in this thread is a JetPack configuration and not a generic Ubuntu issue.
Let me know if I’m wrong in this usb flash drive automount configuration diagnosis. I make no claim to any expertise here.
Now I need to make some changes in the configuration to harden against these events. I can’t train users out of making mistakes. Recommendations?
sudo apt-cache show nvidia-jetpack
So I am out of date as of August. I don’t see in the JetPack 4.6 release notes anything about no longer auto-mounting usb or flash media. Curiously, /etc/udev/rules.d/99-nv-ufs-mount.rules describes exactly the mountpoint and automount. Maybe there is another location where this is defined?
I have to admit that I still don’t know what is the exact error you want to report here.
You know the story about the three blind men and the elephant … I can describe symptoms and move towards a cause with direction, but I won’t know that it is an elephant until you tell me that it is one. It is up to you to present focused, detailed tests and provide insights into what those tests reveal.
Please just share the steps and what will we see here…
User reports that Nautilus file manager doesn’t show new files after about 8 hours of usage on the Jetson. If I walk in and use the CLI and write ls /media/*user*/*device*/, the files are there.
Indirect indications are that either power interruptions or premature USB removal are leading to filesystem corruption on the external drive.
USB is formatted FAT32.
USB is a SanDisk high endurance flash drive sudo badblocks -w -s /dev/sda shows no errors fsck fails to repair the filsystem
I believe that I need to make some changes in the Linux configuration to harden against filesystem corruption on the USB drive. I can’t train users out of making mistakes. Recommendations?
This python script requires modification for local usage.
#Test for usb drive corruption
import numpy as np # numeric processing (use arrays to store image data)
import cv2 # opencv image processing
import sys # system calls
from datetime import datetime # snapshot filenames
Before first run, format a USB drive as FAT. Modify the
path variable below to match the location of the USB drive.
The pattern is /media/"username"/"USB name" where the
username is the name of the active user account and
USB name is the label of the formatted drive.
Open Nautilus file manager and inspect drive. Leave it open
while running this script.
Drive will be occupied for 30 minutes as files are saved.
Wait one minute or more and pull drive without unmounting.
Repeat until Nautilus is no longer updating thumbnails.
for ndx in range(360):
img = np.random.randint(65536, size=(540,960), dtype=np.uint16)
now = datetime.now() #time of snapshot
print("saving : " + path + snapfilename + " Please be patient while we compress.")
retval=cv2.imwrite(path + snapfilename, img.astype(np.uint16), [cv2.IMWRITE_PNG_COMPRESSION, 1]);
(8) was the error reported to me. “Why can’t I use the USB drive like I do on Windows?”
(9) and (10) were diagnostic attempts. It looks like the underlying problem is related to (10), filesystem corruption.