omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

Nightlight toggle does not reset to baseline

Open sean-imus opened this issue 9 months ago • 2 comments

System details

Omarchy 3.3.3, Hyprland 0.53.1, Hyprsunset 0.3.3

What's wrong?

Preface

While investigating a discord help post about residual warmth after toggling night light on and off, I was able to reproduce and confirm the behavior.

After rebooting and testing from a completely clean state (no hyprsunset running), it appears that disabling night light via omarchy-toggle-nightlight does not restore the identity color matrix. As a result, a subtle warm tint remains

This is not just perceptual; it is visible in the calculated color transform matrix (CTM) from the logs below.

Steps to Reproduce

  1. Reboot the system.

  2. Confirm hyprsunset is not running: hyprctl hyprsunset temperature (Fails to connect, as expected.)

  3. Run omarchy-toggle-nightlight once (night light ON).

  4. Run omarchy-toggle-nightlight again (night light OFF).

Observed Behavior

First run (night light ON, hyprsunset starts from clean state and sets the temperature to 4000K):

~ ❯ omarchy-toggle-nightlight
┏ hyprsunset v0.3.3 ━━╸
┃
┣ Loaded 1 profiles
┣ Applying profile from: 7:0
┣ Resetting the matrix (--identity passed)
┃
┣ Calculated the CTM to be [mat3x3: 1, 0, 0, 0, 1, 0, 0, 0, 1]
┃
┣ Running on Hyprland
┣ Found hyprland-ctm-control-v1 supported with version 2, binding to v2
┣ Found new output with ID 63, binding
┣ Found new output with ID 64, binding
┣ Found new output with ID 65, binding
┣ Found 3 output(s), applying CTMs
┣ Resetting the matrix (--identity passed)
┃
┣ Calculated the CTM to be [mat3x3: 1, 0, 0, 0, 1, 0, 0, 0, 1]
┃
┣ Setting the temperature to 4000K (default)
┃
┣ Calculated the CTM to be [mat3x3: 1, 0, 0, 0, 0.8071225, 0, 0, 0, 0.6512994]
┃
ok

Second run (night light OFF, sets the temperature to 6000K):

~ ❯ omarchy-toggle-nightlight
5602
┣ Setting the temperature to 6000K (default)
┃
┣ Calculated the CTM to be [mat3x3: 1, 0, 0, 0, 0.96528697, 0, 0, 0, 0.92878336]
┃
ok

The CTM does not return to identity and instead sets the temperature to 6000K. Green and blue channels remain reduced.

Expected Behavior

Disabling night light should restore the identity matrix:

[1, 0, 0 0, 1, 0 0, 0, 1]

This corresponds to the compositor’s true unmodified baseline (roughly D65 / ~6500K).

Additional Observations

Running: hyprctl hyprsunset identity immediately restores the correct baseline and produces a visible change.

hyprctl hyprsunset temperature reports 6000K both before and after running identity, despite the clear visual and matrix difference.

This suggests that temperature reporting does not reflect whether the identity matrix is actually applied.

Why This Matters

Using 6000K as an “off” state leaves a subtle but noticeable warm tint.

Proposed Fix

Use hyprctl hyprsunset identity when disabling night light instead of setting a specific temperature value.

Relevant Script

omarchy-toggle-nightlight https://github.com/basecamp/omarchy/blob/dev/bin/omarchy-toggle-nightlight

sean-imus avatar Feb 03 '26 16:02 sean-imus

Spent a bit of time playing around with this and wanted to share some of my thoughts.

  • I agree that hyprctl hyprsunset identity is the correct fix here (it is mentioned in the docs)
  • Calling hyprctl hyprsunset identity when the screen temperature is 4000K does reset the screen to the default colour balance but doesn't actually seem to change the screen temperature as reported by hyprctl hyprsunset temperature - you noted the same behaviour when the current screen temperature is 6000K
~ | omarchy-toggle-nightlight
3230
ok
~ | hyprctl hyprsunset temperature
4000
~ | hyprctl hyprsunset identity
ok
~ | hyprctl hyprsunset temperature
4000
~ |
  • Since the script relies on the temperature reported by hyprctl hyprsunset temperature reflecting the current status of the nightlight, we will need to track nightlight state some other way (e.g., via a toggle)

benkelcher77 avatar Feb 23 '26 03:02 benkelcher77

I confirmed this is still happening on current quattro, and a fix is up as #14489.

quattro now turns night light off by setting 6500K rather than 6000K, but hyprsunset (0.4.0, the version Arch ships) still renders 6500K as a tint: the colour matrix comes out as [1, 0.9965, 0.9806] rather than the identity matrix. I checked this on a worker built from the Omarchy ISO, running Hyprland and real hyprsunset. Off left hyprctl hyprsunset identity get at false through both omarchy-toggle-nightlight and the bar's night light service. As @benkelcher77 noted, identity does not change the temperature hyprsunset reports. The fix therefore sets 6500K, which every status check already reads as off, and then sends identity, so the screen is untouched and the status stays right.

The same run turned up a second problem in the same toggle. With hyprsunset already running at its 6000K default, the first toggle set 6500K instead of turning night light on. #14489 fixes that too.

On the worker with #14489 applied, off restores the identity matrix through both paths, and on still sets 4000K. The full test suite ran on the worker, and every failure it reported also fails on quattro without the change. Codex Medium reviewed the fix as a second opinion and found nothing to change in its last round.

This now waits on the maintainer to review #14489.

omarchybot avatar Oct 07 '26 23:10 omarchybot