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 until disabling the use of DMA-BUF renderer in WebKitGTK. #3

Open
visnkmr opened this issue Oct 29, 2023 · 7 comments
Labels

Comments

@visnkmr
Copy link
Owner

visnkmr commented Oct 29, 2023

I've encountered a very odd bug, and after some digging I've found a temporary workaround.
My System Specs:

  • Nvidia 3000 series GPU.
  • Ryzen 5000 series CPU.

After an update to Manjaro install, building and running the project, I encountered the following error:

KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Permission denied
Failed to create GBM buffer of size 350x40: Permission denied
KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Permission denied
Failed to create GBM buffer of size 350x40: Permission denied
KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Permission denied
Failed to create GBM buffer of size 350x40: Permission denied
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.

After some searching, I've found that this is already reported on 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 app/an updated webkit lib using project.

@db47h
Copy link

db47h commented Nov 2, 2023

Check out https://bugs.webkit.org/show_bug.cgi?id=261874#c32 (Comment 32). This blank page issue seems to have different possible causes. In your case this may be a missing library.

EDIT: I'm on Manjaro as well, and get a blank window, but not the error messages. In the webkit bug I linked, some later comments mentioned that the issue was gone following a recent nv driver update, but it didn't help for me.

@visnkmr
Copy link
Owner Author

visnkmr commented Nov 9, 2023

Check out https://bugs.webkit.org/show_bug.cgi?id=261874#c32 (Comment 32). This blank page issue seems to have different possible causes. In your case this may be a missing library.

EDIT: I'm on Manjaro as well, and get a blank window, but not the error messages. In the webkit bug I linked, some later comments mentioned that the issue was gone following a recent nv driver update, but it didn't help for me.

issue also present in browser epiphany as well. shows blank page as well untill i disable the use of DMA-BUF renderer in WebKitGTK.

@db47h
Copy link

db47h commented Nov 10, 2023

issue also present in browser epiphany as well. shows blank page as well untill i disable the use of DMA-BUF renderer in WebKitGTK.

Same for me. All software that uses webkit2gtk is affected, so this should give this issue enough visibility to get an upstream fix sometime, soon. ish.

In the meantime, this got patched in arch linux (by disabling dma buf), and just got into Manjaro as well. There's also a workaround now in wails too (see #2977), so that end users don't even see the problem regardless of their distro. The plan is to keep that other issue open until this is properly fixed upstream. If that's ok with you, I think we could close this issue as a dupe of #2977.

@visnkmr
Copy link
Owner Author

visnkmr commented Nov 10, 2023

If I close the issue right now anyone visiting issues section in netspeed_pc repo will not know about it. So keeping the issue open till its fixed upstream seems like a better option from the POV of users of netspeed app.

@visnkmr visnkmr changed the title bug: Blank window from 'webkitgtk2-4.1' bug (with temporary fix) bug: Blank window until disabling the use of DMA-BUF renderer in WebKitGTK. Nov 10, 2023
@db47h
Copy link

db47h commented Nov 10, 2023

And... I'm dumb, I didn't notice this issue isn't in the same repo, sorry bout that.

@visnkmr
Copy link
Owner Author

visnkmr commented Nov 10, 2023

And... I'm dumb, I didn't notice this issue isn't in the same repo, sorry bout that.

No prob. Thanks for your time, feedback and support regarding the issue.

@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
Projects
None yet
Development

No branches or pull requests

3 participants