Control HDMI On/Off

  • Recently managed to disable the HDMI port on my RPI 3 while running LibreELEC 11 and Kodi 20. I cut power while it was in the middle of streaming and the next time I turned it back on, putty showed it was up and Kodi was loaded and running, but there was no HDMI signal. Start/Stop Kodi did nothing, as did soft and hard reboots. I pulled the SD and popped in my previous version (9.2.8) and the screen came back on. Swapped back to 11 and it was still on.

    SO, it's obvious this is a command to the chip that turns it off or on. And it remembers. I found a suggestion that you can turn it on or off in some version of Linux with a command "rpi-hdmi on" and "rpi-hdmi off," but those clearly don't work with LibreELEC.

    Anyone know if there's command control of the hdmi state for LibreELEC? I don't want to be swapping SD cards if I do this again. It'd be nice to be able just tell it via putty to turn it back on.

  • Go to Best Answer
  • No. There is no command that disables hdmi and remembers it (other that manually editing configuration files).

    I found it quite baffling that rebooting LibreELEC 11, even after powering down, would not turn the HDMI back on. But swapping* out 11 for 9.x turned it back on, and then swapping back to 11 found it still on. Doesn't that suggest that it couldn't have been the config file?

    But, whatever. That's not important right now. Here's the main question: Is there a command that works in LibreELEC to turn the rpi's HDMI port on or off? I'm barely competent in linux, but I can use putty and follow instructions.

    _____

    *- By "swapping" I mean physically changing the SD card, pulling one for the other.

  • Hi, usually the HDMI is "turned on" only if at the boot is detected a compatibile display (HDMI cable issue, display in stand-by when the LE booting...). Between LE v9 and v11 was major changes, probably the newer version is more "stricter" to get the display information (EDID data). When I had the same issue the solution was to save the display data using the command "getedid create" (SSH).

  • When I had the same issue the solution was to save the display data using the command "getedid create" (SSH).

    Thanks.

    Will that work when the display signal is off? One problem I'm having is that with whatever it is I installed in Kodi addons with this new (for me) build of 11, it keeps cycling the TV back on a couple minutes after I've turned it off (probably with CEC/Simplink), so I've been powering down the RPi. With 9, I just left it on 24/7. If I could figure out what's doing that, I could just disable that.

    So far, though, this has only happened to me once in perhaps 30 on/off cycles. I'd really like some definitive way to poke HDMI back to life when it happens again, if such a method exists.

  • Humm. I have a similar issue going on with my RPi5 and a nightly build. A simple reboot and Sony TV reports "No Signal" after repeated reboots (hard and soft) still no signal. Boots normal on a different TV so very curious what's going on.

  • Will that work when the display signal is off?

    No, you need to run that command when the HDMI connection is working (the RPI "seeing" the TV). Do you tried to reboot (or power cycle) the RPi when the TV is switched to that HDMI input (displaying the "no signal" message)?

  • Seems my issue is simply a Sony HDMI handler thing. I think Sony did way more with their hdmi control system than they needed to. It causes me all manner of problems when active inputs are selected. Makes my head hurt.:cry:

  • I think Sony did way more with their hdmi control system than they needed to.

    It's a standard communication between the video source (RPI) and display (TV) using dedicated wires in the cable (HDMI). Till now I seen two issues, the cable - defective, wrong contact, poor quality, or the display in stand-by don't offer the display data (EDID info) - like my LG TV. You can try 2 simple things, try with another cable, and try to switch on the TV first then the RPi, to be sure the display data it's available.

  • Do you tried to reboot (or power cycle) the RPi when the TV is switched to that HDMI input (displaying the "no signal" message)?

    Yes, absolutely. Again, this only happened the one time, when I cut power to it while it was streaming something, although that just could have been coincidence. Been careful to only cut power since then with nothing streaming. Again, though, that could be entirely irrelevant. I never had to cut power with my LibreELEC 9.2.8 setup, but the 11 setup keeps turning the set back on after I've turned it off. Something is cycling CEC and I can't figure out what, and given my beginner skill set, I'm not likely to. So, it would be nice if there was a command line I could enter from a putty session to reenable HDMI if this happens again.

    Thanks for the response.

  • On my Sony none of the HDMI inputs were connecting properly to any device. I did some research at Sony website and tried disconnecting all HDMI inputs,TV factory reset then one by one connect each device and so far all is working again. Likely older Sony HDMI software and or display timing issues. I don't believe it's a LE or RPi issue. YMMV.

  • The information you have linked to is over 7 years old and doesn't apply. Don't try this.

    Good to know, thanks. However I would expect also some positive response to this guy, say "nope, no way, just restart your device" or "use that magic-command instead". Unless you are waiting for some ritual of ash and dust begging? :P

  • Unless you are waiting for some ritual of ash and dust begging? :P

    Fresh out of ashes and dust. I thought it was a legit question. I've noticed it asked in other places, with other answers that don't work on LibreELEC.

    While I'd obviously be thankful if anyone has the answer, for now I think I'm going to try to track down what is tweaking CEC periodically, which has the effect of turning my tv back on. That way, I won't have to power down the RPi and risk a recurrence of "No Signal" when I power it back up.

  • That way, I won't have to power down the RPi and risk a recurrence of "No Signal" when I power it back up.

    When I had the same issue the solution was to save the display data using the command "getedid create" (SSH).

    1. For the "No Signal":

    Do you have any reason to don't try to save the EDID (display) data from TV? Did you tried to search some info about that command? Maybe to learn something?

    When it's working (on the TV you see what should to be see), go to SSH and run that command...

    Or don't try it... and wait for... something...

    for now I think I'm going to try to track down what is tweaking CEC periodically, which has the effect of turning my tv back on

    2. Turning the TV back on:

    You could have some "unwanted" reboots (RPi power issue?) and it's activated in the CEC settings to wake up the display at the LE boot. (Settitings - System - Input - Peripherals - CEC - "Devices to power on during startup")

  • 2. Turning the TV back on:

    You could have some "unwanted" reboots (RPi power issue?) and it's activated in the CEC settings to wake up the display at the LE boot. (Settitings - System - Input - Peripherals - CEC - "Devices to power on during startup")

    Power seems fine, and it's not rebooting. Something is tweaking CEC, though. I'm seeing popup Simplink notifications periodically. Been going through all the installed addons, and not seeing anything obvious. I don't want to have uninstall everything one by one to see if it gets fixed.

  • UPDATE:

    Okay. So, I still haven't learned an SSH command that will turn the HDMI on or off (I was only interested in the "on" part), but I may not need that now. (Although, still would like to learn how, if anyone knows.)

    To recap the problem: I had been powering down the RPi because it kept turning the TV on after I shut it off. One time when I powered it back up, there was no HDMI signal, though "top" showed it was up and running, with Kodi. Multiple reboots & power cycles did nothing. Pulling the SD and putting in an older version worked fine, and then putting the new one back ALSO worked fine, as if nothing had happened.

    My suspicion was that something was unnecessarily calling the CEC routine.

    Considering how rarely HDMI got shut off (just the once in a few dozen cycles) I was seeking a solution to just turn it on. Instead, I was forced to do things the right way and solve the CEC problem.

    Which, honestly, I'm probably not smart enough to do, but I figured I could isolate it. So here's what I tried:

    Disable all the video addons, reboot, and then power off the tv (not the RPi) and wait. That worked. It stopped popping back on.

    So, then it was a process of enabling those addons to see which one was the culprit. I did that. The answer was surprising.

    None of them! However, despite that they were all set to autoupdate, it looks like disable/enable forced some updates I wasn't getting. TL/DR: It's fine now.