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
Consider providing a build for Wayland #10915
Comments
After reading a bit, it looks like the best way to achieve this would be to enable ozone in the chromium build. So I wanted to know if someone ever did that or if i could get a few pointers to try it out ? |
Further look in the build shows that electron depends on chromium libgtkui. I'm not sure what |
I have managed to patch libchromiumcontent to make it build without X11. libchromiumcontent can be built in that case with Then I started the electron build and the situation is similar. Although most of the code has some There are also bits in the brightray GYP files that make it X11 dependent, a wayland version would need there to link with the right displaymanager libs ( I believe that the best way to make it buildable without too much hassle on linux and without X11 support, would be to make the libgtk3ui component use optionnal in the build. But I don't know electron enough to know what this would break / make unavailable. it seems it's mostly taskbar icons, which wouldn't matter much as there is no taskbar in weston anyways :) I guess i'll stop my attempt here as that makes too many patches and there has been no interest / feedback on this from electron team at this point :) |
This would allow running via a hack on ChromeOS as well. |
That has piqued my interest a bit, can you explain how that would work? |
Latest chromeos devices, the ones that bundle android runtime use wayland to display non-chrome apps. I have sucessfully compiled and run a hello wayland demo. |
ChromeOS uses Aura & Ozone, either with Wayland or GBM/KMS. |
Nice progress @LongChair ! |
I was able to compile and run chromium with wayland patches! See the build script here: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=chromium-wayland-git |
@onny : well as i meantionned before, it seems that a lot of X11 dependencies are still in electron itself because if the use of libgtkui in the libcc build. As far as i have seen electron also handles AURA as a build parameter but then assumes that aura/x11 is used. so there is not way currently to get it to build without X11. it will run on Xwayland / Wayland but this is far from bringing the wayland performance, especially on embedded. |
Oh that is interesting:
👍 |
@onny : yes that is what chromium 61 brings. this is progress. What i'm looking for is a full native wayland version of electron as X11 (Xwayland) tends to take the overal performance down by a bunch. I am not sure how that X11 dependency could be overcome. The following things would be required :
It would have been nice if some electron devs could evaluate that or bring some feedback / techincal considerations here :) |
Any news on this? |
hi! I just wanted to share that we (from Igalia) have support for Wayland in both Chromium (the browser) and Content (the embedding layer) levels in https://github.com/Igalia/chromium/. So depending on how one configures electron on top of a regular chromium/x11 build today, it might be really straightforward to try it out on top of chromium/wayland. The biggest differences are that:
please reach me out at \tonikitoo at igalia dot com\, if one wants to follow up on this. |
does anyone find a solution to run Electron without X11? |
@tonikitoo do you have any indication of when your work on Wayland will be integrated back upstream? |
@luispabon the work is being actively upstream. We estimate that about 85% is already in chromium's mainline. /cc @msisov |
@tonikitoo excelente 👍 |
hi @tonikitoo, any good news regarding electron with xwayland, wayland or weston? |
we are not working on electron, but rather adding support for wayland in Chromium :) crbug.com/578890 |
I think sway does. |
Indeed, wlroots implement |
Version 12 of Electron with the initial Wayland support has just been released 🎉 . |
Okay so electron is released, but can you tell me where you found that “Wayland” statement? I searched the whole electron changelog and cant find a word about Wayland! |
There is nothing in the release notes about Wayland. I'm not sure what the criteria is for something to be mentioned in the release notes, but the Wayland support seems to be there and can be tested by installing the latest version and running:
|
This is a Chromium feature. Check Chromium's changelog for the Wayland news. This issue can be closed. |
Has someone tested this feature? |
I've been using Electron on Wayland for months now. Many people I know have, too. |
Okay well that parameter worked fine but my window doesn't have borders or a top bar and I cannot move or resize the window 🤔️ |
That's probably a client-side decorations thing, see here for a starting point |
That's a known issue which is specific to GNOME (or more accurately specific to compositors which don't support server-side decorations). It has also been spun-out as a separate Electron feature request in #27522 (also related: #27016, #11907). |
Congratulations on v12 :) <3 Please close this issue and lock further comments, so individual topics around wayland polish can be raised separately |
Being picky: It's not a bug with GNOME and it's not GNOME specific, however it's probably a Chrome issue |
Before I do that: is it already possible to set up things in such a way that Electron-based applications use Wayland automatically when it's available (or the only option)? If not, are there plans to do this and thus remove the need to remember and add |
This automation is not in Chromium source tree yet, but it's on its way - https://chromium-review.googlesource.com/c/chromium/src/+/3188974 |
If the electron app runs as a flatpak, there's need for a flatpak override that:
You can create this override with:
Where $VENDOR is the flatpak vendor, e.g. Another convenient option is to use Flatseal. On Arch, you can override all Electron apps flags globally. P.S. been my first day back on a gnu/linux workstation battlefield. |
Apparently Chromium now supports native Wayland. Is there an update on this? |
Expected behavior
Latest Ubuntu comes with Wayland a default display server.
On embedded devices, wayland provides usually the best rendering performance, at least compared to X11 where the performance is usually pretty poor.
Actual behavior
Current linux / arm / arm64 binary releases are great but run pretty bad from my experience on embedded devices. They all link to libx11 / gtk which makes them unusable for wayland.
libGtk can be build with --wayland-backend and then electron can be built against it
I would really like electron team to consider providing prebuilt binaries usable with wayland, that would open a new range of possibilities, especially on embedded devices.
The text was updated successfully, but these errors were encountered: