ValveSoftware / Source-1-Games

Source 1 based games such as TF2 and Counter-Strike: Source
646 stars 74 forks source link

[TF2] Strange lag when getting killed #3938

Closed UAVXP closed 2 years ago

UAVXP commented 2 years ago

Hello. Yesterday, after the latest update me and my friend experienced a huge time-consuming lag, when getting killed on Valve Matchmaking servers. The maps were ctf_2fort, ctf_doublecross and koth_harvest (haven't tried other maps though). After it begins to happen I asked about it in game chat, and received a few confirmations that this lag happened to some guys.

This lag takes almost exactly the whole death period (8-15 seconds) and initiates right after the death camera approaches the killer. It starts with a second lag, and increases in time to the point when I got kicked from a server due to "Client disconnect".

Under "lag" I mean whole game just stops working, and the last played sound is repeating itself, until my next spawn Notice: you must be killed by a player/sentry, not by "kill" in console or jumping down the pit on Double Cross

My PC: uavxp_pc.txt

During this lag RAM usage is not increasing, and CPU utilization is dropping from around 90% to 70%. GPU usage drops to 4%

My custom folder contains Bot Detector Vote HUD, which messes with resource folder

I use Comanglia's Toaster FPS config from here: https://cfg.tf/make/ with a few changes: uavxp_config.zip My friend is using straight up Comanglia: Toaster config without dramatic changes

Also me and my friend were using TF2 Bot Detector software from here: https://github.com/PazerOP/tf2_bot_detector This software sets the priority level for hl2.exe as "high"

Command-line parameters: -novid -nojoy -nosteamcontroller -nohltv -particles 1 -precachefontchars -noquicktime

I might say that this lag bug could not happen right after the first kill in the first match, but if it hits you - the only solution is rebooting the game

UPD: The only fast way we've found to eliminate this bug after it starting to happen - is to execute hud_reloadscheme command in console

UAVXP commented 2 years ago

Almost forgot to mention. After this huge lag, some of the enemy (or even my team) players starts to not render at all, and sometimes if they render - they're having my team model for some reason (imagine being in BLU team and getting killed by BLU sniper). Someone in the game chat suggested to me running a "stopdemo" command, but I don't remember if it fixes that model issues IMG_20220624_004608

UAVXP commented 2 years ago

Here's the video with example: https://youtu.be/kIn6BiXYKHM This time bug started to happen after 3 games and 2 enemy team votekicks

UAVXP commented 2 years ago

Just tested, this bug occurs after 23-25 minutes on ctf_doublecross. I was not using TF2BD and removed any addons from "custom" folder. Only fps config was present

Jgr9 commented 2 years ago

Same here since the recent update, Intel CPU graphics (no mods). Length of game freezes increase with every death until it finally crashes. (ntdll.dll)

Speaking of Intel (CPU) graphics drivers, if that's even relevant, I'm frequently coming across sightings of playermodels with a vertices spiking off in a random direction.

I also noticed that bots are able to change everyone's Flair! cosmetic decals - Troll Face of course.

UAVXP commented 2 years ago

Changing mat_setvideomode could help btw

Jgr9 commented 2 years ago

Your resolution / window size? Why?

unless you're talking about the good old known invisible player bug after lag/freeze spikes. Recording a demo and stopping it fixes invisible players, but now I have to do it after every death with whatever's causing these freezes at death now. Too bad recording a demo doesn't fix the freezing.

UAVXP commented 2 years ago

No, mat_setvideomode actually fixes the main bug (death lag), but not for long I suppose. mat_setvideomode has 3 parameters: width, height and windowed. If you're in fullscreen mode, you can run mat_setvideomode yourW yourH 1 and then mat_setvideomode yourW yourH 0 If in windowed - do the opposite

It's the fastest way to eliminate the death lag I found at the time. It's definitely faster than rebooting the whole game

Jgr9 commented 2 years ago

Actually you seem to be right, except..... For me the first time doing it always takes FOREVER for it to actually switch/change - Long enough to disconnect me, so I recommend not changing the video settings (fullscreen/windowed etc) until after you're off the server if you can help it. - Unfortunately griefers like to hold matches with objectives to instead last for 4 hours, so...

Also, somebody who was also talking about the same problem in a TF2 match seemed to confirm that it isn't only an Intel graphics driver thing, nor laptop. They were desktop with Nvidia and were also getting the death freezing since the update.

I'm not sure, but I suggested everyone change their video settings like here, but like I said, the first time might take forever to switch and disconnect you and I might have gotten most of the server to disappear. XD (maybe)

UAVXP commented 2 years ago

Hey @Jgr9 , could you provide crash dumps that has been created due to death lag bug? It would be pretty handy for developers to investigate more quickly into that bug

Jgr9 commented 2 years ago

idk, I've always found logs TF2 gives to be pretty useless, but I can't say I actually know for sure in that regard. Also It takes (or can take) quite a while not only for the issue to show, but for it to finally crash, too.

UAVXP commented 2 years ago

Yeah, I believe it take so long, but I meant not the logs, but crash dump, .mdmp file that is getting created after crash in a TF2's root folder

Jgr9 commented 2 years ago

I don't see one in TF2's root folder. Then again I wonder if verifying the game files deletes them or if it otherwise gets removed anyways? or did I get it to crash before the newest patch (which I'm sure did not address the issue, but)

UAVXP commented 2 years ago

No, verifying files shouldn't remove these dumps. Okay, that's strange and sad at the same time. Thank you for investigating)

treacherousfiend commented 2 years ago

I've talked to a couple people who also have this issue but don't have an intel iGPU, so it might be worthwhile to remove the "Intel Driver" tag from this issue report?

UAVXP commented 2 years ago

@kisak-valve , can you please remove the "Intel Driver" label from issue?

Jgr9 commented 2 years ago

Ugh... Unfortunately changing the video settings Fullscreen/Windowed still permanently removes objective status from the HUD (Capture Points, Cart progression, etc) until restart, and I still don't know of a way to fix it. hud_reloadscheme doesn't fix it [missing objective status on the HUD]. (nor does switching mini hud)

So that's not a great solution (workaround) either....

UAVXP commented 2 years ago

By the way, hud_reloadscheme does fix the main issue (death lag)

So I'm making statement that the death lag hug is HUD-related

Jgr9 commented 2 years ago

Wait what, it does? So no need to change video settings then? lol

idk if it's related, but Ever since they added the Friends list to the main screen my game stutters every time Esc is used during game. And yes, disabling the in-game Friends list does remove that issue but then you can't use parties.

UAVXP commented 2 years ago

Yes, it works for me at least

idk if it's related, but Ever since they added the Friends list to the main screen my game stutters every time Esc is used during game. And yes, disabling the in-game Friends list does remove that issue but then you can't use parties.

Esc and also inventory change menu? I had that issue too, but this is probably Win10 related. When I was on Win7 on the same PC, I didn't experienced that stuttering

Jgr9 commented 2 years ago

I am 100% certain that^ issue started the update before the in-game Friends list appeared, years ago. Probably preliminary changes or whatever.

UAVXP commented 2 years ago

Yeah, I've read that a Friends panel is causing this, but I'm too lazy to remove it so I can test. You probably can make another issue about this stuttering here

nejby commented 2 years ago

Ok so i thought i had issues with my pc or something but thankfully i am not the only one having this issue I remember having a normal match when then for some reason it was giving me a huge stutter when getting killed even on the next map, the issue stays and becomes more and more annoying my hardware is OS: Windows 10 GPU: GTX 1050TI CPU: AMD Ryzen 3 1200

Jgr9 commented 2 years ago

I'll probably end up trying it tonight, but OP says inputting hud_reloadscheme in console temporarily fixes it (workaround). Try that first once it starts happening. (or more if you want)

The other workaround by changing video settings can unfortunately cause other issues.

Hunches - This probably means there's something with the hud is causing it - It makes me wonder if aimbots use SOME part of the hud to aimbot? Perhaps player outline, even if it's not visible? (and Valve is trying to check for this?) hmm.... idk.

treacherousfiend commented 2 years ago

i've seen a couple workarounds and all of them seem to include reloading the hud in some way, material resets like changing video settings are also a way to reload the hud (probably because the game needs to translate the hud to the new resolution)

and regarding that aimbot comment, the server keeps track of what areas the client can and can't see, and will only send data of other players that the client can see, i'm not super familiar with how the cheats work but they probably don't need the team outline to find out where a player is, as long as the server sends that data. although this is probably a bit offtopic for this issue post.

Jgr9 commented 2 years ago

yeah, unfortunately changing some of the video settings can cause objective status on the hud (CP, Payload progression, etc) to disappear permanently and hud_reloadscheme doesn't even fix that for some reason. Yet it sounds like it may fix the new death freezing. i gotta test it myself later

Jgr9 commented 2 years ago

Yup, can confirm that hud_reloadscheme does temporarily fix death freezes.

Jgr9 commented 2 years ago

Ugh.... hud_reloadscheme causes a giant scrollbar to cover Ping on the scoreboard. It's always something.....

VeridianFox commented 2 years ago

Having this same issue too. Just began happening recently. I can only assume it has something to do with the recent update to the game. Uninstalled/reinstalled the game with no custom HUD or mastercomfig in the game files. Issue seemed briefly resolved before coming right back. Incredibly annoying and always seems to last the full 15 seconds.

treacherousfiend commented 2 years ago

Yeah unfortunately it is due to the update, I'm part of the mastercomfig discord and recently we fixed an issue which made the freezes worse, but otherwise all that we can do is wait for it to be fixed, and occasionally use a command like hud_reloadscheme to temporarily relieve the issue

RexBucket commented 2 years ago

The problem is that if I write this command the game freezes and I am banned for lost connection, maybe we can only wait for an update from them, to fix death lag and invisible players.

Jgr9 commented 2 years ago

If you're using the video settings command, yeah, It'll do that. Use hud_reloadscheme instead. It should be quicker (though still only a temporary fix).

ScorpianCode commented 2 years ago

It can be caused by getting dominated/revenged, and typically there's a pyro around. Then the sounds dies almost completely. I should mention I encounter this every single time I play.

toaoEda commented 2 years ago

Hey, I dont know much about computers or GitHub, but I started experiencing this problem around the time of the update too. Audio looping and freezing when I die (just like in the video), after I've been playing for a while. Some other bugs I've noticed is invisible players like OP mentioned, and I play a lot of MvM bootcamp (valve servers) - sometimes normal-sized robots appear large, sometimes they appear ubered. Using "snd_restart", "record; stop" dont fix these issues, usually I restart tf2 after letting my laptop cool down. Yes, potato gaming laptop. I use low graphical settings changed using in-game menu; i have no configs or mods or custom huds. I just assumed my potato settup was causing this problem, but i really think its something in the update. Its super annoying hearing audiolooping of screaming when you die. I'll try hud_reloadscheme, mat_setvideomode, to see if they help for me.

Jgr9 commented 2 years ago

Great, now hud_reloadscheme made my game crash completely. No error of course. I really hope they fix death freeze soon, but I'm fearing they might not fix it ever.

agrastiOs commented 2 years ago

@Jgr9 The death freeze will be fixed next update.

UAVXP commented 2 years ago

The death freeze will be fixed next update.

How do you know that?

MechaWolft commented 2 years ago

@Jgr9 The death freeze will be fixed next update.

i hope it will drop really soon cuz that freezing is really annoying

KookyKlutz commented 2 years ago

Low-key relieved to know that I'm not the only one experiencing this issue. At first I thought it might've been a .cfg issue (since it was an error that kept popping up in my console), and fixing that made it not lag after death for a tiny bit, but it still went back to how it was moments later.

Really hope that Valve does something about it soon, cuz it's getting to the point where it's almost unbearable to play :(

agrastiOs commented 2 years ago

May be fixed in the latest update, per "Fixed an occasional lag spike when showing the kill cam for some players".

agrastiOs commented 2 years ago

@UAVXP

Jgr9 commented 2 years ago

Here's hoping, but I always have to doubt

UAVXP commented 2 years ago

Will do. Need to play longer, I've only handled about 30 minutes of gameplay or so today, so maybe this bug didn't show yet

KookyKlutz commented 2 years ago

With roughly 3 hours worth of gameplay after the patch, I have yet to experience the death lag. 99% sure the issue is gone, but once again you never know with Source games lol

KookyKlutz commented 2 years ago

With roughly 3 hours worth of gameplay after the patch, I have yet to experience the death lag. 99% sure the issue is gone, but once again you never know with Source games lol

Jgr9 commented 2 years ago

I don't think I got it either, but......

it still sucks that normal (?) strong lag spikes can cause players to go invisible (fixed by recording a demo). Which happened to me a lot still last night due to household internet usage. ugh

agrastiOs commented 2 years ago

I don't think I got it either, but......

it still sucks that normal (?) strong lag spikes can cause players to go invisible (fixed by recording a demo). Which happened to me a lot still last night due to household internet usage. ugh

Well, that is a separate issue. I've experienced the Death Freeze bug twice before the patch, but haven't experienced it yet. It appears as if the issue has been fixed, knowing that four of us didn't get it yet.

UAVXP commented 2 years ago

@kisak-valve Well, so I've tested for a few days, if this bug appears now, after the latest update. Now I could definitely say that no, it doesn't.

I think the issue is fixed now. Thank you all guys for participating)

Jgr9 commented 2 years ago

I'm still wondering if it (or some part/portion) of (what we think is it) might still be happening, and may be brought on / pushed into happening by bots?

Though I haven't needed the hud_reloadscheme fix anymore so far I don't think, so maybe not that issue. Maybe, even though Valve is working on DDoS protection the bots may be doing it / successful just enough to cause a lag spike that'll cause people to end up with invisible players (fixed by recording a demo). I say this because others were mentioning the lag and invisible players at the same time I got it.

ugh

I fear that invisible players could be something that leads people to drop from the game if they don't know the way to fix it.

agrastiOs commented 2 years ago

@Jgr9 That's an entirely different issue. I would suggest closing this one and opening one regarding invisible players after a lag spike.

kisak-valve commented 2 years ago

Closing as fixed in the 2022-07-29 Team Fortress 2 update.