You can also use cec-client to get more CEC details than with the KODI debug logging.
- Stop KODI process: systemctl stop kodi
- Start CEC client: cec-client
This CLI client will announced as "CECTester" on the TV. Depending on the behaviour of the TV it could be necessary to switch to the selected HDMI port again, to get CEC to work.
In general it's sometimes a good idea to disconnect the HDMI devices and TV physical and make all the components powerless simultaneous for some minutes. Afterwards the HDMI handshake will be initiated again and sometimes the CEC issues are like "magical" blown away.