Bug 433063 - Network Speed widget is not working
Summary: Network Speed widget is not working
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: System Monitor (show other bugs)
Version: 5.21.0
Platform: Neon Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: regression
Depends on: 425992
Blocks:
  Show dependency treegraph
 
Reported: 2021-02-17 10:28 UTC by steveb
Modified: 2021-02-22 15:38 UTC (History)
19 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.21.1


Attachments
Error message (107.46 KB, image/jpeg)
2021-02-17 19:33 UTC, jonzn4SUSE
Details
network widget working after running cmd (72.58 KB, image/jpeg)
2021-02-17 19:34 UTC, jonzn4SUSE
Details
widget speedtest (65.53 KB, image/jpeg)
2021-02-18 16:54 UTC, jonzn4SUSE
Details

Note You need to log in before you can comment on or make changes to this bug.
Description steveb 2021-02-17 10:28:01 UTC
+++ This bug was initially created as a clone of Bug #425992 +++

SUMMARY
I just updated to 5.21 and added a "Network speed" widget.
I was set to Line Chart, and working ok.
Some minutes later, nothing - flat lines and no traffic visible.

STEPS TO REPRODUCE
1. Add "Network speed" widget to desktop. Set to "Line Chart".

OBSERVED RESULT
Widget will only work if the system tray "Networks" popup is visible.
If the popup is pinned, then the widget continues to work.
Hide the popup, and the widget lines stay at zero.

EXPECTED RESULT
Widget should always display network data.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE neon 5.21 User Edition
KDE Plasma Version: 5.21.0
KDE Frameworks Version: 5.79.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Is the widget missing a step to enable/subscribe to network data?
Something that the popup does do, as it also shows network speed.
Comment 1 steveb 2021-02-17 10:32:07 UTC
The "Network Rates" display in "System Monitor" is also affected the same way.
Comment 2 David Redondo 2021-02-17 12:14:01 UTC
This is because the applet sets the statistics refresh rate to 0 upon hiding
Comment 3 jonzn4SUSE 2021-02-17 19:33:21 UTC
Created attachment 135786 [details]
Error message

Same issue.  It has to stay pinned or the widget will stop working.
I've been running ksystemstats --replace & to keep it going, but now I get a different message after running it.  see attachment
Comment 4 jonzn4SUSE 2021-02-17 19:34:45 UTC
Created attachment 135788 [details]
network widget working after running cmd
Comment 5 David Redondo 2021-02-18 08:17:21 UTC
Yeah the issue is that networkmanager only has a global statistics update rate and ksystemstats and the widget both set it. And the widget disables statistics when it hides.
Comment 6 Nicola Mori 2021-02-18 08:24:11 UTC
I just updated to 5.21.0 on my Archlinux box and the network widget now works again after the failure of 5.20 series. I don't use NetworkManager nor have "Networks" popup in my system tray. I still could not find a way to set the refresh rate (currently it seems to be around 2 Hz, too much for me) but at least the widget works.
Comment 7 David Redondo 2021-02-18 08:38:51 UTC
(In reply to David Redondo from comment #5)
> Yeah the issue is that networkmanager only has a global statistics update
> rate and ksystemstats and the widget both set it. And the widget disables
> statistics when it hides.
I meant both ksystemstats and the connection widget set that
Comment 8 jonzn4SUSE 2021-02-18 16:54:15 UTC
Created attachment 135857 [details]
widget speedtest

Just a question, but is there a limit to how high the widget can read the download speed.  see screenshot
Comment 9 David Redondo 2021-02-18 19:01:38 UTC
The widget is displaying MegaByte/s whereas this speedtest thing shows Megabit/s
Comment 10 jonzn4SUSE 2021-02-18 22:55:58 UTC
Right, I thought the widget would scale up to match what's coming down.
Comment 11 Bug Janitor Service 2021-02-19 13:50:42 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/ksysguard/-/merge_requests/70
Comment 12 David Redondo 2021-02-22 15:37:29 UTC
Git commit 4b5251ad162e5014b1f0cc352b1842c87daf7fbe by David Redondo.
Committed on 19/02/2021 at 13:50.
Pushed by davidre into branch 'master'.

Force device statistics refresh rate to be always one second

Unfortunately the statistics refresh rate of a device is a global property. So
when it is changed from the outside we just force it back to one second. The
initial rate is saved and updated when something tries to change it in order
to restore it upon destruction.
Because NetworkmanagerQt just forwards the DBus signal we have to guard the
slot with a boolean to we do not trigger it ourselves.
FIXED-IN:5.21.1

M  +17   -0    plugins/global/network/NetworkManagerBackend.cpp
M  +1    -0    plugins/global/network/NetworkManagerBackend.h

https://invent.kde.org/plasma/ksysguard/commit/4b5251ad162e5014b1f0cc352b1842c87daf7fbe
Comment 13 David Redondo 2021-02-22 15:38:06 UTC
Git commit 16c5713dabb1c843d4ad81ba84195b1bbe796712 by David Redondo.
Committed on 22/02/2021 at 15:38.
Pushed by davidre into branch 'Plasma/5.21'.

Force device statistics refresh rate to be always one second

Unfortunately the statistics refresh rate of a device is a global property. So
when it is changed from the outside we just force it back to one second. The
initial rate is saved and updated when something tries to change it in order
to restore it upon destruction.
Because NetworkmanagerQt just forwards the DBus signal we have to guard the
slot with a boolean to we do not trigger it ourselves.
FIXED-IN:5.21.1


(cherry picked from commit 4b5251ad162e5014b1f0cc352b1842c87daf7fbe)

M  +17   -0    plugins/global/network/NetworkManagerBackend.cpp
M  +1    -0    plugins/global/network/NetworkManagerBackend.h

https://invent.kde.org/plasma/ksysguard/commit/16c5713dabb1c843d4ad81ba84195b1bbe796712