xbmc / xbmc

Kodi is an award-winning free and open source home theater/media center software and entertainment hub for digital media. With its beautiful interface and powerful skinning engine, it's available for Android, BSD, Linux, macOS, iOS, tvOS and Windows.
https://kodi.tv/
Other
18.24k stars 6.28k forks source link

Windows: Kodi (sometimes) fails to initialize CEC communications at startup with P8 USB-CEC adapter #23260

Open lukjak opened 1 year ago

lukjak commented 1 year ago

Bug report

Describe the bug

Here is a clear and concise description of what the problem is:

Kodi sometimes fails to initialize CEC communications properly, which results in Kodi not receiving/reacting to actions on TV remote. TV is the only display and already turned on when starting Kodi.

Expected Behavior

Here is a clear and concise description of what was expected to happen:

Kodi should always react to CEC commands, provided that CEC adapter is present and enabled.

Actual Behavior

Most often when Kodi is started from desktop, it does not react to TV remote keypresses.

Possible Fix

Not known

To Reproduce

Steps to reproduce the behavior:

  1. Boot computer with TV attached via P8 UCB-CEC adapter (in my case it's connected via Amplifier)
  2. Start Kodi from desktop. Usually CEC works.
  3. Exit Kodi and do something on the computer, fe open and close web browser.
  4. Start Kodi. usually CEC is not working anymore at this point.

Debuglog

The debuglog can be found here: CEC not enabled after starting Kodi: https://paste.kodi.tv/hiyefeyoya.kodi CEC not enabled after starting Kodi, but enabled itself some time afterwards: https://paste.kodi.tv/tutocetihe.kodi CEC enabled after altering CEC adapter configuration in Kodi: https://paste.kodi.tv/ayemakaxup.kodi Reference log: CEC working right after starting Kodi: https://paste.kodi.tv/puyizutila.kodi

Screenshots

Here are some links or screenshots to help explain the problem:

n/a

Additional context or screenshots (if appropriate)

Here is some additional context or explanation that might help:

I've tried changing different setting for the CEC adapter in Kodi, but I don't see any specific settings pattern to affect the problem. When Kodi is in "CEC unresponsive" state, sleeping computer with TV remote works without problems (TV, amplifier and PC go to sleep). I tried also 4.0.7 library, but observed no improvement. cec-tray application always works (remote keypresses are visible in the live debug log in cec-tray dialog). It seems to me the problem occurs because Kodi loses information about the current state of CEC connectivity. For example I turn off TV when Kodi is on, so all components (TV, amp, PC) go to standby/sleep. Then I wake everything with TV remote and CEC communications is not correctly reinstated. Or I close Kodi when CEC is working, then do some stuff on PC (like web browsing) and then when I turn Kodi back on, it does not properly reinstate communications. As written above, I've tried different CEC adapter options; I could not find descriptions/documentation for them though.

Possible workarounds (not always working):

  1. Go into CEC adapter configuration in Kodi and accept it (no changes needed, just click OK button), so that it is saved (flyout notification regarding saving appears). Then CEC usually starts to work. Sometimes the config is not saved (no flyout) though, even after changing some options, and then CEC does not start.
  2. Exit Kodi. Run cec-tray app (part ot Pulse Eight software for the adapter) and close it. Start Kodi again. (Not always fixes the problem).
  3. After some time (minutes), CEC sometimes starts working by itself. (It seems nothing specific needs to be done)

Your Environment

Used Operating system:

note: Once the issue is made we require you to update it with new information or Kodi versions should that be required. Team Kodi will consider your problem report however, we will not make any promises the problem will be solved.

lukjak commented 1 year ago

There's something that corroborates my assumption that there is an issue with establishing CEC dialog with TV:

I set Kodi as Recorder in Kodi CEC settings (because only then playback controls - Play, Stop etc. - are passed from TV). I had a situation though, when ONLY playback controls worked - so Play or Stop on TV remote worked as expected, but OK or direction keys did not. So using keyboard I went to CEC settings and set Kodi as Player, which killed CEC altogether - I did not see the flyout about configuration change and all remote keys stopped to work.

Another situation - Kodi set up as CEC Player, so only "basic" remote keys work. Then I go to CEC settings in Kodi, do nothing and close them. "Configuration changed" flyout appears and - "basic" remote keys stopped working and instead playback controls started to work - ???.

github-actions[bot] commented 1 month ago

This issue is now marked stale because it has been open over a year without activity. Remove the stale label or add a comment to reset the stale state.