-
Notifications
You must be signed in to change notification settings - Fork 16
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
How to run Ecode natively on Wayland #404
Comments
Hi! I think I made some mistakes and it's not currently working properly. But I cannot verify it this week due to no having access to Linux systems. I did change the way ecode is build for distribution, now it's being automatically built with GitHub Actions, and I don't remember testing pure Wayland with those builds, so it's probable that something is not correct (SDL2 is being build during the process, it has X11 and Wayland activated but something might be wrong). Regarding the manual build it still requires X11 headers to build, although the error is happening due to SDL2 headers being different in your distribution: it does not have any mention to X11 and I guess it make sense but it's not expected by eepp/ecode context. I just pushed a few changes that should help you build ecode with no issues, could you pull the latest changes a try again, please? Thanks |
Hi, Thank you for looking into this. Here's what I did:
After this, Ecode starts and works fine also when the X11 DISPLAY variable has been unset. So this is a good workaround to run the current Ecode on Wayland. artist |
Great it worked. Yes, I need to check how to enable Wayland and X11 and use Wayland by default when available. That was supposed to be the SDL2 default behaviour but maybe I missed something or the version used is bugged, so first I'll update to the latest SDL2 version just in case. |
I did some investigating and found the change that happened is not in Ecode, but is in SDL; a while ago the SDL devs changed the default for SDL2 from 'wayland' to 'x11'. For SDL3 the default should still be 'wayland'. As a workaround it is possible to export SDL_VIDEODRIVER=wayland before starting Ecode. Setting this inside Ecode itself can possibly be done using SDL_SetHint as per https://wiki.libsdl.org/SDL2/SDL_SetHint |
Oh I was sure they reverted it back to Wayland by default in SDL2 too! Thanks I'll take a look. |
@artist-artix Could you do me a favour? Could you test running ecode from the default distribution (maybe use the nightly) with |
I downloaded https://github.com/SpartanJ/eepp/releases/download/nightly/ecode-linux-nightly-x86_64.tar.gz and untarred it. This makes ecode start up correcty, and using wayland. |
I made a few tests. Setting |
Thanks for you help and the upcoming patch. |
Cool! |
Issue #344 shows that on Linux, Ecode runs natively on Wayland. But when checked using xeyes, which is often used to check if an application is using X11 or not, this shows Ecode is not running on Wayland but using X11.
When the X11 specific DISPLAY variable is unset, Ecode will segfault at startup.
I tried this with Ecode built from source, and with an Ecode binary package downloaded from sourceforge; both show X11 is being used.
In another attempt I did first build SDL2 with X11 support disabled, and then tried to build Ecode against it which resulted in error:
File eepp/window/backend/SDL2/wminfo.cpp shows there is a check for these platforms:
EE_PLATFORM_WIN EE_PLATFORM_MACOS EE_X11_PLATFORM EE_PLATFORM_IOS EE_PLATFORM_ANDROID
So there does not seem to be Wayland platform support for SDL2, but maybe I'm missing something.
If Ecode can run natively on Wayland, what is required to make this work?
The text was updated successfully, but these errors were encountered: