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

Fix XWayland and Java apps rendering at double size on stock Omarchy

omarchyhyprlandwaylandxwaylandlaptopdesktop
CORRECTED An auditor found the fix wrong or incomplete and rewrote it.
AUDIT NOTE

Re-checked on this workstation (omarchy 4.0.2-1, omarchy-settings 4.0.2-1, hyprland 0.56.2-1, quickshell 0.3.1-1, kernel 7.1.9, NVIDIA). Every claim in the cause is true, and all three cited issues genuinely support it, which is unusual for this corpus. The corrections are about paths, the supported command, and reload advice that would mislead.

Confirmed on this machine, not from a source. /usr/share/omarchy/config/hypr/monitors.lua contains local omarchy_gdk_scale = 2, local omarchy_monitor_scale = "auto" and hl.env("GDK_SCALE", tostring(omarchy_gdk_scale)). /usr/share/omarchy/default/hypr/envs.lua ends in an hl.config() block setting xwayland = { force_zero_scaling = true }, and hyprctl getoption xwayland:force_zero_scaling returns bool: true, set: true. The operator's own ~/.config/hypr/monitors.lua carries a first-hand instance in a comment: GDK_SCALE=2 on a scale-1 27 inch 1440p panel made Steam draw zoomed with its titlebar drag region offset, and the file now sets 1.

Cited issues read in full on omacom/omarchy. Issue 7021 is this record's cause almost verbatim, including the measured WM_NORMAL_HINTS minimum width of 1530 against a real 1x minimum of 765, and it names both defaults. Issue 2824 reports over-scaled Java GUIs (BurpSuite, Ghidra, JADX-GUI, JD-GUI) on Omarchy 3.1.1. Issue 6415 reports Steam not correctly scaled on 3.8.4. All three support the record. I swapped the three basecamp/omarchy URLs for omacom/omarchy, the current name. The old ones still redirect but the search API does not follow the rename.

What was wrong. The cause said "Omarchy's packaged monitors.lua" without saying which one. There is no /usr/share/omarchy/default/hypr/monitors.lua. The template lives under config/, not default/, and the file that actually runs is the user copy in ~/.config/hypr/. The danger compounded this by naming /usr/share/omarchy/default/hypr/ and ~/.local/share/omarchy/default/hypr/, the second of which is the Omarchy 3 layout and does not exist on Omarchy 4. Both rewritten with the real paths. The fix omitted omarchy-hyprland-monitor-scaling, which is the supported way to change a scale and which rewrites local omarchy_gdk_scale in the same pass. I read that script rather than running it: it persists int(scale + 0.5), so at 1.5 it writes GDK_SCALE=2 and does not fix this bug, which issue 7021 also reports. Both the helper and its limit are now in the fix. The reload advice said GDK_SCALE "is read at process start and is exported through the systemd user manager, so hyprctl reload is not enough", then offered systemctl --user import-environment GDK_SCALE and dbus-update-activation-environment. A reload does re-apply the value, because Hyprland re-runs every hl.env() line, and import-environment imports from the calling shell, which on an already-open terminal is the stale value the user is trying to escape. Replaced with what is actually true: reload plus relaunch from a keybind works, an already-open terminal does not, and the user manager is only guaranteed after a re-login. I added a systemctl --user show-environment read in its place, which I ran here and which reports GDK_SCALE=1. The fix's Lua snippet also put the monitor rule above the GDK_SCALE lines, the reverse of the shipped template. Reordered so it can be pasted over the real file. The verify used pgrep -x steam only, and now also reads the user manager and shows the xprop check the symptom promises.

Java. The record's only Java advice is JAVA_TOOL_OPTIONS=-Dsun.java2d.uiScale=1, which is sound: the Arch HiDPI page documents sun.java2d.uiScale for AWT and Swing and records that Java 9 and later read GDK_SCALE for Swing, which is why fixing GDK_SCALE alone usually suffices. The record does not mention _JAVA_AWT_WM_NONREPARENTING, so there was nothing to correct, and that is the right call: grep -rn "JAVA" /usr/share/omarchy/ returns nothing, so Omarchy sets no Java variable at all, and the variable no longer appears on the current Hyprland environment-variables wiki page. It addresses blank or grey AWT windows under non-reparenting window managers, not scaling, so it does not belong in this record.

Duplication. This record overlaps xwayland-blurry-on-fractional-scale in hyprland-config, which after its own re-audit carries a "keep the two numbers in step" paragraph describing exactly this mismatch. It is not a duplicate. The symptom is the inverse (oversized rather than blurry), the root cause is specific to Omarchy's own shipped defaults rather than to XWayland in general, and it holds material the sibling does not: the Flatpak override, the Steam launch-option form, the per-command escape hatch and the three upstream issues. A reader searching "Steam is double size" needs this record and would not find it under a blur title. I recommend keeping both and leaving the cross-reference I added, rather than merging. The record that should be merged away is xwayland-apps-blurry-hidpi, audited alongside this one.

