elkowar / eww

ElKowars wacky widgets
https://elkowar.github.io/eww
MIT License
9.11k stars 377 forks source link

[BUG] Network throughput reported by EWW_NET variables is double of the actual value #618

Open Daxtorim opened 1 year ago

Daxtorim commented 1 year ago

Checklist before submitting an issue

Description of the bug

The values returned by the EWW_NET magic variable is always twice and rarely even three times the real amount.

Reproducing the issue

  1. Start continuously checking the EWW_NET reported download throughput in megabits per second (replace the interface in the jq command with the active one on your machine):
    while true; do eww get EWW_NET | jq '.wlp6s0.NET_DOWN' | xargs bash -c 'echo $(($0 * 8 / 1000000))' ; sleep 2; done
  2. Go to https://www.speedtest.net/ and start a speedtest (or start any other network benchmark of your choice).
  3. Observe the difference between what the benchmark displays and what the EWW_NET variable contains.
  4. Repeat the experiment for the NET_UP value and observe the same behavior.

Expected behaviour

The values reported by EWW_NET should be close to the actual value.

Additional context

Various other applications, e.g. btop++ or KDE Plasma's network widget, measure the throughput just fine.

NoXPhasma commented 1 year ago

I experience the same, I have to divide the value by 2 to make proper use of it.

Ocyss commented 1 year ago

I am the same, I use the mt7921 network card, I don't know if it has something to do with the network card