OPINIONATED OMARCHY
TROUBLESHOOTING CORPUS
790
RECORDS
790
AUDITED
0
UNCHECKED
2388
SOURCES
LIVE
wayland-compat low common DISPUTE

Fix an Electron app stuck on XWayland because of an old flags file

omarchyarchhyprlandwaylandelectron
CORRECTED An auditor found the fix wrong or incomplete and rewrote it. · checked against Omarchy omarchy 4.0.4-1 on 2026-10-05
AUDIT NOTE

Read /usr/bin/electron43 on this machine: it reads ~/.config/electron43-flags.conf and falls back to ~/.config/electron-flags.conf only when the versioned file is absent, one argv element per line via mapfile, exactly as the record says. /usr/bin/obsidian reads ~/.config/obsidian/user-flags.conf and execs electron43, so both files apply. Electron's breaking-changes.md (38.0) confirms ELECTRON_OZONE_PLATFORM_HINT removed and --ozone-platform defaulting to auto, and the Arch Electron wiki marks --ozone-platform-hint removed in 38 and the Wayland wiki says 38.2 uses Wayland by default. The Visual Studio Code wiki confirms code-flags.conf for code and visual-studio-code-bin. envs.lua does export ELECTRON_OZONE_PLATFORM_HINT=wayland. The one defect is the verify step: the wrapper execs /usr/lib/electron43/electron, so the process name is electron, and ps -C electron43 matches nothing and would falsely reassure. Not exercised: launching an Electron app.

The cause above was not rewritten and may still contain the error described. The fix below is the corrected version.

Symptom

VS Code, Obsidian, Signal or Vesktop is blurry on a fractionally scaled monitor while everything else is sharp, and hyprctl clients shows xwayland: 1 for it. Omarchy already exports ELECTRON_OZONE_PLATFORM_HINT=wayland, so the app should be native. Exporting the variable again, or adding --ozone-platform-hint=wayland to a flags file, changes nothing. Sometimes the reverse: a flag you put in ~/.config/electron-flags.conf used to work and silently stopped after an update.

Cause

Electron 38 removed both the ELECTRON_OZONE_PLATFORM_HINT environment variable and the --ozone-platform-hint switch, and changed the default of --ozone-platform to auto, so Electron 38.2 and later run natively on Wayland whenever XDG_SESSION_TYPE=wayland with no help at all. On a current app the hint Omarchy exports is simply ignored. An app that is still on XWayland is therefore almost always being handed an explicit --ozone-platform=x11, and the usual source is a flags file written months ago as a workaround (this corpus's own electron-app-no-window-ozone-wayland record suggests exactly that line for one app).

Arch's electron* wrapper decides which file to read in a way that is easy to trip over. /usr/bin/electron43 reads ~/.config/electron43-flags.conf if it exists and falls back to ~/.config/electron-flags.conf only when the versioned file is absent. So one --ozone-platform=x11 line in the shared file pushes every Arch-packaged Electron app without a versioned file onto XWayland, and creating a versioned file for one reason silently drops everything in the shared file. Some packages read their own file first: Obsidian's /usr/bin/obsidian reads ~/.config/obsidian/user-flags.conf, code and visual-studio-code-bin read ~/.config/code-flags.conf, the AUR spotify wrapper reads ~/.config/spotify-flags.conf. Apps that bundle their own Electron (Discord, Slack) read none of these.

Fix

  1. Find out which apps are on XWayland and which Electron each one uses:

hyprctl clients -j | jq -r '.[] | select(.xwayland) | .class'
pacman -Qi obsidian code signal-desktop 2>/dev/null | grep -E '^(Name|Depends On)'

A dependency like electron43 means the app runs through /usr/bin/electron43.

  1. Look at every flags file that could be feeding it, including comments:

ls -l ~/.config/*-flags.conf ~/.config/*/user-flags.conf 2>/dev/null
grep -Hn 'ozone' ~/.config/*-flags.conf ~/.config/*/user-flags.conf 2>/dev/null
  1. Delete any --ozone-platform=x11 line you no longer need, and delete --ozone-platform-hint=... lines too, since Electron 38 and later ignore them. If an app genuinely needs X11, keep the x11 line only in that app's own file, never in ~/.config/electron-flags.conf.
  1. Remember the fallback rule. If ~/.config/electron43-flags.conf exists, ~/.config/electron-flags.conf is not read at all for Electron 43 apps. Copy any shared lines you still want into the versioned file:

cat ~/.config/electron-flags.conf >> ~/.config/electron43-flags.conf   # only if you want them there

The files take one flag per line. Lines are not split on spaces.

  1. For an Electron older than 38.2 (check with step 1), Wayland is not the default. Put the explicit switch in that app's flags file:

--ozone-platform=wayland
  1. Quit the app completely (check pgrep -a <name>) and start it again. The platform is chosen at process start.

**Omarchy 4 and plain Arch** behave the same here. The only Omarchy difference is that the hint variable is already exported in /usr/share/omarchy/default/hypr/envs.lua, which matters only for apps on Electron older than 38.

Verify

Start the app from the launcher and run hyprctl clients -j | jq -r '.[] | select(.class|test("obsidian";"i")) | .xwayland' (substitute the class). It should print false. pgrep -af -- '--ozone-platform=x11' should print nothing for that app. The Arch wrapper execs /usr/lib/electron43/electron, so search by argument, not by the name electron43.

Sources

electron-stale-flags-file-forces-xwayland