Team Fortress 2
DJTHED Aug 3, 2015 @ 9:49pm
Constant lagspikes and packet loss/choking while playing online.
https://www.youtube.com/watch?v=v9nRDrk65L0&feature=youtu.be

This started to happen when I built my new PC. My PC from before didn't have this issue, nor do any of the other computers on my network have this issue. I've also started to doubt that it was a hardware problem with the wireless network adaptors I've used. I've gone through THREE of them, both USB and Internal PCI-E, and none of them solved this problem. I've tried upgrading from Windows 7 to Windows 10 hoping it might be some weird OS issue, but that didn't solve it either. I've updated all my network drivers, still no. This issue doesn't occur just in TF2 either, but it is definitely most noticeable and annoying in TF2. I'm currently lost at what could be causing this. It can't be my ISP, router or modem, it's only happening on this PC. It can't be a hardware issue because I've gone through 3 network adapters with no change in wireless performance. It could still be a software issue, though, but I don't know for sure. Does anyone know what could be causing this, and know a possible fix?

If you need any hardware specs, let me know.
Last edited by DJTHED; Aug 4, 2015 @ 3:47am
< >
Showing 1-15 of 19 comments
Mashpit Aug 3, 2015 @ 9:56pm 
Commenting for future reference, I'll get back to you in a couple hours.
Mashpit Aug 4, 2015 @ 1:02am 
Aight, the first thing that came to my mind was wifi stutter but judging by what you said and the general shape of the interp/exterp graph it doesn't follow the usual wifi interference pattern (2~5 seconds of pure exterp, and then smooth sailing).

What this looks more like is packet choke - your client does not have access to enough bandwidth to handle the amount of packets that are being sent at once.

I'm gonna guess that you getting a new PC happened to coincide with the gunmettle update - the new skins take up obnoxious amounts of processing power to draw for whatever reason, and they must be spiking your net activity.

I can't be 100% sure without footage with net_graph 4 (the one that shows packet loss and choke), but I'm fairly sure I'm right.

Try the following commands:
rate 80000 cl_cmdrate 67 cl_updaterate 67 cl_interp_ratio 2 //You may want to change this to 1 if you main Demo/Soldier/Medic cl_interp 0 cl_lagcompensation 1 cl_pred_optimize 2 cl_smooth 0 cl_smoothtime 0.01 echo "Netcode loaded"
If I'm being completely honest, anything other than "rate 80000" is optional but they'll massively improve your hitreg, projectile delay and model/hitbox sync, so just don't question 'em too much. You also shouldn't need anything more than rate 67000 but setting a little safety cap never hurts
This gives your TF2 client a lot more bandwidth to work with, reducing the amount of stutters you get. Enjoy!

rate 100000 cl_cmdrate 128 cl_updaterate 128 cl_interp 0 cl_interp_ratio 2 //You may want to change this to 1 if you main Demo/Soldier/Medic cl_lagcompensation 1 cl_pred_optimize 2 cl_smooth 0 cl_smoothtime 0.01 echo "128 tick netcode loaded"
This is a webcode setting optimized for servers with modified tickrates. As far as I know, the TF2 engine limits the server tickrate to 100 and defaults to 66, and so an average TF2 player will never need their client set any higher than 66 cmd/updaterate (I do 67 to compensate for it technically being 66.6 ticks). However, if you regularly play on those 100 tick servers (lucky you), this netcode setting will serve you better. I set the rates to 128 in the hopes that Valve will introduce 128 tick servers to TF2 someday - a pipe dream, I know, but I can dream. If you want to use this you can copy it by quoting it and then copying the parts between [code] and [/code].


You can use one of these by putting them in autoexec.cfg. Don't paste in both, the command that is input later will cancle out previous commands. If you want to save one of them in autoexec without using them, you can turn it into a comment by adding // in front of every line.

