Bug 405322 - Negative "Relative Start Time" in Process Table after hibernation
Summary: Negative "Relative Start Time" in Process Table after hibernation
Status: RESOLVED UNMAINTAINED
Alias: None
Product: ksysguard
Classification: Unmaintained
Component: ksysguard (other bugs)
Version First Reported In: 5.12.7
Platform: Mint (Debian based) Linux
: NOR normal
Target Milestone: ---
Assignee: KSysGuard Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-10 16:45 UTC by evandrocoan
Modified: 2024-09-23 21:00 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description evandrocoan 2019-03-10 16:45:42 UTC
SUMMARY
Shows negative `Relative Start Time` when the computer comes out from hibernation on the next and subsequent days.

STEPS TO REPRODUCE
1. Open KSysGuard.
2. Hibernate you computer.
3. Wake up your computer from hibernation (not sleep mode), later, 24 hours or more.

OBSERVED RESULT
It will show several program with negative relative start time.

EXPECTED RESULT
No program with negative relative start time.

SOFTWARE/OS VERSIONS
Linux (x86_64) Mint Xfce 19.1 Kernel release 4.15.0-46-generic
Comment 1 Chris Holland 2020-01-11 21:52:45 UTC
I observe this regularly after putting my PC to sleep. I don't hibernate it, and I'm able to wake it with the spacebar.

Operating System: Manjaro Linux 
KDE Plasma Version: 5.17.4
KDE Frameworks Version: 5.65.0
Qt Version: 5.14.0
Kernel Version: 5.4.6-2-MANJARO

-----

Here's where the logic is calculated:

* https://github.com/KDE/libksysguard/blob/master/processui/ProcessModel.cpp#L1410
* https://github.com/KDE/libksysguard/blob/master/processui/ProcessModel.cpp#L1573

I think it's caused by TimeUtil::systemUptimeAbsolute(), as it takes the current time, and subtracts TimeUtil::systemUptimeSeconds()

* https://github.com/KDE/libksysguard/blob/master/processui/timeutil.h#L65
* https://github.com/KDE/libksysguard/blob/master/processui/timeutil.h#L45
* https://doc.qt.io/qt-5/qdatetime.html#currentDateTime

We're using CLOCK_MONOTONIC

> https://linux.die.net/man/3/clock_gettime
> CLOCK_MONOTONIC
>    Clock that cannot be set and represents monotonic time since some unspecified starting point.


I assume that it's taking the seconds since waking up and subtracting the seconds since the system's initial boot somewhere but I can't figure it out without some debug logging.
Comment 2 Christoph Cullmann 2024-09-23 21:00:22 UTC
ksysguard is no longer maintained, in Plasma 6 there is the Plasma system monitor for this task.

If your issue still happens with the Plasma 6 replacement, please re-open and we can move this bug to the new product, thanks!