NVIDIA Jetson Linux Developer Guide!comprehensive and useful resources
JetPack SDK includes:
- L4T
- Ubuntu 18.04(Linux operating system)
- bootloader
- Linux kernel 4.9
- necessary firmwares
- NVIDIA drivers
- CUDA accelerated libraries
- TensorRT
- cuDNN
- CUDA
- Multimedia API
- Computer Vision
- Developer Tools
- DeepStream
- Upgrade L4T
- Upgrade JetPack
Note: upgrade L4T on a system where Jetpack is not installed.
-
Set power mode(5W or 10W)
# To set Jetson Nano to 10W performance mode sudo nvpmodel -m 0 sudo jetson_clocks
-
Set CUDA toolkits in environment path
in
~/.bashrc
,export PATH=/usr/local/cuda/bin:${PATH} export LD_LIBRARY_PATH=/usr/local/cuda/lib64:${LD_LIBRARY_PATH}
use script,
#!/bin/bash set -e if ! grep 'cuda/bin' ${HOME}/.bashrc > /dev/null ; then echo "** Add CUDA stuffs into ~/.bashrc" echo >> ${HOME}/.bashrc echo "export PATH=/usr/local/cuda/bin:\${PATH}" >> ${HOME}/.bashrc echo "export LD_LIBRARY_PATH=/usr/local/cuda/lib64:\${LD_LIBRARY_PATH}" >> ${HOME}/.bashrc fi
-
Ethernet/WiFi It needs Jetson to connect to the same network as your desktop pc via Ethernet or WiFi.
# `jetson-desktop` is hostname of Jetson ssh [email protected]
-
USB device mode Jetson Nano Micro-USB Login
-
serial console
screen /dev/cu.usbmode* 115200 -L
-
ssh(over virtual network)
the Jetson establishes a virtual network where it works as a network device and desktop PC works as a host. When Jetson is connected from PC by micro USB, PC will ask for a IP address of
192.168.55.100
via DHCP from Jetson and Jetson will192.168.55.1
in default. This service is located at:/opt/nvidia/l4t-usb-device-mode
IP address 192.68.55.1 in Jetson a bit of explanaion on SSH through micro USB USB device mode USB Gadget API for Linux
-
J40 header pins, Jetson Nano USB Login
-
-
Docker setting
# setup docker without sudo sudo usermod -aG docker $USER # upgrade docker sudo apt-get --only-upgrade install docker.io
-
Docker Compose
-
install
NodeJS
through installingnvm
-
install
JupyterLab
-
configure
JupyterLab
# configure /home/$USER/jupyter_notebook_config.py ... c.NotebookApp.ip = '*' c.NotebookApp.port = 8888 c.NotebookApp.open_browser = False ... # configure password $ jupyter notebook password
Run jupyterlab as ubuntu service
# 1. create script $ vim /home/$USER/jupyterlab.sh #!/bin/sh /home/jetson/.local/bin/jupyter lab --ip=0.0.0.0 --port=8888 --no-browser $ sudo chmod +x /home/$USER/jupyterlab.sh # 2. create service $ sudo vim /etc/systemd/system/jupyterlab.service # replace $USER [Unit] Description=Jupyterlab After=syslog.target network.target [Service] User=jetson ExecStart=/bin/bash /home/$USER/jupyterlab.sh WorkingDirectory=/home/$USER/ [Install] WantedBy=multi-user.target # 3. enable service $ sudo systemctl enable jupyterlab.service $ sudo service jupyterlab start
-
install
JupyterLab
extensions# install ipywidgets and enable jupyter labextension install @jupyter-widgets/jupyterlab-manager
sudo apt-get install openvpn
# Then you can connect like this:
sudo openvpn --config /path/to/config.ovpn
sudo apt install samba samba-common-bin
sudo nano /etc/samba/smb.conf
# edit `/etc/samba/smb.conf` file
workgroup = your_workgroup_name
wins support = yes
[pihome]
comment= Pi Home
path=/home/pi
browseable=Yes
writeable=Yes
only guest=no
create mask=0777
directory mask=0777
public=no
# save and exit
sudo smbpasswd -a pi
Samba Installation Anonymous Read-Write Document Server
Using GPU with OpenCV on Jetson Xavier - Jetson AGX Xavier - NVIDIA Developer Forums
GitHub - mdegans/nano_build_opencv: Build OpenCV on Nvidia Jetson Nano
tips: make the CMake version >3.20 or support ssl. Otherwise it will not support https download for
xfeatures2d
in opencv
Check OpenCV Build Information: getBuildInformation()
python3 -c 'import cv2; print(cv2.getBuildInformation())'
nmcli device wifi rescan
nmcli device wifi list
nmcli device wifi connect <ssid_name> password <password>
dpkg-query --show nvidia-l4t-core
JETSON_L4T_STRING=$(head -n 1 /etc/nv_tegra_release)
JETSON_L4T_RELEASE=$(echo $JETSON_L4T_STRING | cut -f 2 -d ' ' | grep -Po '(?<=R)[^;]+')
JETSON_L4T_REVISION=$(echo $JETSON_L4T_STRING | cut -f 2 -d ',' | grep -Po '(?<=REVISION: )[^;]+')
JETSON_L4T_VERSION="$JETSON_L4T_RELEASE.$JETSON_L4T_REVISION"
echo $JETSON_L4T_VERSION
or
JETSON_L4T_STRING=$(dpkg-query --showformat='${Version}' --show nvidia-l4t-core)
JETSON_L4T_ARRAY=$(echo $JETSON_L4T_STRING | cut -f 1 -d '-')
JETSON_L4T_RELEASE=$(echo $JETSON_L4T_ARRAY | cut -f 1 -d '.')
JETSON_L4T_REVISION=${JETSON_L4T_ARRAY#"$JETSON_L4T_RELEASE."}
JETSON_L4T_VERSION="$JETSON_L4T_RELEASE.$JETSON_L4T_REVISION"
echo $JETSON_L4T_VERSION
sudo apt-cache show nvidia-jetpack
cat /usr/include/cudnn_version.h | grep CUDNN_MAJOR -A 2
export CPATH=$CPATH:/usr/local/cuda/include
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/cuda/lib64
pip3 install pycuda --user
sudo systemctl set-default multi-user.target
sudo systemctl get-default
Disable GUI in Ubuntu 18.04. desktop? (SSH/Webmin headless setup) How to disable GUI from starting on boot?
# restart camera daemon
sudo systemctl restart nvargus-daemon
# find reason from logs
sudo journalctl -S -3m
# add user xrdp into ssl-cert group
sudo adduser xrdp ssl-cert
# configure desktop session for xRDP
# rdp works better with XFCE
sudo apt-get install xfce4
echo xfce4-session > ~/.xsession
sudo sh -c 'cat /dev/null > /etc/xrdp/startwm.sh'
cat <<EOF > /tmp/startwm.sh
#!/bin/sh
if [ -r /etc/default/locale ]; then
. /etc/default/locale
export LANG LANGUAGE
fi
startxfce4
EOF
sudo mv /tmp/startwm.sh /etc/xrdp/startwm.sh
sudo systemctl restart xrdp.service
xRDP cannot read /etc/xrdp/key.pem. Permission denied error explained
How to Use Remote Desktop Connection in Ubuntu Linux: Complete Walkthrough
How to configure XRDP to start cinnamon as default desktop session
Check this issue by opening ssh daemon log(/var/log/auth.log
in ubuntu) to solve. In some cases, upgrade libs (sudo apt-get upgrade
, systemd,...etc) or install missing libs(sudo apt-get install libpam-kwallet5
)
ssh connection takes forever to initiate, stuck at “pledge: network”
JetCam ! camera interface for NVIDIA Jetson