I am facing a “problem” which i assume is connected to how osmc works.
When osmc’s update implementation starts (blue screen), kodi somehow stops (the update action “kills” kodi) if you have enabled “send inactive source command when stopping kodi” in kodi’s hdmi cec settings…
Having that cec command enabled, when updates start, hdmi source is reverting back to were it was (tv?).
Having that cec command disabled, update blue screen starts ok, but when you shutdown kodi it stays on hdmi mode (doesn’t revert back to TV) because the command is disabled…
Had similar problem when starting retosmc, but mcbit found a solution by tweeking the retropie.sh script.
This is my post:
Mcbit found a solution here that works (for retrosmc):
So is it possible to tweek osmc to not change hdmi input when update blue screen starts?
I suggest you disable “send inactive source command when stopping kodi” then, because Kodi must exit to install some updates, there’s nothing we can do about that.
With CEC, sending “Active source” means “please switch to my input - I’ve got something to show”
and “Inactive source” means “you can switch away now, I’ve finished”.
So are you happy with the normal kodi behaviour with active/inactive source, but it’s just a problem when updating kodi?
Does rebooting osmc work okay?
If an osmc update requires kodi to restart, I’d expect an inactive source to be sent when kodi exits (which may make your TV switch to a different input), and then an active source when kodi restarts (which should make your TV switch back). Is that what is happening?
Hmm…i also thought that but…not…that isn’t happening…“Send inactive source command” makes my tv switch to different input (when update starts) but it stays on my tv
I have to manually switch the source back to kodi…
I see what haris is asking here.
If kodi shutsdown ie so user can power off, cec inactive should be sent.
But if kodi exits to restart, cec inactive shouldn’t be sent.
This is really a kodi issue as it controls cec on close of kodi, unless osmc devs can over-ride kodi sending cec inactive?
Hypothetical, if an update is in progress, would be nice to see the progress instead of having tv source switch inputs away from pi, then back to pi on kodi restart.
I think that devs could make a script (or add some lines like mcbit on my 1st post) to “fool” kodi into thinking that it is still active ,even if “send inactive command” is on…
Send inactive command should ONLY work when kodi is restarting/powering off i beleive…
I am sending some stuff with the debian cec client to make the kodi libcec crash and prevent it from sending the inactive source command. Then killing the cecclient to let kodi take control again when it restarts.
As I stated earlier, this is really ugly but I cannot think of another way to do this.
If you want to experiment a bit, you can try to put the lines, I posted into the update part of the mediacenter script.
And re-launching Kodi should send the active source command, and change the input back.
If the issue is that every time you change to RetroPie, the TV changes input, but not when starting Kodi, then RetroPie needs to also send the active source command
Be careful doing things like this. If CEC isn’t torn down properly, you can get ‘ghosting’ where the TV things that it has multiple CEC peripherals (instances of Kodi, RetroPie etc) attached.
Updates are not done in the mediacenter script, they are done by a service called manual-update.service, whose script is /usr/bin/manual-update. One of the first things it does is stops mediacenter.service.
Both these scripts are likely to get replaced during updates so it is not recommended to edit either of them directly.