Bug 428357 - Night color does not activate after session start
Summary: Night color does not activate after session start
Status: RESOLVED INTENTIONAL
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 5.25.5
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL: https://bugs.launchpad.net/ubuntu/+so...
Keywords:
: 450288 464166 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-10-27 19:29 UTC by piotr
Modified: 2024-03-05 15:42 UTC (History)
19 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description piotr 2020-10-27 19:29:54 UTC
SUMMARY
Apparently when new session is started (like when e.g. logging into KDE after fresh boot) after terminating previous session while night color was already active, night color mode does not activate. Specifically the colors remain "normal" (i.e. day temperature), however night color icon in the panel indicates that the "night mode" is activate. Clicking night color icon in the panel twice (first disabling it, and later enabling) restores proper colors.

STEPS TO REPRODUCE
1. Terminate KDE session while night color was active (e.g. during the night)
2. Start new session (also during the night)
3. 

OBSERVED RESULT
Colors switch to "night colors" and than immediatelly switch back to "day colors", while panel indicator stays in "night colors on" state 

EXPECTED RESULT
Colors should stay in "nigh mode"


SOFTWARE/OS VERSIONS
Operating System: KDE neon 5.20
KDE Plasma Version: 5.20.1
KDE Frameworks Version: 5.75.0
Qt Version: 5.15.0
Kernel Version: 5.4.0-52-generic
OS Type: 64-bit
Processors: 8 × Intel® Core™ i7-8550U CPU @ 1.80GHz
Memory: 15,4 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 620
Comment 1 Nate Graham 2020-10-29 19:27:10 UTC
Can confirm.
Comment 2 Maciej Mrozowski 2021-03-01 01:55:51 UTC
This happens also if "Start with an empty session" is selected.
Color Daemon is enabled in "Background Services".
Comment 3 Maciej Mrozowski 2021-03-01 01:58:05 UTC
Might have something to do with https://bugs.kde.org/show_bug.cgi?id=413134
Comment 4 david 2021-11-19 19:25:33 UTC
I don't know if this is related, but Night color is active on only one monitor for me; I have two monitors, each connected to a different GPU. I have to turn Night color off and on again after startup.

I use Fedora 35 (upgraded from F34) w/ Plasma 5.23.2 (updated from 5.22.x), X11 and one monitor connected to the on-board APU (AMD Ryzen 3400G w/ Vega 11), the other to an older graphic card (AMD Radeon HD 6450).
Comment 5 JanNowak94 2022-01-05 23:15:50 UTC
Can confirm on Arch 5.23.5. 

