Bug 391623

Summary: Night Colour does not get updated when external monitor is connected
Product: [Plasma] kwin Reporter: Martin Kostolný <clearmartin>
Component: platform-drmAssignee: Roman Gilg <subdiff>
Status: RESOLVED FIXED    
Severity: normal CC: adikurthy, simonandric5, subdiff
Priority: NOR Flags: mgraesslin: Wayland+
mgraesslin: X11-
Version: git master   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:

Description Martin Kostolný 2018-03-09 16:26:44 UTC
If external monitor is always connected, Night Colour works fine for both screens. When external monitor is disconnected and connected later, its colour is restored to previous state (not the actual state).

Steps to reproduce:
1) Connect external monitor during the day, then disconnect it
2) Wait for night :) (there are other ways of course)
3) Connect it at night

Now the external monitor does not turn red until first colour update. Workaround is disabling & enabling night colour.

This workaround of course does not work when the steps are reversed (I mean when you start the experiment at night) - red colour is "saved to external screen" and when connected during the day it stays red.

Anyway, thanks for Night Colour, it is a super pleasant feature!
Comment 1 Roman Gilg 2018-03-15 23:21:03 UTC
Thank you for the bug report and your encouraging feedback. :)

Indeed I overlooked this problem. I have a very simple patch, that solves this issue (I just connected to the output added signal to resync current color temperature value on all outputs - in my code this is the "hardReset" call).

I'm currently waiting for the review of some changes I made to write a sensible autotest with this patch: https://phabricator.kde.org/D11351

Afterwards the real patch should be quick to do.
Comment 2 Martin Kostolný 2018-03-16 00:25:38 UTC
> Afterwards the real patch should be quick to do.

Thanks for your effort! I'll test your patch when it arrives in phabricator.
Comment 3 Roman Gilg 2018-03-27 07:51:43 UTC
Git commit 99fec3d24597acaef16b3e2b11b24bf647789919 by Roman Gilg.
Committed on 27/03/2018 at 07:51.
Pushed by romangilg into branch 'Plasma/5.12'.

[colorcorrection] Apply current color temperature on screen hot plug

Summary:
Current color temperature must be applied immediately to hot pluged outputs.

Test Plan:
Manually. I'm working on auto tests with the new virtual output classes, but
since 5.12.4 will land before I can finish this work, I have to get this fix
in without them.

Reviewers: #kwin, broulik

Reviewed By: broulik

Subscribers: martinkostolny, broulik, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D11654

M  +2    -0    colorcorrection/manager.cpp

https://commits.kde.org/kwin/99fec3d24597acaef16b3e2b11b24bf647789919