No EGL support on Wayland with eGPU, also no GBM

I have an 4060 eGPU setup with my Dell XPS13 laptop on Arch and am trying to run wayland only on the nvidia card: WLR_DRM_DEVICES=(only my egpu). I have nvidia drm modesetting and fbdev enabled via modprobe.conf (I don’t load nvidia drivers at boot).

Unfortunately I can’t get EGL working on nvidia in wlroots (sway, hyprland). EGL apps (incl., eg, eglgears_wayland) report

libEGL warning: egl: failed to create dri2 screen

…then fall back to zink(?). eglinfo reports ‘EGL driver name: zink’. Vulkan and xwayland apps work as expected on wlroots with the nvidia driver doing the rendering. I am using the gles2 wlroots backend renderer, but the issue remains when using the vulkan backend.

Additionally I can’t seem to use GBM, despite

GBM_BACKEND=nvidia-drm
__GLX_VENDOR_LIBRARY_NAME=nvidia

…and filling all the requirements here: https://download.nvidia.com/XFree86/Lin … E/gbm.html in eglinfo I still see

GBM platform:
eglinfo: eglInitialize failed

% journalctl -b 0 --grep "renderer for"
-- No entries --

I’m wondering if my igpu is still interfering somehow; note that despite being off the laptop’s display still appears in inxi, and iris (for the intel igpu) is still listed as a driver for EGL and the wayland server.

Any help and ideas are appreciated.

System info:

% inxi -G
Graphics:
  Device-1: Intel TigerLake-LP GT2 [Iris Xe Graphics] driver: i915 v: kernel
  Device-2: NVIDIA AD107 [GeForce RTX 4060] driver: nvidia v: 555.58
  Device-3: Logitech C922 Pro Stream Webcam driver: snd-usb-audio,uvcvideo
    type: USB
  Device-4: Microdia Integrated_Webcam_HD driver: uvcvideo type: USB
  Display: wayland server: X.org v: 1.21.1.13 with: Xwayland v: 24.1.0
    compositor: Sway v: 1.10-dev-28fd7358 driver: X: loaded: modesetting,nvidia
    dri: iris gpu: i915,nvidia,nvidia-nvswitch resolution: 1: 3840x2160~60Hz
    2: 3840x2400
  API: EGL v: 1.5 drivers: iris,nvidia,swrast,zink
    platforms: wayland,x11,surfaceless,device
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: nvidia mesa v: 555.58
    renderer: NVIDIA GeForce RTX 4060/PCIe/SSE2
  API: Vulkan v: 1.3.279 drivers: nvidia,intel surfaces: xcb,xlib,wayland

installed packages:

% pacman -Qs nvidia wayland
local/egl-wayland 2:1.1.13-2
    EGLStream-based Wayland external platform
local/lib32-egl-wayland 1.1.13-1
    EGLStream-based Wayland external platform (32-bits)

% pacman -Qs wlroots
local/azote 1.12.9-1
    Wallpaper & color manager for wlroots-based compositors and some X11 WMs
local/hyprland-git 0.41.2.r25.22138ac2-1
    A dynamic tiling Wayland compositor based on wlroots that doesn't sacrifice on its looks.
local/tofi 0.9.1-2
    Tiny rofi / dmenu replacement for wlroots-based Wayland compositors.
local/waybar 0.10.3-1
    Highly customizable Wayland bar for Sway and Wlroots based compositors
local/wdisplays 1.1.1-1
    GUI display configurator for wlroots compositors
local/wlroots-git 0.18.0.r7117.59138460-1
    Modular Wayland compositor library (git development version)
local/wlroots-git-debug 0.18.0.r7117.59138460-1
    Detached debugging symbols for wlroots-git
local/wofi 1.4.1-1
    launcher for wlroots-based wayland compositors
local/xdg-desktop-portal-wlr 0.7.0-2

% yay -Qs nvidia
local/cuda 12.5.0-1
    NVIDIA's GPU programming toolkit
local/egl-wayland 2:1.1.13-2
    EGLStream-based Wayland external platform
local/ffnvcodec-headers 12.2.72.0-1
    FFmpeg version of headers required to interface with Nvidias codec APIs
local/gwe 0.15.9-1
    A system utility for controlling NVIDIA GPUs
local/lib32-egl-wayland 1.1.13-1
    EGLStream-based Wayland external platform (32-bits)
local/lib32-libvdpau 1.5-2
    Nvidia VDPAU library
local/lib32-nvidia-utils 555.58-1
    NVIDIA drivers utilities (32-bit)
local/libvdpau 1.5-2
    Nvidia VDPAU library
local/libxnvctrl 555.58-1
    NVIDIA NV-CONTROL X extension
local/nvidia 555.58-2
    NVIDIA drivers for linux
local/nvidia-prime 1.0-4
    NVIDIA Prime Render Offload configuration and utilities
local/nvidia-settings 555.58-1
    Tool for configuring the NVIDIA graphics driver
local/nvidia-utils 555.58-2
    NVIDIA drivers utilities
local/nvidia-xrun 0.3-0
    Script to run dedicated X server with discrete nvidia graphics