Also from me - when pseudo "night colors on" state is turned off, the colors jump to the night state and shift from that state to the "day" one, as if the night colors were active, even though they clearly were not.
It is also incorrect for me to state that it "does not activate" - it does during splashscreen, but then it jumps back to the "day" state just after few seconds (still during splashscreen).
Comment 6 Jiann-Ming Su 2022-11-08 02:03:33 UTC
Same problem on Kubuntu 22.10 on kwin 5.25.5.  No such problem on Kubuntu 20.04 on kwin 5.18.4.  If I log in AFTER Night Color is suppose to begin, then it does NOT automatically adjust the color temperature.  But, if I'm logged in before the begin time, then the color temp changes automatically.
Comment 7 Jesus 2022-12-14 22:39:52 UTC
Same here with Arch Linux, KDE Plasma 5.26.4, this also happens when you connect a secondary screen, after connect the night color is disabled.
Comment 8 Nicolas Fella 2023-01-11 22:40:18 UTC
*** Bug 450288 has been marked as a duplicate of this bug. ***
Comment 9 Nicolas Fella 2023-01-11 22:40:25 UTC
*** Bug 464166 has been marked as a duplicate of this bug. ***
Comment 10 Nicolas Fella 2023-01-11 23:08:39 UTC
(In reply to Maciej Mrozowski from comment #3)
> Might have something to do with https://bugs.kde.org/show_bug.cgi?id=413134

Yes, it indeed seems related.

What I'm seeing is this:

When logging into an X11 session night color activates, then after 1-2s it deactivates again. It's still marked as enabled in the applet and deactivating and activating again enables night color

After going to Systemsettings > "Startup and Shutdown" > "Background Services" and disabling "Color Daemon" it works as expected
Comment 11 David 2023-02-22 22:32:43 UTC
(In reply to Nicolas Fella from comment #10)
> (In reply to Maciej Mrozowski from comment #3)
> > Might have something to do with https://bugs.kde.org/show_bug.cgi?id=413134
> 
> Yes, it indeed seems related.
> 
> What I'm seeing is this:
> 
> When logging into an X11 session night color activates, then after 1-2s it
> deactivates again. It's still marked as enabled in the applet and
> deactivating and activating again enables night color
> 
> After going to Systemsettings > "Startup and Shutdown" > "Background
> Services" and disabling "Color Daemon" it works as expected

I can confirm, additionally, manually toggling the colour daemon service stops Night Color functionality immediately. There is definitely something going on there.
Comment 12 Jiann-Ming Su 2023-05-20 21:25:47 UTC
(In reply to Jiann-Ming Su from comment #6)
> Same problem on Kubuntu 22.10 on kwin 5.25.5.  No such problem on Kubuntu
> 20.04 on kwin 5.18.4.  If I log in AFTER Night Color is suppose to begin,
> then it does NOT automatically adjust the color temperature.  But, if I'm
> logged in before the begin time, then the color temp changes automatically.

Not sure what has changed, but this behavior is corrected and reliable now.  Night color on Kubuntu 22.10 on 5.25.5 started working reliably and has continued on Kubuntu 23.04 and 5.27.4.
Comment 13 Ye Wod 2023-06-26 03:40:11 UTC
Disabling the color daemon fixing this issue on Fedora KDE, but Kubuntu doesn't have the color daemon listed in Background Services. The issue still exists for Kubuntu, but occurs sporadically.
Comment 14 Vlad Zahorodnii 2023-07-25 09:52:21 UTC
Can you please post the output of `qdbus org.kde.KWin /ColorCorrect GetAll org.kde.kwin.ColorCorrect` when screen color temperature is incorrect? Please also specify the expected screen temperature
Comment 15 David Edmundson 2023-07-25 09:53:24 UTC
It is expected and known that enabling colour daemon will mess with night colour. They both adjust the same monitor settings and are therefore mutually exclusive.
Comment 16 chmurli 2023-09-24 10:11:40 UTC
I guess there should be some information in night mode configuration that color daemon is enabled and should be disabled.
Comment 17 test 2024-03-03 14:43:38 UTC
Fedora 39:

# systemctl disable colord
The unit files have no installation config (WantedBy=, RequiredBy=, UpheldBy=,
Also=, or Alias= settings in the [Install] section, and DefaultInstance= for
template units). This means they are not meant to be enabled or disabled using systemctl.
 
Possible reasons for having this kind of units are:
• A unit may be statically enabled by being symlinked from another unit's
  .wants/, .requires/, or .upholds/ directory.
• A unit's purpose may be to act as a helper for some other unit which has
  a requirement dependency on it.
• A unit may be started when needed via activation (socket, path, timer,
  D-Bus, udev, scripted systemctl call, ...).
• In case of template units, the unit is meant to be enabled with some
  instance name specified.


What do you suggest how to disable colord?  It's required by gnome-shell which I don't want to remove atm.  Why does it even run when I'm using KDE?
Comment 18 Nicolas Fella 2024-03-03 14:46:25 UTC
> What do you suggest how to disable colord?

Systemsettings > "Startup and Shutdown" > "Background Services" > disable "Color Daemon"

> Why does it even run when I'm using KDE?

Because it's used to do color management on Plasma X11. It's not exclusive to Gnome
Comment 19 test 2024-03-05 15:42:16 UTC
Thanks, I found it.  Why does colord get started despite no color profiles have been provided?

However, the colour change doesn't work even when colord is not running.  Should I just wait until plasma 6 has arrived and see if it works then; and meanwhile, keep night color disabled?