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.