-
Notifications
You must be signed in to change notification settings - Fork 47
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
Explicit sync causes bgfx examples to crash when running in Wayland session #142
Comments
The issue with that protocol error on Vulkan is a fix we have internally which will be in a future release. I can't reproduce any issues on GL native wayland or Xwayland (GL and Vulkan) however. |
Great to hear, thanks for looking into this!
Are you saying that the examples app starts normally? May I ask how are you starting it? On Fedora, SDL wayland videodriver is the default, so my exact command line is:
With wayland and GL, it appears that the examples app does not really crash, but rather shuts down without displaying anything. |
My GPU is an RTX 2070 and I am running the proprietary kernel module in case this matters. |
Those are pretty much the exact commands I used, except my build ended up being a release build so the binary was |
I am testing with the debug build. I will try release later and report back. |
I also get crashes using the release build. Strange. Could this be GPU-specific? Or caused by using the proprietary kernel driver? |
Here is my eglinfo output:
|
And you don't get crashes with the debug build? If yes, this usually points to a race condition depending on tight timing. |
I get crashes in both. I was referring to @amshafer not seeing issues with GL on wayland or any crashes with xwayland. |
Is this the protocol error you are referring to: |
565.57.01 does not fix the issue unfortunately. |
There have been some Wayland fixes in bgfx recently. With current git (bkaradzic/bgfx@4bc6529) and 565.57.01 nvidia driver there is an improvement:
I will be posting logs in separate comments, but |
Updated log of Wayland with Vulkan
|
Updated log of Wayland with GL
|
Updated log of XWayland with GL
|
Are you sure bgfx is calling eglDestroySurface properly? I don't see any calls to That would also explain why this still happens on 565 with Vulkan, since the fix I mentioned previously is in that release. |
I have relayed your comment to bgfx developers as I cannot answer the question myself. I will report back if I get an answer. |
If egl-wayland even allows more than one EGLSurface to be created at the same time form the same wl_surface, then that would be a bug in and of itself. From the EGL spec:
I think it does check for that, though, since it checks and assigns to the |
Now that I think about it, checking for a duplicate |
I installed the latest egl-wayland snapshot and tested again. I am not seeing any changes unfortunately, but I am not seeing |
Posting here since there is a lot of other traffic on nvidia forums [0].
On Fedora 40 x86_64 with nvidia driver 560.35.03 and egl-wayland 1.1.16, attempting to start bgfx examples under wayland crashes regardless of the renderer or the SDL videodriver. In order to reproduce:
cd examples/runtime
../../.build/linux64_gcc/bin/examplesDebug
Defining
__NV_DISABLE_EXPLICIT_SYNC=1
allows both Vulkan and OpenGL. Using x11 SDL videodriver is also not working, but likely due to different reasons [2]. I have also reported this to bgfx [3] given that the recent explicit-sync-related firefox crashes required fixes both in firefox and in egl-wayland.With
WAYLAND_DEBUG=1
the following error can be observed:[0] https://forums.developer.nvidia.com/t/explicit-sync-causes-bgfx-examples-to-crash-when-running-in-wayland-session/304484
[1] Building — bgfx 1.127.8709 documentation 3
[2] https://forums.developer.nvidia.com/t/hardware-egl-not-working-on-wayland-libegl-warning-egl-failed-to-create-dri2-screen/262167
[3] Crashes on Wayland with nvidia driver 560.35.03 · Issue #3342 · bkaradzic/bgfx · GitHub
The text was updated successfully, but these errors were encountered: