I’m having issues with the UnrealEditor scaling with X11, so I thought I’d set SDL_VIDEODRIVER=wayland to see if that fixes any issues.
Unfortunately it does not work:
[2023.08.14-23.28.17:024][ 0]LogInit: Initializing SDL.
[2023.08.14-23.28.17:024][ 0]LogInit: Warning: Could not initialize SDL: wayland not available
[2023.08.14-23.28.17:024][ 0]LogInit: - Physical RAM available (not considering process quota): 63 GB (64194 MB, 65735120 KB, 67312762880 bytes)
[2023.08.14-23.28.17:024][ 0]LogInit: - VirtualMemoryAllocator pools will grow at scale 1.4
[2023.08.14-23.28.17:024][ 0]LogInit: - MemoryRangeDecommit() will be a no-op (re-run with -vmapoolevict to change)
[2023.08.14-23.28.17:024][ 0]LogInit: - PageSize 4096
[2023.08.14-23.28.17:024][ 0]LogInit: - BinnedPageSize 65536
[2023.08.14-23.28.17:024][ 0]LogCsvProfiler: Display: Metadata set : extradevelopmentmemorymb="0"
[2023.08.14-23.28.17:029][ 0]LogInit: Physics initialised using underlying interface: Chaos
[2023.08.14-23.28.17:042][ 0]LogInit: Using OS detected language (en-GB).
[2023.08.14-23.28.17:042][ 0]LogInit: Using OS detected locale (en-GB).
[2023.08.14-23.28.17:043][ 0]LogTextLocalizationManager: No specific localization for 'en-GB' exists, so 'en' will be used for the language.
[2023.08.14-23.28.17:160][ 0]LogInit: Initializing SDL.
[2023.08.14-23.28.17:160][ 0]LogInit: Warning: Could not initialize SDL: wayland not available
[2023.08.14-23.28.17:160][ 0]LogInit: Warning: FLinuxSplashState::InitSplashResources() : InitSDL() failed, there will be no splash.
[2023.08.14-23.28.17:160][ 0]LogInit: Initializing SDL.
[2023.08.14-23.28.17:160][ 0]LogInit: Warning: Could not initialize SDL: wayland not available
[2023.08.14-23.28.17:160][ 0]LogInit: Error: FLinuxApplication::CreateLinuxApplication() : InitSDL() failed, cannot create application instance.
[2023.08.14-23.28.17:160][ 0]LogCore: FUnixPlatformMisc::RequestExit(bForce=true, ReturnCode=1)
[2023.08.14-23.28.17:160][ 0]LogCore: FUnixPlatformMisc::RequestExit(1)
I am assuming it is linked against different binaries?
I’m stuck with this problem too. SDL2 is in ThirdParty/ and is probably built without Wayland support, unfortunately. If there is a way to compile it with all available drivers, it would be great. Or alternatively use the system library instead.
For now, I cannot use the editor in X11 due to redrawing problems and neither can run it on Wayland.
I assume that it is linking UnrealEditor (or the module) with the Unix/ variant. Unfortunately, I could not get ./Build.sh to be verbose or veryverbose to check what is
happening in detail.
My questions are now…
How do I rebuild UnrealEditor, using one of my rebuilt libSDL2.a?
How do I clean the build that I can rebuild everything, alternatively?
How do I run UnrealBuildTool to be verbose to, at least, check what is going on?
I got as far as you did following your instructions. I can follow the steps to get a SDL .a build with Wayland support. However, running the engine (even after fully rebuilding it) does indeed not use our Wayland-enabled SDL2, as it still fails to run. I can force it to use my system SDL2 lib by defining SDL_DYNAMIC_API=/usr/share/libSDL2.so, but it crashes shortly after opening the initial project list window. My attempt to get it working is documented here: Mat: "@PJB thanks! This does get it to run on Wayland, …" - Gamedev Mastodon
I could not build this with the build.sh script in the SDL2 directory, as my system stdlib wont link with the SDK’s version. The only way I could build it was by running the RunMe.sh script in SDL2/docker, which automatically copies it to the right directory when its donw. This also fails because the version of SDL2 in the tree requires a newer libwayland-client than CentOS 7 has. So, here are all the changes I had to make:
Quite a pain but the end result is that wayland seems to work quite nicely. I’m running the NVIDIA proprietary driver on arch linux gnome wayland session, and running with xwayland was super glitchy for me. Now with native SDL wayland, it’s usable as far as I can tell.
I cannot figure out how to do this, cannot find this runme.sh file (maybe cuz i’m using the precompiled linux binaries? maybe a version difference?). I ended up just setting up i3 and switching between TTYs to run the editor lol.
I’ve submitted a bug report though (or tried to at least, i don’t see my report on their issue tracker so who knows), hopefully they fix it soon.