CEC keeps turning TV back on

One of my new V’s has a direct conneection to an old Panny plasma. With CEC enabled, and in spite of tinkering with the CEC settings in Kodi, every time I turn off the TV, it comes straight back on. This wasn’t happening with a V4K. For now I’ve had to disable CEC. This log was running during one of these events. Any suggestions?

https://paste.osmc.tv/ojemasaqos

Kodi doesn’t log much of anything CEC related without debug and component specific. This is just connected straight to a TV with no CEC enabled AVR or soundbar? Can you run the following from the terminal and let us know the url that is returned…

paste-log ~/.kodi/userdata/peripheral_data/cec_CEC_Adapter.xml

thanks for the comment, this is a direct connection, no AVR or soundbar.

https://paste.osmc.tv/imoxeximag

Did you restore a profile from a Raspberry Pi? When I put that file on my Vero V I see a setting come up for “connected to HDMI device” and I’ve only seen that on my Pi’s. Can you in the CEC settings click defaults then OK or possibly the following to get a clean slate…

systemctl stop mediacenter
rm ~/.kodi/userdata/peripheral_data/cec_CEC_Adapter.xml
systemctl start mediacenter

this was a clean build, I’ve not restored a profile to any of my new V boxes just in case it caused an issue. I’ll restore to defaults and see what happens (though the issue with the TV switching back on started with out-of-the box setttings).

neither deleting the cec_CEC_Adapter.xml file nor resetting to defaults worked. There is a sort of workaround, if I switch the TV’s input away from the V and then put the TV in standby, it stays off. But if I put the TV in standby while the V is still the active input the TV comes straight back on if CEC is enabled.

You might try powering everything down and unplugging the TV from the wall for a minute and then plug everything back on. This will reset the CEC bus in case something is getting confused with device assignments or something. If that doesn’t have any effect then if you made a log with debug and CEC component specific logging it might show what communication is happening to trigger the TV to turn back on which may give a possible path forward.

powering everything down didn’t help. Here is an additional log:

https://paste.osmc.tv/dapanomine

If you turn on the component specific logging for CEC you should see in the kodi.log all the back and forth from the CEC bus. My idea was to look for the message coming from the TV stating that it powered off and then look to see what messaging happens from then to when it turns back on to see if that provides a clue to what is triggering the behavior.

I thought I had turned on logging for libCEC, here is another attempt.

https://paste.osmc.tv/ateniqocaz

Thanks, unfortunately I don’t really see anything there enlightening. Maybe someone else can spot something. What is the other device that’s plugged in?

