HDMI CEC on Samsung TV switches to Raspberry PI2 randomly

I have a Samsung TV. I have osmc installed on rpi2. I use the samsung remote and it works very well. The problem is I like to leave the rpi powered up but when watching tv (dish hopper) the rpi will randomly (maybe a couple of times a day) take control and switch to OSMC. Anybody have this problem and possibly a solution?

BTW, the TV is a series 6300 if that makes any difference

Can you disable CEC in system/input/peripherals/cec adaptor?
Would be useful to confirm if it is CEC related.

Probaly your RPI rebooted and you have the CEC setting to set Kodi as active source when start up.

Good idea, I will try it for a couple of days and see what happens.

I assume you’re talking about CEC setting in the TV? Worth looking at.

No. Kodi setting.

System -> Settings -> System -> Input Devices -> Peripherals -> CEC adapter

Thanks for the solution, it hasn’t acted up for about a week after I changed that setting

you still need to see why your RPI is rebooting. maybe power supply while scanning media or something that uses high CPU

Mine’s a Samsung TV as well, and disabling Kodi as active source works for me.