OPINIONATED OMARCHY
TROUBLESHOOTING CORPUS
790
RECORDS
790
AUDITED
0
UNCHECKED
2388
SOURCES
LIVE
display-monitors low occasional DISPUTE

Bring night light back after it switches itself off mid-session

omarchyomarchy-4hyprlandhyprsunsetdesktoplaptop
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

Issues #8161 and #12334 are open and support the cause: both launch paths (bin/omarchy-toggle-nightlight and the shell's nightlight Service.qml) start hyprsunset with setsid uwsm-app and pgrep -x, unchanged on quattro today, and a fresh hyprsunset comes back neutral. /usr/lib/systemd/user/hyprsunset.service from hyprsunset 0.4.0-3 has Restart=on-failure and PartOf=graphical-session.target as stated. Two defects. The verify step uses pkill -x hyprsunset to prove the restart, but pkill sends SIGTERM, which systemd counts as a clean exit, so Restart=on-failure does not restart it and a correctly working setup fails the check. Second, omarchy restart hyprsunset and omarchy refresh hyprsunset both run omarchy-restart-app, which is pkill -x followed by a bare setsid uwsm-app launch, so either one silently replaces the supervised instance with an unsupervised one until the next login, which the fix does not warn about. The fix also never stops an instance the toggle already started before enabling the unit. Separately, with a running but neutral hyprsunset the toggle picks its target from the reported temperature, so whether one press warms the screen was not confirmed. The corrected fix uses hyprctl hyprsunset temperature 4000, which sets it directly. Nothing was started, killed or enabled on this machine.

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

Symptom

I turned night light on in the evening, and some time later the screen is cold and blue again although I never turned it off. omarchy-toggle-nightlight --status prints {"enabled":false,"temperature":null}, and hyprctl hyprsunset temperature fails with Couldn't connect to /run/user/1000/hypr/<signature>/.hyprsunset.sock. It often follows a monitor flapping, when the journal shows XWAYLAND: wl_registry#2: error 0: global wl_output (73) is unavailable. With a scheduled sunset profile, a hyprsunset restart at night leaves the screen neutral until the next sunset.

Cause

Omarchy starts hyprsunset as a bare background process, setsid uwsm-app -- hyprsunset &, from omarchy-toggle-nightlight and from the shell's night light service, with no restart policy. If it dies, for example when an output disappears while it is binding to it, nothing restarts it for the rest of the session. A freshly started hyprsunset applies its default (about 6000K, or the identity = true profile in Omarchy's hyprsunset.conf), and hyprsunset profiles fire only at their clock time, not the most recent one that has passed. So even a restart leaves the screen neutral until the next scheduled change. Both issues are open against 4.0.4-1.

Fix

**Get the warmth back now:** press Super+Ctrl+N, or run:


omarchy toggle nightlight

With no hyprsunset running, the toggle starts one and retries until 4000K sticks.

**Have it restart on its own.** The hyprsunset package ships a supervised user unit, /usr/lib/systemd/user/hyprsunset.service, with Restart=on-failure and PartOf=graphical-session.target. Stop any instance the toggle already started, then enable the unit:


pkill -x hyprsunset
systemctl --user enable --now hyprsunset.service

Omarchy's toggle finds the running process with pgrep and drives it through hyprctl hyprsunset, so the keybinding keeps working. If you added o.launch_on_start("hyprsunset") to ~/.config/hypr/autostart.lua for a schedule, remove that line, or you will run two instances.

Once the unit owns hyprsunset, restart it with systemctl --user restart hyprsunset. Do not use omarchy restart hyprsunset or omarchy refresh hyprsunset: both kill it with pkill and start a bare copy outside the unit, and systemd treats that kill as a clean exit, so supervision is gone until you log in again.

A restarted hyprsunset still comes back neutral at night. After a crash, set the warmth directly:


hyprctl hyprsunset temperature 4000

Verify

systemctl --user is-active hyprsunset prints active. Simulate a crash with systemctl --user kill --signal=SIGKILL hyprsunset.service, wait a few seconds, and systemctl --user is-active hyprsunset prints active again with a new PID from pgrep -x hyprsunset. Do not test with pkill -x hyprsunset: SIGTERM is a clean exit and Restart=on-failure correctly leaves it stopped. hyprctl hyprsunset temperature answers instead of failing to connect.

Sources

night-light-off-after-hyprsunset-dies