If you don't know how to use autoexec, then it's simple - create a text file named "autoexec.cfg" (make sure it's not autoexec.cfg.txt - it's important that the file format is set to .cfg), open it with notepad or notepad++, paste in the netcode setting of your choice, save, and move it to your \cfg\ folder (some people prefer custom/[name]/cfg, but I don't c:). If you don't know where that is, then it's in the \tf\ folder of your installation folder. If you still have no idea where that is, then it's probably at C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\tf\cfg. Drop autoexec.cfg in that folder, pat yourself on the back for your hard work, and run (or type "exec autoexec" in console, if you already had it running) TF2. If you see "Netcode loaded" in the console, then it worked. Congrats.

Do note: These settings will increase the amount of bandwidth that TF2 uses. It's still a tiny amount (what, 66.6 kb/s max? Roughly 8.325 KB/s and usually lower), but it's a dramatic increase from the vanilla 20 kilobits/sec max.

Please do get back to me about whether this worked or not.
Last edited by Mashpit; Aug 4, 2015 @ 1:04am
DJTHED Aug 4, 2015 @ 1:50am 
https://www.youtube.com/watch?v=Q_T_qhynlfQ

Unfortunately no, it didn't seem to help much at all. I enabled net_graph 4 in this vid.

Originally posted by Mashpit | I should study:
I'm gonna guess that you getting a new PC happened to coincide with the gunmettle update - the new skins take up obnoxious amounts of processing power to draw for whatever reason, and they must be spiking your net activity.

I would find this kinda strange if this were true. My laptop, which is significantly less powerful than my main rig, doesn't suffer from this problem. This lag occurs in empty servers. Also, this lag started a few weeks before the big skins update, but it only happened occassionally until now.
Last edited by DJTHED; Aug 4, 2015 @ 1:51am
Mashpit Aug 4, 2015 @ 2:38am 
Originally posted by DJTHED:
https://www.youtube.com/watch?v=Q_T_qhynlfQ

Unfortunately no, it didn't seem to help much at all. I enabled net_graph 4 in this vid.

I would find this kinda strange if this were true. My laptop, which is significantly less powerful than my main rig, doesn't suffer from this problem. This lag occurs in empty servers. Also, this lag started a few weeks before the big skins update, but it only happened occassionally until now.
I'm noticing that the download bandwidth used by your computer increases pretty dramatically (from 20~24kb/s to >40kb/s), but actually stays below the "rate limit" (80kb/s) that was set in the cfg. You would only see stutters if the TF2 client needed to download at above 40kb/s, which is why this became more common post-mettle (more textures and resources that need to be received from the server) If your laptop can run the game without stuttering, then I'd figure it's one of two possibilities:
  1. There is a process that is running on your computer that constantly uses bandwidth. You may want to check your applications' bandwidth usage by using something like NetBalancer[www.howtogeek.com].
  2. Someone else is using your internet connection, and you're getting low priority.
For problem 1, it's simple to fix: find what software is hogging your bandwidth and close it before you play the game.
For problem 2, it's a bit more complicated. If it's interference to your wifi signal that's causing the disruptions(microwaves, etc), then it could be solved with an ethernet cable, but if it's someone else using the internet connection and bottlenecking your own connection then... tell whoever's using your connection to stop? I guess you can set up packet prioritization if your router supports it, but that's outside my area of knowledge.
SirP1zza Aug 4, 2015 @ 2:50am 
I have no idea what you guys are talking about but I do know that you do a
"Record fix"
"Stop"
To regain the packet.
Mashpit Aug 4, 2015 @ 3:40am 
Originally posted by Sir_P1zza {Vacation in China!}:
I have no idea what you guys are talking about but I do know that you do a
"Record fix"
"Stop"
To regain the packet.
All that does is record a demo and immediately stop recording it. It fixes model and some sound glitches on client's end, but has no effect on netcode. Players showing up invisible/animations becoming stuck/sounds being looped when they spawn/trigger during a disconnect is a graphical problem, not a netcode problem.
...Not to mention the fact that "regaining" a packet after it has been lost from the stream would be entirely useless. You would just have information from the past that is now entirely obsolete. Besides, the problem here isn't packet loss (which is generally interpolated with decent accuracy), but packet choke - all the packets are going through, but the client's bandwidth can't keep up with the amount of information being sent, meaning that a second's worth of data is being received over 1 second and a half, etc. The client then has to extrapolate (aka: completely guess) as to where the players and live projectiles will end up in the half-second of information that it wasn't able to download in time. When the client is able to "catch up" to the server, it adjusts the players' position to match the server's - if the extrapolation was incorrect (which is, usually), then it just teleports the players to where they are supposed to be, which is what people see as stuttering/rubberbanding.
DJTHED Aug 4, 2015 @ 2:05pm 
Originally posted by Mashpit | I should study:
There is a process that is running on your computer that constantly uses bandwidth. You may want to check your applications' bandwidth usage by using something like NetBalancer[www.howtogeek.com].
I tried out this piece of software, but nothing else at all was hogging my own bandwidth, but just in case, I ended the tasks of anything that used even the tiniest bit of bandwidth. This didn't fix the problem.

Originally posted by Mashpit | I should study:
Someone else is using your internet connection, and you're getting low priority.

*snip*

For problem 2, it's a bit more complicated. If it's interference to your wifi signal that's causing the disruptions(microwaves, etc), then it could be solved with an ethernet cable, but if it's someone else using the internet connection and bottlenecking your own connection then... tell whoever's using your connection to stop? I guess you can set up packet prioritization if your router supports it, but that's outside my area of knowledge.
Unfortunately, the router is too far away for an ethernet cable to be ideal. I did go into my router settings and prioritized everything that had to do with my PC, and there's still no change to the packet choking. Also, both of those vids were recorded at like 2 AM, so no one would likely be hogging the internet at that time of day.
DJTHED Aug 6, 2015 @ 1:10am 
Going to have to bump this. Just to quickly summarize the details of the issue I'm having:

-I am currently experiences packet loss and/or choking on every game on this computer. And ONLY this computer. Every other computer on this network do not have this issue, so it probably can't be an ISP/Router/Modem issue.
-I've used multiple wireless cards for my PC and none of them changed the problem. I've used both USB and PCI-E variants of the Wi-Fi cards. Chances are it can't be a faulty wireless card.
-This issue started when I built this PC. The PC I had from before was fine. So it's obviously got something to do with whatever's currently in my current build, just not sure what piece of hardware or software/drivers it could be.
Last edited by DJTHED; Aug 6, 2015 @ 1:11am
Mashpit Aug 6, 2015 @ 2:19am 
Maybe it's the antivirus? I still think you have some sort of download limit imposed on your TF2 client (since your download speed doesn't hit 67kb/s - whenever you stutter, your download rate shoots up to ~40kb/s and no further even though you have access to more bandwidth). Check your motherboard's drivers, see if there's any sort of packet prioritization driver that you haven't installed/found yet. It might also be a connection protocol issue - if you're confident in the fidelity of your connection, try putting in -tcp into launch commands. If nothing changes, though, remove that line. UDP is always advantageous for online gaming, TCP is just a bit more stable (and honestly, minor packet loss doesn't matter nearly as much as connection speed when playing videogames).
O Suricato Dec 14, 2016 @ 9:35am 
Hey, did you solve the issue? I am experiencing the exact same thing.
DJTHED Dec 15, 2016 @ 8:19pm 
I just know at this point that my motherboard is at fault. I've been using an ethernet connection for a while now which works fine for the most part, but still not perfect.
O Suricato Dec 15, 2016 @ 8:51pm 
I solved my problem by connecting the PSU directly to the power outlet, without using an UPS. Idk if this helps.
Last edited by O Suricato; Sep 2, 2018 @ 4:12pm
buchiach Jun 27, 2018 @ 4:25pm 
oh and you know what its 2018 and i still suffer the same problem
Pir Threontai Sep 1, 2018 @ 12:22pm 
suffering from the same prob pls help
HoBoMiKe Sep 2, 2018 @ 6:45am 
Originally posted by Mashpit:
Maybe it's the antivirus? I still think you have some sort of download limit imposed on your TF2 client (since your download speed doesn't hit 67kb/s - whenever you stutter, your download rate shoots up to ~40kb/s and no further even though you have access to more bandwidth). Check your motherboard's drivers, see if there's any sort of packet prioritization driver that you haven't installed/found yet. It might also be a connection protocol issue - if you're confident in the fidelity of your connection, try putting in -tcp into launch commands. If nothing changes, though, remove that line. UDP is always advantageous for online gaming, TCP is just a bit more stable (and honestly, minor packet loss doesn't matter nearly as much as connection speed when playing videogames).
i think what he's saying is you're speaking Technese and none of us average joes can understand what the heck you're saying.


tone down the computer jargon and walk us through how to fix it, in laymans terms.
< >
Showing 1-15 of 19 comments
Per page: 1530 50

Date Posted: Aug 3, 2015 @ 9:49pm
Posts: 19