Bug 508516 - Sensors and chart continue to report network activity while the computer is disconnected from any networks
Summary: Sensors and chart continue to report network activity while the computer is d...
Status: RESOLVED FIXED
Alias: None
Product: ksystemstats
Classification: Frameworks and Libraries
Component: General (other bugs)
Version First Reported In: 6.4.4
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-08-20 12:20 UTC by Patrick Silva
Modified: 2026-05-12 17:01 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2025-08-20 12:20:05 UTC
SUMMARY
Can reproduce on both Arch Linux (Plasma 6.4.4) and neon unstable.

STEPS TO REPRODUCE
1.  add Network Speed widget to desktop
2. download a large file
3. observe the network sensors/chart from the added widget during download
4. disconnect from network during download
5. observe the network sensors/chart from the added widget again

OBSERVED RESULT
sensors and chart continue to report network activity after disconnecting from network

EXPECTED RESULT
reset down/up rate sensors to 0.0 B/s and clear the chart after disconnecting from network

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 6.4.80
KDE Frameworks Version: 6.18.0
Qt Version: 6.9.1
Graphics Platform: Wayland
Comment 1 TraceyC 2025-08-20 18:52:24 UTC
Can confirm on git-master
Comment 2 Bug Janitor Service 2026-02-12 13:16:33 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/ksystemstats/-/merge_requests/126
Comment 3 Arjen Hiemstra 2026-05-12 13:31:13 UTC
Git commit a610a8215cc98c06e702ee90a0bd49a7c2986ad2 by Arjen Hiemstra, on behalf of Kartikeya Tyagi.
Committed on 12/05/2026 at 13:24.
Pushed by ahiemstra into branch 'master'.

Fix stuck throughput values when device disconnects

When a network device disconnects, the backend previously emitted the `disconnected` signal immediately. This caused the device object to be removed from ksystemstats before the frontend (Plasma System Monitor) or the aggregate sensor could register a zero value. As a result, the "All Network Devices" graph would often flatline at the last measured speed instead of dropping to zero.

This patch fixes the issue by:

1. Explicitly setting all download and upload rate sensors (both bytes and bits) to 0 immediately upon disconnection.
2. Deferring the emission of the `disconnected`  to the next global `update()`  cycle using a pending disconnect flag. This ensures that the frontend has exactly one polling cycle to read the "0" values before the device object is destroyed

M  +27   -1    plugins/network/NetworkManagerBackend.cpp
M  +4    -0    plugins/network/NetworkManagerBackend.h

https://invent.kde.org/plasma/ksystemstats/-/commit/a610a8215cc98c06e702ee90a0bd49a7c2986ad2