Bug 493612

Summary: Night Light fails to activate when displayport monitors go to sleep triggering hotplug
Product: [Plasma] kwin Reporter: Eric Parker <atericparker>
Component: night colorAssignee: KWin default assignee <kwin-bugs-null>
Status: REPORTED ---    
Severity: normal CC: kwin-bugs-null, nate, slavko
Priority: NOR    
Version First Reported In: 6.1.5   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Eric Parker 2024-09-25 00:47:48 UTC
SUMMARY

If the monitors turn off for any reason, night light will fail to activate. This is because of Displayport "hotplug", where sleeping displayport monitors are treated as unplugged.



STEPS TO REPRODUCE
1. Turn off a displayport monitor before Night Light's activation time.
2. Turn it on after activation, it doesn't activate.

OBSERVED RESULT

Night Light never triggers

EXPECTED RESULT

Night light should work normally.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 6.10
KDE Plasma Version: 6.15
KDE Frameworks Version: 6.6
Qt Version: 6.7.2

ADDITIONAL INFORMATION
This can probably be fixed by checking night light status whenever a monitor is plugged or unplugged.
Comment 1 Eric Parker 2024-09-25 00:55:47 UTC
From looking at the codebase, this could probably be fixed by adding a check for monitor plug similar to how the suspend check works? https://invent.kde.org/plasma/kwin/-/blob/master/src/plugins/nightlight/nightlightmanager.cpp
Comment 2 Nate Graham 2024-09-25 20:48:47 UTC
Interesting, would you like to submit a patch?
Comment 3 slavko 2025-08-20 20:48:23 UTC
Hello i am here to add that on gento kwin 6.4.4 with three monitors on an amd 7600xt the night colors are used only on one monitor after resume. clicking "temporarily disable" on the desktop widget immediately turns all monitors red (so it was in night state, just not applied), then flows to blue colors. So the suspend check does not work:)