Chapter 40. GBM and GBM-based Wayland Compositors
Prev | Part I. Installation and Configuration Instructions | Next

## Chapter 40. GBM and GBM-based Wayland Compositors

### Overview

GBM is a memory allocation API developed as a component of the Mesa project. Most Wayland compositors use the GBM API to initialize an EGLDisplay object directly on a GPU, and to allocate the EGLSurface representing the desktop. The NVIDIA driver includes a GBM backend enabling the use of such software on NVIDIA GPUs. A GBM EGL external platform library is also included to enable the use of GBM objects in EGL.

### Requirements

The following are necessary to enable use of the NVIDIA driver's GBM backend and its EGL and related Wayland client support:

- DRM KMS must be enabled. See Chapter 36, Direct Rendering Manager Kernel Modesetting (DRM KMS) for details.

- libgbm.so.1 from Mesa version 21.2 (https://gitlab.freedesktop.org/mesa/mesa).

- egl-wayland version 1.1.8 or later must be present (if installed separately from the the NVIDIA driver). To support applications that use the wl_drm Wayland protocol to select a GPU to render on, such as Xwayland, version 1.1.9 or later must be present.

### Xwayland and GBM

Xwayland uses the GLAMOR backend to accelerate X application rendering using EGL. While not required for basic functionality, GLAMOR acceleration is required for good performance when running accelerated Vulkan or OpenGL X11 applications. The GLAMOR integration code in Xwayland has paths to use either EGLStreams or GBM to allocate surfaces for use with accelerated rendering. To use the GBM path with the NVIDIA driver's GBM backend and GBM EGL external platform library, a version of Xwayland containing the following patch or equivalent code must be used:

https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/751

See Chapter 39, OpenGL and Vulkan on Xwayland for more details on Xwayland support in the NVIDIA driver.

Prev | Up | Next
Chapter 39. OpenGL and Vulkan on Xwayland | Home | Chapter 41. Addressing Capabilities