Bug 483801

Summary: Night Color wrong temperature when HDR is enabled
Product: [Plasma] kwin Reporter: Evan <evanc577>
Component: night colorAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: kwin-bugs-null, nate, vlad.zahorodnii, xaver.hugl
Priority: NOR Keywords: qt6
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 6.0.5

Description Evan 2024-03-17 00:18:42 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

Night color is too warm when HDR is enabled on the display.

STEPS TO REPRODUCE
1. Enable HDR on a display
2. Enable night color

OBSERVED RESULT
Night color filter is too warm

EXPECTED RESULT
Night color filter is the correct temperature

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
(available in About System)
KDE Plasma Version: 6.0.2
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2

ADDITIONAL INFORMATION
Comment 1 Bug Janitor Service 2024-05-10 16:39:04 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/5710
Comment 2 Zamundaaa 2024-05-14 13:10:47 UTC
Git commit 9fef6380d4d4de7d20408861db8708505bec8de0 by Xaver Hugl.
Committed on 14/05/2024 at 12:47.
Pushed by zamundaaa into branch 'master'.

backends/drm: adapt the color factors to the target colorspace

Otherwise the effect of night color is much bigger in larger colorspaces.
This is mostly a workaround, but the better solution (adapting the color
temperature of the colorspace instead) will have to wait for 6.1
FIXED-IN: 6.0.5

M  +7    -4    src/backends/drm/drm_egl_layer_surface.cpp
M  +1    -0    src/backends/drm/drm_egl_layer_surface.h

https://invent.kde.org/plasma/kwin/-/commit/9fef6380d4d4de7d20408861db8708505bec8de0
Comment 3 Zamundaaa 2024-05-21 04:16:34 UTC
Git commit 1c7d007165e81b52bcd0b0c9fae3a68053cc0eb8 by Xaver Hugl.
Committed on 21/05/2024 at 04:09.
Pushed by zamundaaa into branch 'Plasma/6.0'.

backends/drm: adapt the color factors to the target colorspace

Otherwise the effect of night color is much bigger in larger colorspaces.
This is mostly a workaround, but the better solution (adapting the color
temperature of the colorspace instead) will have to wait for 6.1
FIXED-IN: 6.0.5
(cherry picked from commit 9fef6380d4d4de7d20408861db8708505bec8de0)

M  +7    -4    src/backends/drm/drm_egl_layer_surface.cpp
M  +1    -0    src/backends/drm/drm_egl_layer_surface.h

https://invent.kde.org/plasma/kwin/-/commit/1c7d007165e81b52bcd0b0c9fae3a68053cc0eb8