polybar / polybar

A fast and easy-to-use status bar
https://polybar.github.io
MIT License
14.05k stars 703 forks source link

Network module not working as expected. #1945

Open bottomupadvent opened 4 years ago

bottomupadvent commented 4 years ago

Network module does get displayed on the bar but stays constant with whatever "label-disconnected" has (in my case OFF) even when connected to wireless network which works perfectly fine. This is me first time trying to add network module in my config. I'm sorry, am I missing something here ??

2019-11-29-150828-1365x240-scrot.png

Following is the network module config:-

[module/wlan]
type = internal/network
interface = wlp0s19f2u1u3
interval = 5
label-connected = ON
label-disconnected = OFF

I also tried using:-

unknown-as-up = true but to no avail.

Polybar Log

~/.config/polybar » polybar white                                                                                                           
warn: No monitor specified, using "VGA-1"

Environment:

X extensions: +randr (+monitors) -render -damage -sync +composite +xkb +xrm +xcursor

Build type: RelWithDebInfo Compiler: /usr/bin/c++ Compiler flags: -Wno-deprecated-copp

patrick96 commented 4 years ago

Everything looks in order.

Can you post your entire config as well as the output of ip link

bottomupadvent commented 4 years ago

My entire config file:-

https://pastebin.com/jKgzep0Q

Output of ip link:-

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp1s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN mode DEFAULT group default qlen 1000
    link/ether 40:8d:5c:09:ae:d6 brd ff:ff:ff:ff:ff:ff
3: wlp0s19f2u1u3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
    link/ether 60:e3:27:0b:72:5e brd ff:ff:ff:ff:ff:ff
patrick96 commented 4 years ago

Yeah, everything is alright with your config.

Help me track this down. There are a few reasons that could be happening:

It may also be that somewhere along the way of getting the SSID it failed without printing an error similar to https://github.com/polybar/polybar/issues/1927

bottomupadvent commented 4 years ago

Sorry for being so late.

patrick96 commented 4 years ago

Alright, this does look very similar to #1927. But there at some point an SSID is displayed it's just not updated, but I think the underlying issue is the same, that we don't have enough error reporting when we can't gather an SSID.

@taschenb Since you wrote the original implementation, you might have some better insight. The scan_cb function has a lot of early returns, if any of them are taken, the SSID is never parsed and set/updated. Are any of these early returns actually something where we should print a warning or an error?

ghost commented 2 years ago

I came back to polybar on Gentoo yesterday and I still face the issue stated in #1822 . Has anyone figure out what is causing the network module displaying the previous used connected ESSID and not updating to the current ESSID being connected?