Kodi Community Forum
Is there a tutorial that shows how to get HDR working with Ubuntu 22.04/Xorg/Nexus? - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52)
+---- Thread: Is there a tutorial that shows how to get HDR working with Ubuntu 22.04/Xorg/Nexus? (/showthread.php?tid=371952)

Pages: 1 2 3 4


RE: Is there a tutorial that shows how to get HDR working with Ubuntu 22.04/Xorg/Nexus? - wsnipex - 2023-02-14

no, it's not correct, instead of -D ENABLE_GLES=ON you need to use -DAPP_RENDER_SYSTEM=gles


RE: Is there a tutorial that shows how to get HDR working with Ubuntu 22.04/Xorg/Nexus? - fritsch - 2023-02-14

The answer to the question was correct - but for enabling GLES in kodi: -DAPP_RENDER_SYSTEM=gles is the right thing to do. Thanks wsnipex for pointing that out.


RE: Is there a tutorial that shows how to get HDR working with Ubuntu 22.04/Xorg/Nexus? - oldtvwatcher - 2023-02-14

(2023-02-14, 14:24)wsnipex Wrote: no, it's not correct, instead of -D ENABLE_GLES=ON you need to use -DAPP_RENDER_SYSTEM=gles

So instead of

cmake -D ENABLE_GLES=ON ..

use

cmake -DAPP_RENDER_SYSTEM=gles ..

right?


RE: Is there a tutorial that shows how to get HDR working with Ubuntu 22.04/Xorg/Nexus? - oldtvwatcher - 2023-02-14

(2023-02-14, 09:59)fritsch Wrote: The rest is just a bit of AI suger stating the obvious Tongue emphasizing on the two "dots". While a human a technical expert has a semantic meaning for "GLES", ChatGPT did not have.

Just to be clear, are you saying ChatGPT's explanation for the ".." was technically incorrect, or are you saying that the ".." should not be in that line, or what?


RE: Is there a tutorial that shows how to get HDR working with Ubuntu 22.04/Xorg/Nexus? - graysky - 2023-02-14

@oldtvwatcher - yes.  One of your cmake arguments should be:
Code:
-DAPP_RENDER_SYSTEM=gles

https://github.com/xbmc/xbmc/blob/master/docs/README.Linux.md#41-configure-build


RE: Is there a tutorial that shows how to get HDR working with Ubuntu 22.04/Xorg/Nexus? - wsnipex - 2023-02-14

I've put a GLES build for ubuntu on my testing ppa: https://launchpad.net/~wsnipex/+archive/ubuntu/kodi-git


RE: Is there a tutorial that shows how to get HDR working with Ubuntu 22.04/Xorg/Nexus? - fritsch - 2023-02-14

(2023-02-14, 15:04)oldtvwatcher Wrote:
(2023-02-14, 09:59)fritsch Wrote: The rest is just a bit of AI suger stating the obvious Tongue emphasizing on the two "dots". While a human a technical expert has a semantic meaning for "GLES", ChatGPT did not have.

Just to be clear, are you saying ChatGPT's explanation for the ".." was technically incorrect, or are you saying that the ".." should not be in that line, or what?
I basically emphasized that ChatGPT stated the obvious ... without having any idea what this command does semantically ...

For a human I suggest: man cmake


RE: Is there a tutorial that shows how to get HDR working with Ubuntu 22.04/Xorg/Nexus? - username145 - 2023-02-15

For me, HDR activation works on my Intel machine with GBM+GLES, but only when the "DRM PRIME" setting is disabled. Can somebody please explain what that setting does, and if I am losing anything by not having it enabled?


RE: Is there a tutorial that shows how to get HDR working with Ubuntu 22.04/Xorg/Nexus? - oldtvwatcher - 2023-02-15

(2023-02-14, 16:42)wsnipex Wrote: I've put a GLES build for ubuntu on my testing ppa: https://launchpad.net/~wsnipex/+archive/ubuntu/kodi-git

Thank you very much!! As I said in my original post, I'm actually trying to help someone else with this, so I have sent him the information on it, including the lines to add to his sources list.  Apparently he's not on his computer right now, and typically he only has time to work on his media center on the weekends, so I may not know until Saturday or Sunday if this works for him.  But I just wanted to let you know how much I appreciate this.

Once he installs it, I'm guessing he still can't run it from within Ubuntu Desktop, even if he launches it from a terminal window, due to Xorg running? In post #6 in this thread, yasij said, "...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" so I assume he'll need to do that, and I'll pass that along to him as well.  I really do hope this works for him, and thanks again!


RE: Is there a tutorial that shows how to get HDR working with Ubuntu 22.04/Xorg/Nexus? - wsnipex - 2023-02-15

yes, using GBM requires additional permissions for the user.
the user running kodi (GBM) needs to access files in /dev/input/ or you will end up without working keyboard and mouse and effectively be locked out.

one can add itself to the "input and/or plugdev" groups, depending on which ubuntu version is used, but this detrimental to overall system security and isn't recommended on a desktop system that used for śecurity sensitive stuff.
A proper fix for that can be pretty complicated and is out of scope here.

If you don't care too much about potential keyloggers, you can run this:
$ sudo adduser [yourusername] input
$ sudo adduser [yourusername] plugdev

Additionally the "audio" and "video" groups might be needed:
$ sudo adduser [yourusername] audio
$ sudo adduser [yourusername] video


replace [yourusername] with the actual user, e.g. if your user is oldtvwatcher:$ adduser oldtvwatcher input
make sure to logout / login after that or reboot.


