I can use sway now with gtx 1080. All of the following fail with getting EGL display.
glmark2-es2
env SDL_VIDEODRIVER=wayland xonotic-sdl
webgl in Firefox.
Chromium seems to work, but I am not sure how to test that. Xonotic and CS:GO start in Xwayland, but with very bad performance. It seems this is expected with Xwayland, according to the wlroots-eglstreams readme.
fwiw, it seems like the egl-wayland that nvidia builds with will be updated soon (ref), maybe closing this gap again? (But also, there’s apparently some regressions for certain users related to the very latest egl-wayland [that isn’t even merged yet] (ref))
I tried egl-wayland 1.1.8 and I have some problems with that, like firefox not starting. I saw here that egl-wayland 1.1.8 needs the unreleased nvidia driver to work.
Granted, it’s day 1, but the wlroots-eglstreams patched Sway with stable nvidia had much more consistent, better performance.
But it is working. Running HEAD of sway, with HEAD of regular wlroots, on an RTX 3080 with jonringer’s nvidia_x11_beta PR.
I am currently experimenting with a PR to add an option for adding a “custom” egl-wayland package so that it will be easy for users to play with egl-wayland from nvidia, the “current” stable, and the next stable release, all of which seem to act differently.
Hi @colemickens I saw that is possible to use the GBM_BACKENDS_PATH env var to indicates to Mesa where to load the GBM backend:
# without GBM_BACKENDS_PATH
❯ eglinfo
EGL client extensions string:
EGL_EXT_platform_base EGL_EXT_device_base
EGL_KHR_client_get_all_proc_addresses EGL_EXT_client_extensions
EGL_KHR_debug EGL_KHR_platform_x11 EGL_EXT_platform_x11
EGL_EXT_platform_device EGL_KHR_platform_wayland
EGL_EXT_platform_wayland EGL_KHR_platform_gbm EGL_MESA_platform_gbm
MESA-LOADER: failed to open nouveau: /run/opengl-driver/lib/dri/nouveau_dri.so: cannot open shared object file: No such file or directory (search paths /run/opengl-driver/lib/dri, suffix _dri)
failed to load driver: nouveau
MESA-LOADER: failed to open kms_swrast: /run/opengl-driver/lib/dri/kms_swrast_dri.so: cannot open shared object file: No such file or directory (search paths /run/opengl-driver/lib/dri, suffix _dri)
failed to load driver: kms_swrast
MESA-LOADER: failed to open swrast: /run/opengl-driver/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory (search paths /run/opengl-driver/lib/dri, suffix _dri)
failed to load swrast driver
GBM platform:
eglinfo: eglInitialize failed
...
# With GBM_BACKENDS_PATH
❯ mkdir /tmp/manolo
❯ ln -s /run/opengl-driver/lib/libnvidia-allocator.so /tmp/manolo/nvidia-drm_gbm.so
EGL client extensions string:
EGL_EXT_platform_base EGL_EXT_device_base
EGL_KHR_client_get_all_proc_addresses EGL_EXT_client_extensions
EGL_KHR_debug EGL_KHR_platform_x11 EGL_EXT_platform_x11
EGL_EXT_platform_device EGL_KHR_platform_wayland
EGL_EXT_platform_wayland EGL_KHR_platform_gbm EGL_MESA_platform_gbm
GBM platform:
EGL API version: 1.5
EGL vendor string: NVIDIA
EGL version string: 1.5
EGL client APIs: OpenGL_ES OpenGL
EGL extensions string:
EGL_EXT_buffer_age EGL_EXT_client_sync
EGL_EXT_create_context_robustness EGL_EXT_image_dma_buf_import
EGL_EXT_image_dma_buf_import_modifiers EGL_MESA_image_dma_buf_export
EGL_EXT_output_base EGL_EXT_output_drm EGL_EXT_protected_content
EGL_EXT_stream_consumer_egloutput EGL_EXT_stream_acquire_mode
EGL_EXT_sync_reuse EGL_IMG_context_priority EGL_KHR_config_attribs
EGL_KHR_create_context_no_error EGL_KHR_context_flush_control
EGL_KHR_create_context EGL_KHR_fence_sync
EGL_KHR_get_all_proc_addresses EGL_KHR_partial_update
EGL_KHR_swap_buffers_with_damage EGL_KHR_no_config_context
EGL_KHR_gl_colorspace EGL_KHR_gl_renderbuffer_image
EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_3D_image
EGL_KHR_gl_texture_cubemap_image EGL_KHR_image EGL_KHR_image_base
EGL_KHR_reusable_sync EGL_KHR_stream EGL_KHR_stream_attrib
EGL_KHR_stream_consumer_gltexture EGL_KHR_stream_cross_process_fd
EGL_KHR_stream_fifo EGL_KHR_stream_producer_eglsurface
EGL_KHR_surfaceless_context EGL_KHR_wait_sync EGL_NV_nvrm_fence_sync
EGL_NV_quadruple_buffer EGL_NV_stream_consumer_eglimage
EGL_NV_stream_cross_display EGL_NV_stream_cross_object
EGL_NV_stream_cross_process EGL_NV_stream_cross_system
EGL_NV_stream_dma EGL_NV_stream_flush EGL_NV_stream_metadata
EGL_NV_stream_remote EGL_NV_stream_reset EGL_NV_stream_socket
EGL_NV_stream_socket_inet EGL_NV_stream_socket_unix
EGL_NV_stream_sync EGL_NV_stream_fifo_next
EGL_NV_stream_fifo_synchronous EGL_NV_stream_consumer_gltexture_yuv
EGL_NV_stream_attrib EGL_NV_stream_origin EGL_NV_system_time
EGL_NV_output_drm_flip_event EGL_NV_triple_buffer
EGL_WL_bind_wayland_display EGL_WL_wayland_eglstream
Configurations:
...
But I’m having problems with Xwayland, anything that uses OpenGL is not working in Xwayland. I think that is because Gnome-shell uses Eglstream and Xwayland tries to use GBM.
For anyone trying to get xwayland working with GBM: make sure to try nixos-unstable (works for me on 5f0194220f2402b06f7f79bba6351895facb5acb) rather than the nixpkgs-wayland overlay; something seems to have broken in Sway or wlroots such that it’s failing to register the wl_drm capability in the latest repo versions:
00:00:00.026 [INFO] [wlr] [render/wlr_renderer.c:238] Cannot get renderer DRM FD, disabling wl_drm
...
glamor: 'wl_drm' not supported
Missing Wayland requirements for glamor GBM backend
glamor: 'wl_eglstream_display' not supported
Missing Wayland requirements for glamor EGLStream backend
Failed to initialize glamor, falling back to sw
Heh, I just meant what application? I’m kind of bad at this GL stuff, I’m not even sure what the basics are for validating every single piece underneath X11/Wayland, etc. I have another thing or two to try, but not even sure if I’m checking the right thing!
(edit: or is that just sway itself starting up and falling back to SW rendering? strange that I’m not seeing that if so)
What is the best way to override the nvidia driver to create the symbolic link from libnvidia-allocator.so to nvidia-drm_gbm.so? What I’m doing now is:
Ahh, this was just with glxgears/glxinfo haha. There are some quirks that lead me to believe that it’s not completely working right, waiting on the Mesa PR to make it into staging or master before testing further.