i3 / i3status

Generates status bar to use with i3bar, dzen2 or xmobar
BSD 3-Clause "New" or "Revised" License
608 stars 254 forks source link

i3status Wifi bitrate shows very low speed, intermittently #135

Open kcrmson opened 8 years ago

kcrmson commented 8 years ago

i3status shows a very low bitrate (on 5GHz it can range from 6.5 Mb to 19.5 Mb, on 2.4 it can get as low as 1 Mb) with wifi's %bitrate variable. iwlist [interface] bitrate returns the correct connection speed (e.g., 270 Mb). Given I'm using iw, the Wifi card is an Intel. Wifi is handled by NetworkManager, running under Arch.

Format for the wireless block is:

wireless wlp3s0 { format_up = "W: (%quality at %essid, %bitrate) %ip" format_down = "W: down" }

The base station has already been restored to factory settings, issue persists. I also observed similar behavior on another Arch machine, connected at 2.4 GHz.

dhclient was updated in the last couple of days but I don't use it, shouldn't have to do with it, but mentioning it anyway.

Versions of i3 running: i3-gaps-git, i3status-git, installed via AUR

Per airblader's suggestion, the issue might lie with the switch from libiw to libnl.

stapelberg commented 8 years ago

Is the bitrate displayed by i3status ever correct, or is it always incorrect?

kcrmson commented 8 years ago

It's sometimes correct, I haven't been able to iron out when it drops low. I did notice that using the hardware switch to toggle off/on seems to let it renegotiate at proper link speed, but not 100%. A restart of the computer doesn't seem to change it. RFKill isn't hard or softblocking anything, but that would end up with no wifi if it were. Just checked now, now this is odd, it shows 300 Mb but iwlist shows 150 Mb, so inverse to my initial bug report.

mrngm commented 5 years ago

On 2.12-1 (as packaged in Arch Linux), the reported bitrate in i3status is 1 Mb/s. When I look at iw dev wlp3s0 link, the following is reported:

# iw dev wlp3s0 link
Connected to 00:14:de:ad:be:ef (on wlp3s0)
    SSID: deadbeef
    freq: 2412
    RX: 1296657183 bytes (957303 packets)
    TX: 35862515 bytes (354764 packets)
    signal: -34 dBm
    tx bitrate: 150.0 MBit/s MCS 7 40MHz short GI

    bss flags:  short-slot-time
    dtim period:    3
    beacon int: 100

The refresh interval is set to 1, other relevant config in /etc/i3status.conf:

order += "wireless wlp3s0"
wireless wlp3s0 {
        format_up = "W: (%quality at %essid, %bitrate / %frequency) %ip"
        format_down = "W: down"
}

I haven't compared iw dev wlp3s0 link on another wireless network, yet, but I cannot remember seeing another bitrate in i3status.

mohlerm commented 3 years ago

I have a similar issue. i3status also reports -1.89307e+06 kb/s or -2.13367e+06 kb/s instead of the proper speed 2161.3 MBit/s or 2161.3 MBit/s. See screenshot here.

n-st commented 2 years ago

@mohlerm That's actually a different problem (integer overflow instead of incorrect bitrate reporting). I've created issue #502 and pull request #503 to address it.