Bug 391623 - Night Colour does not get updated when external monitor is connected
Summary: Night Colour does not get updated when external monitor is connected
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: platform-drm (show other bugs)
Version: git master
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Roman Gilg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-09 16:26 UTC by Martin Kostolný
Modified: 2018-04-05 13:02 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
mgraesslin: Wayland+
mgraesslin: X11-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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