Jetson/General debug

Currently this page is applicable to release <= rel-32.6.

Get prepared
This section is to share some debug tips for users to understand the basic flow of how to use/debug jetson platform. Before we start to describe each kind of error, you should check below pages to understand how to dump a serial log from UART. Please note that only UART console can dump the bootloader logs. If your board hangs in somewhere prior to the kernel, then you must dump the log from UART. Tutorials: https://www.jetsonhacks.com/2017/03/24/serial-console-nvidia-jetson-tx2/ https://www.jetsonhacks.com/2019/04/19/jetson-nano-serial-console/ https://developer.ridgerun.com/wiki/index.php?title=Xavier/In_Board/Getting_in_Board/Serial_Console

Also, we put all the official document in the dlc here: https://developer.nvidia.com/embedded/downloads And if you want some help or report issue, please file a topic on forum. https://forums.developer.nvidia.com/

When reporting issue, you may tell your problem with below details. 1. The software release version you are using (e.g. which jetpack version). 2. Is this issue reproducible on developer kit(devkit) or custom board? 3. How to reproduce this issue? It would be good if a sample code is attached. 4. What peripherals are connected on device? 5. The log from uart and dmesg

SDKM
SDK Manager is a GUI tool for installing L4T and other JetPack components. This tool has two basic functions: flash the Jetson module (driver package/BSP) and install SDKs (CUDA, TensorRT, etc.). https://developer.nvidia.com/nvidia-sdk-manager To run SDKM, you have to prepare a x86 host with Ubuntu 18.04 (or 16.04). Some users asked whether SDKM can be installed on ARM version of Ubuntu so that they can flash Jetson from another ARM device. Currently, this is not supported. Flashing and SDK installation can be done separately with SDKM. You could flash the board and skip the installation of SDKs, or vice versa. In general, the flash process should finish in 10 minutes. If it lasts longer than this, the flash process probably has problem. To debug flash, I would suggest to use flash.sh directly instead of SDKM. (SDKM uses flash.sh in the background.) flash.sh This is the official tool to flash jetson modules. This tool is also installed and used by SDKM. After you choose the flash button in sdkm, it would download a package "Linux_for_Tegra" on your host. The flash.sh is inside this folder. For more detail about how to use flash.sh, please refer to Jetson quick start guide -> https://developer.nvidia.com/embedded/downloads
 * How to debug if flashing process is stuck in SDKM?

To debug flash problem. You need two parts of log for forum admin to check. 1. The result of flash.sh  This log should be seen after you run above flash.sh '''2. The result from device''' During the flash, the host would send some binary to target device and use this binary to flash. It is a protocol over usb. To dump this log, you need to enable serial console on UART as above tutorial (methods in the top section) You shall see the log start to dump in the meantime when flash.sh starts to flash your board.
 * What log should I prepare for flash problem?

The SDK installation could be done through ethernet/wifi or usb device mode. You could just ping or ssh before sdk installation starts. USB device mode is a virtual internet interface created when you connect micro usb cable to jetson. It would use a IP 192.168.55.x as device IP and create another 192.168.55.100 on your host. However, this method requires your host to have driver support. Some users' host may not support it. In this case, please use wired ethernet to install.
 * The installation of SDK is stuck, why?

Boot
After your flash process finishes, the system would boot up no matter you install sdk or not.

There are lots of reason that might cause system hang. Here are some common cases. 1. Need to configure user account This is a new feature after rel-32.1. User needs to configure their own ubuntu account with USB keyboard and HDMI monitor. If you don't have HDMI monitor for it, there is also alternative method- oem config to help. You could refer the detail in L4T dev guide: https://docs.nvidia.com/jetson/l4t/index.html 2. There is bootloader failure or kernel failure To dump the log, you need to enable the serial console on UART. This is the only way to debug bootloader log. For kernel log, before dumping it, you need to make sure there is no "quiet" in kernel cmdline. If you see this, it would disable the boot log. The way to remove this keyword is check the extlinux.conf under "Linux_for_Tegra/rootfs/boot/extlinux"on your host. If you don't know how to tell whether it is in kernel cmdline. Just see the length of your kernel log. The full log should have usb/pcie init log which are available on all kinds of jetson platforms. If you don't see them, then your log is in silent mode. Such issue is somehow very common on forum and the root cause may differ case by case. For example, such error may happen even when running out of disk space. When such case happens, enable the uart console and make sure your board is still booting up. Try to backup the system under such case and file the topic for forum moderator.
 * My system gets hang and doesn't respond. How to resolve?
 * I see some logs are printed on the screen and there is no desktop for me to operate'''

Board name
Some users may get confused by the board ID within Jetpack. Here is the list to check. P2180 -> Jetson TX1 P3310 -> Jetson TX2 P3489 -> Jetson TX2i P3448 -> Jetson Nano devkit P3448-0020 -> Jetson Nano production module P2888 -> Jetson Xavier P2888-0060 -> Jetson Xavier-8GB When you run "sudo ./flash.sh  mmcblk0p1" command to flash your board. It is actually searching the config file .conf under Linux_for_Tegra. For example, sudo ./flash.sh jetson-tx2i mmcblk0p1 This one would try to check the file in jetson-tx2i.conf. It means you could also create your own board name and it would work if the format in this config file is correct.

Device tree debug tips
1. There are lots of dtb file in source. Which one should I modify? Ans: If you already flashed your board and it can boot up, please try "dmesg |grep dts". This will tell the name of dts. nvidia@nvidia-desktop:~$ dmesg |grep dts DTS File Name: /dvs/git/dirty/git-master_linux/kernel/kernel-4.9/arch/arm64/boot/dts/../../../../../../'''hardware/nvidia/platform/t210/porg/kernel-dts/tegra210-p3448-0000-p3449-0000-b00.dts '''

2. How to check if my change/patch take effect in dts? Ans: You can check each property under /proc/device-tree/. For example, if you want to check the status of i2c@7000c000, then nvidia@nvidia-desktop:/proc/device-tree$ xxd i2c@7000c000/status 00000000: 6f6b 6179 00                            okay.