Fix: Jetson Nano not able to detect a VGA monitor

Hitarth
4 min readJan 17, 2021
Photo by Stephen Monterroso on Unsplash

Jetson nano works perfectly with HDMI monitors without any problems but with VGA monitors it doesn’t work. Since nano doesn't have a VGA port, one has to use a VGA-HDMI converter to connect to a VGA display. And the converter is where the issue lies, it fails to convey required EDID data to jetson nano. Jetson relies on EDID to recognise the capabilities of the display. HDMI to VGA adapter strips this EDID communication and as result VGA monitors are not detected by Jetson. One might not be able to afford a new monitor to work out this problem, this solution isn’t feasible.

I will explain the steps to solve this issue,

  1. Flash the jetson nano image (download from Nvidia site) into SD card using balena etcher. If you have done it already no need to redo it.
  2. Download L4T driver package for nano. And extract that archive in your computer.
  3. Go inside extracted archive and execute ./source_sync.sh -k tegra-l4t-r32.1
  4. Set the shell variable with the command:

$ TEGRA_KERNEL_OUT=<outdir>

Where:

<outdir> is the desired destination for the compiled kernel.

5. If cross-compiling on a non-Jetson system, export the following environment variables:

$ export CROSS_COMPILE=<cross_prefix>

$ export LOCALVERSION=-tegra

Where:

•<cross_prefix> is the the absolute path of the ARM64 toolchain without the gcc suffix. For example, for the reference ARM64 toolchain, <cross_prefix> is:

<toolchain_install_path>/bin/aarch64-linux-gnu-

See The L4T Toolchain for information on how to download and build the reference toolchains.

Note:

NVIDIA recommends using the Linaro 7.3.1 2018.05 toolchain.

6. Execute the following commands to create the .config file:

$ cd <kernel_source>

$ mkdir -p $TEGRA_KERNEL_OUT

$ make ARCH=arm64 O=$TEGRA_KERNEL_OUT tegra_defconfig

Where:

•<kernel_source> directory contains the kernel sources (e.g. kernel-4.9). Here it’s value is Linux_for_Tegra/sources/kernel/kernel-4.9

7. Execute the following commands to build the kernel including all DTBs and modules:

$ make ARCH=arm64 O=$TEGRA_KERNEL_OUT -j<n>

Where <n> indicates the number of parallel processes to be used. A typical value is the number of CPUs in your system.

8. Replace <release_packagep>/Linux_for_Tegra/kernel/Image with a copy of:

$TEGRA_KERNEL_OUT/arch/arm64/boot/Image

9. Replace the contents of Linux_for_Tegra/kernel/dtb/ with the contents of:

$TEGRA_KERNEL_OUT/arch/arm64/boot/dts/

10. Execute the following commands to install the kernel modules:

$ sudo make ARCH=arm64 O=$TEGRA_KERNEL_OUT modules_install \

INSTALL_MOD_PATH=<top>/Linux_for_Tegra/rootfs/

11. Install dtc (device tree compiler) using sudo apt-get install device-tree-compiler. It converts between the human editable device tree source “dts” format and the compact device tree blob “dtb” representation usable by the kernel or assembler source. dtc is also a dtb decompiler.

12. Find all instances of “tegra210-p3448–0000-p3449–0000-b00.dtb” file inside Linux_for_Tegra dir.

13. On all of them, execute sudo dtc -I dtb -O dts -f <path to above dtb file> -o <path to above dtb file, but change ext to .dts>.

14. For each of those generated dts files, find below-shown sor sections,

Mine is already edited, yours will look different. In hdmi-display, change status value to “okay” and add below text (which is edid data, required to communicate with VGA monitors)

nvidia,edid = [00FFFFFFFFFFFF001E6DEF4B15000000
0B1401036C291778EAD025A258559C28
0F5054A76A00314F454F614F01010101
010101010101662150B051001B304070
360096E51000001E000000FD00384B1E
3D0E000A202020202020000000FC0045
313934330A20202020202020000000FF
0053657269616C5F4E756D62657200D9

00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000];

below phandle def. This has to be done for both above shown sections and for all generated dts files from previous step.

15. Now convert all of these dts files back to dtb using sudo dtc -I dts -O dtb -o <path to dtb file from step 6> -f <path to dts file>. Do this for their respective dts files. By doing this we have edited all instances of “tegra210-p3448–0000-p3449–0000-b00.dtb”, which will allow nano work with VGA display.

16. Now this updated dtb file must be signed. Execute sudo rm bootloader/signed/tegra210-p3448–0000-p3449–0000-b00.dtb.encrypt to delete previously signed dtb file. Go to rootfs dir (In Linux_for_Tegra dir). Run sudo ../tools/jetson-disk-image-creator.sh -o edid.img -b jetson-nano -r 300. If an error is thrown about a file is not found, copy-paste it to the required location (error message will say which file and where it should be present. Missing file will be present inside Linux_for_Tegra dir). Do this for all those missing files, till .img file is successfully built. Once done Linux_for_Tegra/bootloader/signed/tegra210-p3448–0000-p3449–0000-b00.dtb.encrypt will be generated which is what we want, a signed updated dtb file.

17. Connect that flashed SD card to your computer (from step 1).

18. Run sudo fdisk -l to list all partitions. In jetson nano image, a partition refers to this dtb binary file, which we need to replace with our signed updated dtb file. This partition is around of size 450 KB (Refer this for partition info in jetson nano). Figure out the partition from the output of fdisk command. Let’s say its /dev/sdeX for the sake of explanation.

19. Go to Linux_for_Tegra dir. Replace desired partition with command sudo dd if=./bootloader/signed/tegra210-p3448–0000-p3449–0000-b00.dtb.encrypt of=/dev/sdeX. Don’t forget to replace partion info in command according to your case.

20. Once done, insert this SD card to nano and check if it works with your VGA monitor.

Give a clap if this helps you !!

References

  1. https://docs.nvidia.com/jetson/archives/l4t-archived/l4t-3231/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/kernel_custom.html
  2. https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/part_config.html
  3. https://forums.developer.nvidia.com/t/override-edid-data-to-connect-to-hdmi-display/76905/6
  4. https://en.wikipedia.org/wiki/Extended_Display_Identification_Data#:~:text=Extended%20Display%20Identification%20Data%20(EDID,Electronics%20Standards%20Association%20(VESA).
  5. https://forums.developer.nvidia.com/t/howto-update-dtb-on-jetson-nano/74820/19
  6. https://elinux.org/Device_Tree_Reference#:~:text=dtc%20(Device%20Tree%20Compiler)%20%2D,in%20the%20kernel%20source%20directory.

--

--