Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
Is there a tutorial that shows how to get HDR working with Ubuntu 22.04/Xorg/Nexus?
#1
I'm trying to help someone who just reinstalled everything fresh on his HTPC.  He's running Ubuntu 22.04 on an Intel-based system, with the default Gnome desktop and using Xorg, and he installed Kodi Nexus using the apt repository (not a snap or flatpak).  It all is working great for him if he tries to play 1080p content (or lower) but if he tries to play 4K HDR content it appears washed out.  He says he found mentions of using --windowing=gbm as a possible solution but he said when he tried adding that Kodi would not launch.  He also said he found an info window in Kodi 20 that is new, something about Displays supporting HDR types which he said doesn't show any HDR displays.

Since I don't have direct access to his system I am just wondering if there are any generic tutorials on how to enable playback of HDR content without it being washed out under Ubuntu 22.04.  He says he has found information for the Raspberry Pi and certain other systems but they don't seem applicable to his situation.  I would hope someone has got this working under stock Ubuntu 22.04 desktop and has shared the procedure somewhere, but so far neither he nor I have found anything useful.  My suspicion is that it may have something to do with Ubuntu using Xorg but if that is the case I have no idea how you change that.  Any pointers to instructions, or hints on how to make this work would be much appreciated!

Just to add since it was mentioned in some replies, while his system is primarily used as a HTPC he does sometimes run software other than Kodi on it, so something like LibreELEC would not be a workable solution here.  He wants to get this working in Ubuntu 22.04 if that is in any way possible.
Reply
#2
X doesn't support HDR. If you want HDR, you have to run Kodi without a window manager.

I would rather go with LibreElec.
Reply
#3
(2023-02-11, 23:38)sarbes Wrote: X doesn't support HDR. If you want HDR, you have to run Kodi without a window manager.

I would rather go with LibreElec.

Is there a guide somewhere on how to do that?  While the computer he is running this on is primarily used as a HTPC, he does sometimes use it as a Ubuntu desktop system so LibreElec isn't an option (last time I looked at LibreElec, which admittedly was a long time ago, you could not even get to a Linux command prompt, let alone install a desktop such as Gnome).
Reply
#4
(2023-02-11, 23:49)oldtvwatcher Wrote: you could not even get to a Linux command prompt, let alone install a desktop such as Gnome)

You can always access LibreELEC via a remote SSH backdoor.
LibreELEC is a setup using only the necessary basics for Kodi. if you want a full desktop, go for a full-blown OS.
Reply
#5
(2023-02-11, 23:55)Klojum Wrote:
(2023-02-11, 23:49)oldtvwatcher Wrote: you could not even get to a Linux command prompt, let alone install a desktop such as Gnome)

You can always access LibreELEC via a remote SSH backdoor.
LibreELEC is a setup using only the necessary basics for Kodi. if you want a full desktop, go for a full-blown OS.
Huh That's what he is doing now, running Ubuntu 22.04.

Are you guys saying there is absolutely no way to get HDR working in a standard Ubuntu installation?  He doesn't want to use LibreELEC, it is just too limited.
Reply
#6
@oldtvwatcher here is a very lengthy thread re: ubuntu+hdr+kodi v20 vs libreelec https://forum.kodi.tv/showthread.php?tid=369528

there seems to be quite a lot of information including some custom patches from libre, i hope you find it helpful
Reply
#7
(2023-02-12, 00:21)jepsizofye Wrote: @oldtvwatcher here is a very lengthy thread re: ubuntu+hdr+kodi v20 vs libreelec https://forum.kodi.tv/showthread.php?tid=369528

there seems to be quite a lot of information including some custom patches from libre, i hope you find it helpful
Thanks.  I wish I could say that is helpful but I honestly don't understand any of that.

I can't believe it is that difficult to get HDR working on a Ubuntu 22.04 system (especially because I thought Nexus was supposed to have better support for it).
Reply
#8
(2023-02-12, 00:41)oldtvwatcher Wrote:
(2023-02-12, 00:21)jepsizofye Wrote: @oldtvwatcher here is a very lengthy thread re: ubuntu+hdr+kodi v20 vs libreelec https://forum.kodi.tv/showthread.php?tid=369528

there seems to be quite a lot of information including some custom patches from libre, i hope you find it helpful
Thanks.  I wish I could say that is helpful but I honestly don't understand any of that.

I can't believe it is that difficult to get HDR working on a Ubuntu 22.04 system (especially because I thought Nexus was supposed to have better support for it).
well it actually means less to me because im not at the machine trying to do this.
but it covered all your talking points - kodi20,ubuntu,hdr,intel and it was a massive amount of information to sift through and decide if it fit your situation.

