[Webkit-unassigned] [Bug 261874] [GTK] Rendering broken with 2.42 on NVIDIA graphics

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 18 02:04:32 PDT 2023


https://bugs.webkit.org/show_bug.cgi?id=261874

--- Comment #32 from Carlos Garcia Campos <cgarcia at igalia.com> ---
The problem with NVIDIA is that there are several issues all of them causing the same result, a blank screen. And all possible combinations of GTK3, GTK4, X11 and Wayland makes it even more complex. After several bug reports and my own trying this is what I've found so far:

If you get errors like:

KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Permission denied
Failed to create GBM buffer of size 1148x893: Permission denied

it's probably because the nvidia gbm library is not installed (I don't know why it's not always installed as part of the driver). In this case, EGL display claims to support GBM platform, so we use it, but apparently it's mesa using llvmpipe renderer, so the KMS backend is used and we fail to allocate buffers. This could be fixed just installing the gbm nvidia library.

If you get errors like:

src/nv_gbm.c:99: GBM-DRV error (nv_gbm_bo_create): DRM_IOCTL_NVIDIA_GEM_ALLOC_NVKMS_MEMORY failed (ret=-1)
Failed to create GBM buffer of size 3840x2160: Invalid argument

in this case it's clear that the nvidia GBM library is used, but you probably don't have modeset enabled, check the output of /sys/module/nvidia_drm/parameters/modeset if you get N, then try enabling it.

If GBM lib is installed and modeset enabled and you still get a white screen:

I guess you are under X11. In this case I think we are failing to map the imported DMA-BUF, gbm_bo_map() fails, but I still don't know why. A possible workaround if you are using GTK4 if to use GDK_DEBUG=gl-egl to force GTK to use EGL, so that we don't need to map the imported buffer. There's no workaround for GTK3, we need to figure out why gbm_bo_map is failing and fix it.

I'm not sure if there are more issues, I guess people using old nvidia drivers not supporing GBM will also see the KMS permission denied errors. Maybe we can try to detect all those situations and simply disable DMA-BUF renderer in those cases or even accelerated compositing mode.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20231018/4f0b53fc/attachment.htm>


More information about the webkit-unassigned mailing list