Bug 487686

Summary: Night Light gets disabled when turning off a monitor
Product: [Plasma] kwin Reporter: fraser_games <danielfras>
Component: night colorAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: minor CC: xaver.hugl
Priority: NOR    
Version First Reported In: 6.0.5   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description fraser_games 2024-05-28 11:53:45 UTC
SUMMARY
When Night Light is active turning off an extra monitor whether it be from 3 to 2 or 2 to 1 the Night Light colour is disabled/not applied.  Found a duplicate here which states fixed in 6.0 but as you can see from my system details below it still happens in 6.0.5 for me https://bugs.kde.org/show_bug.cgi?id=480911

STEPS TO REPRODUCE
1. Be in Night Light night time mode
2. Turn off a monitor
3. Be greeted by a blinding reversion to day light temperature.
4. Can return to Night Light temperature by going to Settings -> Colors & Themes -> Night Light and clicking either temperature bar setting control - I do not even need to click apply or adjust the actual K value, merely clicking the slide setting re-enables Night Light.

OBSERVED RESULT
My eyes!  They burn!

EXPECTED RESULT
Night Light temperature to activate automatically on desktop refresh when a monitor is turned off.

SOFTWARE/OS VERSIONS
Operating System: EndeavourOS 
KDE Plasma Version: 6.0.5
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.1
Kernel Version: 6.9.2-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 12 × AMD Ryzen 5 5600 6-Core Processor
Memory: 31.3 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 2070 SUPER/PCIe/SSE2
Manufacturer: Micro-Star International Co., Ltd.
Product Name: MS-7C37
System Version: 3.0

ADDITIONAL INFORMATION
This is my first bug report here, I hope I've done this right!
Comment 1 Zamundaaa 2024-05-28 12:40:40 UTC
Does it stop happening if you disable the "Color Daemon" in the background services settings page?

> This is my first bug report here, I hope I've done this right!
Yes you have
Comment 2 fraser_games 2024-05-28 12:49:34 UTC
(In reply to Zamundaaa from comment #1)
> Does it stop happening if you disable the "Color Daemon" in the background
> services settings page?
> 
> > This is my first bug report here, I hope I've done this right!
> Yes you have

Disabling Color Daemon does make the behaviour as expected.

Steps taken to test this were - modify the times for Night Light to custom to enable night time colour (early afternoon as I test this and type right now).  Disable Color Daemon, turn off a monitor and the remaining monitor stays at the night time colour correctly without any "flickering" in said colour as displays and settings update.
Comment 3 Zamundaaa 2024-06-03 18:10:27 UTC
Then unfortunately we can't really fix this, on Xorg many different processes can override the gamma lut used to implement night color, and that API isn't going to change anymore.
You can of course leave the color daemon disabled as a workaround though, if you don't use icc profiles.