What? If you run tvheadend and kodi on one device you want to wait to start kodi until hdmi is conected, Why? kodi has bugs that cause issues when started before connected to hdmi Sometimes it crashes Sometimes it stops to render text in menu How to work arround? Wait for HDMI and timeout if no recording is upcomming #!/bin/bash # This scripts wait <TIMEOUTINSECONDS> till hdmi connection got established or shutdown if no tvheadend recording is running, upcomming or some stream is consumed, served by tvheaden # Howto https://debianisttoll.blogspot.com/2021/07/wait-till-hdmi-is-connected-before.html # Source https://gist.githubusercontent.com/stesee/9ebb11cc2db6a58e6b42afb2d74e7e7b/raw/7327e42950c449c1153ebf546f60ee1d8e3d0d0d/waitTillHdmiConnected.sh # install stuff before using this script # ...