CEC change TV input on startup

Hi. I have my rasplex power coming from my tv’s usb. When my TV comes on…it automatically changes to the RasPlex input. How can I avoid this…as it is irritating.

@plummer66 said:
Hi. I have my rasplex power coming from my tv’s usb. When my TV comes on…it automatically changes to the RasPlex input. How can I avoid this…as it is irritating.

First, I’m surprised this setup isn’t corrupting your SD card containing your Rasplex/OpenPHT image.

Second, your TV is most likely receiving a CEC message on boot from the rPI and thinking (naturally) that the device that you just powered on, is the one you want to use.

Preferences > System > Input Devices > Peripherals > CEC Adapter Settings
Uncheck the option: “Switch source to this device on startup”

Third, what TV do you have that supplies 5w 2.5a power out of the USB?

Thanks for the response.
I have always used the usb for powering my rasplex from day 1. I have never had any issues.
I unchecked that option…but it still always boots up to the rasplex input.
I am just running this on a older Samsung 32 inch LCD in my bedroom. It uses the Anynet+ CEC.

How do you power the rPi off with the TV? Are you using some sort of UPS or shutting down the rPi before powering off the TV?

Try disabling CEC all together and see if it stops as a test. Your tv (and tv remote) will not be able to control the rPi afterwards, so be prepared with an alternate control.

When I shut the tv off it cuts the power to the rpi.
It’s always worked just fine so I never worried about it.
If I disable CEC then yes it does not switch inputs on startup.

That’s dangerous for your SD card. Not all of the card is read only and can be corrupted. Try reimaging with the latest version and disabling the original setting again.

I have the same issue with a PC (windows 10) next to my TV. Pulse eight CEC adapter. Worked fine with the older normal windows plex client.
Now with openPHT it switches the input of my receiver to the PC every time i turn on the amp. also if I press the TV input, it starts the amp on TV then always jumps to PC after a second or 2. Doesnt do this when i quit openpht or if I turn of the CEC control in OpenPHT. so the software is sending a cec command to the amp.

I’m running the lastest version and did not have this on the original plex software.
The setting ‘swich input on startup’ is off!

@WabsNL said:
I have the same issue with a PC (windows 10) next to my TV. Pulse eight CEC adapter. Worked fine with the older normal windows plex client.
Now with openPHT it switches the input of my receiver to the PC every time i turn on the amp. also if I press the TV input, it starts the amp on TV then always jumps to PC after a second or 2. Doesnt do this when i quit openpht or if I turn of the CEC control in OpenPHT. so the software is sending a cec command to the amp.

I’m running the lastest version and did not have this on the original plex software.
The setting ‘swich input on startup’ is off!

Please turn on debug log with the startup option off. Then replicated the issue and upload the log here.

I’ll do that later today when i’m home.

in this topic somebody else has the same issue: https://forums.plex.tv/discussion/245429/pmp-changes-hdmi-source-at-startup#latest
he has already logged the same problem, maybe that can help too.
broadcasting the active source still happens as you can see in the log even when the option is switched off. I’m guessing that causes the issue?

I had this issue before. I disabled the cec init in the config.txt
hdmi_ignore_cec_init=1

The raspberry starts with the raspberry built in cec and the settings in rasplex is only valid for libcec that loads after a while. So setting this in config.txt will prevent the built in cec to set the TV input before libcec takes over.

to edit the config.txt through ssh (default user/pass is root/rasplex):

mount -o remount,rw /flash
nano /flash/config.txt

Edit the file and uncomment the line hdmi_ignore_cec_init=1 by removing #. Make sure to save the file before exiting nano.

mount -o remount,ro /flash
reboot

@mrhedstrom

That setting is in place for me. Still amp always defaults to my Pi at startup.

Your AMP probably defaults to the first input that has video (Mine does the same). Seeing as the Pi will always output video when it’s on then it gets in first. I have to turn on my DirecTV Genie first before my AMP otherwise I get the same thing.

@moje1977 does it still change source if libcec is disabled? Then it might be like @Valdhor says.