Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Network module not working as expected. #1945

Open
bottomupadvent opened this issue Nov 29, 2019 · 6 comments
Open

Network module not working as expected. #1945

bottomupadvent opened this issue Nov 29, 2019 · 6 comments
Labels

Comments

@bottomupadvent
Copy link

bottomupadvent commented Nov 29, 2019

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:

  • WM: i3wm
  • Distro: Arch
  • Output of polybar -vvv:
polybar 3.3.1
Features: +alsa +curl +i3 +mpd +network(libnl) +pulseaudio +xkeyboard

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

Build type: RelWithDebInfo
Compiler: /usr/bin/c++
Compiler flags: -Wno-deprecated-copp
@patrick96
Copy link
Member

Everything looks in order.

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

@bottomupadvent
Copy link
Author

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 patrick96 added the bug label Dec 1, 2019
@patrick96
Copy link
Member

patrick96 commented Dec 1, 2019

Yeah, everything is alright with your config.

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

  • Does the folder /sys/class/net/wlp0s19f2u1u3/wireless exist?
  • What are the contents of the /sys/class/net/wlp0s19f2u1u3/operstate file when you are connected to a network?

It may also be that somewhere along the way of getting the SSID it failed without printing an error similar to #1927

@bottomupadvent
Copy link
Author

Sorry for being so late.

  • /sys/class/net/wlp0s19f2u1u3/wireless exists.
  • contents of the /sys/class/net/wlp0s19f2u1u3/operstate file are "up" when connected to a network and "down" when not.

@patrick96
Copy link
Member

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
Copy link

ghost commented Jan 1, 2022

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants