I would like to see (and hopefully you report
) how your TV reacts to this - something that cannot be determined from the Kodi log - specifically whether the TV turns on and enables the forwarding of remote control commands to KODI.
First of all I changed When the TV is switched off from Shutdown to Ignore.
I did several tests after that. reboot was working from the beginning and turned the TV on and the TV remote control was working. Using poweroff and starting the RPi by pressing the button, the TV was also always turned on but the first two times the TV remote control did not work. After these two times every further use of poweroff also made the TV remote control work.
Instead, running cec-ctl -w -M and paying close attention to the messages displayed via SSH when the TV is turned on will reveal the CEC messages the TV sends out on its own.
This is the log it produced. I added two comments to mark the sections where the TV was turned off and on. If you have an idea how to fix this with some magic script it would be very nice if you could share it with me.