visnkmr / netspeed_pc

Monitor live bandwidth usage/ network speed on PC. Native version also available for Android, separately.
MIT License
29 stars 3 forks source link

bug: Blank window until disabling the use of DMA-BUF renderer in WebKitGTK. #3

Open visnkmr opened 1 year ago

visnkmr commented 1 year ago

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

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: https://github.com/tauri-apps/tauri/issues/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: https://github.com/wailsapp/wails/issues/2977#issuecomment-1761765185

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 commented 1 year ago

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 commented 12 months ago

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 commented 12 months ago

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 commented 12 months ago

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.

db47h commented 12 months ago

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

visnkmr commented 12 months ago

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 commented 8 months ago

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