Open Saviq opened 6 months ago
RAOF: One of the reasons this was never a priority is that passing
-eglstream
there will (might) get you accelerated rendering for the X server, it won't get you acceleration for X11 clients. Saviq: Wonder if GBM is the right direction here, then? RAOF: Yes; that has 3D accel plumbed through to clients. RAOF: And might even work!
Problems with NVIDIA on gbm-kms so far:
gbm_create_surface
fails if you pass flags != 0
(at least USE_SCANOUT
is necessary for other drivers :woman_facepalming:, and technically we should pass USE_RENDERING | USE_SCANOUT
)gbm_surface_has_free_buffers
is broken (probably?), spuriously returning false
; commenting out the check gets GBMSurface-backed output on NVIDIA.eglQueryDmaBufModifiersEXT
returns EGL_BAD_PARAMETER
(spuriously? Or are we doing something wrong?)I was actually able to figure out the problem why Xwayland fails to successfully run eglInitialize
on Mir running with --platform-rendering-libs mir:egl-generic
, my installation was missing libnvidia-egl-gbm1
. That makes Xwayland successfully initialize glamor: (II) GLX: Initialized glamor GL provider for screen 0
.
However X11 clients still fail to use OpenGL ES, e.g. glmark-es2
reports
Error: eglGetDisplay() failed with error: 0x3000
Error: eglGetDisplay() failed with error: 0x3000
Error: main: Could not initialize canvas
when forcing the NVIDIA EGL driver via __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/10_nvidia.json
.
FYI, Xwayland no longer has EGLStreams support: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1386
NVIDIA is (slowly!) becoming more usable on gbm-kms, which is interesting to us for superior XWayland support.
There are still a few bugs (as of the NIDIA 545 drivers - currently the most recent drivers available in 24.04) that we either need to wait for fixes for or work around. Those are:
gbm_surface_create
fails withflags != 0
(need driver quirk, as other drivers (correctly) requireGBM_BO_USE_SCANOUT
for scanout buffers)/dev/dri/card0
and/dev/dri/renderD128
refer to the same physical device. This results in bothgbm-kms
(bound to/dev/dri/renderD128
) andeglstream-kms
(bound to/dev/dri/card0
) being loaded as rendering platformsOriginal bug:
Ref.:
https://github.com/canonical/mir/blob/d0a68ae3de28ce59923c13e2e89ddea9a9dfdc8b/src/platforms/eglstream-kms/server/platform.cpp#L176-L183
3182