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
Deprecate & remove ELECTRON_OZONE_PLATFORM_HINT env var #48001
While working on the main upgrade roll for Electron 39, this change that removes the --ozone-platform-hint flag was causing an error. After tracking it back to a change, I discovered the flag was being removed because the default value became auto. That change landed in Chromium 140 which is part of Electron 38.
Curious about our env var's intended behavior, I searched through the history of it. I learned it was added to make it simple for users to tell Electron apps to automatically detect Wayland.1 Since the auto behavior is now the default, ELECTRON_OZONE_PLATFORM_HINT's purpose is equivalent to XDG_SESSION_TYPE and we can remove it without losing any convenience for those Wayland users.
I also noticed the flag removal in Chromium is also being backported to Chromium 140. We should keep the environment variable "working" for Electron 38 to give users time to adapt if something unexpected comes up. If we decide that the risk is not large enough, we can also choose to do the removal in Electron 38, but I'm planning to do the removal in Electron 39.
The removal will be backwards-compatible, so users running apps with Electron 38 and below will continue to accept the ELECTRON_OZONE_PLATFORM_HINT and Electron 39 and above will safely ignore it.
Footnotes
It can also be set to wayland to force Wayland instead of potentially falling back to X11; however, auto works by inspecting the XDG_SESSION_TYPE env var, meaning ours now acts like an alias for that one. ↩
@clavin How do I now tell Electron that it has to use Wayland?
Your assumption seems to be that the only use case was ELECTRON_OZONE_PLATFORM_HINT=auto but my production software is now broken because I can't do ELECTRON_OZONE_PLATFORM_HINT=wayland.
Setting XDG_SESSION_TYPE=wayland has no effect and I still get an X11-related error and a seg-fault:
[23615:0903/112048.191370:ERROR:ui/ozone/platform/x11/ozone_platform_x11.cc:249] Missing X server or $DISPLAY
[23615:0903/112048.191409:ERROR:ui/aura/env.cc:257] The platform failed to initialize. Exiting.
Segmentation fault (core dumped)
Activity
clavin commentedon Aug 8, 2025
@VerteDinde @ckerr Wise Linux experts, I'm curious what you think about this plan?
nikwen commentedon Aug 8, 2025
Potentially related: #46843 (as in: this issue can probably be closed once this lands)
Remove ELECTRON_OZONE_PLATFORM_HINT env var
Remove ELECTRON_OZONE_PLATFORM_HINT env var
Remove ELECTRON_OZONE_PLATFORM_HINT env var
chore: bump chromium to 141.0.7346.0 (main) (#47983)
clavin commentedon Aug 11, 2025
Closing as finished in #47983
Remove ELECTRON_OZONE_PLATFORM_HINT env var
chore: bump chromium to 140.0.7339.16 (38-x-y) (#48075)
leithouse commentedon Sep 3, 2025
@clavin How do I now tell Electron that it has to use Wayland?
Your assumption seems to be that the only use case was
ELECTRON_OZONE_PLATFORM_HINT=autobut my production software is now broken because I can't doELECTRON_OZONE_PLATFORM_HINT=wayland.Setting
XDG_SESSION_TYPE=waylandhas no effect and I still get an X11-related error and a seg-fault:nikwen commentedon Sep 11, 2025
@leithouse Thanks for your comment!
Let's continue the discussion on this new issue: #48298
Remove unnecessary environment variable `ELECTRON_OZONE_PLATFORM_HINT`
Remove unnecessary environment variable `ELECTRON_OZONE_PLATFORM_HINT`
Remove unnecessary environment variable `ELECTRON_OZONE_PLATFORM_HINT`
Remove unnecessary environment variable `ELECTRON_OZONE_PLATFORM_HINT`
chore: bump chromium to 141.0.7346.0 (main) (electron#47983)
Refine Wayland support based on VS Code's approach
Remove Wayland-specific flags to match VS Code's approach
Update Electron info
Docs: Update Electron info (#3320)
Link to Electron section of the wiki in FAQ (#3324)
zsh: Remove obsoleted var for Electron
chore: drop dead ELECTRON_OZONE_PLATFORM_HINT env var