Raspberry Pi 5: HDR not working

  • Cheers LibreELEC team!

    I just switched from Raspberry Pi 4 to Raspberry Pi 5 by setting up a fresh LE 12 installation on an USB SSD drive and then restored a backup from Raspberry Pi 4 LE installation (I am using the official Raspberry Pi 5 power supply, in case that may matters somehow).

    Everything works flawlessly so far except HDR. Whenever I try to play my HDR movie via SMB from my NAS share, the LG TV just shows me an error message which says "invalid format". I can indeed hear the sound of the movie for a few seconds, but just no picture (however, the TV itself shows the "HDR" icon on the right top corner, so a HDR signal is indeed being detected somehow).

    I did have exacly the same problem before on the Raspberry Pi 4 until someone suggested to switch the Raspi 4 HDMI port from one to the other and that indeed solved the issue back then (I remeber I switched the HDMI ports a couple of times just to verify that this was the problem because it seemed so strange to me). However, on the Raspi 5, the same workaround does not help. Both HDMI ports are giving me the same issue.

    Any idea what the problem could be?

    Here are the debug logs:

    https://paste.libreelec.tv/rare-urchin.log

    Thank you in advance!

  • Try without AVR.

    Code
    2024-06-04 21:35:27.440 T:1004     info <general>: [display-info] make: 'ONKYO Corporation' model: 'AV Receiver'
    2024-06-04 21:35:27.440 T:1004     info <general>: [display-info] supports hdr static metadata type1: true
    2024-06-04 21:35:27.440 T:1004     info <general>: [display-info] supported eotf:
    2024-06-04 21:35:27.440 T:1004     info <general>: [display-info]   traditional sdr: true
    2024-06-04 21:35:27.440 T:1004     info <general>: [display-info]   traditional hdr: false
  • Unfortunately it is a bit complicated currently to move the Pi next to the TV because of my harware setup.

    I tried now again with the Raspi Pi 4 instead of the Raspi Pi 5 and yes, it really works without any issues with exactly the same settings, exactly the same hardware setup and by playing exactly the same video file.

    Here are the debug logs from the Pi 4:

    https://paste.libreelec.tv/holy-cow.log

    It also says traditional hdr false , same as on the Raspi 5 debug logs, but HDR works in this case!

    EDIT: Also it should not be an AVR issue. It is a HDMI 2.1 AVR and supports HDR10, HDR and up to 8K@60Hz. It's a Onkyo TX-NR6100 AVR with latest firmware installed.

  • Hmm...when I disable DRM-PRIME completely, then it works, but the video is stuttering af, obviously.

    When I enable DRM-PRIME back again and change the render method from Direct-To-Plane to EGL, the video is playing fine, but HDR is not getting enabled.

    EDIT: Also, when I choose Direct-To-Plane render method and disable Adjust display HDR mode, then the video file plays fine, but HDR is not getting enabled.

  • Okay, at least I can imagine now why the TV is showing the invalid format message.

    As I already wrote, when playing the video file with Raspi 5, the HDR icon on the TV is popping up but the screen remains black and the TV is showing up the invalid format message. Only the sound output is working.

    So for further troubleshooting I enabled the advanced information screen on the TV to see what happens when I try to play the video and I got this:

    So now it makes sense the TV is showing up the invalid format message because it only supports up to 4K resolution.

    The question now is: Why is this even happening? Why is the Raspi 5 putting out a 5760x2160P@24 resolution when 4K is the maximum possible resolution I can choose in the LE menu settings?

    Any ideas on how to go further?

  • RPi4 and RPi5 do not support 4K@60 4:2:0 output, and some TV's (or specific HDMI ports on the TV) only support 4K60 4:2:0 input, so when the RPi outputs e.g. 4K@60 in 4:2:2 the TV cannot display that format. On some TV's the solution is to enable "Deep Colour" or some kind of special/extended/enhanced modes on that port (there is no standard terminology so vendors invent their own weird namings) or to move the RPi connection to another HDMI port that supports 4:2:2.

    Are you using adjust-refresh + whitelist to play [email protected] content at [email protected], or is it being forced to 4K@60?

    NB: RPi4/5 have identical HDR capabilities. DRMPRIME must be enabled with the Direct-to-Plane settings (not EGL). Also ensure that on the RPi side the HDMI cable is connected to port 0 nearest the PSU connector.

  • Forcing EDID will almost certainly achieve nothing because the current EDID is being read fine. However, removing all the 4096x2160 modes from the whitelist would be advised as 99.99% of 4K media aligns with the 3840x2160 modes.

  • Okay guys, I tried now a few things:

    • Set EDID again
    • Disable all 4096x2160 resolutions
    • Enable/Disable adjust refresh rate on start/stop
    • Disable Deep Colour mode on the LG TV

    In the end, what fixes the issue, was to disable Deep Colour mode, the setting chewitt mentioned (thanks for that!). Strange thing somehow as the Pi 4 had the same problem but just switching the HDMI port was enough to make it work, even with Deep Colour enabled. Is there anything I can do to make it work on the Pi 5 with Deep Colour mode enabled or would I have t replace the Pi 5 completely by an x86 mini computer or similiar?

  • Not all HDMI ports are equal specification. Some TVs only support specific input on specific connectors. Some support everything on all connectors. Most common on a modern TV is the hardware supporting everything but default software config forcing different specs on different inputs. Deep Colour or similar is normally required for 4K60 and 4:2:2 input.

    Remove the EDID forcing because this will override EDID on the HDMI connector and enabling/disabling "Deep Colour" on the port will change the EDID output from the TV on HDMI.

    Then configure Deep Colour ON, adjust refresh ON, ensure no 4096 modes and 3840@60/59.94/50/30/29.97/25/24/23.98 are in the list, reboot for clean logs, then share a debug log showing something with HDR content.

  • Depending on the receiver it might not support hdr passthrough.

    my onkyo supports 4k/hdr passthrough but no ALLM 1440p

    RPI5 on nightlies HDR works flawless to my LG C3


    Only issue is Dolby Vision comes out purple/green due to lack of license or support I guess.

    The official Kodi build installed on my LG TV does Dolby Vision but since my receiver is only ARC will only pass Dolby Digital/+

  • My Onkyo TX-NR6100 receiver does actually support all of the following features (from the specs data sheet):

    Supports features defined in HDMI 2.1*7 specification including
    8K/60p(4:4:4/12-bit*8, 4:2:2/12-bit*8, 4:2:0/10-bit), 8K/30p(4:4:4/12-bit*8,
    4:4:4/10-bit, 4:2:2/12-bit), 4K/120p(4:4:4/12-bit*8, 4:4:4/10-bit, 4:2:2/12-
    bit) video passthrough, VRR, ALLM, QFT (Quick Frame Transport),
    DSC (Display Stream Compression), QMS (Quick Media Switching)
    and eARC (Main Out); supports HDR10+, Dolby Vision™, HDR10, and
    HLG, and BT.2020 color; DeepColor™, x.v.Color™, LipSync, and HDCP
    2.3

    EDIT: Also, it would make zero sense that it worked on the Pi4 but not on the Pi5 if the issue was one the receiver side.

  • It also says traditional hdr false , same as on the Raspi 5 debug logs, but HDR works in this case!

    If I recall correctly the 'Traditional HDR' EOTF which is an EDID EOTF option is not supported by (m)any UHD HDR TVs - it's an old and deprecated HDR EOTF that has been replaced by HDR10 (aka ST.2084 PQ) and HLG (aka ARIB STD-B67). ('Traditional HDR', I believe, basically uses standard SDR Power Law Gamma but pushes it into the HDR range)

    (EOTF = Electro Optical Transfer Function - i.e. how video levels are mapped to screen pixel brightness levels)


    Then configure Deep Colour ON, adjust refresh ON, ensure no 4096 modes and 3840@60/59.94/50/30/29.97/25/24/23.98 are in the list, reboot for clean logs, then share a debug log showing something with HDR content.

    NB Deep Colour isn't always the term used to describe 4:2:2 12-bit 2160p support - it's often called 'Enhanced HDMI' or 'Enhanced 4:2:2 HDMI' on AVRs and TVs (and you often need to enable it on both - and on some TVs it's only available on some, but not all, of the HDMI inputs. My previous Sony Bravia only supported it on HDMI 2 and 3 - and it was still disabled by default, HDMI 1 and 4 were not able to accept that input format. My Denon AVR required it to be enabled too).

    However the Pi 4B and the Pi 5 have the same limitations (i.e. they don't support 4:2:0 output - which is all some UHD HDR TVs accept at 50Hz and above UHD resolutions)


    NB There are a number of reports of Pi5 models not playing nicely with Denon AVRs with UHD modes >30Hz. Some set-ups only work on the AVR's HDMI 2.1-enabled 8K HDMI inputs (even though the Pi isn't running 8K)

    Edited 4 times, last by noggin: Merged a post created by noggin into this post. (June 9, 2024 at 9:54 AM).

  • Thanks for that input noggin .

    In my case, I already tried to switch between 4K standard, 4K enhanced, 8K standard and 8K enhanced modes on that HDMI port. Nothing changed according to that issue.

    I have enabled 8K enhanced mode on all ports by default as the same limitations you described counts also for VRR support: Even when the TV's resolution capability is limited to 4K, to make VRR work on Onkyo receivers, in some circumstances 8K Enhanced mode has to be set for that specific HDMI port to make VRR work flawlessly.

  • Thanks for that input noggin .

    In my case, I already tried to switch between 4K standard, 4K enhanced, 8K standard and 8K enhanced modes on that HDMI port. Nothing changed according to that issue.

    I have enabled 8K enhanced mode on all ports by default as the same limitations you described counts also for VRR support: Even when the TV's resolution capability is limited to 4K, to make VRR work on Onkyo receivers, in some circumstances 8K Enhanced mode has to be set for that specific HDMI port to make VRR work flawlessly.

    Yes - 8K Enhanced is probably code for HDMI 2.1 support - and VRR was added with HDMI 2.1 (My Denon, annoyingly, doesn't support VRR)