Screensaver blocking CECActivateSource

Hi. I have an all in one remote paired with a Flirc adapter to control my parent’s vero 4k. I’ve mapped escape key to the power button and to CECActivateSource in keymaps, which turns on their tv and soundbar from standby and changes to the correct input with a single press - works very well!

However, after Kodi’s screensaver has kicked in, two presses of the escape key are required to either turn on their equipment from standby, or to change to the vero’s hdmi source if they’re watching sky for example (not a big deal, but can be a bit confusing for the oldies)

Setting ‘Wake devices when deactivating the screensaver’ to ON in CEC settings solves this problem, as does disabling the screensaver completely.

Two questions:

  1. Is this expected behaviour when a screensaver is active, or should
    CECActivateSource still work with a single press.

  2. If I settle on using the ‘Wake devices when deactivating the screensaver’ option, is anything likely to wake Kodi other than a direct button press from the remote (osmc updates/ notifications for example)? As they own an oled tv, I’d rather not introduce the possibility of their tv turning on and staying on overnight, even with a screensaver active.


Yes, It is intended behavior.

I’m not sure this one can have a simple answer. With various CEC settings and various CEC enabled devices that could be attached there is potential for all manor of unexpected things to happen. I would think your best bet here is to simply make sure you have the screen saver enabled, CEC set to suspend on screen saver, and the TV set to power off with the suspend. You could then give it a period of time and see what happens without worrying too much about burn-in.

Ok thanks, very helpful. Just to clarify, in terms of not being able to predict what could trigger Kodi to activate…could that include events from within Kodi such as osmc updates, various Kodi addons potentially? Or is it more about cec communication across devices being unpredictable? Either way, thanks for the suggestion.

I mean in a general sense when you are using CEC. If you had CEC disabled and were just using the power options to shutdown after a straight period of inactivity then there could be a clear answer to ‘will it wake up without a keypress’. But with CEC you have multiple devices working in concert with each other and user settings that dictate what messages are exchanged and what they do with messages they receive. This has the potential to cause all sorts of things to happen so a generic statement of what will happen is problematic. Generally speaking OSMC updates and Kodi notifications should not AFAIK pull Kodi out of a sleep state. But perhaps the TV wakes up to install updates without turning on the screen but it coming online wakes up the AVR and that in turn triggers it Kodi to wake up and with it having activate on source set it in turn tells the TV to turn on and switch source on the AVR and now everything is up because of an event the TV did not intend to cause. It can get messy. Just make sure if Kodi gets woken up it can turn itself back off after a period of time. If situations come up then tweak till you find a solution.

Ok I hear what you’re saying. Thanks again.

Perhaps the TV also has an auto standby mode which can turn off the TV after some inactivity. This could be used as a fallback just in case something turns the TV on.

1 Like