2023-09-12 20:34:58.537 T:2991    debug <general>: CecLogMessage - >> 44
2023-09-12 20:34:58.537 T:2991    debug <general>: CecLogMessage - << POLL: Playback 1 (4) -> Playback 1 (4)
2023-09-12 20:34:59.098 T:2991    debug <general>: CecLogMessage - >> bf:a6:06:10:56:10
2023-09-12 20:34:59.098 T:2991    debug <general>: CecLogMessage - >> Playback 3 (B) -> Broadcast (F): UNKNOWN (A6)
2023-09-12 20:34:59.244 T:2991    debug <general>: CecLogMessage - >> bf:84:30:00:04
2023-09-12 20:34:59.245 T:2991    debug <general>: CecLogMessage - >> Playback 3 (B) -> Broadcast (F): report physical address (84)
2023-09-12 20:34:59.321 T:2991    debug <general>: CecLogMessage - >> bf:85
2023-09-12 20:34:59.321 T:2991    debug <general>: CecLogMessage - >> 11 requests active source
2023-09-12 20:34:59.321 T:2991    debug <general>: CecLogMessage - Playback 3 (B): power status changed from 'standby' to 'on'
2023-09-12 20:34:59.321 T:2991    debug <general>: CecLogMessage - Got TV power status: 0
2023-09-12 20:34:59.321 T:2991    debug <general>: CecLogMessage - << Playback 1 (4) -> broadcast (F): active source (2000)
2023-09-12 20:34:59.321 T:2991    debug <general>: CecLogMessage - << 4f:82:20:00
2023-09-12 20:34:59.322 T:2991    debug <general>: CecLogMessage - >> Playback 3 (B) -> Broadcast (F): request active source (85)
2023-09-12 20:34:59.522 T:2991    debug <general>: CecLogMessage - >> bf:90:01
2023-09-12 20:34:59.527 T:2991    debug <general>: CecLogMessage - Playback 3 (B): power status changed from 'on' to 'standby'
2023-09-12 20:34:59.527 T:2991    debug <general>: CecLogMessage - >> Playback 3 (B) -> Broadcast (F): report power status (90)
2023-09-12 20:34:59.605 T:2991    debug <general>: CecLogMessage - >> 0f:36
2023-09-12 20:34:59.605 T:2991    debug <general>: CecLogMessage - TV (0): power status changed from 'on' to 'standby'
2023-09-12 20:34:59.605 T:2991    debug <general>: CecLogMessage - >> TV (0) -> Broadcast (F): standby (36)
2023-09-12 20:34:59.607 T:2930     info <general>: Activating standby mode
2023-09-12 20:34:59.607 T:2930     info <general>: Activating Vero standby mode
2023-09-12 20:34:59.607 T:2930     info <general>: Toggle standby state is sleeping
2023-09-12 20:34:59.607 T:2930     info <general>: CApplication::ToggleStandby -- Toggle TMDS clock to 0
2023-09-12 20:34:59.607 T:2930     info <general>: CApplication::ToggleStandby -- Toggle LED brightness to 0
2023-09-12 20:34:59.607 T:2930     info <general>: CApplication::ToggleStandby -- governor will now be powersave
2023-09-12 20:34:59.607 T:2930     info <general>: CApplication::ToggleStandby -- HPD locking will now be hpd_lock1
2023-09-12 20:34:59.607 T:2930     info <general>: CApplication::ToggleStandby -- checking for existence of /home/osmc/.kodi/userdata/standby.py
2023-09-12 20:34:59.610 T:2930    debug <general>: ------ Window Init () ------
2023-09-12 20:34:59.989 T:2991    debug <general>: CecLogMessage - >> 0f:84:00:00:00
2023-09-12 20:34:59.989 T:2991    debug <general>: CecLogMessage - << Playback 1 (4) -> broadcast (F): physical address 2000
2023-09-12 20:34:59.989 T:2991    debug <general>: CecLogMessage - << 4f:84:20:00:04
2023-09-12 20:34:59.989 T:2991    debug <general>: CecLogMessage - >> TV (0) -> Broadcast (F): report physical address (84)
2023-09-12 20:35:00.425 T:2991    debug <general>: CecLogMessage - >> 0f:36
2023-09-12 20:35:00.734 T:2991    debug <general>: CecLogMessage - >> bf:87:00:10:fa
2023-09-12 20:35:00.735 T:2991    debug <general>: CecLogMessage - >> Playback 3 (B) -> Broadcast (F): device vendor id (87)
2023-09-12 20:35:00.989 T:2991    debug <general>: CecLogMessage - >> 0f:87:00:80:45
2023-09-12 20:35:00.989 T:2991    debug <general>: CecLogMessage - << Playback 1 (4) -> Broadcast (F): vendor id Panasonic (8045)
2023-09-12 20:35:00.989 T:2991    debug <general>: CecLogMessage - << 4f:87:00:80:45
2023-09-12 20:35:00.989 T:2991    debug <general>: CecLogMessage - >> TV (0) -> Broadcast (F): device vendor id (87)
2023-09-12 20:35:00.989 T:3378    debug <general>: Thread JobWorker start, auto delete: true
2023-09-12 20:35:01.512 T:2991    debug <general>: CecLogMessage - >> 04:8c
2023-09-12 20:35:01.512 T:2991    debug <general>: CecLogMessage - << Playback 1 (4) -> TV (0): vendor id Panasonic (8045)
2023-09-12 20:35:01.512 T:2991    debug <general>: CecLogMessage - << 4f:87:00:80:45
2023-09-12 20:35:01.512 T:2991    debug <general>: CecLogMessage - >> TV (0) -> Playback 1 (4): give device vendor id (8C)
2023-09-12 20:35:01.796 T:2991    debug <general>: CecLogMessage - >> 04:89:10:01:03
2023-09-12 20:35:01.796 T:2991    debug <general>: CecLogMessage - Playback 1 (4) was already marked as active source
2023-09-12 20:35:01.796 T:2991    debug <general>: CecLogMessage - TV (0): power status changed from 'standby' to 'in transition from standby to on'
2023-09-12 20:35:01.796 T:2991    debug <general>: CecLogMessage - >> source activated: Playback 1 (4)
2023-09-12 20:35:01.796 T:2991     info <general>: Toggle standby state is waking

thanks for looking at this. There is a USB DVB adapter plugged in to the Vero V, been in use for a long while with the previous V4K.

I was referring to a second playback device connected to the CEC bus. In that log you see the TV and the Vero (Playback 1) but you also see a “Playback 3” device talking on the bus. I pulled up a manual for a random Panasonic Plasma to see what CEC options are available. Does your TV have under its VIERA Link settings have a “Power on link” setting and if so is that an option to turn off?

the TV is a Panny TH-37PX80, rather old. I experimented with the limited VIERA link options and no joy. The other devices connected to the TV are a bluray player and an ATV in standby. I swapped out the V for the 4K (August OSMC) and immediately the issue was gone. I made a note of the CEC settings, put the V back in and matched, and as soon as I switched off the TV it came straight back on.

I’ll look at this in a bit.

Same problem here. I have a Raspberry Pi 4 with the latest available OSMC, cleanly installed. TV is also an old Panasonic plasma.

The reports here were concerning Vero V, so I doubt it’s the same issue

@ac16161 Did you get to the bottom of this? I had a couple of similar issues whereby Kodi would trigger CEC and keeping switching back to it from other HDMI ports & applications on the TV e.g. PS5, Prime etc. Or occasionally with the PS5 it would get stuck in a loop of endlessly switching from the PS5 to Kodi and back.

For me the issue was the Video ScreenSaver, under Settings > Interface > Screensaver. It was obviously triggering the CEC given it was still technically a video. After switching back to a regular screensaver e.g. Matrix trails, the issue went away.

I never got to the bottom of this, short of disabling CEC on the V entirely. But I have a workaround: switch the TV to its internal tuner first, and then put it in standby. It then stays switched off. As of the latest public nightly of OSMC, if CEC is enabled on the V and I put the TV in standby, the TV is immediately switched back on to the V’s HDMI input. Here’s a log of such an event. Nothing unusual in my screensaver setttings, just set to the regular “Dim” view of the GUI. I’m not currently running V’s on my other TV’s but as I recall this has only been an issue with the ancient plasma that I’m still running (and rather fond of).

https://paste.osmc.tv/yanayukave

A debug log (with CEC logging enabled under component logging) should let me be able to see what / why there’s a CEC event and get this solved

Cheers

Sam