In July 2020 I explained in this article how to install Jetpack 4.4 in headless mode on Xavier NX.
Now, more than two years later, JetPack has been updated to version 5.1. Today, I will explain how to install JetPack 5.1 in headless mode and how to utilize NVME SSD.
First, download SD card image for Xavier NX from https://developer.nvidia.com/embedded/jetpack .
As of March 2023, the latest version is JetPack 5.1. JetPack upgrades to the new version frequently, so always check the latest version on the homepage. Then, use the Etcher tool to create an SD card image. Since this process has a lot of help materials, the explanation is omitted. Etcher supports zip compressed files, so you don't have to decompress it on purpose.
Tips: There is no big problem if you install JetPack 5.1 on the SD card, but if you want to upgrade from JetPack 4.X to Jetpack 5.1, you need to install the QSPI image first. If you are upgrading from JetPack 4.X to Jetpack 5.1, please do not refer to this article, but refer to NVidia's QSPI installation documentation.
Headless Setup
Now insert the SD card into Xavier NX. And before connecting the power, connect the USB cable as shown in the picture. Connect the other end of the USB cable to your PC.
Then connect the Xavier NX's 19V power supply. When Xavier NX boots, the device connected to COM5 is shown in the device manager of the PC as shown in the following figure. The COM port number will change depending on your PC.
You can now connect Xavier NX using putty. Connect using the COM port number checked in the PC device manager. System Configurationon putty screen as follows. Now follow the instructions on the screen to set up.
Install useful software
sudo apt-get install python3-pip
jtop
sudo pip install -U jetson-stats
sudo jtop
Boot from SSD
How to set up an SSD
spypiggy@spypiggy-NX:/$ sudo fdisk -l [sudo] password for spypiggy: Disk /dev/nvme0n1: 119.25 GiB, 128035676160 bytes, 250069680 sectors Disk model: SAMSUNG MZVLW128HEGR-00000 Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes ......
Now create an ext4 file system on the NVME disk using the mkfs.ext4 command.
spypiggy@spypiggy-NX:/$ sudo mkfs.ext4 /dev/nvme0n1 mke2fs 1.45.5 (07-Jan-2020) Found a gpt partition table in /dev/nvme0n1 Proceed anyway? (y,N) y Discarding device blocks: done Creating filesystem with 31258710 4k blocks and 7815168 inodes Filesystem UUID: 9ae59d1d-e451-4a69-aced-eba90c69e148 Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424, 20480000, 23887872 Allocating group tables: done Writing inode tables: done Creating journal (131072 blocks): done Writing superblocks and filesystem accounting information: done
3. Create a mount point for the drive
I will mount /home/spypiggy directory to ssd and use it. So in the future, most of the work on Xavier NX will be done in /home/spypiggy.
#First, copy the existing files on the /home/spypiggy to /dev/nvme0n1 sudo mount /dev/nvme0n1 /mnt sudo rsync -avhr /home/spypiggy/.* /mnt sudo rsync -avhr /home/spypiggy/* /mnt sudo umount /mnt
Add the following to the fstab file to use the /home/spypiggy directory as an NVME disk upon booting.
Then reboot the system and check the file system.
spypiggy@spypiggy-NX:~$ df -h Filesystem Size Used Avail Use% Mounted on /dev/mmcblk0p1 59G 15G 41G 27% / none 3.4G 0 3.4G 0% /dev tmpfs 3.4G 0 3.4G 0% /dev/shm tmpfs 685M 19M 667M 3% /run tmpfs 5.0M 4.0K 5.0M 1% /run/lock tmpfs 3.4G 0 3.4G 0% /sys/fs/cgroup /dev/nvme0n1 117G 79M 111G 1% /home/spypiggy tmpfs 685M 16K 685M 1% /run/user/124 tmpfs 685M 8.0K 685M 1% /run/user/1000
You can see that the NVME disk is mounted as /home/spypiggy.
Power Mode
There are 4 cpus checked with the jtop command above. It can be seen that CPUs 5 and 6 are disabled. This is the default value set to reduce Xavier's power usage. You can use all six CPUs by changing the Power mode. If you want to use the Edge AI function that requires quick response while running an AI application, it is better to change the mode to get the maximum performance.
The current power usage mode can be checked with the "nvpmodel -q" command.
spypiggy@spypiggy-NX:~$ sudo nvpmodel -q NV Power Mode: MODE_10W_DESKTOP 5
You can see that the NVME disk is mounted as /home/spypiggy. It is currently mode 5 and the amount of power is limited to 10W. The power modes available in Xavier NX are:
spypiggy@spypiggy-NX:~$ sudo nvpmodel -m 2
spypiggy@spypiggy-NX:~$ sudo nvpmodel -q NV Power Mode: MODE_15W_6CORE 2
Now run jtop and you should see 6 cores.
If you normally use 4 cores and up to 10W of power in Mode ID 5, which is the default mode, and you need to perform machine learning, etc., you can change the mode to 2 for maximum performance.
For reference, since the GPU is used regardless of the Mode ID, the machine learning execution performance, which is highly dependent on the GPU usage, does not depend heavily on the Mode ID.
Wrapping up
So far, we have seen how to install JetPack in Headless mode on Jetson Xavier NX and how to use SSD. Next time, I will look at using the Python virtual environment to utilize SSD effectively.
In the next article, we will learn how to update the latest version of OpenCV in Jetpack 5.1, how to install and use YOLO V8.
댓글 없음:
댓글 쓰기