-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
OBS crashes with explicit sync on wayland #11022
Comments
Without remembering any OBS code:
|
OBS draws directly into the QWidget for all displays (OBS rendered content), perhaps the project is using a different setting that causes the shm to be attached. |
I am also experiencing this issue or something similar. It seems to somewhat fix itself but it has reappeared today after installing openrazer. |
I posted a question about mixing app and GL buffer attaches on wayland that might be relevant here: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/211 |
I'm pretty sure removing https://github.com/obsproject/obs-studio/blob/master/UI/window-projector.cpp#L41-L44 will resolve this for people experiencing issues. Unfortunately a real solution is a bit more complicated assuming this really does work. |
I believe the problematic code also causes the following issue: When resizing a projector window, the window becomes transparent. flicker.mp4 |
Can confirm this still occurs under the Flatpak version on KDE Plasma 6.2.0/QT Ver 6.7.2 / Nvidia 1080ti (driver 560.35.03). When trying to open the windowed projector I get this:
And then OBS crashes |
@kkartaltepe I tried building a Flatpak from master today with the "WA_PaintOnScreen" part removed as you suggested. At first sight, it works nicely for me under Wayland (KDE 6.2.1), including resizing the windowed projector smoothly. When running this modified version under X11, however, resizing the projector window freezes rendering in OBS until after I stop resizing the window, causing framedrops. I don't know what possible other drawbacks there could be when running this modified version under Wayland, but if it works nicely, could it be a solution to conditionally set WA_PaintOnScreen if running under X11 only? Edit: Here's a suggestion for conditionally setting the attribute: OchiLive@d2189ab - feel free to try it out and let me know if it may be worthwhile to make a pull request out of it. Maybe it should be tested in various desktop environments. |
i get this error on OBS 31.0.1, any news about it ? |
This is not an OBS issue, I get exactly the same problem using looking-glass.io, the fix (well workaround) is to add "__NV_DISABLE_EXPLICIT_SYNC=1" to your environment variables or downgrade egl-wayland to version 1.1.13 (but I don't recommend that). |
Yes this is an obs issue and we have a tentative fix pending, however there are even more bugs and broken behavior in Qt with the "correct" qwidgets. So until we find suitable workarounds to avoid breaking more people you will have to workaround your nvidia situation. |
@kkartaltepe what other explicit sync related Qt issues are you referring to? |
The remaining issues are unrelated to explicit sync, and just the regular wayland issues that qt and gnome cant agree on how the wayland protocol works, or just plain bugs in qt. |
If there are bugs in Qt + Wayland please do reach out to the QtWayland maintainer (me), I can help fix anything either here or upstream. |
You are free to remove the workaround from #11773 and test the fullscreen/windowing functionality on gnome. Its unlikely I would ever have the time to try and craft a minimal reproducer for a Qt bug report, and its pretty low value since any fixes in qt wont be usable by downstreams like us for at least 2 years anyway due to distro and qt release processes. |
Operating System Info
Other
Other OS
Arch Linux
OBS Studio Version
30.1.2
OBS Studio Version (Other)
No response
OBS Studio Log URL
https://obsproject.com/logs/WQGyYH2S1OMk7op4
OBS Studio Crash Log URL
No response
Expected Behavior
OBS does not crash.
Current Behavior
OBS crashes.
Steps to Reproduce
Start OBS under a wayland compositor that supports explicit sync and with graphics drivers that support explicit sync. With up-to-date nvidia drivers, that should always be the case. With mesa, you will also have to set the environment variable
MESA_LOADER_DRIVER_OVERRIDE=zink
to ensure that vulkan is being used under the hood.After starting OBS, right click on the preview and select
Windowed Projector (Preview)
. You might have to repeat this several times.OBS crashes.
Anything else we should know?
I am reasonably certain that this is caused by the following series of events:
The last step is unsound. QT must not not manipulate the surface buffer while the surface is owned by an OpenGL or Vulkan context. I believe that that much is required by the OpenGL and Vulkan specifications.
The question is if QT is in the wrong here (although I don't see how, QT seems to know nothing about OBS creating on OpenGL context) or if this is an OBS bug because OBS creates an OpenGL context without properly informing QT about this.
@davidedmundson can you comment on the above?
The text was updated successfully, but these errors were encountered: