The introduction of the Jetson Nano 2GB ships with a different desktop environment than the other Jetsons. The desktop environment is LXDE. You can change over to this desktop environment fairly easily. Looky here:
Up till now, the default desktop environment on the Jetson has been Unity/GNOME. Unity is a shell around the GNOME desktop environment. While GNOME is attractive and easy to use this comes at a cost, namely memory. On a fresh install of JetPack, the memory in use is ~ 1.7GB.
With the introduction of the Jetson Nano 2GB this presents a problem. There is only 2GB of memory, so using 1.7GB to get the system up and running is a no go. Fortunately there are other desktop environments which use less memory. Lightweight X11 Desktop Environment (LXDE) is one such environment, and was chosen to be the default on the Jetson Nano 2GB. This saves ~ 1GB of main memory, which makes life much more comfortable on more memory constrained devices.
You may want to follow much the same procedure on other Jetsons, the Jetson Nano (4GB) can also benefit from these memory savings. Fortunately this is easy to do with the latest JetPack 4.4.1 release.
If you are using JetPack 4.4.1 (L4T 32.4.4), there are a couple of steps. First you will need to select LXDE as your desktop environment. This selection is available when you login (this screen is known as a greeter) in the settings menu (the gear icon):
Once you have logged in (LXDE should now be your desktop environment), you can switch over from the GNOME display manager (gdm3) to lightdm. This will also set the window compositor to Compton. From a LXTerminal (there is a shortcut on the desktop):
$ sudo dpkg-reconfigure lightdm
This will bring up a menu where you can select lightdm as the display manager:
After you make your selection, reboot for the change to take effect.
When you log back in, you can check your memory. You will find that you are saving ~ 1GB in comparison to using GNOME!
JetPack 4.4 and earlier
You can switch over to LXDE if you are using JetPack 4.4 and earlier. The process is described here:
NVIDIA Jetson Linux Developer Guide
Lightweight Window Manager Alternatives
Over on the JetsonHacks account on Github, there is a convenience script to help: installLXDE. Download the repository, switch over to the directory and install:
$ git clone https://github.com/jetsonhacks/installLXDE.git
$ cd installLXDE
Once installed, you can follow the steps described earlier to switch over to LXDE. See the video for more explanation.
As with most desktop environments, LXDE is highly configurable. You can set the desktop background, widget themes, font sizes and so on. See the video for some examples.
You can go back to GNOME of course. Go to the greeter screen, and select Unity/GNOME. GNOME is built with gdm3 in mind, but also seems to work with lightdm which saves some space. Use the dpkg-reconfigure command as shown above if you would like to switch back to gdm3.
First, as a side note, the Raspberry Pi uses a modified version of LXDE for their desktop environment.
We’ve introduced a lot of different names in this article, such as GNOME, LXDE, lightdm, gdm3. The GUI that you see on the screen represents a stack of software which speaks to the hardware of the machine.
From the bottom up, the software stack looks like the following list. Rather than go through a full explanation, here are links to Wikipedia articles which describe each part to get you started if you have interest.
- X Window System (aka X11): A network protocol encoding things such as graphic primitives, images, pointer motion, and key presses.
- X Display Server (e.g. Xorg and XFree86): X server implementing X11 and providing an interface to keyboards, mice, and video cards.
- X Display Manager (e.g. GDM, and LightDM): Graphical login manager which starts a session on an X server from the same or another computer
- Widget/GUI toolkit/framework/library (e.g. GTK+ and Qt): Providing things such as buttons, scrollbars, edit boxes, etc.
- Window Managers (e.g. Mutter which is used by Gnome, OpenBox which is used by LXDE): Decorating X window primitives and supporting various operations such as moving, resizing, and maximizing of windows.
- Desktop Environments (e.g. GNOME, KDE, XFCE, and LXDE): Providing libraries and specifications that applications use and follow in order to “play nice” with other applications.
Note that some Desktop Environments have shells around them (e.g. Unity for GNOME). Also, some of these programs combine different components of this architecture.
A compositor, such as Compton, usually works with a display manager to composite windows from the Window Manager. In more integrated solutions, this may be a little more hidden.
You may also hear the term “Wayland” which is a X Windows replacement. “Weston” is an reference implementation of Wayland. In this case, Wayland represents the bottom of the stack and works its way up from there. Many of the display managers, window managers and desktop environments have built in Wayland support.
The demo shown in the video is on a Jetson Nano (4GB). Other Jetsons can also benefit from the steps described above, but we did not test them here.
The summary of the desktop environment stack is taken from:
Unix Stack Exchange description of desktop stack.
This is a surprisingly difficult subject to summarize, especially considering that X Windows originated in 1984. In part, this is because of the overlap and popularization some of these terms.
Welcome back. We missed our jetson update.
Thanks! And thanks for reading.
Hello! Thank you for this article!
I have a problem with using lightdm in L4T Jetpack 4.4.1, maybe you can help me. I installed lightdm as follows:
sudo apt install lightdm
sudo dpkg-reconfigure lightdm
System boots without error, lightdm.service works.
When I log out, the lightdm greeter screen (which allows to select users and graphical environment) does not appear, the system returns to the desktop. There is no such problem when using gdm3.
How do I enable the greeter in lightdm?
I have not encountered this error, so there’s not much advice I can give. However you may try:
$ sudo dpkg-reconfigure gdm3
and see if it behaves itself. Select lightdm from the menu.
Unfortunately this doesn’t work on the 4GB Jetson Nano.
If you do:
sudo apt install lightdm
and logout, there is no LXDE option in the login screen. I am using the very latest SD card image.
Additionally, several users of the 2GB Nano have been having trouble with Lightdm:
I gave this a shot on a brand new Nano(4GB) install and my monitor showed it was active but nothing was being displayed. A weird thing also happened when I switched over. The network stack doesn’t appear to come up until after I have logged in once after a reboot (with a usb UART cable). I assume this has something to do with the gdm3 auto login. I even tried to avoid graphical UI all together with `sudo systemctl set-default multi-user.target` but the same networking issue persisted. The memory savings is close to 500 MB but my robot is unusable unless I can ssh into it from the network after it is powered on.
If you have any insight into how I can resolve this that would be great.
Interesting! If you’re really into lightweight desktops, it looks like OpenBox is also on JetPack. OpenBox is really lightweight; it comes up with a blank screen. However, if you right-click, you’ll get a menu.
Thanks for the tip, and thanks for reading!
I am getting random unity-panel-ser failures (see below). Do you think moving away from unity would help with this?
Apr 26 20:11:09 jetson unity-panel-ser: window_menu_model_new: assertion ‘BAMF_IS_APPLICATION(app)’ failed
Apr 26 20:11:09 jetson unity-panel-ser: track_menus: assertion ‘IS_WINDOW_MENU(menus)’ failed
Apr 26 20:11:09 jetson unity-panel-ser: menus_destroyed: assertion ‘IS_WINDOW_MENU(wm)’ failed