As CEC is implemented different on each hardware (TV brand/type) it may is needed to switch the used libCEC version to get a stable CEC handling for your CoreELEC device.
Maybe a older libCEC version is working better with older TVs or vice versa.
Any error found by libCEC can be reported at the developer site from Pulse-Eight:
Different libCEC versions can be chosen by open a SSH connection to a CoreELEC device.
By default libCEC version 4.0.4 is used.
Revert any changes done to the used libCEC version:
(This have to be executed every time when changing the used libCEC version)
rm -rf /storage/.config/libcec-4.*.conf
Use libCEC 4.0.5:
touch /storage/.config/libcec-4.0.5.conf
Use libCEC 4.0.7:
touch /storage/.config/libcec-4.0.7.conf
Hint:
libCEC is not used for wake up of the CoreELEC device from power off/suspend. For this a Odroid N2/C4 or a device compatible with BL301 injection is needed. libCEC is only used if the CoreELEC device is in normal usage.
Hint nr.2
It looks like libCEC 4.0.7 do have a minor bug and show the wrong version in Kodi.
But the 4.0.7 get loaded anyway. There is a open issue about it: