HDMI-CEC configuration changing after reboot or shutdown


I have an issue with my the HDMI CEC configuration of my Raspberry Pi OSMC, which is changing for unknown reason after some reboot or shutdown (not every time).

My configuration is :

  • raspberry pi with OSMC_TGT_rbp2_20161224
  • soundbar samsung hw-k450
  • TV samsung UE40J5000
    everything on the same plug with a timer to ON/OFF all the equipment at a specific time.

connection :
raspberry pi to the sound bar (HDMI)
soundbar to the TV (HDMI)
TV to the soundbar (Digital)

I use my raspberry pi as a clock alarm in the morning, the timer Power ON all the equipement and the raspberry pi send a HDMI-CEC signal to the soundbar to wake up and go to the correct source.

My problem is that sometime everything works well, but for some reason most of the time the HDMI-CEC change (I don’t know why ?) and the soundbar either stay OFF or is Digital source instead of the HDMI source.

It has work well for a time, but since mid December I have the issue. I just reinstall OSMC, and I don’t uses HDMI-CEC to control the raspberry, I only need to select automatically the source of the soundbar on the morning. maybe there is an other way than HDMI-CEC ?

Sorry for my English, hope I have been enough clear ?
Thanks in advance for your help and support !

Bad idea, switching off the Pi without a clean shutdown can lead to filesystem corrpuption at one day

While besides this being a bad idea (see above) the issue could be a timing problem that one of the devices is not ready when you need to initiate the switch

Thanks for your fast response !

For your first point I used crontab to shutdown the raspberry 5 minutes before the timer, so I don’t think there will be a issue.

for your second point, do you know if there is a possibility to delay the HDMI-CEC signal ?

I make different try,

I reboot the raspberry pi and power off the soundbar with the remote, everything works well,
but if I reboot the raspberry pi and the soundbar is still power on the configuration of the HDMI-CEC is change on the raspberry pi and at the next restart, the soundbar power ON on the Digital source.

What about this command :
hdmi_ignore_cec_init=1 ?
I don’t understand it.


You would be better leaving the Pi on all the time and switching just the TV and soundbar with the timer, then you can simply put a job in cron to restart kodi to trip the hdmi-cec change.

The danger of using cron only 5 minutes before your timer is that the two clocks csn easily get out of sync and shutdown could initiate too late.