Created attachment 874147 [details] Script to test webkit-gtk When trying to start webkit-gtk versions 2.42.1 or 2.42.1-r410 on my computer using an nvidia gpu with proprietary drivers, I get the error `EGLDisplay Initialization failed: EGL_NOT_INITIALIZED`. The window starts, but not the browser. This is the case using the latest stable nvidia drivers. Using the latest ~amd64 nvidia-drivers, I run into webkit bug 259644 instead, reported by other users on their bugzilla. I used the python script in the attachments to test wether webkit-gtk would start. After downgrading the packages to 2.40.5 and 2.40.5-r410, both versions work without issue. This doesn't seem to be an issue with the ebuild itself, but these two versions seem to break on an accept amd64 keyword system with nvidia graphics cards.
Please also include emerge --info and any other output in full you get from webkit-gtk.
All the output I got from webkit-gtk, outside of the usual css warnings unrelated to this issue was: ` EGLDisplay Initialization failed: EGL_NOT_INITIALIZED Cannot create EGL context: invalid display (last error: EGL_SUCCESS) ` emerge --info added to the attachments
Created attachment 874151 [details] emerge-info
Maybe try updating to ~arch >=gui-libs/egl-wayland-1.1.13 (could try it with both stable and ~arch drivers). It's not much different from the currently stable snapshot beside a few commits, but some of these could "potentially" help (it's due to be stabled in a week or so). Asking given egl-wayland did need fixes for webkit-gtk in the past, but beside that I have no idea from nvidia's end (beside that nvidia and wayland is still pretty finnicky and hard to recommend "currently", 545 drivers does fix a lot of things but it's not due to be stabled being a non-production branch).
(In reply to Ionen Wolkens from comment #4) > wayland Oh and, I have been assuming(?) that this is wayland because of the error sounded like it. But just seen that your emerge --info probably does not have a global USE=wayland with that profile, so nevermind what I said if this is Xorg.
I am indeec on Xorg. For :4 I have the wayland flag enabled because I need it for development, for :4.1 I do not have it enabled. For both versions I got the issue I described. Also, I checked and I don't have the package egl-wayland installed (:4 <=2.40.5 works without it, even with the wayland useflag)
This bug also affects 2.42.3 and 2.42.3-r410
Hi, Sorry for jumping in, I'm not using nvidia as my primary card, but I could test as well since I have one, but not used as primary GPU. This looks interesting and potentially related * https://github.com/WebKit/WebKit/pull/18614 * https://bugs.webkit.org/show_bug.cgi?id=262607 (workaround) * https://bugs.webkit.org/show_bug.cgi?id=261874 (related bug) Found those patches applied by Archlinux https://gitlab.archlinux.org/archlinux/packaging/packages/webkit2gtk-4.1/-/blob/main/PKGBUILD?ref_type=heads#L105 https://gitlab.archlinux.org/archlinux/packaging/packages/webkitgtk-6.0/-/blob/main/PKGBUILD?ref_type=heads#L105 ... Regards, Branko
Thank you for your response, the workaround applied as a patch in Arch Linux didn't fix the problem, at least in my situation, but I found after some trial and error that as a workaround, if I set both WEBKIT_FORCE_DMABUF_RENDERER and __NV_PRIME_RENDER_OFFLOAD to 1, it starts to work seemingly without issue. I do get the `EGLDisplay Initialization failed: EGL_NOT_INITIALIZED` error previously mentioned and an additional error: `GTK failed to initialize GL: No available configurations for the given RGBA pixel format.`, but despite that, the webkit-gtk app I was trying to run launches and runs.
(In reply to lfpraca from comment #9) Turns out I just needed to read some more of the comments in the workaround pull request, after emerging gui-libs/egl-gbm, webkit-gtk started working just fine without my additional workaround of setting the environment variables I mentioned.
(In reply to lfpraca from comment #10) Oh and by the way, with the gui-libs/egl-gbm package, the errors I mentioned getting even when I got it working disappeared. The gui-libs/egl-gbm package is only pulled as a dependency by x11-drivers/nvidia-drivers with the wayland flag enabled, maybe it would be an option for webkit-gtk to pull it when use video_cards_nvidia