Nvidia modeset error when trying to run egl-streams enabled mutter.

It used to work a couple of months ago using 4.7 or 4.8 kernel since updating to newer versions I get this.

[    4.427010] nvidia-modeset: Allocated GPU:0 (GPU-c2c0f616-6a4c-68eb-dab1-80f2b49c59c8) @ PCI:0000:01:00.0
[    4.572622] [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:01:00.0 on minor 0
[    7.310266] [drm:nvidia_drm_gem_import_nvkms_memory [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to import NVKMS memory to GEM object
[    7.455041] [drm:nvidia_drm_gem_import_nvkms_memory [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to import NVKMS memory to GEM object
[    7.458042] [drm:nvidia_drm_gem_import_nvkms_memory [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to import NVKMS memory to GEM object

Kernel 4.9 and greater produce the above error when starting GDM.
Mutter is compiled with the following options ‘%configure --disable-static --enable-compile-warnings=maximum --enable-egl-device --enable-installed-tests’.

Using 4.8 kernel it was possible to start GDM and run a gnome wayland session using egl-streams enabled mutter.

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

Sorry I missed this.

I’m just going to copy&paste the same comment I left on [Fedora 26] Unable to Start Any KMS/EGL Compositor That Uses EGLStream · Issue #27 · negativo17/nvidia-driver · GitHub :

I’m not sure what’s wrong/missing when installing the driver using the negativo17 repository. I spent some time last week trying to figure it out, and I was running into a variety of strange issues.

At some point, after re-installing the driver several times, and manually running akmods to build the kernel modules, I got it working.

It’s worth mentioning that using our official .run installer, everything worked out of the box, and other users reporting similar issues have been able to get it working too using the official installer.

The main issue I was facing was that nvidia-modeset wouldn’t be able to create the /dev/nvidiactl device node, needed for the EGLDevice extensions to enumerate all NVIDIA devices. Since EGL would fail to find any devices, the EGL_EXT_device_base client extension wouldn’t be reported. Mutter would then fail to initialize the EGLDevice backend and try with GBM, which, in the best-case scenario would fall back to software rendering. nvidia-drm would then report those error messages.

Adding a udev rules file to create the missing device nodes solved the issue, thank you for the pointer.