Adjust Display Refresh Rate and Resolution not matching content in all expected cases

A long investigation (included below if interested) has pointed me to observe that my Vero4k resolution and refresh rate is not matching the content in all cases when I have Adjust Display Refresh Rate.

For refresh rate, I expect the system to set my screen to match it in all cases.

For resolution, I desire to have my tv be fed signal at as close to native resolution in all cases, such that for low resolutions so that the TV will utilise its upscaling capabilities, and for high resolutions the TV (4k capable) will adapt to match content. I’ve also read that having Kodi interface in lowest accessible resolution is preferable for responsiveness, but as we can see certain settings have undesirable outcomes.

I’ve run a number of test cases and see unexpected behaviour. This includes: i) Adjust Display Refresh Rate only working for certain interface resolutions, ii) resolution of output is not dropped to match content.

For all test cases:

OSMC July Update
Settings/player/video/Adjust Display Refresh Rate=ALWAYS (have also tried ON START/STOP)

Note that the ‘result’ is obtained from the HiSense (model 55P7) TV Signal information, of which I am yet to see a true 23.976 displayed (only 24hz), so maybe it is 23.976 but the Hisense UI rounds it to 24hz?

Case 1: Play Content #1 encoded at 1920x802 @23.976 FPS

Settings/System/Display/Resolution=1920 x 1080i Refresh rate @60Hz
Expected result= 1920 x 1080p @23.976
Actual Result = 1920 x 1080i @60hz

We can see here that the refresh rate remains @60hz. Interestingly it is being displayed in same resolution as display (1080i) even though display is 1080p compatible,.

Case 2: Play (same) Content #1 (encoded at 1920x802 @23.976 FPS)

Settings/System/Display/Resolution=1280 x 720p Refresh rate @60Hz
Expected result= 1920 x 1080p @23.976
Actual Result = 1920 x 1080p @24hz

This is close to expected result, ie FPS is close to 23.976.

Case 3: Play Content #2 (encoded at 1280x544 @23.976 FPS)

Settings/System/Display/Resolution=1280 x 720p Refresh rate @60Hz
Expected result= native resolution (or at least 1080 x ???) [in order to maximise screen upscaling potential] + refresh rate @23.976
Actual Result = 1280 x 720p @60hz

We can see here that for the 1280 x 720p interface resolution seems to disallow the adjust refresh rate setting since it stays at 60hz.

Case 4: Play Content #2 (encoded at 1280x544 @23.976 FPS)

Settings/System/Display/Resolution=1280 x 720p Refresh rate @50Hz
Expected result= native resolution (or at least 1080 x ???) [in order to maximise screen upscaling potential] + refresh rate @23.976
Actual result= 1920 x 720p @60hz

Again we can see that the interface resolution is being used, but in this case, though interface was set to 50hz, the output refresh rate is 60hz. I’d expect 23.976.

Case 5: Play Content #2 (encoded at 1280x544 @23.976 FPS)

Settings/System/Display/Resolution=1920 x 1080p Refresh rate @50Hz
Expected result= native resolution (or at least 1080 x ???) [in order to maximise screen upscaling potential] + refresh rate @23.976
Actual result= 1920 x 1080p @24hz

We can see here that the interface resolution is being used, but refresh rate of screen is being adjusted to more closely match content.

As a FYI this investigation all started when trying to debug that when connected directly to TV, Kodi was introducing a large lipsync issue on raw passthrough DTS audio to Yamaha receiver that is NOT present when playing same content but connected directly to Yamaha receiver. I then noticed the FPS was at 60, and fiddling with this resolved the issue. However, this lipsync side effect is probably worthy of another bug report.

Questions:

  1. What is the recommended interface resolution to achieve the desired outcomes?
  2. Within Kodi is it possible to confirm output refresh rate (without having to verify in tv)?
  3. Is it possible to utilise tv upscaling as desired?
  4. Is this bug the root cause of the refresh issues: Display refresh rate auto adjust issue · Issue #15777 · xbmc/xbmc · GitHub ?

Can you upload logs and MediaInfo for the files?

Sam

Thanks for the reports. Initial thoughts:

  • I would think your TV is unlikely to distinguish between 24 and 23.98Hz. You can check what Vero is sending with cat /sys/class/amhdmitx/amhdmitx0/config
  • Case 1: adjust refresh rate does not work when GUI is an interlaced mode (known bug/feature)
  • Case 2: check from the commandline
  • Case 3: is 1280x720x23.976 whitelisted?
  • Case 4: 1920x720? really?
  • Case 5: needs investigation. Please provide logs.

OSMC is currently implementing what’s in stock Kodi Leia but with tweaks to:

  • prefer 4k50Hz for 1080p50 if TV does not support 1080p50 (common in USA)
  • stop choosing 4k smpte modes for 3840x2160 material

There was a time when many of the devices that ran XBMC were pushing the hardware to the limits and running the UI at lower resolutions could help. The hardware that most people use to run Kodi no longer have this issue. I would recommend keeping your UI at 1080p at the refresh rate you most commonly play and then forget about that settings.

As for the main topic at hand it sounds like what you want is going to be found by using whitelists. The behavior without white lists, and with adjust refresh rate enabled, is to scale up anything below the UI resolution, to the UI resolution at a optimal supported frame rate. Content larger than the UI resolution will get sent out at the closest match the TV will support. This is what you are seeing.

If you have adjust refresh enabled and you have whitelisted lower resolutions then Kodi will send out video below the UI resolution as well to allow for your TV to handle upscaling instead.

Just to add to that - if you whitelist anything at all, then only the whitelisted resolutions will be used (above and below the GUI resolution) in addition to the GUI resolution (and refresh rate) itself.