CEC keeps turning TV back on

I get this all the time, the 4+ did it too. I’ll come home and all the hifi gear is on, burning energy… maybe 1-2 per week. Whats more annoying is when I turn everything on at night to watch sat tv or something, the vero will steal the hdmi input back to itself 1-3 times and I have to keep turning it back to the other input, whichever one I’m (wanting) to use.

I changed some defaults regarding CEC at the end of last year to fix this. Only new installs will benefit however as I didn’t want to change people’s existing settings

with CEC debug logging enabled:

https://paste.osmc.tv/qigugulike/

When the TV goes in to standby, the Panasonic is trying to change the active source.

There seem to be two other devices connected to the HDMI that fight for control of the display.

Enabling HPD Lock could help

Would also check your CEC settings as they won’t be the latest ‘sane’ defaults based on the installation date of:

OSMC filesystem assembled on jenkins at Mon 07 Aug 2023 03:24:13 PM UTC using Debootstrap version 1.0.123+deb11u1

IS there any way to put these settings back to default with an existing installation?

If you go to the CEC settings there is a default button which should do it. Otherwise if you stop Kodi (systemctl stop mediacenter via ssh) and delete ~/.kodi/userdata/peripheral_data/cec*.xml that should do it as well.

ssh: permission denied…

Is ssh enabled on your device (check the My OSMC add-on) and had you ever changed your password for the system. If you are still running defaults, and ssh is enabled, you should be able to connect just by using at a terminal on another machine that has ssh installed (should be most any PC running a current OS) ssh osmc@192.168.1.10 (but using the IP address of the OSMC device) and it should then ask for a password which by default is “osmc”.

I mean the last command to delete the file was denied. ssh is fine.

osmc@VeroV:~$ systemctl stop mediacenter
osmc@VeroV:~$ ls .kodi/userdata/peripheral_data
application_Keyboard.xml  cec_CEC_Adapter.xml               usb_2017_1690_OSMC_RF_Remote.xml
application_Mouse.xml     usb_2017_1689_OSMC_RF_Remote.xml
osmc@VeroV:~$ rm ~/.kodi/userdata/peripheral_data/cec*.xml
osmc@VeroV:~$ ls .kodi/userdata/peripheral_data
application_Keyboard.xml  application_Mouse.xml  usb_2017_1689_OSMC_RF_Remote.xml  usb_2017_1690_OSMC_RF_Remote.xml
osmc@VeroV:~$ reboot
osmc@VeroV:~$ Connection to 192.168.254.190 closed by remote host.
Connection to 192.168.254.190 closed.

C:\Windows\System32>ssh osmc@verov
osmc@VeroV:~$ ls .kodi/userdata/peripheral_data
application_Keyboard.xml  cec_CEC_Adapter.xml               usb_2017_1690_OSMC_RF_Remote.xml
application_Mouse.xml     usb_2017_1689_OSMC_RF_Remote.xml
osmc@VeroV:~$

so the thing I need to type is
ls ~/.kodi/userdata/peripheral_data/cec*.xml ?

No. The “ls” command lists directory contents. I did that to show the folder contents before and after. The “rm” command is the one that removes the file.

no change. the vero keeps “stealing focus” from other inputs on the denon avr-4520. It will change the input back to its own input name, i.e “media player” which is what I have it connected to, rather than for example if I have turned everything on to watch from input “sat/cbl” or “dvd” or “bluray” etc. it will randomly steal focus/input back to “media player”. This only happens when first turning on the tv and thus it triggering the denon to turn on. It might steal focus back anywhere from 1-3 times before settling on what I am repeatedly changing it back to, sat/cbl for instance.
If the vero reboots it will turn all the gear back on, uninitiated.

I find myself on occasion with testing swapping devices around and plugging multiple OSMC devices into the TV at the same time. I’ve gotten this kind of situation a few times but it never had anything to do with my AVR but rather my TV getting confused on what device was plugged in where. It could easily get confused as the AVR doing it as the TV was telling the AVR to switch inputs, but the AVR was just doing what it was told. The solution is usually to just unplug the TV for a minute to reset the CEC device assignments.

yep it’s the vero telling the avr to change inputs - WHY this is happening is anyones guess… Even when the avr is turned on and was previously turned to another input the vero will often (but not always) steal it back to its own input. the 4+ was the same.

This was default Kodi behaviour: I changed this a while ago but only for new installs.

Did you try changing the settings as advised by @darwindesign

Yes sam, no change.

Can you please upload a log then so I can compare to fresh install, check all is changed as expected and also see what CEC is doing

Cheers

Sam

I also got it to steal the input just a minute or so before creating the log.
https://paste.osmc.tv/vifikaviyi

Thanks. I’ll take a look in a bit.