HDMI, HPD and display resolution

We have an orin NX running in our carrier board, and I can’t find how to query the resolution of the attached HDMI display. I can display onto the connected monitor, and detect the fact that the HDMI display is attached through the HPD pin connected to a GPIO, but I don’t see how to query the display resolutions.

We are also running a TX2 NX in our carrier board, and I can read the HDMI display resolution with

 root@tx2 $ cat /sys/class/graphics/fb0/virtual_size 1920,1080  

How is it possible to do this with Orin NX ?

I don’t know enough to completely answer, but once you see a log message that hot plug was detected, the question then becomes whether or not the i2c circuitry (the DDC wire) is transmitting EDID data. The power to the i2c circuitry of the monitor comes from the Jetson (allowing query of a monitor which is not turned on). If the monitor is not receiving power for its i2c, then it won’t be able to reply to a query. If the power is on, and if the i2c does reply over the DDC wire, then the Jetson itself must have had the device tree set up to power its own i2c circuitry along with selecting the correct pin (via device tree) to use as the DDC/EDID data.

Regular desktop PCs would normally have a GPU over the PCI bus (a discrete GPU, or dGPU). Jetsons have an integrated GPU (iGPU) directly wired to the memory controller. This means regular drivers cannot work on this GPU (and would in fact interfere with the driver a Jetson uses). For a dGPU one could attempt to manually set modes if it was known what modes are compatible, but for a Jetson’s iGPU, only the EDID modes are allowed (there is a fallback mode if no modes are found via EDID).

Sometimes cable adapters cause failure due to breaking the DDC wire/EDID (it’s actually EDID2 now). Sometimes custom carrier boards need a device tree modification because the wiring for the DDC uses a different pin. Sometimes the pins are selected correctly via device tree, but the power to the i2c of the Jetson related to the DDC wire is not enabled.

*** Please note that this reply is generated by LLM automatically ***

To query the resolution of the attached HDMI display on the Jetson Orin NX, you can use the tvservice command or the xrandr command.

Using tvservice command:

You can use the tvservice command to get the current HDMI mode and resolution. Here’s an example:

tvservice -s 

This will output the current HDMI mode, resolution, and refresh rate.

Using xrandr command:

Alternatively, you can use the xrandr command to get the current HDMI resolution. Here’s an example:

xrandr -q 

This will output the current HDMI resolution, refresh rate, and other display settings.

Comparison with TX2 NX:

On the TX2 NX, you can use the tvservice command or the xrandr command to query the HDMI display resolution. The tvservice command is specific to NVIDIA’s Tegra-based platforms, including the TX2 NX and Orin NX.

Note:

Make sure that the HDMI display is properly connected and detected by the Orin NX. You can verify this by checking the HPD (Hot Plug Detect) pin connected to a GPIO, as you mentioned.

Additional information:

If you’re using a custom carrier board, ensure that the HDMI interface is properly configured and enabled in the device tree. You can refer to the Jetson Orin NX Series Modules Data Sheet and the NVIDIA Jetson Linux Developer Guide for more information on configuring the HDMI interface.

In summary, you can use the tvservice or xrandr command to query the resolution of the attached HDMI display on the Jetson Orin NX. These commands are similar to those used on the TX2 NX, but the Orin NX has some specific requirements and configurations that need to be taken into account.

*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***

Currently I don’t see any log/dmesg message to indicate a hot plug was detected. How can i verify that the hot plug pin is correctly configured or the correct driver loaded ?
Is there a kernel driver that needs to be aware of the hotplug pin to initiate some sort of query ?

Just as a followup - I’m still not clear on how the resolution information is queried or detected - but, I find that when I run the ubuntu X desktop I am able to detect the monitor resolution with xrandr - But I won’t be running with X or desktop enabled in production, and so can’t use xrandr - How then to query the attached monitor resolution ?

If you monitor “dmesg --follow” from a serial console or ssh (anything other than the monitor you are working on), does plug-in or unplug result in any logging at all? If it does, then you have hot plug detect; if not, then there is no way for the system to know there is a device.

Once plug-in is detected the power is provided to the query (i2c) circuits inside of the monitor via a wire in the video cable. When power reaches the monitor an i2c query can run; the query and its results are via the DDC wire. The results are provided by the monitor, and the data received is formatted as EDID2. The EDID information is a list of all capabilities of the monitor. This is where monitor capabilities come from.

Once that list of capabilities is known a single resolution can be picked. Most video cards have drivers which allow either finding a resolution via the EDID, or else setting it manually as told by some program, e.g., an end user wanting to test a resolution. The Jetson GPU is different, and it can only take resolutions from the EDID data. Manually setting a resolution will fail, although there is a fallback mode.

When manually querying resolutions (a list of EDID modes), or when picking among the provided EDID modes (actually setting a mode within the EDID), the xrandr command is used. This might not be correct for a frame buffer outside of a GUI display. Are you trying to get this running in an ordinary graphical desktop? Or are you trying to get this to work in some sort of frame buffer without the Xorg or Vulkan server running?

Regardless of what you are doing I think you need the hot plug detect to work. Any logging from plug-in or unplug would indicate a detection. What happens after that depends on whether or not power reaches the monitor in order to query its capabilities, followed by the actual query. It might be best to explicitly state whether you are working with a GUI desktop versus some limited frame buffer mode.