Bug 436796 - Seconds skip or update irregularly at minute change
Summary: Seconds skip or update irregularly at minute change
Status: REOPENED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Digital Clock widget (show other bugs)
Version: 5.21.4
Platform: Manjaro Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-08 20:31 UTC by Timothy B
Modified: 2023-11-16 21:11 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.24.3
Sentry Crash Report:


Attachments
Screen recording of digital clock widget showing :00 very briefly compared to other seconds (379.36 KB, video/mp4)
2022-03-20 21:58 UTC, Timothy B
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Timothy B 2021-05-08 20:31:56 UTC
SUMMARY

Clock plasmoids (including Digital Clock and its forks) would skip or briefly display the first second of each minute (e.g. 12:34:00). In rare cases, clock plasmoids would randomly skip/briefly display other seconds as well.

STEPS TO REPRODUCE
1. Add any clock plasmoid that supports displaying seconds to the desktop or any panel, if there isn't one
2. Configure the plasmoid to show seconds (in the case of Digital Clock, right click the plasmoid, click "Configure Digital Clock", check "Show seconds" under the Appearance tab, and apply changes)
3. Observe that the clock updates irregularly when the minute increments (e.g. 12:00:59 -> 12:01:00)

OBSERVED RESULT

Within the last few seconds of any minute, the clock would slow down (i.e. one of the seconds would not update for more than 1 second). When the minute changes, the next second (e.g. 12:01:00) is shown for about half a second or not at all.

EXPECTED RESULT

The clock would consistently display each second in uniformly spaced intervals.

SOFTWARE/OS VERSIONS
Linux: Kernel 5.11 on Manjaro (I also have kernel versions 5.10 LTS and 5.4 LTS as fallbacks)
KDE Plasma Version: 5.21.4
KDE Frameworks Version: 5.81.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION

This behavior can be inconsistent, at least in recent Plasma releases, as clock plasmoids would sometimes display the first second of each minute properly. I can also work around this by restarting plasmashell over and over until the irregular updates stop, but after a while, the irregular updates return in the same plasmashell instance.

This behavior affects ALL clock plasmoids (built-in Analog Clock, Zren's Event Calendar, etc.) but is most noticable with a digital clock. This behavior also occurs when the plasmoid is loaded into Latte Dock, which I no longer use as of submitting this ticket.

I believe this is likely related to Bug #392476 since that ticket also deals with clock updates.

My Linux kernel version and distro are likely irrelevant, but they may still be helpful. This bug has persisted since I started using Plasma daily on the same machine with version 5.16. Additionally, I first spotted this behavior when I first tried Plasma on a Linux machine running Fedora 24 back in 2016!

I am frustrated that this annoyance has not been fixed in the past 5 years or so, and that I've never seen this oddity happen in other desktop environments (including Windows and macOS).
Comment 1 Fushan Wen 2022-03-04 16:38:01 UTC
Git commit dbdae689ff82f88e1ab424646714d13f85f77033 by Fushan Wen.
Committed on 04/03/2022 at 16:37.
Pushed by fusionfuture into branch 'master'.

applets/digital-clock: Fix `Qt.formatDateTime` returns different date when minute changes

`Qt.formatDateTime` uses `MM` instead of `mm` to represent month number.
FIXED-IN: 5.24.3

M  +1    -1    applets/digital-clock/package/contents/ui/DigitalClock.qml

https://invent.kde.org/plasma/plasma-workspace/commit/dbdae689ff82f88e1ab424646714d13f85f77033
Comment 2 Fushan Wen 2022-03-04 16:38:42 UTC
Git commit 788f52fc9f33dd3e38112815deeb27886ce69d93 by Fushan Wen.
Committed on 04/03/2022 at 16:38.
Pushed by fusionfuture into branch 'Plasma/5.24'.

applets/digital-clock: Fix `Qt.formatDateTime` returns different date when minute changes

`Qt.formatDateTime` uses `MM` instead of `mm` to represent month number.
FIXED-IN: 5.24.3


(cherry picked from commit dbdae689ff82f88e1ab424646714d13f85f77033)

M  +1    -1    applets/digital-clock/package/contents/ui/DigitalClock.qml

https://invent.kde.org/plasma/plasma-workspace/commit/788f52fc9f33dd3e38112815deeb27886ce69d93
Comment 3 Timothy B 2022-03-20 21:58:17 UTC
Created attachment 147635 [details]
Screen recording of digital clock widget showing :00 very briefly compared to other seconds

I'm happy to see that this bug was partially fixed in Plasma 5.24.3. However, I've reopened this ticket because I was still able to reproduce the original reported behavior when clock widgets in plasmashell are lagging around a second behind, but only when the minute changes. It usually occurs when plasmashell starts for the first time after I log into a new session. I had to restart plasmashell multiple times to minimize that lag, and the aforementioned second skipping effect wouldn't come back as long as the delay is about half a second or less.

I've included a more precise clock in the Yakuake window on the attached video for reference between the two clocks. I used `tty-clock -scDd 0 -a 10000000` on the terminal to bring the terminal clock's precision within 1/100 of a second. Since I use Manjaro, which is Arch-based, tty-clock is only available in the AUR.
Comment 4 Timothy B 2022-08-08 14:00:49 UTC
This behavior still occurs as of Plasma 5.25.4, especially after waking up the monitor from sleep. See bug #392476 comment #3 for details.
Comment 5 Timothy B 2023-11-16 21:11:47 UTC
I'm still able to reproduce this in Plasma 5.27.9 in Manjaro as well as in the latest unstable ISO image of KDE Neon with Plasma 6 alpha.