Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Blank window from 'webkitgtk2-4.1' bug (with temporary fix) #31

Open
scurty-labs opened this issue Oct 24, 2023 · 2 comments
Open

Comments

@scurty-labs
Copy link

scurty-labs commented Oct 24, 2023

Hello! Been using this module and it's wonderful!
I've encountered a very odd bug, and after some digging I've found a temporary workaround.
After an update to Manjaro install, building and running a ttytm.webview example project, I encountered the following error:

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 800x600: Invalid argument
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 800x600: Invalid argument
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 800x600: Invalid argument
Failed to create EGL images for DMABufs with file descriptors -1, -1 and -1

A window did show, but it was not rendering anything within.

Lots of Nvidia related things in here, and after some searching, I've found that this is also an issue with Tauri:
tauri-apps/tauri#7910
Seemed to also be discussed here on a GTK4 webkit bug post:
https://bugs.webkit.org/show_bug.cgi?id=228268
And here I found a work around posted by somebody:
wailsapp/wails#2977 (comment)

Solution:

The temporary workaround is running the following in a terminal session before running/building an app with :
export WEBKIT_DISABLE_DMABUF_RENDERER=1

Posting this incase anyone else has this issue when using this module/an updated webkit lib.

@scurty-labs scurty-labs changed the title bug: Blank window from 'webkit2gtk2-4.1' bug (with temporary fix) bug: Blank window from 'webkitgtk2-4.1' bug (with temporary fix) Oct 24, 2023
@ttytm
Copy link
Owner

ttytm commented Oct 25, 2023

Hey @scurty-labs!

thanks for the feedback 💯 and for providing a workaround for those who run into it!

This looks like a very recent bug people might run into.

@nobane
Copy link

nobane commented Mar 2, 2024

I ran into this issue trying use webkit2gtk on arch linux (with an nvidia card) and I was able to fix it without setting WEBKIT_DISABLE_DMABUF_RENDERER=1.

Here is how I fixed it:

  1. Check if you have modesetting enabled via

     cat /sys/module/nvidia_drm/parameters/modeset
    
  2. If you see printed N then you need to enable it with

     echo options nvidia_drm modeset=1 | sudo tee /etc/modprobe.d/nvidia_drm.conf
    
  3. Restart your computer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants