TX2i tegra-udrm HDMI connection status

Hello,

I need to determine whether HDMI is in a connected state or not. On other systems, this can be determined by reading the contents of “/sys/class/drm/card0-HDMI-A-1/status”. However, this varies a bit on the TX2i. I have enabled tegra-udrm modeset=1 and I am now seeing “/sys/class/drm/card0”, but there is no status file to read. Is this file located elsewhere, or is there an option to enable it, or perhaps some other simple way of monitoring the connection status of HDMI? Preferably something simple that I can monitor from my c++ application.

Thanks

I think I have found the answer. Reading the contents of /sys/devices/virtual/switch/hdmi/state appears to output “1” when connected and “0” when disconnected.

Can anybody verify this?

Yes, that one could be used.