Bug 450288 - Night colors aren't applied if login takes place during the "night"
Summary: Night colors aren't applied if login takes place during the "night"
Status: RESOLVED DUPLICATE of bug 428357
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_nightcolor (show other bugs)
Version: 5.24.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-15 06:51 UTC by Gerhard
Modified: 2023-05-04 22:46 UTC (History)
8 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 Gerhard 2022-02-15 06:51:42 UTC
If you log in during the "night", i.e. before normal colors start to reapply, the system coloring is still on normal color. It should be on night colors at this time.
If you wait until the point in time when normal colors start to apply, the night colors are applied all of a sudden.

It seems to be some sort of initialisation problem. The system always seem to be in day color mode until it notices it's time to transition from night to normal colors.

If you toggle night colors manually, the correct coloring is applied.

I checked the times and location in the kcm modules, all seems correct.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: openSUSE TUmbleweed 20220213
KDE Plasma Version: 5.24.0 
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2
Comment 1 Atul 2022-04-06 06:58:50 UTC
I can confirm this issue on my system as I wake up and work before sunrise :)

Operating System: KDE neon 5.24
KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.3
Kernel Version: 5.13.0-39-generic (64-bit)
Graphics Platform: X11
Processors: 12 × AMD Ryzen 5 5600X 6-Core Processor
Memory: 31.3 GiB of RAM
Graphics Processor: NVIDIA GeForce GT 710/PCIe/SSE2
Comment 2 Malte 2022-05-12 11:58:09 UTC
Can confirm as well:

Operating System: openSUSE Tumbleweed 20220509
KDE Plasma Version: 5.24.5
KDE Frameworks Version: 5.93.0
Qt Version: 5.15.2
Kernel Version: 5.17.5-1-default (64-bit)
Graphics Platform: Wayland
Processors: 8 × AMD Ryzen 5 2400G with Radeon Vega Graphics
Memory: 31.3 GiB of RAM
Graphics Processor: AMD Radeon RX 580 Series
Comment 3 Torkin 2022-12-15 17:21:34 UTC
Same here.

Operating System: Fedora Linux 37
KDE Plasma Version: 5.26.4
KDE Frameworks Version: 5.101.0
Qt Version: 5.15.7
Kernel Version: 6.0.12-300.fc37.x86_64 (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-4700MQ CPU @ 2.40GHz
Memory: 15.3 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 4600
Manufacturer: LENOVO
Product Name: 20BE0087GE
System Version: ThinkPad T540p
Comment 4 Elias 2022-12-21 23:17:24 UTC
Hi, I noticed one thing that contributes to the problem on Nvidia systems. Some distributions (Fedora, Ubuntu, Pop,...) package an auto start entry which executes the command
`nvidia-settings --load-config-only`
after every user login. This should load the nvidia configuration file (if you have one) but unfortunately at the same time resets your color profile.

What happens is that Night Color activates on login, works for about one second, but shortly after the autostart command is run, nvidia config is loaded and colors are reset.

For me, deleting the autostart entry (on Fedora: `/etc/xdg/autostart/nvidia-settings-user.desktop`) (filename could be different depending on distribution, look in your `/etc/xdg/autostart`) did help.
Now Night Color works at least most of the time after login.
But it still sometimes fails to activate after first login after boot, so there seems yet something else involved.
Comment 5 Elias 2022-12-21 23:25:49 UTC
(In reply to Elias from comment #4)
> For me, deleting the autostart entry (on Fedora:
> `/etc/xdg/autostart/nvidia-settings-user.desktop`) (filename could be
> different depending on distribution, look in your `/etc/xdg/autostart`) did
> help.

...However keep in mind this is only a workaround and may have side effects (your custom nvidia config won't load anymore, if you have one). Ideally Plasma should wait until the `nvidia-settings --load-config-only` command (run by the autostart entry) finished executing and only after that activate Night Color.

An alternative workaround:
Add a script to your autostart which toggles Night Color two times, with a little delay, after login. Example:
```
#!/bin/bash
sleep 2
qdbus org.kde.kglobalaccel /component/kwin org.kde.kglobalaccel.Component.invokeShortcut "Toggle Night Color"
sleep 1
qdbus org.kde.kglobalaccel /component/kwin org.kde.kglobalaccel.Component.invokeShortcut "Toggle Night Color"
```
Comment 6 Nicolas Fella 2023-01-11 22:40:18 UTC

*** This bug has been marked as a duplicate of bug 428357 ***