Can't manually change HDMI port in CEC Adapter Settings

  • Hope everyone is doing good!

    I've got one weird issue.

    I've used my RPI4, running LE 9.2.8 on HDMI port 1 of my TV, but then decided to move it to HDMI port 2.

    There are no other devices connected to the TV except for the RPI4.

    If I restart RPI4 with my LG 50LA660S off, Kodi uses HDMI port 1 for CEC by default, shows a CEC device on HDMI port 1 and shows HDMI port 2 being used as well.

    Picture is not present on either of those HDMI ports.

    If I restart RPI4 with my LG 50LA660S on, Kodi detects the proper HDMI port and everything works as it should.

    In config.txt I've just got this:

    hdmi_ignore_cec_init=1

    disable_splash=1

    Tried without them, the same thing happens.

    If I add this parameter:

    hdmi_force_hotplug=1

    The results are as follows:

    If I restart RPI4 with my LG 50LA660S off, Kodi uses HDMI port 1 for CEC by default, shows a CEC device on HDMI port 1 and shows HDMI port 2 being used as well.

    Picture is now present on HDMI port 2! - This is progress!

    If I restart RPI4 with my LG 50LA660S on, Kodi detects the proper HDMI port and everything works as it should.

    If I add these parameters:

    hdmi_ignore_edid=0xa5000080

    hdmi_edid_file=1 (Makes no difference)

    Kodi behaves the same regardless if the TV was on or off, Kodi uses HDMI port 1 for CEC by default, shows a CEC device on HDMI port 1 and shows HDMI port 2 being used as well.

    Picture is now present on HDMI port 2! - This is progress!

    I'm trying to set the HDMI port manually through Physical Address in CEC Adapter settings (System/Input/Peripherals/CEC Adapter) to be HDMI 2.

    But every time RPI4 restarts, this setting reverts to 0.

    I've even tried accessing \\RPI4_IP\Userdata\peripheral_data\rpi_2708_1001 which has the CEC settings, I made the change and those were overwritten at boot.

    Any thoughts how I can manually set the HDMI port to 2 so that CEC is connected to the proper HDMI port (2) where Kodi is actually connected to the TV?

    If you need any more info please let me know.

    Thank you!

  • I've used my RPI4, running LE 9.2.8 on HDMI port 1 of my TV, but then decided to move it to HDMI port 2.

    So if I'm right you mean HDMI Port 2 on your TV and not on your Raspberry ?

    Maybe you can try this:

    1. On your TV disable CEC-Support (If it's possible)

    2. On LibreElec remove everything you added to the config.txt

    3. In LibreElec go to Settings -> System -> Input

    4. Disable CEC-Support in LibreElec

    (Settings -> System -> Input -> Peripherals ->Peripherals )

    5. Chose "Reset above Settings to default"

    (Settings -> System -> Input)

    6.Turn off the Raspberry and the TV

    7. Wait for about a hour to be shure that all the Data in the RAM of your TV and

    Raspberry is deletet.

    8. Check if the HDMI-Cabel is in the right Ports of the Raspberry and the TV

    9. Turn on the TV

    10. Enable CEC-Support of the TV (If it's possible)

    11. Turn on the Raspberry

    12. Enable CEC-Support on the Raspberry

    13. Reboot your Raspberry

    14. Look if the CEC-Connect is OK now

    It is important that your first turn on the TV and then the Raspberry !

    Edited 2 times, last by Niceguy (January 22, 2022 at 8:51 AM).

  • Huh..?

    Why not simply ask why he shoud wait an hour instead of making stupid remarks ?

    The Reason why he should wait an Hour after he shut down Raspberry and PC is this:

    Maybe there are some RAM-Chips build inside the TV and/or the Raspberry which stores some Data (Settings) as long as they connected to Power, like the Chips you use as RAM on your Computer.

    If you Power down your PC of, all the Data stored in this memory is lost, therefore you can save it on a HDD, SDD or USB-Stick !

    So if you disconnetd the TV and the Raspberry from the Power for an hour you can be shure that this Data (if there is one) is erased for sure.

    Edited once, last by Niceguy (January 22, 2022 at 8:51 AM).

  • I got it working as follows:

    hdmi_force_hotplug=1 - This is needed for my TV to actually show Kodi, without it no picture is shown.

    hdmi_edid_file=1 - This is needed to read the edid file in the boot partition, I dumped the edid information into that file.

    hdmi_ignore_edid=0xa5000080 should be avoided.

    The Setting "hdmi port" is not visible by default on my end.

    I had to set the "physical address" to 2000, then reset the RPI, after which "physical address" reverted to 0, but "hdmi port" became visible above it, that's where I could select port 2!

    Without the edid file, when rpi boots with TV off, it uses 1024x768 as a resolution, where 1920x1080p is the normal one.

    So I had to dump the edid information into a file, which would be read at boot, instead of fetching that data from the TV.

    That worked like a charm.

    So getting to a point where I can set the HDMI port to 2 was weirdly complicated, but once done it sticks.

    The issue is that Kodi uses low resolution if the TV is not on while powering on.

    That's where the edid file comes to rescue.

    Dumping the edid file was done by entering this command in putty:

    /opt/vc/bin/tvservice -d /storage/downloads/edid.dat

    Then I copied the edid.dat bile into boot partition and set the hdmi_edid_file=1

    Now everything works properly.

    This is my config.txt related to the hdmi stuff:

    # Force HDMI even if unplugged or powered off

    hdmi_force_hotplug=1

    # Doesn't send initial active source message.

    # Avoids bringing CEC (enabled TV) out of standby and channel switch when rebooting.

    hdmi_ignore_cec_init=1

    # Disables the splash image

    disable_splash=1

    # When set to 1, will read the edid data from the edid.dat file instead of from the monitor

    hdmi_edid_file=1

    I hope this helps someone down the road.

    This was very helpful for me:

    RPI falls back to 1280x720 from x1024. - Raspberry Pi Forums

    Edited once, last by vdb86 (January 22, 2022 at 12:29 PM).

  • Why not simply ask why he shoud wait an hour instead of making stupid remarks ?

    Stupid remarks... 3 letters can already set you off?!? Well, perhaps because I had some idea it had to be something weird, and this time it's about RAM chips needing an hour before they start forgetting whatever they were doing, which is not a thing at all for RPi devices.

    Maybe there are some RAM-Chips build inside the TV and/or the Raspberry which stores some Data (Settings) as long as they connected to Power, like the Chips you use as RAM on your Computer.

    "Maybe"..? Please don't start making things up along the way again. Why would that be helpful?

    Really, a modern LED TV and the RPi are not 70-80's television sets with light bulbs that have up to 25,000 volts on their tubes. The RPi has a modern design. It really does go into Alzheimer mode in under 3 seconds after the power has been cut off.

    Helping out people on a forum really is fine, but giving out dis-information is not helpful. I actually don't know everything about LibreELEC or computers, but I'll join in when I have something on Kodi which I know is correct.

  • Stupid remarks... 3 letters can already set you off?!? Well, perhaps because I had some idea it had to be something weird, and this time it's about RAM chips needing an hour before they start forgetting whatever they were doing, which is not a thing at all for RPi devices.

    "Maybe"..? Please don't start making things up along the way again. Why would that be helpful?

    Really, a modern LED TV and the RPi are not 70-80's television sets with light bulbs that have up to 25,000 volts on their tubes. The RPi has a modern design. It really does go into Alzheimer mode in under 3 seconds after the power has been cut off.

    Helping out people on a forum really is fine, but giving out dis-information is not helpful. I actually don't know everything about LibreELEC or computers, but I'll join in when I have something on Kodi which I know is correct.

    Realy, this reply clearly shows that you and at last two other People didn't want anybody else here to help People and answer questions.

    And that afer 37 (!) Posts, my Postd must still be "checked" and "unlocked" by a Mod shows it too !

    I ask you:

    Is this a "Hotline" where a few choosen People answer all the questions or is this a Board where all People can exchange their Opinions ?

    For me, it's the first !

    What did you do in the first way ?

    Are you the first who answered to the Question of vdb86 ?

    No, you didn't !

    But then you show up out of the Blue, making stupid remarks and calling my Information not helpfull because for you it seems outdated !

    Maybe it is, but if you are Mr. "I know it all" why did it take so long for you to answer vdb86 Questions ?

    By the way where is YOUR "Helpful Information" here ?

    Nothing to say about the problem but making fun of others who at last try to help !

    Is that your way ?