local/nvtop 3.1.0-1
    GPUs process monitoring for AMD, Intel and NVIDIA
local/opencl-nvidia 555.58-2
    OpenCL implemention for NVIDIA

% yay -Qs mesa
local/glu 9.0.3-1
    Mesa OpenGL utility library
local/lib32-glu 9.0.3-1
    Mesa OpenGL utility library (32 bits)
local/lib32-mesa 1:24.1.2-1
    Open-source OpenGL drivers - 32-bit
local/lib32-mesa-utils 9.0.0-1
    Essential Mesa utilities (32-bit)
local/lib32-vulkan-mesa-layers 1:24.1.2-1
    Mesa's Vulkan layers - 32-bit
local/mesa 1:24.1.2-1
    Open-source OpenGL drivers
local/mesa-demos 9.0.0-4
    Mesa demos
local/mesa-utils 9.0.0-4
    Essential Mesa utilities
local/opencl-clover-mesa 1:24.1.2-1
    Open-source OpenCL drivers - Clover variant
local/opencl-rusticl-mesa 1:24.1.2-1
    Open-source OpenCL drivers - RustICL variant
local/vulkan-mesa-layers 1:24.1.2-1
    Mesa's Vulkan layers

eglinfo forcing nvidia egl:

% __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/10_nvidia.json eglinfo -B
GBM platform:
eglinfo: eglInitialize failed

Wayland platform:
eglinfo: eglInitialize failed

X11 platform:
eglinfo: eglInitialize failed

Surfaceless platform:
EGL API version: 1.5
EGL vendor string: NVIDIA
EGL version string: 1.5
EGL client APIs: OpenGL_ES OpenGL
OpenGL core profile vendor: NVIDIA Corporation
OpenGL core profile renderer: NVIDIA GeForce RTX 4060/PCIe/SSE2
OpenGL core profile version: 4.6.0 NVIDIA 555.58
OpenGL core profile shading language version: 4.60 NVIDIA
OpenGL compatibility profile vendor: NVIDIA Corporation
OpenGL compatibility profile renderer: NVIDIA GeForce RTX 4060/PCIe/SSE2
OpenGL compatibility profile version: 4.6.0 NVIDIA 555.58
OpenGL compatibility profile shading language version: 4.60 NVIDIA
OpenGL ES profile vendor: NVIDIA Corporation
OpenGL ES profile renderer: NVIDIA GeForce RTX 4060/PCIe/SSE2
OpenGL ES profile version: OpenGL ES 3.2 NVIDIA 555.58
OpenGL ES profile shading language version: OpenGL ES GLSL ES 3.20

eglinfo falling back to zink:

% eglinfo -B
GBM platform:
eglinfo: eglInitialize failed

Wayland platform:
libEGL warning: egl: failed to create dri2 screen
EGL API version: 1.5
EGL vendor string: Mesa Project
EGL version string: 1.5
EGL client APIs: OpenGL OpenGL_ES
OpenGL core profile vendor: Mesa
OpenGL core profile renderer: zink Vulkan 1.3(NVIDIA GeForce RTX 4060 (NVIDIA_PROPRIETARY))
OpenGL core profile version: 4.6 (Core Profile) Mesa 24.1.2-arch1.1
OpenGL core profile shading language version: 4.60
OpenGL compatibility profile vendor: Mesa
OpenGL compatibility profile renderer: zink Vulkan 1.3(NVIDIA GeForce RTX 4060 (NVIDIA_PROPRIETARY))
OpenGL compatibility profile version: 4.6 (Compatibility Profile) Mesa 24.1.2-arch1.1
OpenGL compatibility profile shading language version: 4.60
OpenGL ES profile vendor: Mesa
OpenGL ES profile renderer: zink Vulkan 1.3(NVIDIA GeForce RTX 4060 (NVIDIA_PROPRIETARY))
OpenGL ES profile version: OpenGL ES 3.2 Mesa 24.1.2-arch1.1
OpenGL ES profile shading language version: OpenGL ES GLSL ES 3.20

X11 platform:
libEGL warning: egl: failed to create dri2 screen
EGL API version: 1.5
EGL vendor string: Mesa Project
EGL version string: 1.5
EGL client APIs: OpenGL OpenGL_ES
OpenGL core profile vendor: Mesa
OpenGL core profile renderer: zink Vulkan 1.3(NVIDIA GeForce RTX 4060 (NVIDIA_PROPRIETARY))
OpenGL core profile version: 4.6 (Core Profile) Mesa 24.1.2-arch1.1
OpenGL core profile shading language version: 4.60
OpenGL compatibility profile vendor: Mesa
OpenGL compatibility profile renderer: zink Vulkan 1.3(NVIDIA GeForce RTX 4060 (NVIDIA_PROPRIETARY))
OpenGL compatibility profile version: 4.6 (Compatibility Profile) Mesa 24.1.2-arch1.1
OpenGL compatibility profile shading language version: 4.60
OpenGL ES profile vendor: Mesa
OpenGL ES profile renderer: zink Vulkan 1.3(NVIDIA GeForce RTX 4060 (NVIDIA_PROPRIETARY))
OpenGL ES profile version: OpenGL ES 3.2 Mesa 24.1.2-arch1.1
OpenGL ES profile shading language version: OpenGL ES GLSL ES 3.20

