Looking for a way to turn off hdmi

I am looking for a way to turn hdmi on and off from script or plugin.
I used to use vcgencmd but that doesn’t work in the new version. I tried using tvservice by switching to the old display driver but that broke cec and h264 playback (my apollogies for thinking that was the updates fault).

I can see that osmc is capable of turning the display off because if I use the powersaving/sleep option it does turn the display off but the problem there is that it never turns on again and I have to reboot.

I tried
kodi-send --action=CECStandby

but that doesn’t send the display into standby it just causes it to switch to a different input.

If I understand correctly the osmc remote is able to do this by holding the home button so maybe I can hook into that.

Any ideas would be greatly appreciated.

I assume you are using a Raspberry Pi.

Which version of OSMC are you using?

vcgencmd is somewhat deprecated on Pi as newer versions of OSMC on Pi use a newer video and display framework.


Yes I am running on a pi 3.

OSMC running Kodi 19.5

osmc 2023.01-1 (kernel:Linux 5.10.78-

I’ve asked @popcornmix if he can advise.



vcgencmd display_power and tvservice only support the old display stack.

I don’t have a cec capable display to hand, but I might investigate something like:

cec-ctl --to 0 --standby

A different option is to blank the console. Run this as root:

setterm -term linux -blank force < /dev/tty0

(use “-blank poke” to restore), but I think you need to have kodi stopped before running that.