Bug 434829

Summary: kwin resets custom luts (colord-kde) when starting or at resolution change
Product: [Plasma] kwin Reporter: Antonio Orefice <kokoko3k>
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: nate
Priority: NOR    
Version: 5.18.1   
Target Milestone: ---   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=428854
Latest Commit: Version Fixed In:

Description Antonio Orefice 2021-03-23 11:10:25 UTC
SUMMARY
I use dispwin to load custom color correction lut to X11.
when kwin_x11 starts, everything is reset to default.

STEPS TO REPRODUCE
1. load a custom lut into xserver via dispwin
2. issue kwin_x11 --replace

OBSERVED RESULT
custom lut is lost

EXPECTED RESULT
to have kwin obey the current monitor color profile.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: archlinux packages
KDE Plasma Version: 5.21.3
KDE Frameworks Version: 5.80
Comment 1 Nate Graham 2021-03-23 13:10:41 UTC
See also Bug 428854.
Comment 2 Antonio Orefice 2021-03-23 14:18:32 UTC
Thanks, but i don't use nightcolor at all, i just calibrated my monitor and i'd like kwin to not reset the color profile i load via dispwin.
Comment 3 Antonio Orefice 2021-03-23 16:13:21 UTC
I also noticed that the very same issue happens when changing screen resolution.
Luts is resetted to the tefault values.
Comment 4 Antonio Orefice 2021-03-29 07:26:41 UTC
Today i decided to go the kde way to see if could improve the situation, but failed.

I installed colord-kde, loaded custom icc profiles, applied it, then i tried to:

* Change resolution via kde screen kcm module -> icc profile resetted, lut cleared.
* Restart kwin -> icc profile resetted, lut cleared.

:(
Comment 5 Antonio Orefice 2021-03-29 08:53:20 UTC
If anybody needs it, this seems like a good workaround till things will be sorted out:

#!/bin/bash

dbus-monitor --profile "type='signal',sender='org.kde.KWin',path=/ColorCorrect" | \
	while read -r line ; do
		dispwin -d 1 /koko/BENQ_7_DESTRA7.cal
		dispwin -d 2 /koko/BENQ_7_SINISTRA13.cal
	done
Comment 6 Vlad Zahorodnii 2021-03-29 13:57:19 UTC
I believe the color manager in kwin unintentionally resets gamma ramps set by colord-kde.
Comment 7 Antonio Orefice 2022-01-19 14:25:12 UTC
I spent some time to convert my .cal files to compliant icc profiles to try to better integrate into the colord subsystem.
Unfortunately Vlad was right, even colord-kde isn't able to keep the icc profile loaded.
Comment 8 Antonio Orefice 2022-03-29 11:09:24 UTC
The situation is improved.
Now kwin does not reset the lut anymore when changing resolution, but just when it starts.
Comment 9 Antonio Orefice 2023-04-06 09:32:05 UTC
And again, it resets luts on resolution changes.
Also, the previous hack does not work anymore.
Could you please suggest another workaround if fixing this issue is not an option, please?