LE 8.1.0 bug with auto resulution switcher 1080P/2160P on nvidia

  • Hi,

    I've got new TV and GT 1030 card on my LibreELEC PC. I have turned on "Sync to display" and "Adjust refresh rate" options but Kodi behaves not like I would like to.

    If I play a 1080P/24P file then TV switches to proper resolution. So it stays with 1080P and just adjust refresh rate to 24P. Everything here is OK. But if I play a 2160P/24P file then Kodi stays on 1080P resolution.

    I can bump up Kodi UI resolution from 1080P to 2160P. 4K movies will be OK, but then Kodi won't set proper resolution for 1080P movies.
    Tried same thing on Windows and there everything works like it should. How can I fix this in Linux/LibreELEC?
    I'm using latest LibreELEC v8.1.0 with GeForce GT 1030. Kodi UI is running at 1080P.

    Here is a debug file. Firstly I've played Game of Thrones which is 1080P file and then Logan movie which is 2160P.

    fritsch from Kodi forum asked other user to test it also on intel GPU:

    And some user responded:

    Quote

    I tested with this sample video (both webm and AVC, [email protected]) : Panasonic G85 4K/24p Sample Footage - YouTube and with the Big Buck Bunny 3840x2160@30 Hz sample.

    Kaby Lake i7-7700. Ubuntu 17.04 with Kodi 17.4 from the PPA. Kodi was set to 1080p59.94. Adjust Refresh Rate to match video was on. Playing the duck sample switched to 3840x2160p23.976 Hz. It switched back to 1080p59.94 when done playing. Playing the Big Buck Bunny sample switched to 3840x2160p30. It also switched back to 1080p59.94 when done. The resolution up switching is working fine for me.

    So i confirm that resolution switching is broken on nvidia GeForce GT 1030 using latest LE v8.1.0 and VDPAU. It doesn't work on LibreELEC. Please note that on Windows it works like it should (using Windows 10, same GT 1030 card using latest nvidia drivers and Kodi 17.3 and 17.4).

  • Some LE team members have a GT1030 (me), some LE team members have a 4K.

    None of the LE team members have both items, so it's not easy reproducing your problem.

    Lend me your 4K television, and we can start troubleshooting. ;)

  • And another thing. When Kodi is set to full HDMI color space (0-255) and 2160P resolution then TV stops auto recognizing it as full color space. You have to set TV to full color space by hand. This problem doesn't exist when Kodi is set to 1080P. This could be nvidia driver bug I think?

    Well I see that 4K is somehow borked on Linux/nvidia right now.

  • What if I install Ubuntu, latest nvidia driver 384.69 and Kodi from PPA? Will it be the same as in LE 8.1.0 right now?

    And lastly? What should I do if Ubuntu will be the same as LE. Use Kodi on Windows?

  • What if I install Ubuntu, latest nvidia driver 384.69 and Kodi from PPA? Will it be the same as in LE 8.1.0 right now

    Yes, that would be the same as LE 8.1.

    And lastly? What should I do if Ubuntu will be the same as LE. Use Kodi on Windows?

    If it's the same on Ubuntu with the same driver and same Kodi, then it's either a driver bug or a Kodi bug. Filing a ticket on trac,kodi.tv would be the next step so that a Kodi developer can look into it.

    You could also test a nightly build with LE 9/Kodi 18a1 in order to determine if it's a driver issue: build #0821 is using 384.59, while build #0822 is using 384.69, and there are no significant LE or Kodi changes between these two builds. If you have the same 4K resolution issue in #0822 but NOT in #0821 then we can say fairly confidently it's a 384.69 driver issue. If the issue is already there in #0821 then chances are it's a long term issue (either in the nvidia driver series, or Kodi 18a1 the videoplayer of which has been largely rewritten since Kodi 17.x).

  • Thanks Milhouse. Notice that currently I'm using Kodi 17-rc1 on LE 8.1.0 build with nvidia 384.59 driver. The bug is present on that setup.

    I will test LE x86 test builds today. I'll check 0821, 0822 and 0831 and report back here.

    My question about Windows was about future of Kodi and 4K/HDR. Klojum said that nvidia in Linux is 8 bit only so I guess no HDR? What about Windows where I can enable HDR in nvidia control panel. Is Kodi capable of using that feature(s) (10 bits) on Windows?

  • Right, sorry - I thought 8.1.0 included 384.69 but that's in a later (possibly unpublished) candidate.

    In that case, I'd say this is likely to be a Kodi 17 issue and will need a trac ticket. Worth knowing if it's already fixed in LE9/Kodi 18 - if not, that information should also be included in the ticket so that it can be fixed in both Kodi 17 and 18.

    Kodi doesn't know anything about HDR metadata yet (regardless of hardware) so I wouldn't expect it to work with Kodi on Windows or any other platform until Kodi is updated with HDR support, which might come later in Kodi 18 (still a long way to go) or possibly Kodi 19 (but it definitely won't be in Kodi 17).

  • OK. I'll test #821, #822 and #831 builds today then and report here. Then I'll create ticket in trac if needed.

    About HDR – so it's a long way to go and I've got time and simply I can stay with LE right now. Or I can choose Kodi DSPlayer build on Windows with madVR. Then I think i could play HDR movies properly?

  • Sure, external players on Windows may already support HDR, but the Kodi built-in videoplayer currently does not.


    Eventually HDR will come to LibreELEC, once all the pieces (kernel, drivers, Kodi) are in alignment.

  • Last question Milhouse :)

    If I set Kodi UI resolution 1080P and play 4K file it switches to higher resolution and when I stop it, it goes back to 1080P. How can I "reverse" it? So if I set 2160P resolution on Kodi UI and play 1080P file. Then Kodi doesn't switch resolution to LOWER one and simply plays that file on 2160P.

    TVs got much better scaling algorithms than Kodi so it would be much better if Kodi would always switch resolution for played media based on "whats in the file" and regardles of currently set UI resolution. If its 1080P then switch to 1080P and if its 4K switch to 2160P. Problem is in Kodi UI. I must say that UI in 2160P on 4K TV looks sharp and beautiful while at 1080P TV scales it up and this looks so-so.

  • OK Milhouse, here are the results from your Leia test builds:

    #821 – Kodi set to 1080P res, VDPAU video mixer enabled, playing 2160P file results in res set to 1080P/24p – bugged

    #821 – Kodi set to 1080P res, VDPAU video mixer disabled, playing 2160P file results in res set to 2160P/24p but screen is green all the time. Sound is OK, but no picture. Just green screen all the time – bugged

    #822 – Kodi set to 1080P res, VDPAU video mixer enabled, playing 2160P file results in res set to 1080P/24p – bugged

    #822 – Kodi set to 1080P res, VDPAU video mixer disabled, playing 2160P file results in res set to 2160P/24p but screen is green all the time. Sound is OK, but no picture. Just green screen all the time – bugged

    #831 – Kodi set to 1080P res, VDPAU video mixer enabled, playing 2160P file results in res set to 1080P/24p – bugged

    #831 – Kodi set to 1080P res, VDPAU video mixer disabled, playing 2160P file results in res set to 2160P/24p but screen is green all the time. Sound is OK, but no picture. Just green screen all the time – bugged

    It seems that it simply the same as in Kodi 17.4. Maybe even slightly worse because disabling VDPAU video mixer gives green screen now and this worked in 17.4 (for some reason).

    Edit: Disabling VDPAU acceleration also solves this problem.

    Edited once, last by Ostrymiecz (September 1, 2017 at 5:36 PM).

  • Code
    08:19:25.542 T:139695467251456   DEBUG: CDVDVideoCodecFFmpeg - Updated codec: ff-h264-vdpau
    08:19:25.545 T:139695467251456   DEBUG: CVDPAU::SetWidthHeight Setting OutWidth: 1920 OutHeight: 1080
    08:19:25.545 T:139695467251456  NOTICE:  (VDPAU) screenWidth:1920 vidWidth:3840 surfaceWidth:3840
    08:19:25.545 T:139695467251456  NOTICE:  (VDPAU) screenHeight:1080 vidHeight:2160 surfaceHeight:2160
    0

    Getting back to the OP, the log shows that the VDPAU code initializes the downscaler early in SetWidthHeight() and sets the output screen size to the current screen size of 1920x1080. As this is part of the VDPAU Mixer the behaviour can be disabled with the Mixer setting.

    Just my five cents, I know that this does not help you. ;)