RE: Is there a tutorial that shows how to get HDR working with Ubuntu 22.04/Xorg/Nexus? - oldtvwatcher - 2023-02-18

(2023-02-14, 16:42)wsnipex Wrote: I've put a GLES build for ubuntu on my testing ppa: https://launchpad.net/~wsnipex/+archive/ubuntu/kodi-git

Well he tried setting it up today under Ubuntu server and it worked!  After messing with it all day, he told me this:
Quote:my goal would be to have two different instances of Kodi on the same machine, one for normal and one for 4K, I would like to be able to keep the desktop and then, have a way to exit the desktop to run the 4K version, but I am not sure how to do it.  I suspect I would have to create a new user to run the other version of kodi, if that is even possible.

I don't know that much about Linux but I know you can add a user using sudo adduser, but that's about all I know.  And when he says "4K version" he means your version that supports HDR.  The problem I have with this is that as far as I know Kodi installs as a system program (owned and run by root) so I don't know if you can have two instances (different versions, I know he wants Nexus on the desktop version) and I don't know how you could exit the desktop version to run the other, assuming you can put two different versions of Kodi on the same machine.


RE: Is there a tutorial that shows how to get HDR working with Ubuntu 22.04/Xorg/Nexus? - wsnipex - 2023-02-18

from kodi side there is nothing he needs to do. The same kodi binary can run on GBM, X11, Wayland. If you run kodi from a terminal., without a running window manager, it will use GBM.
If you start it from a desktop it will use X11 or Wayland automatically.

edit:
switching between desktop and terminal session can be done like this:
$ sudo systemctl isolate multi-user.target # <-- terminal
$ sudo systemctl isolate graphical.target # <-- desktop

more info e.g. here: https://www.cyberciti.biz/faq/switch-boot-target-to-text-gui-in-systemd-linux/


RE: Is there a tutorial that shows how to get HDR working with Ubuntu 22.04/Xorg/Nexus? - oldtvwatcher - 2023-02-18

(2023-02-18, 12:51)wsnipex Wrote: from kodi side there is nothing he needs to do. The same kodi binary can run on GBM, X11, Wayland. If you run kodi from a terminal., without a running window manager, it will use GBM.
If you start it from a desktop it will use X11 or Wayland automatically.

edit:
switching between desktop and terminal session can be done like this:
$ sudo systemctl isolate multi-user.target # <-- terminal
$ sudo systemctl isolate graphical.target # <-- desktop

more info e.g. here: https://www.cyberciti.biz/faq/switch-boot-target-to-text-gui-in-systemd-linux/
That would be great except the problem is he doesn't want to run an alpha version, he wants to run Kodi Nexus.  His fear is that as time goes by there will be compatibility issues between the alpha version of Kodi and various addons (such as the Tvheadend addon).  As time goes by there will be changes to the various point releases, and there are less likely to be compatibility issues if he is running Nexus.

Also he asked me a question I can't give a good answer to, he said "That part that I REALLY don't get is if that kodi.bin can do all 3 and it uses the one it needs based on the desktop or lack there of, why don't they just have that -DAPP_RENDER_SYSTEM=gles enabled by default on that version in the main repo? I mean if your system did not use it does it hurt for it to be there?"  I think that is a really good question but since I don't really understand this building stuff I can't respond in any meaningful way.

Is there an easy way to run two versions of Kodi on the same system, maybe by moving one of the Kodi executables to a different directory such as /usr/local/bin/kodi?


RE: Is there a tutorial that shows how to get HDR working with Ubuntu 22.04/Xorg/Nexus? - fritsch - 2023-02-18

Kodi supports wayland, gbm or X11
Kodi only supports one renderer type, be it GL or GLES. One is built, there is no runtime selection of this.

And for your friend: He can just build Nexus from source -> problem solved.


RE: Is there a tutorial that shows how to get HDR working with Ubuntu 22.04/Xorg/Nexus? - oldtvwatcher - 2023-02-19

(2023-02-18, 21:04)fritsch Wrote: Kodi supports wayland, gbm or X11
Kodi only supports one renderer type, be it GL or GLES. One is built, there is no runtime selection of this.

And for your friend: He can just build Nexus from source -> problem solved.
You do realize you are contradicting what was written in previous posts, don't you?

wsnipex wrote in post #42:  from kodi side there is nothing he needs to do. The same kodi binary can run on GBM, X11, Wayland. If you run kodi from a terminal., without a running window manager, it will use GBM.
If you start it from a desktop it will use X11 or Wayland automatically.
(emphasis added)

And what he was asking is if that the case, why don't they just build Kodi with -DAPP_RENDER_SYSTEM=gles enabled by default on the version in the main repo?  People who run it under X11 or Wayland would get exactly what they get now, but people who run it from a terminal (presumably running kodi-standalone or kodi with the --standalond option) would be able to use GBM.  In other words, make things at least somewhat easy for just plain users, particularly those of us who do not eat/sleep/breathe Linux.

As for building Nexus from source, you probably won't believe this but he actually tried that yesterday, and for some reason the Kodi addons that he uses (such as the Tvheadend addon) would not work with it.  Like I said in earlier posts, neither of us are Linux experts.  I would not even have attempted it, but he did and got nowhere fast (he also had some other problem with it but I don't recall what it was, just that neither was a problem when installing from your apt repository).

EDIT: Literally two minutes after I sent the above, he replied to me and asked me to tell you that he did build from source and it was the 21 Alpha version, but it did work so he did it again for Nexus and that built fine but PVR addons and the remote would not work with the Nexus build.  Any idea why?