Solved OnDisplayLost - Kodi freezes after display rate change
#1
Hello All!
I've been struggling with this issue for QUITE some time (probably around 2 years now) and it's time for me to try and tackle it.  The tl;dr is that when I select a video file, sometimes (will expand on "sometimes" shortly) Kodi freezes after the requisite frame rate change.  Since the start of these issues (no, I dont recall the version I was on when this started as it was too long ago, but I've always kept up to date on the latest revision) I have since replaced my AV receiver, my graphics card, later building a whole new HTPC, and finally a new TV.  Only the new TV seems to have made an impact towards reducing the issues, but, at the same time I bought a new TV, I switched to the Kodi 19 HDR edition as Kodi 18 wouldn't load any 4K HDR movies at all, it ALWAYS crashed.

Any help you can offer would be much appreciate by me and the wife.

So, that's the Tl;dr.  Now, for greater detail.

Current Setup
Self-built AM4 HTPC
Nvidia GTX 1050TI GPU
Win10 Professional
Onkyo AV Receiver w/HDCP
Vizio P Quantum X TV
Build Version: Current is 19 HDR edition.  Issue has been seen on 18, and i believe 17, but that was quite some time ago.


Troubleshooting
I should start by saying that this is an annoyingly inconsistent issue.  There is no consistency between the type of file played (all are stored as MKV containers, but I'm referring to video resolution, with the apparent exception of Kodi 18 and 4K HDR files) so it is not easy to replicate.  Also, there are times when we can click through half a season of a show with no issue and other times when it takes 3+ forced restarts of Kodi to get one movie to play.  That said, below are some troubleshooting steps that I have already attempted. 
1) As mentioned, I have replaced every piece of the setup that plays Kodi on my TV (excluding my NAS that stores the files and hosts the MariaDB database I use).
2) When I built the current HTPC that I am using, I did a fresh install of Win7 Pro and upgraded through to Win 10 (product key from school still works on Win7)
3) I have tried a near infinite set of combinations of Player --> Video settings related to "Adjust display refresh rate", "Sync Playback to display", "Hardware Acceleration", and System-->Display "Delay after change of refresh rate" settings and none have reduced or rectified my issue.
    **  I should note here, the reason I use those settings is because I was getting a lot of noticeable dropped or missing frames when playing videos previously.
4) I have also tried multiple HDMI ports on my AV receiver, both those that do and do not have HDCP 2.2 support, to no avail.
5) I have also connected the HTPC directly to my TV (previous TV) and no change in performance occurred.

Research
In the logs (below), you will see that, when loading a file fails, I receive a "CWinSystemWin32::OnDisplayLost: notify display lost event" error.  I have searched this error previously and the only information I was able to find was a post or bug report from several years ago that stated it was fixed in a version update and then was never mentioned again.

Repeat Note
The combination of new TV and switching to Kodi 19 HDR has reduced the frequency of this issue drastically.  Previously, it was near-guaranteed to have it freeze every 3rd or so video, and usually take 2 or 3 restarts of Kodi to get the video to load.  Now, I am able to make it through several episodes of a show before this issue occurs.

Again, any help or suggestions would be amazing.  I can provide any other information that you think would be helpful.

LOGS
"Good" log (ie: Kodi loaded video without freezing)
good log
"Bad" log (ie: Kodi freezes when loading a video)
bad log
Reply
#2
(2019-12-26, 22:38)mrsdoubtfire613 Wrote: I switched to the Kodi 19 HDR edition as Kodi 18 wouldn't load any 4K HDR movies
Kodi 19 is Alpha atm, and some things are not quite there yet. HDR is something that will have to wait for MS DX improvements UHD use is not offically supported atm Kodi is a work in progress; enthusiasts are carrying this and this thread which is the place to be for this issue. Looking at the log "(windowed fullscreen) with size 3840x2160, refresh 23.976023" I suggest trying full screen (not windowed 1080p 60 cycles for the interface, and see how that performs) use wasapi 2.0 channels for audio pass-through.
Reply
#3
(2019-12-26, 23:36)PatK Wrote:
(2019-12-26, 22:38)mrsdoubtfire613 Wrote: I switched to the Kodi 19 HDR edition as Kodi 18 wouldn't load any 4K HDR movies
Kodi 19 is Alpha atm, and some things are not quite there yet. HDR is something that will have to wait for MS DX improvements UHD use is not offically supported atm Kodi is a work in progress; enthusiasts are carrying this and this thread which is the place to be for this issue. Looking at the log "(windowed fullscreen) with size 3840x2160, refresh 23.976023" I suggest trying full screen (not windowed 1080p 60 cycles for the interface, and see how that performs) use wasapi 2.0 channels for audio pass-through. 
Hey!  Thanks for the headsup about Kodi 19.  I'll switch back to it from the HDR edition when it's in a good place.  Though, I do want to reiterate that this is not an issue with just Kodi 18/19 as this has been ongoing for two years so at least since Kodi 17.  HDR playback is only a new thing for me as I finally have an HDR TV.

