Closed lieux closed 5 years ago
Are you sure that:
1) you have the timeout
option of the plugin set (to something sensible, e.g. 10), and
2) you are waiting that amount of seconds (10 in our example) before reconnecting?
Also, please try i3-msg restart
and report if the signal changes.
Still no changes. I have timeout=10
. I waited for several seconds each time I place the laptop somewhere and it does not update.
Also did i3-msg restart
. Nothing happens.
Here is the code:
widget = {
plugin = 'network-linux',
opts = {
wireless = true,
timeout = 10
},
cb = function(t)
if not t then
return nil
end
local dbm
for iface, param in pairs(t) do
if param.wireless then
if param.wireless.signal_dbm then
dbm = param.wireless.signal_dbm
end
end
end
return {
full_text = string.format('%s', dbm)
}
end
}
And also, the example wireless.lua
is not updating (signal bars not changing).
I waited for several seconds each time I place the laptop somewhere and it does not update.
Have you been waiting for 10 seconds?
Also did i3-msg restart. Nothing happens.
Then, the problem is in your driver, because this restarts the luastatus process (so it has no chance to cache the signal information anywhere).
And, are you sure that reconnecting updates it?
Also, as an experiment, can you please launch i3status
(with a config that displays wireless %quality
, default will do) in the terminal and see if it changes?
Have you been waiting for 10 seconds?
Yes. Minutes even just to make sure.
And, are you sure that reconnecting updates it?
Yes. By just toggling airplane mode.
i3status
I tried it. Set the global interval to 1 but still it's not changing. So I guess it really is a driver problem. Thanks!
Hmm, interesting, the same is going on on my machine. cat /proc/net/wireless
updates in the real time.
The code for the network-linux
plugin was adapted from i3status, so there’s a bug either in:
i3status’ code for retrieving the wireless parameters;
libnl;
kernel driver.
I will probably investigate it later.
P.S. I’ve just found a bug in network-linux that has nothing to do with the quality not updating, but could crash the entire luastatus process when reconnecting, so please update (fixed with f403c84228ab2ddfe20f1c2e8ea8339f83cd6da5 commit).
Also, i3status has a bug open for it: https://github.com/i3/i3status/issues/106
Fixed, please try now.
It's working. Thank you!
I tried placing my laptop far away from the router, then close to it, but the signal does not change. It only updates when I reconnect to the network but then it just stays with the first signal detected.