Bug 496875

Summary: System Monitor constantly redraws until History page is viewed/loaded the first time
Product: [Applications] plasma-systemmonitor Reporter: Flupp <Flupp+bugs.kde.org>
Component: generalAssignee: KSysGuard Developers <ksysguard-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: ahiemstra, john.kizer, nate, plasma-bugs
Priority: NOR    
Version: 6.2.3   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=434877
https://bugs.kde.org/show_bug.cgi?id=488440
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Flupp 2024-11-30 18:45:06 UTC
System Monitor constantly redraws until the History page is viewed the first time. Afterwards, redrawing is only done when necessary (e.g., when updating the graphs) regardless of the shown page.

To see the redraws, enable the “Show Paint” KWin desktop effect. The constant redrawing is noticeable as flickering.

When a page is loaded the first time, a spinning cog is animated to indicate the loading process. Consequently, this causes a flickering “Show Paint” effect. However, the flickering does not stop until the History page is loaded/shown the first time. Until then, it feels as if the cog continues spinning invisibly in the background.

On a system with low graphics power and 4k monitor, the load caused by the excessive redraws can actually be noticeable in other applications, which feel less responsive then. With a maximized System Monitor window in the background, hover effects in, e.g., Firefox lag behind mouse movements. The lagging stops when the History page is viewed the first time or the System Monitor window is minimized or closed.

Potentially related bugs:
Bug 434877: System Monitor has high idle CPU usage
Bug 488440: System Monitor has unusually high GPU usage

SOFTWARE/OS VERSIONS

Operating System: Arch Linux 
KDE Plasma Version: 6.2.3
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.0
Kernel Version: 6.12.1-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i5-8250U CPU @ 1.60GHz
Memory: 15,4 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 620
Manufacturer: LENOVO
Product Name: 20L50000GE
System Version: ThinkPad T480
Comment 1 John Kizer 2024-12-10 00:52:35 UTC
For what it's worth, I can reproduce the constant redraws on my system, but viewing the History page doesn't stop them, so it might be a different circumstance?

Operating System: Fedora Linux 41
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.0
Kernel Version: 6.11.10-300.fc41.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 7800X3D 8-Core Processor
Memory: 30.4 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 4070 SUPER/PCIe/SSE2
Comment 2 Nate Graham 2024-12-11 21:48:12 UTC
Oh wow, I can reproduce this. After opening the history page once and then going to the Processes page, System Monitor drops to about 6% CPU usage, down from 21% normally. So this is definitely at least part of the puzzle.
Comment 3 Bug Janitor Service 2024-12-18 12:13:19 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-systemmonitor/-/merge_requests/326
Comment 4 Bug Janitor Service 2024-12-19 18:57:50 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-systemmonitor/-/merge_requests/327
Comment 5 Arjen Hiemstra 2024-12-19 18:59:55 UTC
Git commit f2b2739b10ac0ea0575e84c21463a3231df56eab by Arjen Hiemstra.
Committed on 19/12/2024 at 18:57.
Pushed by ahiemstra into branch 'Plasma/6.2'.

page: Hide new pages by default

We load pages on request but also in the background if a page requests
it. The background loaded pages would be considered visible, resulting
in anything relying on said visibility to continue running, such as
animations of BusyIndicator. This consequently results in continuous
redraws.


(cherry picked from commit 92d98f0e8a78335f10d0100f8ab46f621bfd3991)

Co-authored-by: Arjen Hiemstra <ahiemstra@heimr.nl>

M  +4    -0    src/page/EditablePage.qml

https://invent.kde.org/plasma/plasma-systemmonitor/-/commit/f2b2739b10ac0ea0575e84c21463a3231df56eab
Comment 6 Arjen Hiemstra 2024-12-19 19:01:15 UTC
Git commit 92d98f0e8a78335f10d0100f8ab46f621bfd3991 by Arjen Hiemstra.
Committed on 19/12/2024 at 18:52.
Pushed by ahiemstra into branch 'master'.

page: Hide new pages by default

We load pages on request but also in the background if a page requests
it. The background loaded pages would be considered visible, resulting
in anything relying on said visibility to continue running, such as
animations of BusyIndicator. This consequently results in continuous
redraws.

M  +4    -0    src/page/EditablePage.qml

https://invent.kde.org/plasma/plasma-systemmonitor/-/commit/92d98f0e8a78335f10d0100f8ab46f621bfd3991