You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature Request]: Please support Wayland by default in Electron on Linux #41551
I agree to follow the Code of Conduct that this project adheres to.
I have searched the issue tracker for a bug report that matches the one I want to file, without success.
Electron Version
26.2.4
What operating system are you using?
Ubuntu
Operating System Version
6.2.0-39-generic #40-Ubuntu SMP PREEMPT_DYNAMIC Tue Nov 14 14:18:00 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
What arch are you using?
x64
Last Known Working Electron version
No response
Expected Behavior
As of today, Electron applications do not support/enable Wayland out of the box, but rather run under XWayland. Please support Wayland by default in Electron on Linux. Are there any blocker issues to enable Wayland by default?
For example, I had a discussion with RStudio developers who decided to wait enabling Wayland by default until Wayland is supported by default out-of-the-box in Electron. rstudio/rstudio#11962 (comment)
Actual Behavior
.
Testcase Gist URL
No response
Additional Information
No response
Reacted by fnuttens, JakobDev, Jan Niklas Hasse, Ryan Brue, Richard Février, Mankirat Singh, Ivan Yarych, Valentin Hăloiu, Thatoo, wiiznokes and 127 more
Reacted by Alex DeLorenzo, Suraj, Clémence Lesné, Jaswant Kumar, Bruno Abitbol, Ethan Kuehler, Steffen Weber, Hilan Meyran, simon_pressel, Thiago Lins and 18 more
I agree -- I feel like it's well past time for ozone-platform to be auto on electron. I don't know necessarily what the hold up is upstream (chromium), though if someone knows please let me know, I've been trying to figure it out for a while now.
Reacted by Solo Bit, Josh Corbett, Mikel Pérez, Konrad Kozubek, Omeid Matten and texsd tan
Reacted by GerryT11, JakobDev, Huang Junlin, Valentin Hăloiu, Thatoo, Tag Howard, Kelvie Wong, Dustin Willis Webber, kamulos, Alex DeLorenzo and 22 more
changed the title [-][Bug]: Please support Wayland by default in Electron on Linux[/-][+][Feature Request]: Please support Wayland by default in Electron on Linux[/+]on Mar 19, 2024
What was a problem on my side anyway was the fact that electron prebuilt binary is linked to a ton of X11 libraries that are not available when operating on a wayland only distribution obviously (custom yocto/buildroot builds). No matter what I set in ELECTRON_OZONE_PLATFORM_HINT, I couldn't run my electron app on wayland because of missing libraries like libXrandr.so or libX11.so. Even though they are probably not used on wayland, they are still linked to the binary and required.
How do you go around this? I just copied a bunch of libs and passed them using LD_LIBRARY_PATH which finally made it work, but it's a cumbersome solution. X11 should die a long time ago.
What was a problem on my side anyway was the fact that electron prebuilt binary is linked to a ton of X11 libraries that are not available when operating on a wayland only distribution obviously (custom yocto/buildroot builds). No matter what I set in ELECTRON_OZONE_PLATFORM_HINT, I couldn't run my electron app on wayland because of missing libraries like libXrandr.so or libX11.so. Even though they are probably not used on wayland, they are still linked to the binary and required.
How do you go around this? I just copied a bunch of libs and passed them using LD_LIBRARY_PATH which finally made it work, but it's a cumbersome solution. X11 should die a long time ago.
X11 won't die - Wayland would die first and replace by something else . Wayland DEVs's made so many decisions that screws wayland.
Here are problems of wayland and many of them wont be fixed , because it against the wayland core develoeprs's belief and ideologies just like religious fanatics.
Don't get me wrong. There are many problems at X11 , which could be solved if there is a new X11 that might deviate from X11 protocol but backward compatible - instead of a rewrite filled with bad decision that breaks so many things - by design.
Reacted by Farseen and Ghasem Ramezani
Reacted by fnuttens, kamulos, Giovanni Dueck, Godvin Ouseph, Max Verevkin, Ryan Brue, Javier Tia, Bernd Schoolmann, Minionflo, Nícholas Kegler and 65 more
We're getting pretty far off topic with that previous comment. The reality is that linux is moving in the direction of wayland, because it's what most developers are supporting nowadays. Make something worthwhile, and linux will move that way. There's no conspiracy, nothing is being forced onto people, just open source being open source
Reacted by Carlos Melo, Minionflo, Eric, Adel Khial, Marcin Baszczewski, Mohammed Bilal N S, Jaswant Kumar, Max, Andreas Poulsen, Bakhtiyar Neyman and 21 more
What was a problem on my side anyway was the fact that electron prebuilt binary is linked to a ton of X11 libraries that are not available when operating on a wayland only distribution obviously (custom yocto/buildroot builds). No matter what I set in ELECTRON_OZONE_PLATFORM_HINT, I couldn't run my electron app on wayland because of missing libraries like libXrandr.so or libX11.so. Even though they are probably not used on wayland, they are still linked to the binary and required.
How do you go around this? I just copied a bunch of libs and passed them using LD_LIBRARY_PATH which finally made it work, but it's a cumbersome solution. X11 should die a long time ago.
X11 won't die - Wayland would die first and replace by something else . Wayland DEVs's made so many decisions that screws wayland.
Here are problems of wayland and many of them wont be fixed , because it against the wayland core develoeprs's belief and ideologies just like religious fanatics.
Don't get me wrong. There are many problems at X11 , which could be solved if there is a new X11 that might deviate from X11 protocol but backward compatible - instead of a rewrite filled with bad decision that breaks so many things - by design.
But your fantasy didn't come true. In addition, the default support for wayland does not mean that x11 is removed.
use_ozone=true ozone_auto_platforms=false ozone_platform="wayland" ozone_platform_wayland=true
Build with these parameters to get a wayland-based chromium.
#35630 would address this, but it was argued that Electron shouldn't deviate from Chromium on this.
In theory, we should follow upstream, but in practice, chromium is just one software, and its unsupported state can be changed with a single command line argument. Electron represents a myriad of software, which requires the user to set myriad command-line arguments. In this case, the benefits of following upstream are limited.
Reacted by Sylvain Dumont, Thatoo, Tobias Cohen, Colin de Roos, Sebastian Lövdahl, Valentin Hăloiu, Quik2007 and rushii
I just wanted to add some evidence to this issue of why this would be useful. It's not just an implementation detail, it negatively impacts how Electron apps render on some Linux desktop environments. In particular, on GNOME when using UI scaling, especially fractional scaling, it causes text to look blurry. Here's a side by side image of Discord loaded in Thorium using --ozone-platform=wayland (left) and Discord packaged in an Electron app (right):
You can see that the text on the left (Thorium) is crisp, but on the right (Electron) the whole application is blurry and this really stands out on text. This affects every electron app on my system and it's been that way for years.
Running Discord via flatpak run --socket=wayland com.discordapp.Discord --enable-features=UseOzonePlatform --ozone-platform=wayland fixes the text issue. However, it introduces other issues of its own: no tray icon and some weird rendering artifacts in the splash screens.
Reacted by Max Verevkin, fnuttens, Sebastian Lövdahl, Andy, Mario Kneidinger, Josh Corbett, Jan Vlug, Zahir Gudiño, Quik2007, Alfonso Valencia and 1 more
@eszlari could you explain what does that mean? Does that mean this option has been merged into chromium now and next release of electron based on this new version of chromium will solve our issues?
We are using Chromium 141 in electron main branch now. Anybody who uses electron -- can we test to see if electron apps using chromium 141 have wayland on by default?
Edit: I ran 39.0.0-alpha.1 which should have chromium 141, and it's still defaulting to X11:
I think we're going to have to change something in electron to pick up this behavior so that we don't have to use --ozone-platform=wayland
Enable OverrideDefaultOzonePlatformHintToAuto feature
This is required for cl/784605417 which fully launches the experiment.
Change-Id: [If722ab1b2a8f6b1004b4baf22834f8f026e8eb5c](https://chromium-review.googlesource.com/q/If722ab1b2a8f6b1004b4baf22834f8f026e8eb5c)
Bug: [40083534](https://issues.chromium.org/issues/40083534)
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6771245
Commit-Queue: Thomas Anderson <[email protected]>
Reviewed-by: Kramer Ge <[email protected]>
Reviewed-by: Nico Weber <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1489138}
Since electron 38 upgrade (element-desktop, signal) it doesn't honnor system-wide configuration using environment variables anymore, and doesn't seem to accept any command line option anymore either. Fractional scaling is broken, is there anything I missed?
Reacted by Roman, teenjuna, Daniel Haupt, Lyle Hanson, Petr Přikryl and grodius
Sad news, the environment variable was a convenient way to set the setting system-wide without having to edit or create new .desktop file for each app using it.
I don't want to be rude, at anytime, because Electron is quite a complex and good product, but it seems that this time, you were maybe too eager to get rid of deprecated behaviors such as environment variables configuration, and yet the feature end up really working only 2 point releases after that, in the meantime, a lot of products using yours were broken. Some will not upgrade before again yet a few month. You moved too quickly, and it broke a lot of apps. Please, be more careful with users the next time.
Edit: don't take it wrong, I do really appreciate electron when it brings new features such as wayland support per defaut, it's really a good thing for all hidpi screens owner, thanks.
You moved too quickly, and it broke a lot of apps.
Sorry for that! We try to be careful and never break behavior on purpose.
an app (Vesktop) that uses Electron 39, still runs under xwayland
The app itself can choose to run under XWayland if it wants to. There are some features that are not supported by Wayland that are supported by X11, so some apps might make that choice.
Activity
ryanabx commentedon Mar 13, 2024
I agree -- I feel like it's well past time for ozone-platform to be auto on electron. I don't know necessarily what the hold up is upstream (chromium), though if someone knows please let me know, I've been trying to figure it out for a while now.
[-][Bug]: Please support Wayland by default in Electron on Linux[/-][+][Feature Request]: Please support Wayland by default in Electron on Linux[/+]vially commentedon Mar 23, 2024
#35630 would address this, but it was argued that Electron shouldn't deviate from Chromium on this.
ryanabx commentedon Mar 24, 2024
Yeah, it'd of course be nice to follow upstream on this, but I still am left wondering when chromium will support Wayland/auto by default?
Chromium ought to have a roadmap or an issue tracker for Wayland enablement.
veodko commentedon Jul 17, 2024
What was a problem on my side anyway was the fact that electron prebuilt binary is linked to a ton of X11 libraries that are not available when operating on a wayland only distribution obviously (custom yocto/buildroot builds). No matter what I set in
ELECTRON_OZONE_PLATFORM_HINT, I couldn't run my electron app on wayland because of missing libraries likelibXrandr.soorlibX11.so. Even though they are probably not used on wayland, they are still linked to the binary and required.How do you go around this? I just copied a bunch of libs and passed them using
LD_LIBRARY_PATHwhich finally made it work, but it's a cumbersome solution. X11 should die a long time ago.banekondic1996 commentedon Jul 23, 2024
v3ss0n commentedon Sep 10, 2024
X11 won't die - Wayland would die first and replace by something else . Wayland DEVs's made so many decisions that screws wayland.
Here are problems of wayland and many of them wont be fixed , because it against the wayland core develoeprs's belief and ideologies just like religious fanatics.
https://gist.github.com/probonopd/9feb7c20257af5dd915e3a9f2d1f2277
Don't get me wrong. There are many problems at X11 , which could be solved if there is a new X11 that might deviate from X11 protocol but backward compatible - instead of a rewrite filled with bad decision that breaks so many things - by design.
ryanabx commentedon Sep 10, 2024
We're getting pretty far off topic with that previous comment. The reality is that linux is moving in the direction of wayland, because it's what most developers are supporting nowadays. Make something worthwhile, and linux will move that way. There's no conspiracy, nothing is being forced onto people, just open source being open source
fxzxmicah commentedon Oct 23, 2024
But your fantasy didn't come true. In addition, the default support for wayland does not mean that x11 is removed.
fxzxmicah commentedon Oct 23, 2024
use_ozone=true ozone_auto_platforms=false ozone_platform="wayland" ozone_platform_wayland=trueBuild with these parameters to get a wayland-based chromium.
fxzxmicah commentedon Oct 23, 2024
In theory, we should follow upstream, but in practice, chromium is just one software, and its unsupported state can be changed with a single command line argument. Electron represents a myriad of software, which requires the user to set myriad command-line arguments. In this case, the benefits of following upstream are limited.
willmtemple commentedon Dec 8, 2024
I just wanted to add some evidence to this issue of why this would be useful. It's not just an implementation detail, it negatively impacts how Electron apps render on some Linux desktop environments. In particular, on GNOME when using UI scaling, especially fractional scaling, it causes text to look blurry. Here's a side by side image of Discord loaded in Thorium using
--ozone-platform=wayland(left) and Discord packaged in an Electron app (right):You can see that the text on the left (Thorium) is crisp, but on the right (Electron) the whole application is blurry and this really stands out on text. This affects every electron app on my system and it's been that way for years.
Running Discord via
flatpak run --socket=wayland com.discordapp.Discord --enable-features=UseOzonePlatform --ozone-platform=waylandfixes the text issue. However, it introduces other issues of its own: no tray icon and some weird rendering artifacts in the splash screens.3 remaining items
Thatoo commentedon Jul 20, 2025
@eszlari could you explain what does that mean? Does that mean this option has been merged into chromium now and next release of electron based on this new version of chromium will solve our issues?
eszlari commentedon Jul 20, 2025
Upstream Chromium wants to enable Wayland by default in the development builds as an experiment, but it will take some time until this reaches the stable channel, see: https://chromiumdash.appspot.com/schedule
VictorVow commentedon Sep 4, 2025
Chromium 141 and up will use Wayland by default it looks like.
ryanabx commentedon Sep 4, 2025
We are using Chromium 141 in electron main branch now. Anybody who uses electron -- can we test to see if electron apps using chromium 141 have wayland on by default?
Edit: I ran 39.0.0-alpha.1 which should have chromium 141, and it's still defaulting to X11:
I think we're going to have to change something in electron to pick up this behavior so that we don't have to use
--ozone-platform=waylandryanabx commentedon Sep 6, 2025
Actually, it does look like Chromium 140 is wayland by default too!
diegorondini commentedon Oct 7, 2025
This was actually immediately reverted (as can be seen in the last gerrit change log):
https://chromium-review.googlesource.com/c/chromium/src/+/6772226
The change actually went in August 4, 2025, which is included in Chromium 141.0.7340.0+:
chromium/chromium@8f2c7d1
pounard commentedon Oct 7, 2025
Since electron 38 upgrade (element-desktop, signal) it doesn't honnor system-wide configuration using environment variables anymore, and doesn't seem to accept any command line option anymore either. Fractional scaling is broken, is there anything I missed?
mitchchn commentedon Nov 28, 2025
Electron runs in Wayland by default as of Electron 38.2 and newer. You can opt out with a command line flag but there is no longer an environment variable:
https://www.electronjs.org/blog/electron-38-0#removed-electron_ozone_platform_hint-environment-variable
pounard commentedon Dec 2, 2025
Sad news, the environment variable was a convenient way to set the setting system-wide without having to edit or create new .desktop file for each app using it.
nikwen commentedon Dec 12, 2025
Closing this as per @mitchchn's comment.
pounard commentedon Dec 12, 2025
I don't want to be rude, at anytime, because Electron is quite a complex and good product, but it seems that this time, you were maybe too eager to get rid of deprecated behaviors such as environment variables configuration, and yet the feature end up really working only 2 point releases after that, in the meantime, a lot of products using yours were broken. Some will not upgrade before again yet a few month. You moved too quickly, and it broke a lot of apps. Please, be more careful with users the next time.
Edit: don't take it wrong, I do really appreciate electron when it brings new features such as wayland support per defaut, it's really a good thing for all hidpi screens owner, thanks.
debuxxed commentedon Dec 13, 2025
doesn't work for me, as an app (Vesktop) that uses Electron 39, still runs under xwayland (Niri compositor)
nikwen commentedon Dec 17, 2025
Sorry for that! We try to be careful and never break behavior on purpose.
The app itself can choose to run under XWayland if it wants to. There are some features that are not supported by Wayland that are supported by X11, so some apps might make that choice.