I am using a RPi connected through HDMI to a Samsung TV. I am attempting to trigger RPi processes so that they are only active when the HDMI output is being used by the TV. Effectively, I would like to start the process when the correct HDMI input is selected from the TV and terminate it when another TV source is selected.
I have tried to use tvservice –s
for that end, but the command’s output does not change depending on whether the TV is configured to use the RPi’s HDMI or any other source.
Therefore, I welcome suggestions on what other mechanisms could be used (e.g. low-level drivers, libCEC, xrandr) to determine if the TV is currently using the RPI’s HDMI.
Thanks!