Skip to content

Electron needs explicit ozone platform hints to work with wayland in multiple monitors #46843

Closed

Description

@khaosdoctor

Preflight Checklist

Electron Version

34

What operating system(s) are you using?

Other Linux

Operating System Version

6.14.4-arch1-1

What arch are you using?

x64

Last Known Working Electron version

As far as I tested, this is happening up until v28

Expected Behavior

The applications work in all the monitors normally

Actual Behavior

I currently have two monitors set up like this in Sway:

# Focus first monitor on start
focus output DP-1

# OLED Monitor (4K) in the center
output DP-1 {
    mode 3840x2160@240Hz
    position 0 0
    scale 1.25
}

# portrait second monitor (UHD 2560x1440) on the left side
output DP-2 transform 90 {
    mode 1440x2560@165Hz
    # 3840 at a 1.25 scale is 3840 / 1.25 = 3072
    # For the Y it was trial and error
    # Left side (transform 90)
    position -1440 -450
}

There's a weird bug happening where, if I open the application on the main monitor (the OLED) it will work normally, if I move the application to the secondary monitor, it doesn't receive any other keyboard or mouse inputs anymore, essentially, it becomes an image.

To make it work again, I need to set ELECTRON_OZONE_PLATFORM_HINT=auto (or wayland) before running the apps, but then this triggers #46823. To reproduce it, I didn't have to do much, the default application from the fiddle already shows the problem: https://gist.github.com/khaosdoctor/145dd3db00b2b4d1fb78f51b9c14b5b9

I added a button, if you have two monitors (I'm not sure if the different DPI will affect it) the second monitor won't have any interaction with it, the application will seem dead, however, it works normally on the main monitor.

Testcase Gist URL

https://gist.github.com/khaosdoctor/145dd3db00b2b4d1fb78f51b9c14b5b9

Additional Information

No response

Activity

  1. added theissue type on Apr 28, 2025
  2. added
    has-repro-gist
    on Apr 28, 2025
  3. nikwen commented on Apr 28, 2025

    @nikwen
    Member

    Thanks for reporting! Does this still happen on Electron v35/v36?

  4. khaosdoctor commented on Apr 29, 2025

    @khaosdoctor
    Author

    As far as I tested in the fiddle, yes. Should I set something in particular?

  5. moved this to 👀 Unsorted Items in 36-x-yon Apr 29, 2025
  6. moved this to 👀 Unsorted Items in 35-x-yon Apr 29, 2025
  7. nikwen commented on Apr 29, 2025

    @nikwen
    Member

    Thanks for testing! Nothing specific to test.

  8. moved this from 👀 Unsorted Items to 🛑 Blocks Stable in 36-x-yon Apr 30, 2025
  9. moved this from 🛑 Blocks Stable to 👍 Does Not Block Stable in 36-x-yon Apr 30, 2025
  10. electron-issue-triage commented on Jul 28, 2025

    @electron-issue-triage

    This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

  11. khaosdoctor commented on Jul 29, 2025

    @khaosdoctor
    Author

    Still a thing

  12. electron-issue-triage commented on Oct 29, 2025

    @electron-issue-triage

    This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

  13. Sytten commented on Nov 7, 2025

    @Sytten

    Platform hints are not a thing anymore, but we are having issues on wayland

  14. nikwen commented on Dec 12, 2025

    @nikwen
    Member

    Closing this as platform hints are no longer necessary on the most recent Electron versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    34-x-y35-x-y36-x-ybug 🪲has-repro-gistplatform/linuxwayland

    Type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions