Problem
Hyprland --verify-config reports "config ok" for a stock 4.0.6 config. With 4.5.0-rc1 it fails, then the process crashes. Tested with Hyprland 0.56.2 on an Omarchy machine, using a fresh ~/.config copied from config/.
$ HOME=$H XDG_RUNTIME_DIR=$H/run OMARCHY_PATH=$RC Hyprland --verify-config -c $H/.config/hypr/hyprland.lua
ERR ]: Lua error (unknown): .../default/hypr/startup-cursor.lua:78: hl.env: second argument (value) must be a string: string type requires a string
timeout: the monitored command dumped coreThere are two causes:
- The startup-cursor handler passes nil to
hl.env(Omarchy; fixed here).default/hypr/startup-cursor.lua:78passesos.getenv("HYPRLAND_INSTANCE_SIGNATURE")tohl.env. A real compositor always sets that variable before it loads the config (CCompositor::CCompositor,src/Compositor.cpp:208at v0.56.2). Verification mode returns before that point (:187), so the value is nil there. - Hyprland 0.56.2 segfaults when
hl.timerruns under--verify-config(upstream). A one-line config reproduces it:hl.timer(function() end, { timeout = 15000, type = "oneshot" })exits with code 139. The same startup-cursor handler callshl.timerat line 91.
Fix
The config.reloaded handler now returns early when HYPRLAND_INSTANCE_SIGNATURE is unset. In a running compositor that variable is always set, so a real session behaves exactly as before.
Verify
These checks ran with Hyprland 0.56.2:
- The fresh RC user config: config ok.
- A 4.0.6 user config with the RC defaults (the upgrade case): config ok.
- The RC config with each of the 23 rendered themes: config ok for every one.
test/shell.d/hyprland-startup-cursor-test.sh already sets HYPRLAND_INSTANCE_SIGNATURE, so it is unaffected.
Not fixed here
Hyprland --verify-config run from a terminal inside a Hyprland session inherits the signature. It still reaches hl.timer and segfaults (cause 2). That is hyprwm/Hyprland#16591, "--verify-config segfaults on exit when the Lua config creates an hl.timer". It is closed upstream, so the segfault goes away once Omarchy ships a Hyprland that includes the fix. Nothing to file there.
Duplicate check: no issue or PR in omacom/omarchy for verify-config. The startup-cursor issues #14836, #14969, #16091 and #14512 are about runtime cursor behavior, not this.
Found while testing Omarchy 4.5.0-rc1.
[Low impact] The change is limited to startup-cursor setup during config loading.
The change appears safe to merge, with a non-blocking request to test the missing-signature branch.
Summary
Skips startup cursor setup when
HYPRLAND_INSTANCE_SIGNATUREis missing.Reviews (1) · Last reviewed commit: "Let Hyprland --verify-config load the st..." · Reviewed by Greptile