Monday, February 02, 2009

How to fix Vista lag spikes

Vista has a nasty bug that can cause lag spikes when attached to a wireless network; every sixty seconds, the PC will experience a rather substantial lag spike:

10.0.0.1 is my router; notice everything is going along just fine, and then out of the blue, I get a ping time of 836 milliseconds, which for any latency-sensitive application is a very consequential amount of time. And it isn't like my computer is attempting to ping some distant target over the nebulous framework of the Internet: this is my router. The most adjacent device to my computer on the network. If you let ping run for ten or fifteen minutes, you'll see the spacing between lag spikes is exactly 60 seconds.

It goes without saying that this is completely unacceptable, especially if you're into online gaming (WoW, CS, etc.) or VOIP. Even more unacceptable is that this issue has been going on for years and MSFT has yet to fix it. A quick google search for 60-second Vista Lag Spike reveals just how pervasive the issue is. Numerous people have "fixes" which involve installing weird applications from the Internet, which I was opposed to even trying since I don't like running "weird applications from the Internet."

The issue has to do with the WLAN Autoconfig service:

Unfortunately, this service is also in control of a whole host of junk, so stopping the service results in your wireless connection dying. For a while, it seemed like there may be some love in registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Wlansvc\Interfaces\INTERFACE_NAME\ScanInterval, which is set to 60 EA 00 00 (EA60 is 60000 in hex, which is the number of milliseconds that elapse between each lag spike), but the Scan Interval field is simply overwritten every time the WLAN Autoconfig service is started with good ol' EA 60. (side rant: why bother putting a value in the registry if the service is simply going to overwrite it every time it starts??? Is this quality of code really worth paying several hundred dollars for?)

Finally, I found a fix that is explained in this article, which simply disables the autoconfig portion on a specific network adapter. Unfortunately, that fix has some problems--if you reboot your computer and forget to turn autoconfig on, the next time it runs your internet will be busted, which means restarting the service and then shutting it off once you've connected. It also means I have to explain to non-computer savvy significant others how to do this, since said significant other enjoys a lag-free WoW experience just as much as I do.

In any event, the quick and dirty fix is to open up a command prompt, and type in netsh wlan set autoconfig enabled=no interface="Wireless Network Interface" where "Wireless Network Interface is the name of your NIC card. The problem with this is if you forget to re-enable the service when you shutdown or reboot your computer, your network connection won't come up correctly. To fix this, enable the service (change "enabled=no" to "enabled=yes") and once the network is connected, disable the service.

All I can say is: totally unacceptable for a product that's been in the market for a few years now. Hopefully Windows 7 doesn't share this same "feature." And hopefully MSFT realizes that crap like this makes me want to either keep on using Windows XP SP3 or "upgrading" to Ubuntu; c'mon, if you're going to charge us for software, at least perform basic QA and resolve issues in a timely manner.

6 comments:

Anonymous said...

Hello,

thanks for the report. I have Vista ULT x64 and have the same probs. After reading your text the simpliest way for should be to just delete the scan interval DWORD and set ACL for all to READONLY. Reboot does it for my, until now. Try it out, that maybe the perfect solution (as perfect it can be)

Regards
STRa|tos

Anonymous said...

If It Lags What I Do Is Take Out MY Ethernet Cords And Turn Off My Computer After That I Reboot It
And Then Put In The Ethernet Cords
And Then Ur Lag Free

kidjan said...

Anonymous,

Thanks for the comments. I haven't tried deleting the scan interval DWORD value, and all my attempts at modifying the registry were basically failures.

The best "fix" I've found thus far is: upgrade to Windows 7, which doesn't contain this bug. And, for the record, is just a better operating system overall (feels more responsive, GUI is less convoluted, etc.)--I'll be posting more on that later this week.

Anonymous said...

Yes, I agree. But remember, Windows 7 is RC status atm. If yu would like to fix the problem immediatelly withput upgradting/reinstalling Windows 7 "RC" my comment includes the perfect solution on this, lets say, bug.

Until today, i see it is solved on my x64 vista. The only thing is if you enter a new WLAN area, you have to grand you write access to the regkey. if you dont, you can connect to a WLAN, but it wohnt be savved in the network center on your vista box.

just open regkey with acl
connect wlan arena
denied access to regkey

and if you see the SCAN INTERVAL key, just delete it. I havend tried setting to zero ;)

Unknown said...

WLAN optimizer worked perfectly for me, i pinged for 10 minute no lag spikes at all!

Anonymous said...

Thank you for the solution, it really did solve the issue :)

Hope you get a nice raise wherever you job and love surrounds you like games around a gamer!