Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GBM (Generic Buffer Manager) in Wayland / Weston instead of X11 windowing system for Nvidia Tegra support? #12

Open
Hedda opened this issue Jun 16, 2021 · 4 comments

Comments

@Hedda
Copy link

Hedda commented Jun 16, 2021

@aliubimov Request you add support for GBM (Generic Buffer Manager) if possible with Nvidia drivers for Tegra and Jetson Nano?

It is well known that both Kodi and LibreELEC (which is the reference operating system platform for Kodi on single-board computers) are together actively working hard to transition away from X11, they are transitioning to instead use GBM and V4L2.

The main reason for this move away from X11 and transitioned to GBM (Generic Buffer Manager) and Wayland / Weston for V4L2 (Video for Linux 2) is will be same for all platforms, plus that Wayland / Weston is the successor to the old X11 Window System.

Could we get support to start Weston compositor (if not already started) and use kodi-wayland instead of kodi-x11?

So the question is if it is possible to enable support Generic Buffer Manager (gbm) in Wayland / Weston with latest Nvidia drivers?

Jetson Nano and Jetson TX1 Package Manifest list libnvgbm.so as "Library for Generic Buffer Management (GBM) implementation".

https://docs.nvidia.com/jetson/archives/l4t-archived/l4t-3231/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/manifest_jetson_nano.html

Looks like Nvidia docs says you could use Weston (Wayland) Windowing System with gbm (Generic Buffer Manager) or? It does however sounds as if you could enable Weston (Wayland) Windowing System with libnvgbm.so gbm (Generic Buffer Manager)? Nvidia docs mention that libnvgbm.so is still considered experimental and that there are limits with multi-planar dma-buf formats.

https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/window_system_wayland.72.1.html

References that show that Kodi and LibreELEC developers are moving towards Generic Buffer Management implementations:

https://kodi.tv/article/kodi-v18-leia-story-so-far/

"Linux gained some great things as well which might not mean a lot for regular users though. For our Google Summer of Code we had a project integrating Wayland display server protocol (again) to our code base which is meant to be the successor of X11 Window System. Since Linux is also quite divided on display drivers we had quite a lot of code implementations getting Kodi running on the variety of devices out there. To reduce the maintenance burden of this code a general path was chosen and for GBM (Generic Buffer Manager) and V4L2 (Video for Linux). With this only a small part of the initial code is needed to get devices running and from this newer devices would just run out-of-the-box once the Linux kernel supports these."

https://libreelec.tv/2021/02/upcoming-changes/

"LibreELEC staff are working with Team Kodi to move all supported platforms onto modern (aka mainline) Linux kernels and a common display/decoding method, GBM/V4L2."

"Although we are running kernels and drivers that now support HDR (on limited Intel/AMD hardware) this also requires GBM/V4L2 in Kodi and we feel further work and testing is needed before we can make the switch. The move from X11 (and demise of nVidia support) is still going to happen, but not in the LE 10.0 release. "

More references regarding running Kodi with Wayland / Weston:

http://www.saikurain.com/projects/xbmc/

https://kodi.tv/article/gsoc-2017-update-wayland-support/

https://forum.kodi.tv/showthread.php?tid=336735

https://forum.kodi.tv/showthread.php?tid=326179

https://forum.kodi.tv/showthread.php?tid=346834

@Hedda
Copy link
Author

Hedda commented Jun 16, 2021

LibreELEC developers mention here they themselves have currently little interest in adding Nvidia Tegra support if it requires X11

https://forum.libreelec.tv/thread/17950-nvidia-jetson-nano-support-any-chances-or-progress/

@Hedda Hedda changed the title GBM (Generic Buffer Manager) instead of X11 windowing system for Nvidia Tegra support? GBM (Generic Buffer Manager) in Wayland / Weston instead of X11 windowing system for Nvidia Tegra support? Jun 16, 2021
@aliubimov
Copy link
Owner

aliubimov commented Jun 16, 2021

I think this is possible as NVidia decoder utilizes V4L2 kernel interface.

@theofficialgman
Copy link

theofficialgman commented Oct 25, 2021

wayland/weston rendering is very broken on the jetsons currently
there is a "wontfix" bug that basically makes using it impossible (it hangs randomly, on display rotation, and on display addition/removal).
while this might be nice to have, its also pretty much never going to get used because of this issue

https://forums.developer.nvidia.com/t/wayland-hangs-on-display-rotation-addition-removal-and-display-sleep/185149/11

if you want wayland/weston to be a real consideration on the jetsons, I suggest you all comment on my forum post above ^ showing your interest in getting the bugs actually fixed

@Hedda
Copy link
Author

Hedda commented Feb 2, 2023

FYI, Nvidia is apparently now supposed to support accelerated XWayland if you use their very latest binary drivers(?)

https://download.nvidia.com/XFree86/Linux-x86_64/510.39.01/README/xwayland.html

...though from what I read video playback acceleration is limited under Wayland(?) and Wayland support in the nvidia-settings program does not yet have full feature parity for Wayland, however at least it seems like it is starting to get a little better, but that is not really something that yo should need to use if using Kodi/XBMC:

NVIDIA/nvidia-settings#69

NVIDIA/nvidia-settings#69 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants