LeeVD / plasma-applet-net-bandwidth-monitor

Network bandwidth monitor for plasma using dbus
GNU General Public License v3.0
24 stars 4 forks source link

Wrong speed on Kubuntu 22.04 #4

Closed Davide-sd closed 1 year ago

Davide-sd commented 1 year ago

Just installed this widget. Unfortunately it shows wrong speed numbers, both in upload and download. If I were to guess, I'd say it shows actual speed * 1000. When downloading a file, I'm consistently seeing 30-40MB/s when my internet connection reaches a maximum speed of 502KB/s in download....

LeeVD commented 1 year ago

Davide, thanks for letting me know. I released a fixed version today v0.1.1. This should correct the stupid bits to bytes calculation mistake i made in the code. Let me know if it fixes the data you see?

leuchtrakete666 commented 1 year ago

i encountered the same problem. i installed 0.1.1 but it still shows the wrong number. interestingly, when i look in "about" it shows version 0.1 .

Davide-sd commented 1 year ago

I confirm what @leuchtrakete666 said...

LeeVD commented 1 year ago

Lets try and get the easy stuff out the way first.
Is everyone seeing the wrong speed when using the widget in 'Bytes' mode? Im not an expert in Linux but when i installed v0.1.1 over top of v0.1 i had to log out and back in to correct some weird behaviour with the icon dropdown section. Just to check have you guys logged/reboot since the install? same wrong speed numbers? If it still isn't resolved, can you open the file CompactRepresentation.qml located in the below location: /home/**USER**/.local/share/plasma/plasmoids/org.kde.NetBandwidthMonitor/contents/ui/CompactRepresentation.qml do you see the below code starting on line 663 and 682?

        if (speedUnits !== 'bits') {
            value = value / 8
        } 

if 'value / 8' is there, you have v0.1.1, thats the bits to Bytes conversion. I've compared with the built in widgets from system monitor in red, v0.1.1 in yellow: image it should now be reporting the correct Bytes data.

@Davide, I forgot to update version number in the about section, will do that next update. Thanks for reminding me.

leuchtrakete666 commented 1 year ago

right, the reboot did the trick. i usually hardly ever reboot. i just put the laptop in hibernation.

Davide-sd commented 1 year ago

I start the system fresh every day and the problem is still there... Note that only the "Bytes" mode seems off. "Bit" mode seems accurate.

LeeVD commented 1 year ago

@Davide-sd Did you locate the code as per the below?

If it still isn't resolved, can you open the file CompactRepresentation.qml located in the below location: /home/USER/.local/share/plasma/plasmoids/org.kde.NetBandwidthMonitor/contents/ui/CompactRepresentation.qml do you see the below code starting on line 663 and 682?

    if (speedUnits !== 'bits') {
        value = value / 8
    } 

if 'value / 8' is there, you have v0.1.1, thats the bits to Bytes conversion.

I'm working on a new way to deal with bits and bytes which will hopefully be included in the next release.

Davide-sd commented 1 year ago

@LeeVD I checked the lines of code you mentioned. Strangely, the code you mentioned wasn't there at all: I believe this has to do with the fact that you didn't update the version number and my system saw the update on discover, checked the version number and skipped the update because it was the same as the one installed.

So, I uninstalled the widget and installed it again. Now I see the code precisely at those lines. However, the widget doesn't work: there is no update at all, not in Bytes mode nor in Bits mode. I also restarted the system multiple times...

LeeVD commented 1 year ago

Version 0.2 just released. It should solve the UI update and Bits / Bytes issues you experienced in the last version. let me know how you get on.

Davide-sd commented 1 year ago

Now it kind of works.... But after a reboot the widget doesn't work. So every time I turn on the pc, I have to remove the widget from the panel, and add it again...

LeeVD commented 1 year ago

@Davide-sd Are you still experiencing the issue? Over the last few releases, we have noticed install/upgrading can be an issue and for the settings to work correctly a reboot or log off needs to happening. Not sure if this is an app issue or something with Plasma. I believe the issues you experience should be fixed in the last couple of releases with v0.3 being the most stable and functional.

Davide-sd commented 1 year ago

@LeeVD it appears to work now. I've installed the latest version and rebooted the system, the widget works fine. Thank you.

I leave this issue open a few more days in case the problem should appears again.