It seems the UART is not involved in this, unless it is a UART over USB, but ttyTHS* files are all integrated UARTs. Are we really talking about USB or UART? Is the UART in question a non-integrated USB serial UART? Does the USB issue cause any kind of interference with the camera operation? I don’t actually see a UART issue, other than the earlier need to stop nvgetty and make sure the user is in group dialout.
If I am looking for a USB issue, then the trace logs are still useful, but I’ll need to search differently. In no case do I now see any kind of permission issue in those logs, so if there is still a permission issue, it isn’t from the UART (at least not any UART which would have been used in the programs which produced the strace logs).
A small sample of file opens for something related to USB is (the two trace subdirectories are searched here):
# egrep -i -R usb * | egrep -i '(openat.*= -1)'
debug/trace_log.txt.8865:openat(AT_FDCWD, "/usr/local/zed/lib/libusb-1.0.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
debug/trace_log.txt.8865:openat(AT_FDCWD, "/usr/local/cuda/lib64/tls/aarch64/libusb-1.0.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
debug/trace_log.txt.8865:openat(AT_FDCWD, "/usr/local/cuda/lib64/tls/libusb-1.0.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
debug/trace_log.txt.8865:openat(AT_FDCWD, "/usr/local/cuda/lib64/aarch64/libusb-1.0.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
debug/trace_log.txt.8865:openat(AT_FDCWD, "/usr/local/cuda/lib64/libusb-1.0.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
debug_zed/trace_log.txt.9925:openat(AT_FDCWD, "/usr/local/zed/lib/libusb-1.0.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
debug_zed/trace_log.txt.9925:openat(AT_FDCWD, "/usr/local/cuda/lib64/tls/aarch64/libusb-1.0.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
debug_zed/trace_log.txt.9925:openat(AT_FDCWD, "/usr/local/cuda/lib64/tls/libusb-1.0.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
debug_zed/trace_log.txt.9925:openat(AT_FDCWD, "/usr/local/cuda/lib64/aarch64/libusb-1.0.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
debug_zed/trace_log.txt.9925:openat(AT_FDCWD, "/usr/local/cuda/lib64/libusb-1.0.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
Do note that an open failure can, and often is, the result of tracing for multiple locations, and is not necessarily a problem. There is a hierarchy of search locations, and failures just might be early parts of the search path. Of those items which were not found above, all of them were from files in the CUDA content of “/usr/local/cuda”. None of those would cause USB itself to disappear or change.
Is it safe to say that the UART issue and the USB issue are separate? I realize that you said fixing the UART permissions caused USB to go away, but this may just be coincidental to the program making it further in and it might not be caused by UART issues.
Incidentally, if you monitor “dmesg --follow”, does anything show up at the moment the USB goes away?