Can the Kodi screensaver power off the display, in the same way the Suspend mode does?


Using the Power menu, Suspend stops the signal to the Hdmi output, which places my monitor into standby (Asus 1080p 28").

I know Suspend doesn’t place the Vero 4K itself into a low-power state (at least an SSH session shows no decrease in cpu use, speed, or temperatures), however it’s useful to power off the display.

I’d like the Kodi screensaver to also power down the display, but can’t find a way.

Via Interface Settings I installed the add-on ‘Turn off’ which states ‘screensaver that turns your screen off to save power’, however it just outputs a black display - the monitor is still on.

Within Settings | System | Input - Peripherals, I tried enabling ‘Put devices in standby mode when activating the screensaver’, but this had no effect.

Can anybody help?

Hi RR,

When you suspend the device we turn off the HDMI TMDS clock and lower the CPU performance (although we keep it high enough for it to be reasonably responsive).

Here’s an add-on (you can download the ZIP): GitHub - osmc/script.vero4kstandby

You can set this as your screensaver add-on and it will turn off the display.


1 Like

Hi @sam_nazarko,

Thanks as always for the reply and the insights.

I’ll grab the zip and install it, cheers

Hi @sam_nazarko,

Partial success.

When using the screensaver add-on from your link, after a period of inactivity the vero’s led turns red, then the monitor powers off the backlight.
After maybe 20 seconds the backlight returns, although the image is a black screen. The monitor never enters standby mode (no message, no change in monitor’s led status colour).

In contrast, using ‘Suspend’ from the power menu, the Vero’s led turns red, the monitor powers off the display/backlight for a few seconds, then it powers back up to show an in-built ‘no signal’ message. A few seconds later the monitor powers off again, with its own led changing colour to confirm this.

I enabled debug logging and notification logs, then rebooted.

I waited for the screensaver to activate, then after a minute or so I used the remote’s ‘ok’ button, navigated to the power menu, and selected ‘suspend’.

In the log, after the 2 minute timeout I set for the screensaver, I can see the debug messages as set in the screensaver’s

I can also see the log messages for the activation of the Suspend mode (whereby the display correctly powers down).

Happy to upload the log file from /home/osmc/.kodi/temp/kodi.log if you provide a location

Excerpt from log file:

20:13:05.217 T:4079919872   DEBUG: CAnnouncementManager - Announcement: OnScreensaverActivated from xbmc
20:13:05.217 T:4079919872   DEBUG: GOT ANNOUNCEMENT, type: 4, from xbmc, message OnScreensaverActivated
20:13:05.545 T:3853554432   DEBUG: CPythonInvoker(5, /home/osmc/.kodi/addons/script.vero4kstandby/ start processing
20:13:05.775 T:3853554432   DEBUG: CPythonInvoker(5, /home/osmc/.kodi/addons/script.vero4kstandby/ instantiating addon using automatically obtained id of "script.vero4kstandby" dependent on version 2.19.0 of the xbmc.python api
20:13:05.915 T:3853554432   DEBUG: TMDS to 0
20:13:05.916 T:3853554432   DEBUG: Toggling HDMI TMDS clock
20:13:05.916 T:3853554432   DEBUG: Toggling LED
20:13:05.916 T:3853554432   DEBUG: ConnMan is to stop
20:13:05.916 T:3853554432   DEBUG: Toggling network connectivity
20:13:07.367 T:3836777216   DEBUG: VPN Mgr : Encountered a new window ID 12900
20:13:07.373 T:3836777216   DEBUG: VPN Mgr : Previous window ID was 10000
20:13:08.127 T:3853554432   DEBUG: Using powersave governor
20:13:08.128 T:3853554432   DEBUG: Toggling CPU governor
20:13:42.057 T:3881415424   DEBUG: script.module.osmcsetting.updates :  - blurp 485 - /home/osmc/.kodi/addons/script.vero4kstandby/resources/skins/default/720p/dummy.xml
20:13:43.074 T:4079923792   DEBUG: LIRC: Update - NEW at 160899:160 0 KEY_OK linux-input-layer (KEY_OK)


osmc has an inbuilt service for uploading logs, details can be found here:

Thanks Tom.

Thanks @Tom_Doyle,

I didn’t want to just upload a log on spec, as it where, without somebody requesting it (e.g. offering to investigate).

If i can find the code that runs the Kodi Suspend command on the Vero 4K I could compare the screensaver and investigate. I don’t know if Kodi is fully open source, with everything on github, or where to begin looking.

Before my illness, things like this used to be so easy for me (I rebuilt ffmpeg and customised Retropie to add native a/v recording of retroarch emulators on the Pi, two years before they added it as standard)


As far as I’m aware kodi is fully open source, a good place to start looking would be here:

Thanks Tom.

This is the code I added to hijack Kodi suspend code for Vero:

If you are serious about building Kodi from source I can give some pointers. You can do it on the Vero.


I wasn’t thinking of building kodi from source, just maybe modifying the screensaver a little if I could see how the Kodi suspend is able to shut off the display…

Kodi’s suspend implementation is not existent on Vero 4K / 4K +.
What I’ve introduced is a bit of a hack, as evinced by previous patches.

The screensaver add-on I linked you to does too much for your requirements.

See script.vero4kstandby/ at master · osmc/script.vero4kstandby · GitHub.

TMDS is shut off in the same way as suspend.

Hi @sam_nazarko

I don’t think I explained my issue very clearly.

Basically, Kodi’s Suspend on the Vero 4K successfully turns off the monitor.

The screensaver add-on, in contrast, briefly powers off the monitor, before turning it back on.

I aleady looked at the screensaver code, and wondered what the Suspend code was doing differently.

I still cannot get this working, and have been unable to locate the source code that Kodi uses to effect the Suspend function (in the main Power menu) when run on the Vero 4K.

Can anybody point me in the right direction? Is the source even on github?

Hi RR.

Thanks for letting me know your findings.

The screensaver approach was originally a poor man’s approach to handle this suspend behaviour, until I decided to hijack Kodi’s suspend support altogether.

I think I posted this a few days ago, but the source code for that is here:

I suspect something is waking you out of screensaver mode quickly. Kodi debug logs usually show wake events.


Thanks @sam_nazarko, I’ll take a look. Cheers

I seem to have fallen into a Git Hub black hole trying to track down the .cpp files referenced in this diff. I’m assuming xbmc is a dependency of osmc?
I have started looking at the osmc developers documentation, but I’m currently heading towards 48 hours without sleep, so nothing much is making sense!

I don’t think the C++ source will help much.

A full log on will likely help me see why your display is waking up.