Summary: | kwin resets custom luts (colord-kde) at resolution change | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | Antonio Orefice <kokoko3k> |
Component: | general | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED UPSTREAM | ||
Severity: | normal | CC: | nate, xaver.hugl |
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: | ||
Sentry Crash Report: |
Description
Antonio Orefice
2021-03-23 11:10:25 UTC
See also Bug 428854. 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. I also noticed that the very same issue happens when changing screen resolution. Luts is resetted to the tefault values. 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. :( 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 I believe the color manager in kwin unintentionally resets gamma ramps set by colord-kde. 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. The situation is improved. Now kwin does not reset the lut anymore when changing resolution, but just when it starts. 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? There's lots of different processes setting gamma ramps to different values on different times on Xorg. If you set the ICC profile on Wayland, nothing will be able to override that, but fixing this on Xorg isn't really feasible (In reply to Zamundaaa from comment #10) > There's lots of different processes setting gamma ramps to different values > on different times on Xorg. If you set the ICC profile on Wayland, nothing > will be able to override that, but fixing this on Xorg isn't really feasible I'm not sure I get it. Kde used to Not doing that, why can't it stop doing it now? Also, what does a resolution change has to do with a color profile is out of my understanding. It doesn't have anything to do with color profiles, but Xorg has only one LUT that any and every application can set, and that we need to use for night color. With night color, we need to ensure that the lut is set appropriately when a new display is connected, otherwise the wrong lut may be set and the colors differently than expected. KWin does not have any information about what other applications are doing or not doing with the lut, so it can't keep your use case working. (In reply to Zamundaaa from comment #10) > There's lots of different processes setting gamma ramps to different values > on different times on Xorg. If you set the ICC profile on Wayland, nothing > will be able to override that, but fixing this on Xorg isn't really feasible I'm not sure I get it. Kde used to Not doing that, why can't it stop doing it now? Also, what does a resolution change has to do with a color profile is out of my understanding.(In reply to Zamundaaa from comment #12) > It doesn't have anything to do with color profiles, but Xorg has only one > LUT that any and every application can set, and that we need to use for > night color. With night color, we need to ensure that the lut is set > appropriately when a new display is connected, otherwise the wrong lut may > be set and the colors differently than expected. > KWin does not have any information about what other applications are doing > or not doing with the lut, so it can't keep your use case working. Ok, can plasma just stop resetting the lut when resolution changes? I've edited the bug title to reflect that. If even that is not possible, feel free to close. Have a good day. (In reply to Zamundaaa from comment #12) > KWin does not have any information about what other applications are doing > or not doing with the lut, so it can't keep your use case working. In case you don't know, Lut can be downloaded from Xorg as well. Making KWin not set the luts on resolution changes would be possible, but I checked and there's no code that actually does that... so that's gonna be some other process doing things. Downloading luts doesn't help either, we don't know if the lut that is set makes sense (or if it's a lut that SDL games set to implement in-game gamma settings in the most annoying way possible), if it's a combination of our previous lut and another, if it's just a different lut, and so on. It's really not a problem that can be solved without backwards-incompatible changes in Xorg, which won't happen. Ok, I'm just going to use xrandr and trigger a lut reload. If anyone needs: koko@Gozer# cat /koko/scripts/benq.keep.lut.sh #!/bin/bash dispwin -d 1 -s /koko/tmp/1.lut dispwin -d 2 -s /koko/tmp/2.lut state_old=$(xrandr |md5sum) while true ; do sleep 5 state_new=$(xrandr |md5sum) if [ "$state_new" != "$state_old" ] ; then echo "Trig" sleep 1 dispwin -d 1 /koko/tmp/1.lut dispwin -d 2 /koko/tmp/2.lut state_old=$state_new fi done |