HDMI CEC has stopped working

I have OSMC running on RPI3+ for years now with out any issues. Today it crashed (sad face), recovered itself but HDMI CEC has stopped working after that. It looks like nothing has changed in Kodi settings, I did check TV settings just in case, but everything seems to be fine. Also CEC is still working with Fire TV stick. I have changed HDMI cable but with no luck. Any idea what happened?

Have you tried turning everything off at the mains for a minute?

Just RPi but it didn’t help yesterday. For some reason it started working back again today, just resolution has changed itself to 640x480. Not sure what or where the problem was.

So it is happening again. CEC is working shortly after reboot/power-on and then stops working for one, two or three days and then it is fine again. Any ideas except re-installation from scratch?

I doubt you would find a reinstallation to have much effect as what you describe sounds like it would have to be hardware related, but not necessarily on your RPi. Probably would be easiest figuring out by isolating your setup to just the TV and RPi to see if the problem persists. If it does try a different input on your TV, another HDMI cable, and clean the connections with electronic cleaner or isopropyl alcohol. If the problem disappears then add your original setup back piece by piece until it breaks again to find the culprit.

I’ve cleaned HDMI port using Isopropyl, I’ve replaced a HDMI cable itself, I reset TV (Toshiba) to defaults despite none of the other devices connected to it have this issue, I left everything unplugged from the power for nearly two hours. Then I’ve connected Rpi OSMC to another TV (Panasonic) and it worked until I put the TV into stand-by mode for a night. In the morning CEC didn’t work. So I took it back to the main TV and it was working fine until I put a TV into stand-by for a night. In both cases if I turn the TV back on and select to HDMI where it is connected the screen is dimmed. It is not locked as I can still control it using wireless keyboard and mouse. Any ideas?

Can you SSH into your RPi, run the following command, and then share the url it outputs…

cat ~/.kodi/userdata/guisettings.xml ~/.kodi/userdata/peripheral_data/rpi*.xml | paste-log


This one has me stumped. When the dimmed screen issue has occurred before it has always been tied to the screensaver. According to the logs you just posted you don’t have a screensaver turned on. I also didn’t see anything out of the ordinary in your CEC settings either. Are you using a profile? If so the above command would need to be tweaked to for correct file paths. If your not using profiles then i’m not sure what to suggest other than a clean install.

I disabled that yesterday in case this was the issue. Also I don’t have any profiles just a standard installation.

Has it happened since you disabled the screen saver? Also you said that you figured out that Kodi was still working but with a dimmed screen using a keyboard. Did you check again to see if CEC control was actually still working when it was in this state which means the issue is only a dim screen.

Dim screen disappeared once I moved the mouse cursor but it didn’t bring CEC back to life. Now it looks like it is working fine again but nearly 24h and one tv stand-by after I disabled screen dimming. So I’ll check tomorrow morning again.

ok, it stopped working after I put TV to standby during the day.

It might be time to just try a clean install. Otherwise I would suggest to provide full debug logs in the following manner. Once you are done with the TV for the day reboot the RPi twice. After that turn on debug logging in the settings and then do your normal whatever to turn your setup off. When you turn on your TV again and the issue is there then, before doing anything else, SSH into your RPi and type in grab-logs -A and post the url it outputs in this thread.

Alternatively you might want to test with stock Kodi settings just to isolate if the issue is with a Kodi setting or not. This would be done in the following manner…

Let’s test with Kodi default settings. Enter the following commands with an SSH connection.

systemctl stop mediacenter
mv ~/.kodi ~/kodi.bak
systemctl start mediacenter

If needed you can restore:

systemctl stop mediacenter
mv ~/.kodi ~/kodi.bk2
mv ~/kodi.bak ~/.kodi
systemctl start mediacenter

If your original setup was restored as expected and you want get rid of the unneeded clean install you can delete that with the following command.

rm -r ~/kodi.bk2