libcec autodetect screws with tv remote control of kodi



Hi,

hopefully someone has an idea what i can do to solve this issue.

I recently had to buy a new TV. The new TV just does (e)ARC on HDMI2 so i have to plug my AVR into HDMI2 on the TV.

At my AVR i have to use HDMI1 because HDMI2 is broken ( :/ )

Now here comes my problem. LibCEC switches the TV to HDMI1 when kodi is launched, and when i manully switch to HDMI2 the remote stops working. I get it to work is i disable auto switching and set HDMI port to 2 in the settings, the remote works and everytrhing is ok. At least up until the next restart / reboot of kodi. Then everything is back to HDMI1. (This is fixable by going to the CEC settings ans just applying them again.. but that’s not feathable for my wife ^^)

My guess is that Kodi / LibCEC detects that kodi is running at HDMI1 (at the AVR) but not on HDMI2 (on the TV). I think i could solve that by using HDMI2 on both, but sadly HDMI2 on the AVR is broken, and the TV only support eARC on HDMI2 not on the others.

Is there some way to force LibCEC to disable autodetection or force Kodi to reapply the CEC settings on start and not rely on autodetection? Maybe scripting the way to fix it from above?

here is a short chart how it looks…

Code:

┌──────┐        ┌─────┐        ┌───────┐         ┌──────┐
│  PC  │        │     │        │       │         │      │
│ KODI │        │  P8 │        │  AVR  │         │  TV  │
│      │ ─────► │ USB │ ─────► │       │ ──────► │      │
│  DP  │        │ CEC │        │ HDMI1 │         │ HDMI2│
│      │        │     │        │       │         │ eARC │
└──────┘        └─────┘        └───────┘         │      │
                                                 └──────┘