Regarding the full screen vs windowed, I have the interface in full screen (ie: no border on the screen) and I have "fullscreen" selected in System settings, so I'm not sure what else would be needed to correct that.  I'll try setting the interface to 1080p, though I'm curious as to what this does with 4K video files as I wouldn't want Kodi to downscale 4K to 1080P only for my TV to have to upscale it again.  I'm just not sure what specifically changing the resolution in Kodi to 1080P will do.
Reply
#4
(2019-12-26, 23:51)mrsdoubtfire613 Wrote: what this does with 4K video files as I wouldn't want Kodi to downscale 4K
If you have 4K media the player will play at that, let your TV do the scaling, the interface for most skins is still 1080p atm. The enthusiasts are doing a great job with UHD keeping up with the latest fixes and keeping up, I wold have no hesitation in using one of their compiles. Certainly look through those threads linked, and see what others have in their configuration.
Reply
#5
Have you tried whitelisting desired resolutions in Kodi settings?

Does it happen randomly across files?
Reply
#6
(2019-12-27, 04:04)Cinephile Wrote: Have you tried whitelisting desired resolutions in Kodi settings?

Does it happen randomly across files?

It appears randomly across files.  In short, 4K always fails in Kodi 19 but Kodi 19 HDR Edition 3.0.1 can play 4K files with seemingly the same probability of initial failure.  All other resolutions are (seemingly) totally random.  I want to make clear that I'm not hung up on 4K files right now.  Using the HDR edition is fine for me.  This ondisplaylost has happened historically mostly for 1080p or 720p (a large majority of my content as most of my TV shows are in one of those ranges, which I have more of).  I can't seem to discern any pattern of resolution/video codec/audio codec that will be more likely to trip this issue, nor any combo of settings that minimize the likelihood, except for one or both of 1) a new TV and/or 2) the HDR edition.
Reply
#7
(2019-12-26, 23:51)mrsdoubtfire613 Wrote:
(2019-12-26, 23:36)PatK Wrote:
(2019-12-26, 22:38)mrsdoubtfire613 Wrote: I switched to the Kodi 19 HDR edition as Kodi 18 wouldn't load any 4K HDR movies
Kodi 19 is Alpha atm, and some things are not quite there yet. HDR is something that will have to wait for MS DX improvements UHD use is not offically supported atm Kodi is a work in progress; enthusiasts are carrying this and this thread which is the place to be for this issue. Looking at the log "(windowed fullscreen) with size 3840x2160, refresh 23.976023" I suggest trying full screen (not windowed 1080p 60 cycles for the interface, and see how that performs) use wasapi 2.0 channels for audio pass-through.  
Hey!  Thanks for the headsup about Kodi 19.  I'll switch back to it from the HDR edition when it's in a good place.  Though, I do want to reiterate that this is not an issue with just Kodi 18/19 as this has been ongoing for two years so at least since Kodi 17.  HDR playback is only a new thing for me as I finally have an HDR TV.

Regarding the full screen vs windowed, I have the interface in full screen (ie: no border on the screen) and I have "fullscreen" selected in System settings, so I'm not sure what else would be needed to correct that.  I'll try setting the interface to 1080p, though I'm curious as to what this does with 4K video files as I wouldn't want Kodi to downscale 4K to 1080P only for my TV to have to upscale it again.  I'm just not sure what specifically changing the resolution in Kodi to 1080P will do. 
Well, I guess no matter how long you use something, you can miss something.  I found the "Use Windowed Fullscreen" switch and toggled it off.  I'll report back in a few days to a week to report if it helped.
Reply
#8
(2019-12-30, 03:30)mrsdoubtfire613 Wrote:
(2019-12-26, 23:51)mrsdoubtfire613 Wrote:
(2019-12-26, 23:36)PatK Wrote: Kodi 19 is Alpha atm, and some things are not quite there yet. HDR is something that will have to wait for MS DX improvements UHD use is not offically supported atm Kodi is a work in progress; enthusiasts are carrying this and this thread which is the place to be for this issue. Looking at the log "(windowed fullscreen) with size 3840x2160, refresh 23.976023" I suggest trying full screen (not windowed 1080p 60 cycles for the interface, and see how that performs) use wasapi 2.0 channels for audio pass-through.  
Hey!  Thanks for the headsup about Kodi 19.  I'll switch back to it from the HDR edition when it's in a good place.  Though, I do want to reiterate that this is not an issue with just Kodi 18/19 as this has been ongoing for two years so at least since Kodi 17.  HDR playback is only a new thing for me as I finally have an HDR TV.

Regarding the full screen vs windowed, I have the interface in full screen (ie: no border on the screen) and I have "fullscreen" selected in System settings, so I'm not sure what else would be needed to correct that.  I'll try setting the interface to 1080p, though I'm curious as to what this does with 4K video files as I wouldn't want Kodi to downscale 4K to 1080P only for my TV to have to upscale it again.  I'm just not sure what specifically changing the resolution in Kodi to 1080P will do.  
Well, I guess no matter how long you use something, you can miss something.  I found the "Use Windowed Fullscreen" switch and toggled it off.  I'll report back in a few days to a week to report if it helped. 

Final update: after two long, annoying years, that did it.  I don't know why that was checked, but I haven't had a single freeze issue in over a week and that's a record.  I'll consider this one closed out.  Thank you all!
Reply
#9
Thread marked solved.
Reply

Logout Mark Read Team Forum Stats Members Help
OnDisplayLost - Kodi freezes after display rate change0