Bug 413134 - Night color conflicts with color correction
Summary: Night color conflicts with color correction
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_nightcolor (show other bugs)
Version: 5.24.3
Platform: Neon Linux
: HI normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 413300 417426 419053 426121 441427 448388 456460 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-10-18 10:23 UTC by Floreal
Modified: 2024-01-10 16:16 UTC (History)
22 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Floreal 2019-10-18 10:23:09 UTC
SUMMARY
Night colors are disabled while we open gamma in settings


STEPS TO REPRODUCE
1. Open system settings
2. Select "Display and Monitor"
3. Go to "Color night", check activate night color and select "Constant" for Mode
4. Apply
5. Go to Gamma item

OBSERVED RESULT

After step 4, color change to the desired temperature. After step 5, temperature go back to the default one without correction. The temperature never go back even we change tab or close settings. The only way to fix it is to go back to night color in settings and re-apply it.


EXPECTED RESULT

Temparature should be kept when we go to gamma, or at least reapplied when we leave this settings.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Neon 18.04
(available in About System)
KDE Plasma Version: 5.17.0
KDE Frameworks Version: 5.63.0
Qt Version: 5.13.1

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2019-10-27 15:01:44 UTC
Hmm, cannot reproduce.
Comment 2 Patrick Silva 2019-10-30 22:34:14 UTC
On neon unstable edition night color stops working when I open system settings > display and monitor. If I select and apply another operation mode, night color works but it stops again when I close system settings. This behavior only occurs on X11.

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.17.80
KDE Frameworks Version: 5.64.0
Qt Version: 5.13.1
Comment 3 Vlad Zahorodnii 2019-11-18 12:58:33 UTC
> Temparature should be kept when we go to gamma, or at least reapplied when we
> leave this settings.
Due to the nature of X11, this is CANTFIX. Although, maybe it's possible to fix gamma kcm so it doens't try to update gamma ramps for no apparent reason.
Comment 4 Christoph Feck 2019-11-18 23:05:31 UTC
https://github.com/maandree/libcoopgamma is a proposed solution.
Comment 5 Vlad Zahorodnii 2019-11-20 13:49:22 UTC
Thanks, I didn't know about that project. It looks promising but it doesn't fix the root cause of the problem, which is X11 itself or rather the fact that the XRANDR extension allows any client to change gamma ramps.
Comment 6 Christoph Feck 2019-11-21 16:45:20 UTC
*** Bug 413300 has been marked as a duplicate of this bug. ***
Comment 7 Vasily Khoruzhick 2019-11-21 17:25:20 UTC
(In reply to Vlad Zahorodnii from comment #3)
> > Temparature should be kept when we go to gamma, or at least reapplied when we
> > leave this settings.
> Due to the nature of X11, this is CANTFIX. Although, maybe it's possible to
> fix gamma kcm so it doens't try to update gamma ramps for no apparent reason.

Check how it's implemented in Gnome, IIRC they don't have this issue.
Comment 8 Doug 2019-12-17 03:57:46 UTC
I am having the same issue (Night Color disengaging) when I open the NVIDIA X Server Settings in KDE Neon 5.17.4.
Comment 9 David Edmundson 2020-02-11 15:23:55 UTC
*** Bug 417426 has been marked as a duplicate of this bug. ***
Comment 10 Nate Graham 2020-04-15 14:51:54 UTC
*** Bug 419053 has been marked as a duplicate of this bug. ***
Comment 11 David Hurka 2020-06-12 19:48:19 UTC
I have the same issue. Night Color and Gamma Correction can’t be used at the same time. As soon as Night Color becomes active, gamma is reset to 1.0, and as soon as something changes gamma, temperature is reset to 6500K.

Do I understand it right, that X11 doesn’t allow to set both gamma and temperature?
Comment 12 Christoph Feck 2020-07-08 18:43:27 UTC
X11 changes both gamma and temperature via gamma ramps. If one tool changes the ramps, the changes from the other tools are lost, unless they would be using some cooperation (see comment 4).
Comment 13 Christoph Feck 2020-09-28 10:34:26 UTC
*** Bug 426121 has been marked as a duplicate of this bug. ***
Comment 14 Joe 2021-02-19 06:29:48 UTC
Just wanted to confirm I am seeing this, too, on the latest stack.

Plasma: 5.21.0
Frameworks: 5.79.0
QT: 5.15.2
NVIDIA: 460.39
on xorg (latest for whatever that matters)

I can reproduce:

System Settings -> Display Configurations -> Compositor: Hit or miss, sometimes it breaks night color, sometimes not. most times it doesn't.

System Settings -> Display Configurations -> Gama: Always breaks

NVIDIA Control Panel: Always breaks

Crossover Office -> Office 2016: Always breaks night color

Those are so far the places I can see night color breaking. The crossover office one is kind of strange, but, figured I would include it anyways. I can test tomorrow on my Intel laptop (well, prime using the intel gpu), and on an AMD rx 5500 box to see if they are different.
Comment 15 Leon De Andrade 2021-02-20 07:37:35 UTC
Can confirm this as well. Just opening Compositor sometimes disabled it and just opening gamma always disabled it.
Even if these conflict (and it's therefore cantfix), it should happen when you change something and not just by opening the settings page.
Comment 16 Maciej Mrozowski 2021-03-01 01:58:31 UTC
I can confirm the behavior.
Perhaps it's same root cause? https://bugs.kde.org/show_bug.cgi?id=428357
Comment 17 Nate Graham 2021-08-23 20:26:26 UTC
*** Bug 441427 has been marked as a duplicate of this bug. ***
Comment 18 Patrick Silva 2022-01-14 01:56:22 UTC
*** Bug 448388 has been marked as a duplicate of this bug. ***
Comment 19 kwizzz 2022-03-29 19:03:53 UTC
Confirmed, too:
Operating System: openSUSE Leap 15.4
KDE Plasma Version: 5.24.3
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2
Kernel Version: 5.14.21-150400.11-default (64-bit)
Graphics Platform: X11
Processors: 4 × Intel® Core™ i5-5300U CPU @ 2.30GHz
Memory: 11.6 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 5500

This bug is especially annoying, as the default view on openSUSE is Icon View.  In this view, night color gets already disabled when clicking on Display and Monitor icon.  After switching to Sidebar View, behavior is the same as described here.
Comment 20 Dan 2022-07-07 20:27:42 UTC
*** Bug 456460 has been marked as a duplicate of this bug. ***
Comment 21 Dan 2022-07-07 20:42:42 UTC
In my case, Night Color stops working when leaving/entering System Settings. So if at least System Settings could be fixed to not interfere with Night Color, it would solve the issue for me...
Comment 22 Yevhen Popok 2023-12-11 05:54:16 UTC
This issue has migrated to KDE Plasma 6 Wayland.

 STEPS TO REPRODUCE:
1. In "System Settings" go to "Input & Output" > "Display & Monitor" > "Display Configuration"
2. In the field "Color Profile" specify the path to the ICC color profile file (.e.g., /usr/share/color/icc/colord/Rec709.icc)
3. In "System Settings" go to "Appearance & Style" > "Colors & Themes" > "Night Light". Set "Switching times" to "Always on night light"

OBSERVED RESULT:
"Night Light" does not work until the user disables "Color Profile" and re-applies "Night Light"
Comment 23 Bug Janitor Service 2023-12-21 20:41:10 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/4827
Comment 24 Zamundaaa 2023-12-22 13:12:04 UTC
Git commit b24505a447a992634380acc223aa617e670106ef by Xaver Hugl.
Committed on 22/12/2023 at 14:00.
Pushed by zamundaaa into branch 'master'.

backends/drm: fix night color with ICC profiles

Until night color is dealt with properly by adjusting the output whitepoint,
the channel factors have to be multiplied in with the color transformation
matrix manually

M  +1    -1    src/backends/drm/drm_egl_layer_surface.cpp
M  +6    -2    src/backends/drm/icc_shader.cpp
M  +1    -1    src/backends/drm/icc_shader.h

https://invent.kde.org/plasma/kwin/-/commit/b24505a447a992634380acc223aa617e670106ef