VR display for jetson nano

I thought Jetson could make a good DIY VR headset. My first challenge is getting Jetson to display on a 2k 5.5 inch display, LS055R1SX03
The attempt failed, Jetson does not recognize it as a valid display.
It does, however recognize an other display, a 7 inch touchscreen, and in raspberry pi, the result is the same out-of-the-box. I did however get it working on raspberry by tweaking the config.txt
Now, is there a setting I can set to make this work like on raspberry?

1 Like

I have similar 1440x2560 display, it did not work out-of-the-box with Jetson Nano but I managed to get it to work. This is known bug in Nvidia HDMI driver, it has issues with 2.5K and 4K displays which have native portrait orientation. It is still not fixed in latest L4T release. Hopefully they fix it in next release. See this forum thread for more information: 1440x2560 HDMI display not working - #7 by Lissanro.

This how I managed to get my 2.5K display to work with Jetson Nano: to add support for 2.5K and 4K displays with portrait orientation, I downloaded L4T source code (L4T | NVIDIA Developer), applied the patch below, compiled the kernel and installed it.

diff --git a/kernel/nvidia/drivers/video/tegra/dc/hdmi2.0.c b/kernel/nvidia/drivers/video/tegra/dc/hdmi2.0.c
index c8e34a298..88af19715 100644
--- a/kernel/nvidia/drivers/video/tegra/dc/hdmi2.0.c
+++ b/kernel/nvidia/drivers/video/tegra/dc/hdmi2.0.c
@@ -321,7 +321,7 @@ static bool tegra_hdmi_fb_mode_filter(const struct tegra_dc *dc,
 	if (!mode->pixclock)
 		return false;
-	if (mode->xres > 4096 || mode->yres > 2160)
+	if ((mode->xres > 4096 || mode->yres > 2160) && (mode->xres > 2160 || mode->yres > 4096))
 		return false;

If you do not know how to compile the kernel, please let me know and I will explain how to do it step-by-step. It is relatively easy once you know how to do it.

I also have deb packages with fixed kernel, I build them on Jetson Nano 4GB B01 with JetPack 4.5. In theory my deb files may work for other Jetson Nano models but I tested them only on B01. If somebody interested in pre-built kernel with support for 2.5K and 4K displays, I can share my kernel deb packages but they only work with JetPack 4.5.

1 Like

Thank you Lissanro for the reply, this is golden. I have never tried compiling any kernels, but that’s probably something worth research. Also, I would love it if you can share me the deb packages, in the end I need an SD card image that I can just flash for Nano.
Any further instructions are welcome.

By the way, I make programming tools for VR, would be nice to start a hardware assembly line for this.

I set up a git for this, GitHub - thaiwash/jetson you can request access

To download and install kernel deb files (standard L4T + the patch to add support for 2.5K and 4K displays) copy and paste these lines to the terminal:

cd /tmp/ && \
wget http://Dragon.Studio/2021/01/nvidia-l4t-kernel-4k-support.zip && \
unzip nvidia-l4t-kernel-4k-support.zip && \
sudo apt install ./*.deb

Please note that this is my first time sharing deb files so if somebody tries them please let me know if they work for you and what Jetson Nano (2GB, B01 or A02) and JetPack you were using. It would be useful to have at least one feedback for each platform so others would know if these packages work for Jetson Nano A02 / B01 / 2GB. I just tested my packages with freshly installed system on Jetson Nano B01 with JetPack 4.5 so they should work at least on this platform.

I soon plan to share a short tutorial about how to build your own kernel .deb, since I was not able to find any tutorials like that for Jetson Nano.

If after finishing booting to the new kernel you still have a black screen, try replugging display power. In my case 2.5K display is USB powered and I had to run USB power cycle tool from USB Power control - #7 by DaneLLL from ~/.xsessionrc. This is not an issue with Jetson Nano but with some badly made HDMI controllers. If after startup you can see an image right away then your display does not have this issue.

Works perfect, thank you, how can i ever repay you!

I think this is the B01 model, but I’m not sure how to check the version numbers exactly.
So it only works in portrait mode, or can I use it in landscape mode?

Yes, you have B01 model (here are differences between B01 / A02 / 2GB models in case somebody needs this information to tell what board they have).

The display can work in both landscape and portrait modes. I personally use it in landscape mode. I added the following at the top of my ~/.xsessionrc file:

sleep 10 # Wait a bit before changing display orientation otherwise it may have no effect
DISPLAY=:0 xrandr --output HDMI-0 --rotate left

You can try to run the command above in a terminal to test if it works. To rotate it back to portrait mode, use --rotate normal option.

Just in case somebody tries to use nvoverlay in gstreamer after setting non-default orientation, since nvoverlay will ignore display orientation set by xrandr, I share a solution to force it to use landscape orientation too. For example, to display RTSP stream from my camera with gst-launch-1.0 I have to use the following low-latency pipeline:

gst-launch-1.0 rtspsrc location=rtsp:// latency=0 drop-on-latency=true max-size-buffers=0 ! decodebin ! nvvidconv flip-method=1 ! nvoverlaysink overlay-x=0 overlay-y=0 overlay-w=1440 overlay-h=1920 sync=false -e

Notice that I use nvvidconv flip-method=1 to rotate video 90 degrees and I have to specify “width” overlay-w=1440 even though 1440 is actually image height, and the same is true for width, it has to be specified as overlay-h when in landscape mode.

But almost all video players and apps respect display orientation set by xrandr, if you do not use nvoverlay, you probably will not notice any issues.