I have an Apple TV and Nvidia Shield connected to a home theater receiver which is connected to the LG TV.
Sometimes when turning any of the set top boxes, the other one would turn on and its HDMI would become the active one. I couldn't simply turn off the box I didn't want to use because all the system would turn off.
The solution was to disable CEC on the TV. I still get CEC between the boxes and the receiver (for volume and HDMI active input) but I need to manually turn the tv on and off.
Sometimes when turning any of the set top boxes, the other one would turn on and its HDMI would become the active one. I couldn't simply turn off the box I didn't want to use because all the system would turn off.
The solution was to disable CEC on the TV. I still get CEC between the boxes and the receiver (for volume and HDMI active input) but I need to manually turn the tv on and off.