Created attachment 170054 [details] Configuration Night Light SUMMARY STEPS TO REPRODUCE 1. 2. 3. OBSERVED RESULT After upgrading to Plasma 6.1 Beta I get this error message (visible with journalctl -p err): kwin_wayland[1181]: kwin_nightlight: Error in time calculation. Deactivating Night Light. But the night color seems to work just fine... The error happens always exactly one minute before the end of the transition duration. I attach a screenshot with my configuration of the Night Light. So in my case, I configured the to change the color at 22:30 for 30 mins, and the error happened at 22:29:59. SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 6.0.90 KDE Frameworks Version: 6.2.0 Qt Version: 6.7.1 Kernel Version: 6.9.3-arch1-1 (64-bit) Graphics Platform: Wayland Processors: 24 × AMD Ryzen 9 7900X3D 12-Core Processor Memory: 93.5 GiB of RAM Graphics Processor: AMD Radeon RX 7900 XT Manufacturer: ASUS
Sorry, for the wrong formatting of the report. I copy-paste from my notes directly in the observed result section...
I cannot reproduce it. I set the transition time as in the screenshot and then used "sudo timedatectl set-time 22:29" and waited until the time crosses 22:30. What's your timezone?
Waiting for info on timezone
Nvm, I've found a way to reproduce it. In my case, the error occurs at the start of the transition
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/5851
Hi Vlad, I use /usr/share/zoneinfo/Europe/Zurich
Git commit 83502e29a94c5972787357f3c5995697b5715304 by Vlad Zahorodnii. Committed on 07/06/2024 at 15:16. Pushed by vladz into branch 'master'. plugins/nightlight: Fix current time changing after updating transitions When the slow update timer fires, it's going to pass m_next.first as the current time in order to calculate the next transition timings. After the timings have been calculated, the slow update timer will be started with an interval of "todayNow.msecsTo(m_next.first)". Since todayNow is a reference to m_next.first, the time diff will be 0, which will throw off the night light manager. To fix that, make a copy of m_next.first and then pass the copy as the current date time to resetSlowUpdateTimers(). M +2 -1 src/plugins/nightlight/nightlightmanager.cpp https://invent.kde.org/plasma/kwin/-/commit/83502e29a94c5972787357f3c5995697b5715304
Git commit 35b3fc0bb1b59423fedb7a4a45603418c20a8881 by Vlad Zahorodnii. Committed on 07/06/2024 at 15:27. Pushed by vladz into branch 'Plasma/6.1'. plugins/nightlight: Fix current time changing after updating transitions When the slow update timer fires, it's going to pass m_next.first as the current time in order to calculate the next transition timings. After the timings have been calculated, the slow update timer will be started with an interval of "todayNow.msecsTo(m_next.first)". Since todayNow is a reference to m_next.first, the time diff will be 0, which will throw off the night light manager. To fix that, make a copy of m_next.first and then pass the copy as the current date time to resetSlowUpdateTimers(). (cherry picked from commit 83502e29a94c5972787357f3c5995697b5715304) Co-authored-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org> M +2 -1 src/plugins/nightlight/nightlightmanager.cpp https://invent.kde.org/plasma/kwin/-/commit/35b3fc0bb1b59423fedb7a4a45603418c20a8881