Background
The Jetson Xavier NX officially supports up to Ubuntu 20.04, but ROS2 Humble requires Ubuntu 22.04. Since NVIDIA has not yet provided an official Ubuntu 22.04 image for Xavier NX, we followed the approach shared in the community project xronos-inc/jetson-nano-ubuntu-22.04 and successfully upgraded our Xavier NX to Ubuntu 22.04, which is now running ROS2 Humble smoothly.
⚠️ Disclaimer: This is an unofficial method. Please back up your data and proceed with caution.
1. Preparing for Ubuntu 22.04 Upgrade
The following commands are executed directly on the Jetson Xavier NX via SSH or using a connected keyboard, mouse, and display.
1.1 Remove Docker
The Docker version in Ubuntu 20.04 is outdated. It should be removed before the upgrade. A more modern version can be installed afterward.
sudo apt remove --purge docker docker.io containerd
sudo rm -rf /etc/docker
1.2 Remove Ubuntu 18.04 Desktop Applications
Remove desktop applications from Ubuntu, even if you plan to install the Ubuntu Desktop later. This helps avoid upgrade errors—especially from Chromium, which can cause upgrade failures. It’s better to remove these applications now and install the newer versions after the upgrade.
sudo apt remove --purge chromium-*
sudo apt remove --purge libreoffice*
sudo apt remove --purge thunderbird*
sudo apt remove --purge ffmpeg smplayer* vlc-*
sudo apt remove --purge youtube-dl
sudo apt remove --purge mobile-broadband-provider-info modemmanager
sudo apt remove --purge example-content
Also remove Java before the upgrade. You can install a newer version afterward.
sudo apt remove --purge openjdk*
1.3 Remove Ubuntu Desktop
Change the default target to multi-user.target
so the system boots into a terminal instead of X Windows.
sudo systemctl set-default multi-user.target
sudo reboot
After rebooting, remove the Ubuntu desktop components:
sudo apt remove --purge --auto-remove \
ubuntu-desktop \
ubuntu-gnome-desktop \
ubuntu-artwork \
ubuntu-wallpaper* \
gnome-* libgnome* \
plymouth-theme* \
light-themes \
kde-window-manager kinit kwin-common kwin-x11 \
lxde lxde-* lxdm lxlock lxsession* \
xserver* \
xorg \
x11-common x11-utils \
unity unity-* \
gdm gdm3 \
lightdm \
libgtk* gtk-* \
xwayland \
nautilus nautilus-* \
zeitgeist-core libzeitgeist*
Remove snap
(it will be reinstalled during the upgrade process):
sudo apt remove --purge --autoremove snapd
Clean up unused packages and reboot:
sudo apt autoremove
sudo reboot
2. Upgrading Jetson Xavier NX to Ubuntu 22.04
First, upgrade all packages on the current system to the latest version:
sudo apt update
sudo apt upgrade
Install Vim and edit the update manager configuration file to allow distribution upgrades:
sudo apt install vim
sudo vim /etc/update-manager/release-upgrades
In the opened file, set:
Prompt=normal
Start the upgrade process:
sudo do-release-upgrade
Once the upgrade is complete, reboot and log in again.
Restore the NVIDIA L4T APT source list:
sudo mv /etc/apt/sources.list.d/nvidia-l4t-apt-sources.list.distUpgrade /etc/apt/sources.list.d/nvidia-l4t-apt-sources.list
Then update and upgrade again:
sudo apt update
sudo apt upgrade
3. (Optional) Install Ubuntu Desktop (Partially Functional)
If you want to use the Ubuntu Desktop interface, you can install it here. Note that some GUI applications (such as Settings) currently may not work properly under Ubuntu 22.04. However, this does not affect the use of ROS 2 Humble.
sudo apt install ubuntu-desktop
Fix SSSD startup error
sudo cp /usr/lib/aarch64-linux-gnu/sssd/conf/sssd.conf /etc/sssd/
sudo chmod 600 /etc/sssd/sssd.conf
Enable GDM to launch the desktop environment:
sudo systemctl enable gdm
To ensure GDM starts automatically on boot, edit the service file:
sudo vim /usr/lib/systemd/system/gdm.service
Add the following at the end of the file:
[Install]
WantedBy=multi-user.target
Known issue: Settings app (gnome-control-center) won’t launch
This issue is caused by a Jetson-specific symbolic link:
libdrm.so.2
is linked to NVIDIA’s custom libdrm_nvdc.so
, which is not ABI-compatible with the standard libdrm.so.2.4.0
. As a result, graphical apps like the Settings panel fail to start.
As a workaround, you can preload the standard DRM library when launching GNOME settings:
LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libdrm.so.2.4.0 gnome-control-center
This workaround allows the Settings app to open, but it’s not persistent. If anyone knows a more permanent solution, please share it.