xbmc icon indicating copy to clipboard operation
xbmc copied to clipboard

"Put display to sleep when idle" option causes the Kodi GUI to freeze/hang

Open chcore opened this issue 1 year ago • 9 comments

Bug report

Describe the bug

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

When Kodi triggers its power saving feature (not the screen saver, but the "Put display to sleep when idle" option) after some minutes of inactivity, it causes the GUI to freeze completely, requiring me to SSH into the system and restart the application.

Unplugging and re-plugging the HDMI cable does not fix the issue, only a restart of the application does.

I am using a slightly modified build of the official flatpak, with the only change being using GLES instead of GL.

Expected Behavior

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

The GUI should not freeze when Kodi puts the display to sleep.

Actual Behavior

The GUI freezes and does not respond to input.

Possible Fix

To Reproduce

Steps to reproduce the behavior:

  1. Disable the screensaver, and enable the "Put display to sleep" option
  2. Wait until the display is put to sleep. My TV (LG G1) doesn't turn off immediately, but just shows some static rotating images for a while. The TV does not need to be powered off to reproduce this issue, and the same thing happens even if it is already powered off when the sleep mode is triggered by Kodi.
  3. Provide some input so as to wake Kodi and unsleep the TV (and turn on the TV if it is powered off). Find that the GUI is frozen.

Debuglog

The debuglog can be found here:

I turn my TV on towards the end of the debug log, and find the GUI to be frozen.

kodi_freeze_debug.log

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:

N/A

Your Environment

Used Operating system:

  • [ ] Android

  • [ ] iOS

  • [ ] tvOS

  • [x] Linux

  • [ ] macOS

  • [ ] Windows

  • [ ] Windows UWP

  • Operating system version/name: Fedora 40

  • Kodi version: 21 (Flatpak)

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.

chcore avatar May 16 '24 11:05 chcore

Does this happen if you unplug and replug HDMI cable? I think this is triggered by a HDMI hotplug event.

smp79 avatar May 17 '24 05:05 smp79

Does this happen if you unplug and replug HDMI cable? I think this is triggered by a HDMI hotplug event.

Just tested it several times. Unplugging and replugging does not fix it, it's still frozen.

chcore avatar May 17 '24 05:05 chcore

Here's another debug log, but with extra logging for the "windowing" component, as requested in #23921.

kodi_debug_log_windowing.log

chcore avatar May 17 '24 06:05 chcore

It seems to occur while my TV is powered off

Is there an easy way to reproduce the issue? Does unplugging and replugging HDMI make it freeze? Does power cycling the TV make it freeze?

smp79 avatar May 17 '24 19:05 smp79

I found some time to test this. Power cycling the TV and/or unplugging the HDMI cable does not reproduce this issue.

I can confirm the "Put display to sleep when idle" option is the culprit, and is 100% reproducible.

chcore avatar May 17 '24 22:05 chcore

Reverting #23921 like in https://github.com/LibreELEC/LibreELEC.tv/issues/8488 fixes the issue for me too.

chcore avatar May 20 '24 11:05 chcore

Stumbled upon this thread while researching the same issue.

Happens every time with my Kodi. Screensaver is set to dim after 3 minutes and turn the screen off after 30. Every time I wake it up the screen stays dimmed and doesn't seem to react, though the navigation sounds can still be heard when using the arrow buttons.

Environment: Kodi 21.0-Omega on x86_64 installed from official flatpak repo, no modifications to the package. Updated yesterday (Friday 24th of May) and checked again today to confirm the issue still happens. No desktop manager of any sort, running raw on whatever the package pulled as a dependency (which is Freedesktop 23.08.17). The service is started by simply running "flatpak run tv.kodi.Kodi" and it seems to handle the graphics by itself. Ubuntu 22.04 with all updates applied.

I can provide logs if you tell me what I need to do.

mnvoronin avatar May 25 '24 09:05 mnvoronin

I'm experiencing this behavior in Kodi 21.0-RC1 with matching error messages from https://github.com/LibreELEC/LibreELEC.tv/issues/8488

Environment: Ubuntu 22.04.3 kernel 6.5.0-14-generic (x86_64) Intel Xe Graphics (TGL GT2) WIndowing sysem: gbm

My repro steps:

  1. Start video playback (something h264, for example)
  2. Pause playback, wait for the display to sleep
  3. Resume playback after display goes to sleep.

Result: Display wakes, and playback audio can be heard, but the picture is permanently frozen and dim. The remote can stop playback and UI button sounds can be heard.

However, if I stop playback while the display is asleep, the screen will wake and the UI will be functional. Playing videos works at this point.

ccope avatar Jun 03 '24 06:06 ccope

Anyone wanna try https://github.com/xbmc/xbmc/pull/25588?

smp79 avatar Aug 09 '24 03:08 smp79

Anyone wanna try https://github.com/xbmc/xbmc/pull/25588?

Tried it, and it works great so far! Thanks for looking into to this, this has been bothering me for a couple of months now.

Have to use it for a little longer to be sure that it fixes all my "starting playback after leaving kodi idle for a while" issues, though, but it's looking good.

rien333 avatar Sep 07 '24 15:09 rien333

Have to use it for a little longer

Kodi resumes playing just fine now, even after not interacting with it for a night!

rien333 avatar Sep 08 '24 09:09 rien333

Where is this "Put display to sleep when idle" option? I can not find it in the Kodi 21.1 settings. Is it on or off by default?

I am asking because of the problem I am asking about in the Kodi Forum.

MarkCallow avatar Nov 30 '24 13:11 MarkCallow

Where is this "Put display to sleep when idle" option?

https://kodi.wiki/view/Settings/System/Power_saving

This issue is fixed for me in master, probably because of https://github.com/xbmc/xbmc/pull/25588.

chcore avatar Dec 20 '24 22:12 chcore