i think the highlights are
1) this isnt even a new thing for ubuntu+hdr+kodi20
2) libreelec has done custom work for this

if i had any further suggestions it might be looking into gbm/wayland capabilities to see if it may offer more than xorg/x11
Reply
#9
(2023-02-11, 23:38)sarbes Wrote: X doesn't support HDR. If you want HDR, you have to run Kodi without a window manager.

I would rather go with LibreElec.

We Live in a 100% Linux household.

Why doesn't LibreElec support Linux?
Reply
#10
(2023-02-12, 02:59)jawilljr Wrote:
(2023-02-11, 23:38)sarbes Wrote: X doesn't support HDR. If you want HDR, you have to run Kodi without a window manager.

I would rather go with LibreElec.

We Live in a 100% Linux household.

Why doesn't LibreElec support Linux?
is this a serious how to write an image file to usb/sd in linux question?

im guessing they just expect linux people use dd...

https://www.cyberciti.biz/faq/unix-linux...-commands/
Reply
#11
Is our goal to get HDR passthrough to work to an HDR capable display, or to just get HDR videos to display without being washed out? If it's the latter, turn on tone mapping in the video settings for the HDR video. Kodi 20 has a few different tone mapping options. Hable is pretty good.

If you want HDR passthrough, you'll need to use the GBM backend of Kodi with GLES. The GL backend does not have the code to turn on HDR passthrough, only GLES does. The Xorg and Wayland backends do not support HDR passthrough. Xorg has no HDR support, and Wayland's is in progress and incomplete (I'm not talking about Kodi, I'm talking about in general.)

To get the GLES backend for kodi GBM, you'll have to compile it yourself as the PPA version uses the GL backend. You will have to compile it with the -DGBM_RENDER_SYSTEM=gles option. Then you'll have to run Kodi from a regular text tty, and not X11. Switch to a tty with ctrl-alt-F2, log in, and run kodi --windowing=gbm.
Reply
#12
(2023-02-12, 07:24)yasij Wrote: If you want HDR passthrough, you'll need to use the GBM backend of Kodi with GLES. The GL backend does not have the code to turn on HDR passthrough, only GLES does.

What's the difference between just displaying HDR video and "HDR passthrough?" If they are the same thing, I do not believe your statement about this being a GLES-only thing is correct. As others have stated: run kodi-gbm for HDR support. I compiled mine with gl and it works as expected.
Need help programming a Streamzap remote?
Reply
#13
(2023-02-12, 11:44)graysky Wrote:
(2023-02-12, 07:24)yasij Wrote: If you want HDR passthrough, you'll need to use the GBM backend of Kodi with GLES. The GL backend does not have the code to turn on HDR passthrough, only GLES does.

What's the difference between just displaying HDR video and "HDR passthrough?" If they are the same thing, I do not believe your statement about this being a GLES-only thing is correct. As others have stated: run kodi-gbm for HDR support. I compiled mine with gl and it works as expected.

When I use GBM with the ubuntu ppa (which I presume is built with GL) playing HDR content doesn't trigger HDR activation on my tv (as in it doesn't detect played file as HDR). Nexus 20.0 build from source with GBM/GLES triggers HDR activation.
I'm guessing with GL it maybe just accurately tries to map the HDR colors, but doesn't actually activate the HDR signal as it isn't passthrough.

No idea why GL renderer (LinuxRendererGL.cpp) doesn't include the same HDR passthrough as GLES (LinuxRendererGLES.cpp) does.
Reply
#14
(2023-02-12, 12:53)ryback Wrote: When I use GBM with the ubuntu ppa (which I presume is built with GL) playing HDR content doesn't trigger HDR activation on my tv (as in it doesn't detect played file as HDR).

How are you detecting that the HDR is not triggered?
Need help programming a Streamzap remote?
Reply
#15
I mean different things by play HDR video vs HDR passthrough. Kodi supports tone mapping HDR content to the SDR color space without sending the HDR metadata to the display. HDR passthrough sends the HDR metadata to the display.

My TV displays when it is in HDR passthrough mode. For Kodi, this happens for GBM with the GLES backend, but not with the GL backend. LinuxRendererGL.cpp contains no calls to SetHDR. LinuxRendererGLES.cpp does. I hacked LinuxRendererGL.cpp with the same calls from LinuxRendererGLES.cpp to SetHDR and it now triggers HDR passthrough.
Reply

Logout Mark Read Team Forum Stats Members Help
Is there a tutorial that shows how to get HDR working with Ubuntu 22.04/Xorg/Nexus?0