Bug 417558

Summary: CPU usage percentage scales incorrectly (up to 102%)
Product: [Unmaintained] ksysguard Reporter: Kyrylo Bohdanenko <kirill.bogdanenko>
Component: ksysguardAssignee: KSysGuard Developers <ksysguard-bugs>
Status: RESOLVED UNMAINTAINED    
Severity: normal CC: bugseforuns, mclemoret97
Priority: NOR    
Version First Reported In: 5.18.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: KSysGuard scaled to show 102 percent CPU graph

Description Kyrylo Bohdanenko 2020-02-13 12:46:45 UTC
SUMMARY
There is a way to make CPU graph to go from 0% to 102%. Depends on window proportions.

STEPS TO REPRODUCE
1. Adjust window height so that "CPU History" graph has 3 sections (see attached image)


OBSERVED RESULT
CPU graph is divided into 0%, 34%, 68%, 102%

EXPECTED RESULT
CPU graph should top out at 100%



SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Kubuntu 19.10 (kernel 5.3.0-29-generic)
(available in About System)
KDE Plasma Version: 5.18.0
KDE Frameworks Version: 5.67.0
Qt Version: 5.12.4

ADDITIONAL INFORMATION
Screen resolution: 1920x1080
OpenGL renderer string: llvmpipe (LLVM 9.0, 256 bits)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 19.2.8
Comment 1 Kyrylo Bohdanenko 2020-02-13 12:50:38 UTC
Created attachment 125941 [details]
KSysGuard scaled to show 102 percent CPU graph

Adding the screenshot
Comment 2 Christoph Feck 2020-03-06 13:35:05 UTC
I was about to mark it as a junior job, but the code in ksignalplotter.cpp is quite convoluted. It seems to prefer rounding up 33.3% to 34% to avoid data points going above the range. Then it computes multiples of that value. The rounding needs to happen for each step separately, not just for the first step.
Comment 3 Patrick Silva 2020-03-31 17:11:27 UTC
*** Bug 419445 has been marked as a duplicate of this bug. ***
Comment 4 Christoph Cullmann 2024-09-23 20:59:42 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!