Is there a way to easily check supported monitor resolutions (HDMI) (no GUI, from a shell) with the Jetson TX2, similar to how I can do something like this on a normal Ubuntu x86 system:
cat /sys/devices/pci0000:00/0000:00:03.0/0000:02:00.0/drm/card0/card0-DVI-I-1/modes 1920x1200 1600x1200 1280x1024 ... 640x480 720x400
My natural inclination is to use xrandr / XRR interface or SDL interface, but that isn’t fool proof because X doesn’t unset the current resolution when you unplug a monitor, so if you have a monitor that’s 3840x2160 and boot the Jetson with that, X will set native resolution of 3840x2160 as expected, but if you hot plug it and plug in a 1920x1080 monitor the monitor will get out of range error.
At that point if you list all resolutions with XRR/xrandr/SDL it’ll list all supported resolutions PLUS the invalid, unsupported, currently selected 3840x2160 resolution. There seems to be no way to get X to forget the selected resolution, even if you restart it, so I’m thinking maybe it’s stored in the Jetson display driver?
Unless I can somehow force X to forget that selected resolution, the resolution output of any interface to X isn’t trusted to be valid.
So I turn to /sys, hoping I can check supported resolutions directly, but there seems to be nothing of interest there on the Jetson, unlike more traditional x86 PC setups.
The only remaining option is to parse EDID directly via the EDID /sys file, but this is a pain as not all resolutions (ie. 2560x1440) have standard VICs, so you have to piece it together from the standard table + detailed resolution extensions, feels very tedious, but may be only option.
Alternatively, if there’s any way to force the Jetson display driver to always select the native resolution on hot plug, that would be a great solution. I’m only hoping to use the native resolution for a given monitor.