Bug 419858

Summary: Night Colour and Redshift require manual activation and display wrong status
Product: [Plasma] plasmashell Reporter: Riccardo Robecchi <sephiroth_pk>
Component: Brightness and Color widgetAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: normal CC: adam, hpfeil, kwin-bugs-null, natalie_clarius, nate, openmindead, sephiroth_pk, torokati44, travneff, vlad.zahorodnii
Priority: NOR    
Version First Reported In: 5.93.0   
Target Milestone: 1.0   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: GUI config

Description Riccardo Robecchi 2020-04-08 19:19:49 UTC
SUMMARY
Ever since the update to KDE Plasma 5.18 Night Colour and Redshift have been behaving improperly. They fail to activate when the time comes, even though their respective applets say they are active.

STEPS TO REPRODUCE
1. Set up either Redshift or Night Colour

OBSERVED RESULT
Even if the applets say the services are active, you can see they are not reducing the blue light and the screen has no changes in colour. If you click on the applet it does not change, but the colour changes. This applies to both Redshift and Night Colour, independently and when not running together (so either one or the other runs at a given time, not both together: this excludes conflicts between the two). This behaviour only emerged after the update to Plasma 5.18. I have been observing this result both if composition is disabled and then enabled again and if it's never disabled.
Furthermore, when either Redshift or Night Colour is enabled, if I open any settings window (e.g. the Sound settings window from the sound plasmoid) the colour correction is disabled and I need to enable it again manually, with the same behaviour of the applets as previously described (the applet says the service's enabled but it's not, and clicking on the applet you don't see it changing even though it enables the service).

EXPECTED RESULT
Night Colour and Redshift behave as desired, applying their effect whether or not you open a settings window.

SOFTWARE/OS VERSIONS
Linux: KDE Neon
KDE Plasma Version: 5.18.4
KDE Frameworks Version: 5.68
Qt Version: 5.14.1

ADDITIONAL INFORMATION
Using a PC with an AMD Ryzen 5 2500U APU with Mesa 19.0.
Comment 1 Vlad Zahorodnii 2020-04-22 06:38:33 UTC
Are you on X11 or Wayland?
Comment 2 Riccardo Robecchi 2020-06-11 18:02:18 UTC
(In reply to Vlad Zahorodnii from comment #1)
> Are you on X11 or Wayland?

I am sorry for my late reply, I forgot to add myself to the CC list. I am on X.
Comment 3 torokati44 2020-06-23 20:13:34 UTC
I have a similar, although somewhat different issue with Night Color:
My system is a desktop, with two monitors. One of them is on HDMI, 60Hz, in portrait orientation (with rotated output), and the other one is on DisplayPort, 120Hz, in landscape orientation. I am on X11 as of now.

I have Night Color enabled, and in the evening, it dims the portrait monitor as expected, but not the landscape one.
Upon opening the preferences dialog, to manually toggle the Night Color feature:

In this inconsistent state, when disabling the feature and pressing Apply on the dialog, the landscape monitor immediately flashes to being a warmer color tone, just to then slowly fade back into blue, together with the other working monitor.

And after this, when Night Color is enabled again, they both fade into warm color together. For some reason, it just doesn't apply the color temperature automatically on the main display basedon time.
It might have something to do with me sometimes playing fullscreen games on that monitor, which disables compositing temporarily?

Back when I had gtk-redshift instead, it seemed to always work just fine.
Comment 4 torokati44 2020-06-23 20:19:11 UTC
Actually my issue is also similar to this one:
https://bugs.kde.org/show_bug.cgi?id=419690
Except I'm never disconnecting-reconnecting any of the displays.
However, I do send the computer into standby every night, which, I guess, effectively, disconnects both of them "at the same time"?
Comment 5 Henry Pfeil 2020-08-03 00:39:58 UTC
With geo-coordinates set to my gps manual location, kcm_nightcolor shows the correct start and end times, but night color is always on (noon). With Custom time, it works as advertised. For reasons I cannot explain, Current location and Detect location are 0, 0. What changed? This used to work as advertised.
Comment 6 adam 2023-09-02 12:25:26 UTC
I also see this behavior.

The application frequently fails to make any of the transitions occur.

I have custom times set and I frequently need to manually touch the sliders get it to "notice" what state its supposed to be in.

When touching either of the sliders it does select the correct state that it should have been in for the custom times set.
Comment 7 adam 2023-09-02 12:28:47 UTC
(In reply to adam from comment #6)
> I also see this behavior.
> 
> The application frequently fails to make any of the transitions occur.
> 
> I have custom times set and I frequently need to manually touch the sliders
> get it to "notice" what state its supposed to be in.
> 
> When touching either of the sliders it does select the correct state that it
> should have been in for the custom times set.

I should say I'm on debian bookworm with an amd gpu.

This has been happening for the last year'ish
Comment 8 Andrew 2023-12-22 20:37:07 UTC
Created attachment 164372 [details]
GUI config

For me it happens from time to time.
Seems like it misses either the current time (scheduledTransitionDateTime) or targetTemperature somehow.
Example state after such a miss; night color configured to 3000°K and not applied here:

    $ for p in `qdbus org.kde.NightColor /ColorCorrect | grep ^property | cut -d. -f5`; do
        echo "$p = `qdbus org.kde.NightColor /ColorCorrect $p`"
    done

    available = true
    currentTemperature = 5000
    enabled = true
    inhibited = false
    mode = 2
    previousTransitionDateTime = 1703224800
    previousTransitionDuration = 60000
    running = true
    scheduledTransitionDateTime = 1703275200
    scheduledTransitionDuration = 60000
    targetTemperature = 5000

    $ date
    Fri Dec 22 10:24:49 PM EET 2023

    $ date --date=@1703275200
    Fri Dec 22 10:00:00 PM EET 2023

Applet icon tells "Night Color is active (5000K)".
After clicking it generates message "Night Color off" (inhibited).

Screenshot of the graphical config attached.

Using Xorg, Fedora 39:
    kwin-common-5.27.10-1.fc39.x86_64
    plasma-workspace-libs-5.27.10-1.fc39.x86_64
    kdeplasma-addons-5.27.10-1.fc39.x86_64
    kde-workspace-common-4.11.22-39.fc39.noarch
    kde-baseapps-common-16.12.2-15.fc39.noarch
    kde-runtime-17.08.3-28.fc39.x86_64
Comment 9 Nate Graham 2024-04-09 14:07:14 UTC
Lots of things have changed here in Plasma 6, so there's a chance the issue may be fixed now.

Can I ask affected folks to try again in Plasma 6? If it's still broken, then at this point it's probably either a KWin issue or a driver issue.
Comment 10 Bug Janitor Service 2024-04-24 03:46:50 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 11 Bug Janitor Service 2024-05-09 03:45:53 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!