-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Running incompatible games on wayland natively #8909
Comments
No, if the game wants to call X11 functions directly, it will call X11 functions directly (and if that makes it crash in the absence of X11, it will crash). SDL cannot change what happens when the game calls X11 functions directly. Technically something could probably reimplement the entire API of libX11 and all the associated libraries like libXext, but that would be a large project that's outside the scope of SDL, and the fact that it doesn't already exist suggests that it's probably too hard. The Wayland community has chosen to do backwards-compatibility by providing Xwayland, rather than having a library-level compatibility layer. There is a quirks mechanism in SDL2 and sdl2-compat that can force individual games to use X11 via Xwayland, instead of attempting native Wayland. Games can explicitly ask for this during startup, or in SDL 2.30.x and sdl2-compat, the library will attempt to detect some common reasons to crash/fail under native Wayland (like GLEW and Nvidia Cg) and switch to X11 automatically if they are detected. In SDL3, the expectation is that each "natively SDL3" game on Linux will either work correctly with native Wayland, or force X11 during its own startup. |
It might be possible to get this working only wrapping a subset of X11 and the Vulkan WSI, but that's still both (a) probably a fair bit of work, and (b) a dodgy hack. But it's not impossible to, for instance, get enough glX working to make Cg with wayland: https://gist.github.com/sulix/fe951daaeb4e51dfb329e5935e705cbf But using |
SDL 2.30.x will do this, too (#8812). |
i am guessing that it stems from the game’s “libvulkan.so” which might not support wayland. I think dxvk-native works when forcing it on wayland (source 1 games) |
If there's a library bundled with the game that assumes X11 and doesn't support Wayland, then that's basically the same as the game itself assuming X11 and not supporting Wayland. |
There are some applications/games that are only designed for X11 that crash when switching video driver to wayland, notably vulkan games that do not support this extension and some older games using SDL 2. Can it be solved by translating or wrapping to render it on a wayland window without use of xwayland? is it going to be on sdl3 or the sdl2 compat layer?
The text was updated successfully, but these errors were encountered: