TVService Gone? Alternative?

  • Am new to LibreElec as a recent convert from OpenElec.
    I have an issue with my Odroid-C2 installations running the 7.90.010 build and tvservice not being available.

    With my previous installations I had a customer script that would kill Kodi and turn off the HDMI port when "powering off", and enable HDMI and start Kodi when "powering on". Worked great for Raspberry Pi installs and the Odroid-C2s that don't have the ability to turn off/on via IR.

    Stopping Kodi and turning off the HDMI:

    Code
    /usr/bin/systemctl stop kodi
      /usr/bin/tvservice -o

    Starting Kodi and turning on the HDMI:

    Code
    /usr/bin/systemctl start kodi
      /usr/bin/tvservice -p

    Now in the latest builds of LibreElec, there is no tvservice command to run the above.
    I have killed a lot of time playing with cec-client to get it to do the same thing, but if the screen is not CEC compliant (Eg. a generic LCD monitor) this won't work. In the same instance tvservice was great as it would put the monitor into standby mode as it would power down the HDMI input.

    Now my question is, is there an alternative to tvservice that will still do the exactly the same thing, or better yet is there a way to install tvservice into the LibreElec build?


  • Isn't tvservice RPI only?

    I think you are right. I thought it was in all *Elec builds as I saw it mentioned on a few ODroid forums as well.

    Turns out I found a solution for this in the end anyway, which is as below:

    Code
    # Turn off HDMI Feed
    echo 0 > /sys/class/amhdmitx/amhdmitx0/phy
    
    
    # Turn on HDMI Feed
    echo 1 > /sys/class/amhdmitx/amhdmitx0/phy

    Tested and working well on my ODroid with LCD monitor attached.

    If anyone is interested in my scripts to emulate power off/on with RPi/Odroid or such devices they can grab them from here:

    Code
    RPi Version:
    https://jemson.org/files/PowerPlay-RPi.zip
    
    
    ODroid Version:
    https://jemson.org/files/PowerPlay-ODroid.zip