Short summary
The lags and interruptions appear to be associated with background scanning by the wireless card. Background scanning is a normal process and occurs on all cards but it should not be noticeable and definitely should not be causing packet loss.
The duration and impact of said scanning varies according to operating system, driver, access point, and card parameters. In most cases this results in a few tens of milliseconds of latency every X minutes. In worse cases with certain cards, drivers, and infrastructure, such as in the OPs case, the scans can cause noticeable connectivity issues and packet loss.
In these cases it may be beneficial to switch off this feature (see below). This is not without drawbacks as it can cause other problems as a result.
Background Scanning
Wireless scanning can be triggered by Windows, the wireless driver, or another application. The scan is done both to refresh the active networks list, as well as scan for the existence of other networks or stronger signals to switch to.
Windows may scan for more preferred networks, even if your signal is perfectly strong, as you may have other networks with higher configured priorities which overrides signal strength. The network driver will search for stronger signals periodically, and more often under weak signal conditions. The frequency of searching and switching can sometimes be modified by driver setting such as "Roaming aggressiveness" on Intel drivers under Windows. Under Linux, the wireless supplicants can also control this behaviour.
Basics of how it works
In order to do a scan, the wireless radio has to stop listening to the current network and physically switch to listening on a different channel, for every channel that it is capable of using. For example if your network is on channel 6, your wireless card will tell the active network to pause transmissions, switch to channel 1, listen for a fraction of a second to check for networks, then switch back to channel 6 to receive any data that has been buffered during that period. It then has to repeat this for every other channel it can use. These switches are a very quick (fractions of a second) so as to not interrupt your connection completely, but does result in slowdowns because no data can be transmitted while it is scanning other channels. Different cards listen for different periods, depending on the card's hardware capabilities and driver design. Some may listen for >100ms, the most common 802.11 beacon interval, some may split this into 2x50ms slots or 10x10ms slots, etc. Some cards can use wideband (V)HT tuners to search multiple channels at a time. The process typically lasts a few seconds.
Background scanning should not cause any instability, disconnections, stuttering, or packet loss. However, to put it bluntly, some cards are worse at it than others. Some routers and APs do not have proper implementations of the pause transmission commands. These, plus many other factors cause your mileage to vary.
In the OP's case, the ping log indicates scanning is occurring exactly every 10 minutes and causing around 0.3s of delay:
So, played a short game. I noticed it happening twice only, but apparently there was one other time. It is logged on Pastebin and happens around lines 273, 876 and 1480. – Rafael Damasceno Aug 12 '14 at 19:51
However, the OP also states getting 30% packet loss in Teamspeak and disconnections in Skype, which should not be happening. The log provided, unfortunately does not show any evidence of this occurring during the test period as there is no packet loss indicated. Consequently, the log itself is inconclusive - this particular log shows background scans are occurring normally and does not show any actual problems.
Disabling Background Scans
The following information applies solely to Windows:
If your particular environment has problems due to background scanning, you may consider switching it off. You can get an idea if there is a problem by doing the same diagnostic as above (ping -t
). If your result shows several lines of "Request timed out" at periodic intervals, possibly surrounded by a few lines of increased ping, your issue may be related. If your result looks the same as the OP's with no packet loss, it does not confirm this issue.
Switching off background scanning can prevent wireless roaming from working. Indeed, it will prevent any functionality that relies on background scans from working. These include, but are not limited to:
- Switching to networks with a stronger signal
- Switching to networks that you have set to a higher priority
- Switching between bands on the same network
- Switching to a stronger signal as you move around a building
- Switching to less busy access points or channels to improve performance
Most of these will only affect you if you have multiple overlapping networks (with or without the same SSID), typically corporate networks with multiple APs. It can also affect home users who have routers that intelligently switch channels to avoid interference - when your router switches channel, you will be disconnected if background scanning is disabled.
With that in mind, for most home users it should not be a big problem. The procedure to do this is as follows (Taken from Rafael Damasceno's own post):
- Run Regedit
- Navigate to HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Class{4d36e972-e325-11ce-bfc1-08002be10318}
- Locate the subfolder path that has the correct AdapterModel
- In that subfolder, create a new REG_DWORD key named ScanWhenAssociated, and set its value to 0.
(More information here: https://forums.lenovo.com/t5/Windows-8-and-8-1/SOLUTION-latency-spikes-and-network-unstability-on-Intel-WLAN/m-p/1461523/highlight/true#M5273)
For testing purposes, did you try connecting witn an ethernet cable instead of wireless to ensure its the wireless card thats the issue? – Ryan Griggs – 2014-08-11T05:22:21.537
Never mind, that's what Guest said. – Ryan Griggs – 2014-08-11T05:23:03.027
Run a continuous ping to determine if connection is completely lost or just slowed down: click start and type ping 8.8.8.8 -t – Ryan Griggs – 2014-08-11T05:25:02.663
I did the ping test wirelessly and it averaged 55, maxing 88 and losing 3 packets out of 120. Ran it again via ethernet and got 55 average again, 74 max. and lost 0 packets out of 120 again. – Phaellow – 2014-08-12T12:19:10.697
How about running the ping while gaming? Specifically look at the results while the problem is happening. – Ryan Griggs – 2014-08-12T16:40:40.007
Not clear on your comment: did you test with ethernet cable? And if so, same problem? – Ryan Griggs – 2014-08-12T16:41:23.107
Sorry, forgot to comment that here. I did test the ethernet connection for some hours, and it didn't present any issue. I'm going to run the test while gaming (both wirelessly and wired) and have it output to a file. If I were to determine the problem is originated on the wireless card, what should I do? Toshiba reps seemed pretty inconsiderate, ignoring the comments I made about switching machines and testing drivers, and recommended I installed some Toshiba distributed old drivers and last resort, restoring to a factory image (which I specifically stated beforehand I had already done). – Phaellow – 2014-08-12T18:31:45.687
So, played a short game. I noticed it happening twice only, but apparently there was one other time. It is logged on Pastebin and happens around lines 273, 876 and 1480.
– Phaellow – 2014-08-12T19:51:15.523Found this which supposedly relates to windows 8, but a firmware issue would likely affect others also. http://www.intel.com/support/wireless/wlan/sb/CS-034535.htm but I'm still looking...
– Ryan Griggs – 2014-08-13T01:46:39.837Have you tried the stock intel drivers? https://downloadcenter.intel.com/Detail_Desc.aspx?DwnldID=24167&lang=eng
– Ryan Griggs – 2014-08-13T01:54:30.887I have, and I tried it again. The same problem occurs. I did the ping test and it looks worse than the previous one, with the problem appearing more often. – Phaellow – 2014-08-13T14:06:27.350
Would you be open to trying a new usb wireless card? That would probably be the simplest way to fix it, and also via the process of elimination ensure it is your wireless card that is the issue. It really sounds like a firmware issue with the card itself. Something else that would be interesting: do other devices on the network experience high latency at the same time? You can download Fing on your android phone to run pings and see if you start getting higher ping times during the problem moments. If so, the router is most likely the culprit. – Ryan Griggs – 2014-08-13T22:39:26.157
I used my other machine to test that, and I got no issues with the connection. I think I will resort to the usb card. However, I don't know what would be a good buy. Can you recommend any good one to me? I'd like something the size of an ASUS USB-N10 NANO, but I don't know if it is any good. Plus, is there anything I can do to report the issue to Intel/Toshiba to get this fixed by them? – Phaellow – 2014-08-24T19:02:46.030
I would suggest getting on newegg or amazon and look at product reviews for various usb cards. Reporting will be difficult, as toshiba will blame intel and intel will blame toshiba. If the card is a discrete card inside the laptop, and you are good at taking things apart, you can replace the internal wifi card with another model. Note this may void your warranty however.:-) – Ryan Griggs – 2014-08-24T19:30:22.290