Surfaceless platform:
EGL API version: 1.5
EGL vendor string: NVIDIA
EGL version string: 1.5
EGL client APIs: OpenGL_ES OpenGL
OpenGL core profile vendor: NVIDIA Corporation
OpenGL core profile renderer: NVIDIA GeForce RTX 4060/PCIe/SSE2
OpenGL core profile version: 4.6.0 NVIDIA 555.58
OpenGL core profile shading language version: 4.60 NVIDIA
OpenGL compatibility profile vendor: NVIDIA Corporation
OpenGL compatibility profile renderer: NVIDIA GeForce RTX 4060/PCIe/SSE2
OpenGL compatibility profile version: 4.6.0 NVIDIA 555.58
OpenGL compatibility profile shading language version: 4.60 NVIDIA
OpenGL ES profile vendor: NVIDIA Corporation
OpenGL ES profile renderer: NVIDIA GeForce RTX 4060/PCIe/SSE2
OpenGL ES profile version: OpenGL ES 3.2 NVIDIA 555.58
OpenGL ES profile shading language version: OpenGL ES GLSL ES 3.20

Device platform:
Device #0:

Platform Device platform:
EGL API version: 1.5
EGL vendor string: NVIDIA
EGL version string: 1.5
EGL client APIs: OpenGL_ES OpenGL
OpenGL core profile vendor: NVIDIA Corporation
OpenGL core profile renderer: NVIDIA GeForce RTX 4060/PCIe/SSE2
OpenGL core profile version: 4.6.0 NVIDIA 555.58
OpenGL core profile shading language version: 4.60 NVIDIA
OpenGL compatibility profile vendor: NVIDIA Corporation
OpenGL compatibility profile renderer: NVIDIA GeForce RTX 4060/PCIe/SSE2
OpenGL compatibility profile version: 4.6.0 NVIDIA 555.58
OpenGL compatibility profile shading language version: 4.60 NVIDIA
OpenGL ES profile vendor: NVIDIA Corporation
OpenGL ES profile renderer: NVIDIA GeForce RTX 4060/PCIe/SSE2
OpenGL ES profile version: OpenGL ES 3.2 NVIDIA 555.58
OpenGL ES profile shading language version: OpenGL ES GLSL ES 3.20

Device #1:

Platform Device platform:
EGL API version: 1.5
EGL vendor string: Mesa Project
EGL version string: 1.5
EGL client APIs: OpenGL OpenGL_ES
OpenGL core profile vendor: Intel
OpenGL core profile renderer: Mesa Intel(R) Xe Graphics (TGL GT2)
OpenGL core profile version: 4.6 (Core Profile) Mesa 24.1.2-arch1.1
OpenGL core profile shading language version: 4.60
OpenGL compatibility profile vendor: Intel
OpenGL compatibility profile renderer: Mesa Intel(R) Xe Graphics (TGL GT2)
OpenGL compatibility profile version: 4.6 (Compatibility Profile) Mesa 24.1.2-arch1.1
OpenGL compatibility profile shading language version: 4.60
OpenGL ES profile vendor: Intel
OpenGL ES profile renderer: Mesa Intel(R) Xe Graphics (TGL GT2)
OpenGL ES profile version: OpenGL ES 3.2 Mesa 24.1.2-arch1.1
OpenGL ES profile shading language version: OpenGL ES GLSL ES 3.20

Device #2:

Platform Device platform:
libEGL warning: egl: failed to create dri2 screen
libEGL warning: egl: failed to create dri2 screen
libEGL warning: egl: failed to create dri2 screen
eglinfo: eglInitialize failed

Device #3:

Platform Device platform:
EGL API version: 1.5
EGL vendor string: Mesa Project
EGL version string: 1.5
EGL client APIs: OpenGL OpenGL_ES
OpenGL core profile vendor: Mesa
OpenGL core profile renderer: llvmpipe (LLVM 17.0.6, 256 bits)
OpenGL core profile version: 4.5 (Core Profile) Mesa 24.1.2-arch1.1
OpenGL core profile shading language version: 4.50
OpenGL compatibility profile vendor: Mesa
OpenGL compatibility profile renderer: llvmpipe (LLVM 17.0.6, 256 bits)
OpenGL compatibility profile version: 4.5 (Compatibility Profile) Mesa 24.1.2-arch1.1
OpenGL compatibility profile shading language version: 4.50
OpenGL ES profile vendor: Mesa
OpenGL ES profile renderer: llvmpipe (LLVM 17.0.6, 256 bits)
OpenGL ES profile version: OpenGL ES 3.2 Mesa 24.1.2-arch1.1
OpenGL ES profile shading language version: OpenGL ES GLSL ES 3.20

NB I also have a post going on the Arch forum at nvidia can't initialize EGL on wlroots (also no GBM) / Applications & Desktop Environments / Arch Linux Forums

nvidia-bug-report.log.gz (870.2 KB)