Extremely high ping to local router over WiFi
Since power management seems to be the problem, this command will disable power management and keep it from turning itself back on
sudo sed -i 's/wifi.powersave = 3/wifi.powersave = 2/' /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf
The issue was caused by this commit to the network manager git
This comment on the bug report shows us that using the wifi.powersave = 3 enables power management and using 2 will disable it
We could also try a newer version of bcmwl-kernel-source
sudo apt-get install linux-headers-$(uname -r) build-essential dkms
wget http://de.archive.ubuntu.com/ubuntu/pool/multiverse/b/broadcom-sta/broadcom-sta-dkms_6.30.223.271-4_all.deb
sudo dpkg -i broadcom-sta-dkms_6.30.223.271-4_all.deb
As recommended by praseodym here
Related videos on Youtube
Kaz Wolfe
Hello. You showed up in my review queue. You will be reviewed and re-tagged if necessary. Failure to comply may result in harm. Yes, I am a wolf. Awoo. IT director for a warehousing company, doing networking, systems, and support. My languages of choice are Java and Python. One of the six people who actually like MongoDB. Self-declared cybersecurity expert. If you need me, swing by the AskUbuntu General Room or contact me on Discord. If you want to talk to me over e-mail for some reason, shoot a message to the below listed address. Please don't spam me. Notable Achievements Wrote WolfBot. And abandoned it. And then went back to working on it. And then archived it to go work on Discord chatbots Played video games Managed to nuke an entire Linux install, live. And then fix it, live. Reddit. Operate DIY Tech, a partnered Discord server. Honestly not much. I'm pretty boring. Contact Information PGP Key: 2588 13F5 3A16 EBB4 (Keybase Enabled) Discord: KazWolfe#2896 E-mail: (username)@linux.com
Updated on September 18, 2022Comments
-
Kaz Wolfe over 1 year
I am currently running Ubuntu 16.04 LTS, and I'm running into an extremely annoying problem with my wireless setup. Occasionally (and seemingly, randomly), my ping will begin to skyrocket and get out of hand:
PING 10.0.2.1 (10.0.2.1) 56(84) bytes of data. 64 bytes from 10.0.2.1: icmp_seq=1 ttl=64 time=367 ms 64 bytes from 10.0.2.1: icmp_seq=2 ttl=64 time=8.48 ms 64 bytes from 10.0.2.1: icmp_seq=3 ttl=64 time=971 ms 64 bytes from 10.0.2.1: icmp_seq=4 ttl=64 time=1.11 ms 64 bytes from 10.0.2.1: icmp_seq=5 ttl=64 time=91.6 ms 64 bytes from 10.0.2.1: icmp_seq=6 ttl=64 time=482 ms 64 bytes from 10.0.2.1: icmp_seq=7 ttl=64 time=1.15 ms 64 bytes from 10.0.2.1: icmp_seq=8 ttl=64 time=131 ms 64 bytes from 10.0.2.1: icmp_seq=9 ttl=64 time=92.6 ms 64 bytes from 10.0.2.1: icmp_seq=10 ttl=64 time=2.72 ms --- 10.0.2.1 ping statistics --- 10 packets transmitted, 10 received, 0% packet loss, time 9005ms rtt min/avg/max/mdev = 1.116/215.207/971.833/297.328 ms
I've also seen cases where my ping to my router is in the upwards of the 4000ms range:
--- 10.0.2.1 ping statistics --- 10 packets transmitted, 10 received, 0% packet loss, time 9031ms rtt min/avg/max/mdev = 1425.396/3721.331/5352.349/1087.015 ms, pipe 5
Other pings seem to just drop packets entirely:
--- 10.0.2.1 ping statistics --- 60 packets transmitted, 48 received, 20% packet loss, time 71043ms rtt min/avg/max/mdev = 0.544/2206.796/7108.406/2372.068 ms, pipe 8
Otherwise, the system functions completely normally. How can I fix or at least reduce this excessive latency?
lshw
output is as follows:*-network description: Wireless interface product: BCM4352 802.11ac Wireless Network Adapter vendor: Broadcom Corporation physical id: 0 bus info: pci@0000:03:00.0 logical name: wlan0 version: 03 serial: [REDACTED] width: 64 bits clock: 33MHz capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless configuration: broadcast=yes driver=wl0 driverversion=6.30.223.248 (r487574) ip=10.0.2.71 latency=0 multicast=yes wireless=IEEE 802.11abg resources: irq:19 memory:f7a00000-f7a07fff memory:f7800000-f79fffff
The Broadcom STA driver is installed and is running. This is happening to no other devices on the network.
uname -a
returns:Linux ArcticWolf 4.4.0-57-generic #78-Ubuntu SMP Fri Dec 9 23:50:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
I have the latest (known) drivers installed:
Package: bcmwl-kernel-source Version: 6.30.223.248+bdcom-0ubuntu8 Priority: optional Section: restricted/admin Source: bcmwl Origin: Ubuntu Maintainer: Ubuntu Developers <[email protected]> Original-Maintainer: Alberto Milone <[email protected]> Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 8,013 kB Depends: dkms, linux-libc-dev, libc6-dev
iwconfig
output at any given time:wlan0 IEEE 802.11abg ESSID:"[redacted]" Mode:Managed Frequency:2.412 GHz Access Point: [REDACTED] Bit Rate=144 Mb/s Tx-Power=200 dBm Retry short limit:7 RTS thr:off Fragment thr:off Encryption key:off Power Management:off Link Quality=51/70 Signal level=-59 dBm Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0
I can occasionally "jar" the network back to normal by disconnecting and reconnecting the wireless connection, but it always goes back to normal after a few minutes of operating normally.
There are no other wireless routers or devices nearby that may cause interference on my WiFi channel. The router firmware is up-to-date and I have tried rebooting it numerous times now.
The router is on Channel 1 (and is the only device on the channel), and WPA2-AES is being used. Distance makes no difference.
This is not a router or interference issue, as other devices on my network work perfectly and exhibit none of the same symptoms.
This happens (so far) on all networks I've tested with, suggesting that this is actually an issue with my system and not my router. This situation happens in both noisy and quiet radio areas, further suggesting that it has nothing to do with interference.
-
Boris Hamanov over 7 yearsWhat channel are you running on? Are you using WPA2-AES? Are you using a repeater? Do the pings become more consistent if you're closer to the router?
-
Kaz Wolfe over 7 years@heynnema I am the only device running on Channel 11, and I am using WPA2-AES. There is no repeater, and the pings are the same three feet from the router as they are 20 feet away.
-
Boris Hamanov over 7 yearsOK. For testing purposes, please set your router to use channel 1 and reconnect the wifi, and then test again with channel 6 and reconnect the wifi.
sudo iwlist wlan0 freq
(change wlan0 to the correct interface name) will show what channel you are currently connected to. Are there any wireless phones, or microwave ovens, near the router? Report back on the test results. -
Kaz Wolfe over 7 yearsChannel 1 and 6 have the same issue (I've tried channel-hopping already), as I think it's the system, not the router itself. There are phones and microwaves (hence using Channel 11 instead of Channel 1). Output of the command: pastebin.com/GKAq6Kip
-
Boris Hamanov over 7 yearsGood. What happens if you connect to any of the 5ghz channels? Also, type
iwconfig
and note thePower management
setting. If it's ON, typesudo iwconfig wlan0 power off
, confirm thatiwconfig
now shows PM=off. Test again. Report back. -
Kaz Wolfe over 7 years5GHz does not reach back to the room where my device is, sadly. Power management was turned off before, it seems to not be saved with reboot. Turning it back off has appeared to reduce the ping back to sane levels.
-
Boris Hamanov over 7 yearsMove the computer closer to the router, and try a 5ghz channel. I want to eliminate a 2.4ghz problem. Test 5ghz with power management off and on. Report back. You can purchase an inexpensive Netgear dual-band repeater for <$40 on ebay. That would solve your problem in the room where it doesn't reach.
-
Boris Hamanov over 7 yearsps: is your router, or your wirelss card, AC capable? If not, look on eBay for a
Netgear WN2500RP
... and they're even cheaper than I thought. Do you have an Android phone/tablet? If so, installWiFi Analyzer
and look at your channel breakdown of local traffic. See if all channels show high traffic. -
Kaz Wolfe over 7 yearsBoth my router and PC are AC-compatible. Traffic is normal and sane, but only on channel 11 (with my only AP) and Channel 36. It might also be worth mentioning that all other devices are running just fine during my PC spikes.
-
Boris Hamanov over 7 yearsGood, both your wireless and your router are AC. The Netgear WN2500RP is not AC, so it wouldn't be right for your setup. What were the results of the 5ghz test? Did you install WiFi Analyzer? We may have to move to chat soon. So did the power management adjustment help? You can always add
iwconfig wlan0 power off
to/etc/rc.local
. -
Kaz Wolfe over 7 yearsTraffic is normal, 5GHz test changes nothing. Power management seems to help temporarily and then it goes back to normal.
-
Boris Hamanov over 7 yearsLast shot. What do the ping times look like to 8.8.8.8? Consistent or varying wildly? After this test, I'm out of ideas.
-
Kaz Wolfe over 7 yearsPinging out to the world is consistent provided the ping to the router is consistent.
-
Boris Hamanov over 7 yearsSounds so much like an interference problem, or a router problem. Any way, maybe somebody else can chime in with some ideas.
-
kcdtv over 7 yearsYour iwconfig stdout is very weird. There is no country with such a legal maximum level as 200dBm I don't even understand how this stdout can happen as you are normally locked by your CRDA configuration at 20dBm. And If you try to put it manually at 16dBm? That's normaly the mximu output power for an internal card...
-
Kaz Wolfe over 7 years@kcdtv 200 dBm is half of the sun's power output in watts. Other people report that some Broadcom drivers have a bug that report power in mW instead of dBm, causing iwconfig to have bad output.
-
kcdtv over 7 yearsYes, it is kind of a lot... isn't it? :D 200mw would be 23dBm which doesn't seems realitic neither for an inetrnal wifi chipset.
-
Kaz Wolfe over 7 years@kcdtv According to the Wikipedia page for dBm, 200mW is a sane value for 5 GHz devices and the new wifi standard.
-
kcdtv over 7 yearswhere i live it is limited at 100mw but you are right, it is in the majority of places limited to 200mw. I forgot about that.
-
-
Kaz Wolfe over 7 yearsNope, pings are still spiking up to 2 seconds or more, even with this patch in place.
-
Jeremy31 over 7 yearsHave your rebooted/restarted network manager?
-
Kaz Wolfe over 7 yearsI have, yes. Multiple times now.
-
Kaz Wolfe over 7 yearsWill try new drivers when I get back home and report back.
-
kcdtv over 7 yearsDid you try with iwl package instead of sta?
-
Kaz Wolfe over 7 yearsBroadcom STA packages do not seem to make any difference over my current driver version, unfortunately. Still reporting very high pings. It doesn't seem as bad (??) but there's still definitely a problem there.
-
Kaz Wolfe over 7 yearsAwarded the bounty because you would have gotten it anyways, and I don't want to see it go to waste. Problem is still there, unfortunately.
-
Jeremy31 over 7 yearsThanks. I wonder if you would have better results from an Intel 7265 wifi card as Broadcom hasn't updated bcmwl in over a year, see the Broadcom page. They do have a support email there and may be able to help
-
Tim Kane about 7 yearsThis totally solved my issues.. Fresh install of Linux Mint and I had ping response times constantly wavering between 3ms and 600ms. Setting the wifi.powersave=2 and restarting the network stack brought me back to a consistent 5-7ms response. Thanks Jeremy31