Not exercised. Nothing was written and no config, scale, mode or reload was performed, because this is the operator's daily workstation driving a real panel and libvirt VMs. Every hyprctl call was a read. I did not reproduce the oversized window, so the WM_NORMAL_HINTS doubling is from issue 7021's measurement and not observed here. flatpak and xlsclients are not installed on this machine, so neither the override nor that detection command was run. JAVA_TOOL_OPTIONS was not tested.

The cause above was rewritten on 2026-09-13 to match this note; the fix was corrected by the audit itself.
RISK

Edit only ~/.config/hypr/monitors.lua. The file Omarchy ships is a template at /usr/share/omarchy/config/hypr/monitors.lua, copied into ~/.config at install and owned by the omarchy package, and /usr/share/omarchy/default/hypr/envs.lua is a packaged default. Editing either is overwritten by the next omarchy update. Setting GDK_SCALE below the monitor scale makes native Wayland GTK apps small, so change it only to match what hyprctl monitors reports.

Symptom

On stock Omarchy, XWayland and Java apps render at double size: Steam's whole UI is 2x on a 1080p screen, or a Java IDE's window is wider than the monitor with the right-hand side hanging off the edge and no way to shrink it. Native Wayland apps look correct. xprop shows WM_NORMAL_HINTS minimum widths that are exactly twice the app's real minimum.

Cause

Two Omarchy defaults disagree. The packaged template /usr/share/omarchy/config/hypr/monitors.lua is copied to ~/.config/hypr/monitors.lua at install and hardcodes local omarchy_gdk_scale = 2 while leaving the monitor scale computed (local omarchy_monitor_scale = "auto"). Separately, /usr/share/omarchy/default/hypr/envs.lua sets xwayland = { force_zero_scaling = true }. With force_zero_scaling on, XWayland clients are handed the full physical resolution (1920x1080, say) with no compositor scaling, and are then told by GDK_SCALE=2 to draw everything at 2x. Java AWT and Swing follow the same path, because Java 9 and later read GDK_SCALE for Swing scaling. So X11 and Java windows demand twice the pixels they need, and a tiling compositor will not shift an oversized toplevel left the way Plasma does, so the surplus hangs off the right edge. On a display where auto-scale resolves to 1, GDK_SCALE=2 is wrong outright and doubles native GTK apps too.

Fix

Match GDK_SCALE to the actual monitor scale. Check what Hyprland picked:


hyprctl monitors -j | jq -r '.[] | "\(.name)\tscale=\(.scale)"'

**Omarchy 4.** Let Omarchy write both numbers together, which is the supported path:


omarchy-hyprland-monitor-scaling 1

That sets the focused monitor's scale and rewrites local omarchy_gdk_scale in ~/.config/hypr/monitors.lua in the same pass, but only while that file still has Omarchy's generic shape. It persists GDK_SCALE as int(scale + 0.5), so a fractional scale of 1.5 still writes 2 and the overflow comes straight back. At 1.5 edit the file by hand instead.

Editing ~/.config/hypr/monitors.lua directly, keeping the shipped line order:


-- was: local omarchy_gdk_scale = 2
local omarchy_gdk_scale = 1        -- use 1 when hyprctl reports scale 1, 1.25 or 1.5
local omarchy_monitor_scale = "auto"

hl.env("GDK_SCALE", tostring(omarchy_gdk_scale))
hl.monitor({ output = "", mode = "preferred", position = "auto", scale = omarchy_monitor_scale })

**Omarchy 3.** The same change in ~/.config/hypr/monitors.conf, which used hyprlang rather than Lua:


env = GDK_SCALE,1

**Getting the new value to the app.** Hyprland re-runs every hl.env() line on reload, so hyprctl reload followed by relaunching the app from a Hyprland keybind or the Omarchy menu picks it up. Two things a reload does not fix. A terminal that was already open keeps the old value and passes it to anything you start from it. And the systemd user environment, which is what D-Bus activated and Flatpak apps inherit, is only guaranteed to match after logging out and back in. Check what the user manager currently holds:


systemctl --user show-environment | grep GDK_SCALE

To fix one stubborn app without changing the global value, so native Wayland GTK stays correct:


GDK_SCALE=1 GDK_DPI_SCALE=1 JAVA_TOOL_OPTIONS=-Dsun.java2d.uiScale=1 <command>

For a Flatpak:


flatpak override --user --env=GDK_SCALE=1 --env=JAVA_TOOL_OPTIONS=-Dsun.java2d.uiScale=1 <app.id>

For a Steam game, in Properties then Launch Options:


GDK_SCALE=1 %command%

For the blurry or pixelated XWayland complaint, which is the same two settings pulling the other way, see xwayland-blurry-on-fractional-scale.

Verify

Restart the app, then read the value it actually got:


tr '\0' '\n' < /proc/$(pgrep -x steam)/environ | grep GDK_SCALE
systemctl --user show-environment | grep GDK_SCALE

Both should show the value you set. The app's window should now fit the screen with normally sized UI. For a Java or X11 app that was hanging off the right edge, confirm the hint shrank:


xprop WM_NORMAL_HINTS

Click the window when the cursor becomes a cross. The minimum width should be the app's real 1x minimum rather than twice it.

Sources

gdk-scale-mismatch-oversized-xwayland