ValveSoftware / Dota2-Gameplay

Public Bug Tracker for Dota2
1.49k stars 85 forks source link

Input lag #15559

Closed tonymonsalo closed 8 months ago

tonymonsalo commented 9 months ago

Ability name

basic dota behaviour

Description

I hear about this issue around last 10 days from streamers, youtubers, on forums and experience this myself. But i don't see any reports on this bug-tracker. There is significantly annoying input lag, mostly on movement and rotating. At the beginning I had it only on juggernaut, but now i notice it on more heroes (applied video with templar assassin).

Some streamers said, that it is related to video settings, but it didn't helped me (maybe only a bit). As for me - i use borderless window (for the last7 years). Setting Fullscreen, i guess helps a bit, but not completely (and it is not comfortable)

Applying video, where i tried to synchronize hero movement in test lobby (left) and in mm game (right; video captured during a game).

https://github.com/ValveSoftware/Dota2-Gameplay/assets/20268195/6010beda-7f23-4198-9ff5-bea65b539cc8

image image

Example Match ID (and possibly Timestamp)

7597571284 - 0:27 (this report is not about some separate game)

kvaddballe commented 9 months ago

@jeffhill Here is .log to the end of the game console - Copy (3).log

@kvaddballe i passed -condebug in launch options

And where does the log end up?

tonymonsalo commented 9 months ago

@jeffhill Here is .log to the end of the game console - Copy (3).log

@kvaddballe i passed -condebug in launch options

And where does the log end up?

search "console.log" file in dota2 directory. I'm in bed already, so i can't give you exact path

kvaddballe commented 9 months ago

Doesn't seem to be working for me. Hmmm.

On another note. Someone on reddit posted that uninstalling and re-installing the Windows-updates from the 13/14th of February made the lag less bad. I've tried this and feel it's also abit lower. Can other people with input lag try this and see if it gets better for them?

Update names if ur on Windows 10: KB5034763 and KB5034685 Update names if ur in Windows 11: KB5034467 and KB5034765

jeffhill commented 9 months ago

Thank you for the console logs! I've done a bunch of digging into evidence in there, particularly these really confusing looking: 02/27 22:26:06 [Client] Server tick 35039 was not available when we needed it, arrived -65.3ms too late

I think what's happening here is that the client is hitting a spectacularly slow frame for some reason - longer than 33ms (30fps). It would really help if someone could install UI for ETW (https://github.com/google/UIforETW/releases) and capture an ETL file while the latency is happening? That should collect all the data needed to find the smoking gun on this one. We've already ruled out networking though the server logs showing stable, good connections and good server performance - so we know there's something weird happening inside the dota2.exe process that's causing this input latency and an ETL file would capture everything involved.

Also helpful would be running the "cl_ticktiming" command in the console while you're having input lag and sharing the result. Comparing that to a "cl_ticktiming" command when you're not having input lag in the early game would be very helpful too.

Thanks for all the help tracking this down folks!

SpiritWinD86 commented 9 months ago

I think i've saw this "server tick" something.. and similar to this things in the console when game was laggy. It feels like your hero is constantly under sticky napalm, but it affects not only movement, but also pressing ability buttons.

And i don't think that it is windows related as mentioned above, because i'm playing on linux and faced same issue.

jeffhill commented 9 months ago

@tonymonsalo Could you try:

Finally, if you could send me your console.log from this test, that would be super useful. I'll be able to see where in the pipeline the lag is coming from. Thank you!

tonymonsalo commented 9 months ago

@tonymonsalo Could you try:

  • launch with "-condebug +cl_ticktiming 300 detail" on the command line
  • when you're in a match, in the in-game console try "cl_clock_recvmargin_enable 1". See if you encounter the lag?
  • If you hit the latency, try "cl_clock_recvmargin_enable 0" in the in-game console rather than alt-tabbing out.

Finally, if you could send me your console.log from this test, that would be super useful. I'll be able to see where in the pipeline the lag is coming from. Thank you!

console - Copy (4).log

I was experiencing lag whether i change cl_clock_recvmargin_enable to 0 or 1 during the game (am i even allowed to do this multiple times?)

tonymonsalo commented 9 months ago

@jeffhill Also, i didn't get what you mean by "rather than alt-tabbing out"

UPD. I don't know, is it possible. But it would be great to have both installed dota 2 builds (latest and before 9 Feb) to compare the gaming experience. Because, for the last 3 weeks, my eye (and other's guys who have this) has already adjusted, and maybe our view of the game is not objective already. Maybe after trying "cl_clock_recvmargin_enable 0" we are become more picky, and we just can't properly distinguish how it was before 9 Feb.

jeffhill commented 9 months ago

Thanks for the log!

My understanding is that one "fix" folks are using is to alt+tab out of Dota and then back in to "reset" whatever's going wrong - and that would spoil the log data in this case.

Running a pre-update version of Dota on public would be pretty complicated as we'd need server infrastructure set up for that as well. The linked video at the top of this ticket shows 200ms latency on a 40ms connection, which is pretty noticeable.

wazerstar commented 9 months ago

Thank you for the console logs! I've done a bunch of digging into evidence in there, particularly these really confusing looking: 02/27 22:26:06 [Client] Server tick 35039 was not available when we needed it, arrived -65.3ms too late

I think what's happening here is that the client is hitting a spectacularly slow frame for some reason - longer than 33ms (30fps). It would really help if someone could install UI for ETW (https://github.com/google/UIforETW/releases) and capture an ETL file while the latency is happening? That should collect all the data needed to find the smoking gun on this one. We've already ruled out networking though the server logs showing stable, good connections and good server performance - so we know there's something weird happening inside the dota2.exe process that's causing this input latency and an ETL file would capture everything involved.

Also helpful would be running the "cl_ticktiming" command in the console while you're having input lag and sharing the result. Comparing that to a "cl_ticktiming" command when you're not having input lag in the early game would be very helpful too.

Thanks for all the help tracking this down folks!

You don't want to use Fletchers Dunn's guide?=

https://docs.google.com/document/d/1v8QtbUtGAf6OapE9iWn4Y4STA7Scn_hr1Yih1nf2_BA/edit#heading=h.u0cg8jbrukvb

tonymonsalo commented 9 months ago

Thank you for the console logs! I've done a bunch of digging into evidence in there, particularly these really confusing looking: 02/27 22:26:06 [Client] Server tick 35039 was not available when we needed it, arrived -65.3ms too late

I think what's happening here is that the client is hitting a spectacularly slow frame for some reason - longer than 33ms (30fps). It would really help if someone could install UI for ETW (https://github.com/google/UIforETW/releases) and capture an ETL file while the latency is happening? That should collect all the data needed to find the smoking gun on this one. We've already ruled out networking though the server logs showing stable, good connections and good server performance - so we know there's something weird happening inside the dota2.exe process that's causing this input latency and an ETL file would capture everything involved.

Also helpful would be running the "cl_ticktiming" command in the console while you're having input lag and sharing the result. Comparing that to a "cl_ticktiming" command when you're not having input lag in the early game would be very helpful too.

Thanks for all the help tracking this down folks!

@jeffhill Didn't seen this comment

Here are some etl things https://s3.eu-central-1.amazonaws.com/mists.life/2024-03-01_01-26-34_Konst.etl https://s3.eu-central-1.amazonaws.com/mists.life/2024-03-01_01-56-31_Konst.etl https://s3.eu-central-1.amazonaws.com/mists.life/2024-03-01_01-57-24_Konst.etl

Not sure that i am recorded them correctly, just clicked "Start tracing" image

@wazerstar thanks for noticing. I guess, link that you provided leads for alternate way of recording ETL thing, and it is not necessary?

jeffhill commented 9 months ago

I'm still digging through those ETL files (thank you!) but it looks like your CPU is often idle for 10ms+ waiting on vsync. It looks like you're usually getting around 30 fps, which means that if even a single frame goes over the deadline and it has to wait on vsync it might be a full 16ms before that 60Hz vsync comes in - during which time everything else is idle.

tonymonsalo commented 9 months ago

getting around 30 fps

Not really. I have vsync enabled, and it is mostly straight 59-60fps. Without vsync - it is 80-120fps.

(not sure that i understood meanings of all your words correctly 😅)

jeffhill commented 9 months ago

Oh, sorry, I misread the ETL. It's reporting 60fps, not 30fps.

Can you try adding "+dota_debug_change_cursor_during_pending_order 1" on the command line? This will make the mouse cursor change to the coaching cursor which is brighter, while you have an order that the server hasn't acknowledged yet. This will make it visually obvious when there's input lag, as your mouse will stay bright longer than normal. Basically every time you click the cursor will be bright until you hear back from the server that it got the order, so you'll be able to see any lag visually.

Another thing to try is setting "cl_interp_ratio 0". This effectively turns off the client side smoothing of data, which will make things more responsive, but at the cost of making any jitter due to lost packets more obvious.

jeffhill commented 9 months ago

We just shipped a client update that we believe fixes the client input latency bug. Please let me know if you see the problem in any new matches!

Aeswaaaaa commented 9 months ago

We just shipped a client update that we believe fixes the client input latency bug. Please let me know if you see the problem in any new matches!

Checking right now, testing to test with cl_clock_recvmargin_enable true or false? Or does it not matter

Upd: I played +-3 lobby 1vs1 solo mid mode vs humans with cl_clock_recvmargin_enable false and the game felt pretty good, after I played with cl_clock_recvmargin_enable true +- 3 games and at times it was like there was a delay, maybe the command had no effect and it's a coincidence, but I'm sharing it as it is.

add: If you compare how bad it was after February 8-9, it's much better now, but are things back to the way they were when there were no problems yet? I can't say yet, it takes time.

Final update: Even though I'm pretty sleepy, I'm still sure I felt some delay and at times the movement wasn't accurate. For example, when I was do strafe a lot, canceling shadowraze and constantly canceling attack + re-aggril creeps, in this huge amount of sharp actions, the hero in some places started later to execute commands

Aeswaaaaa commented 9 months ago

When I wake up I will test again with different values of cl_clock_recvmargin_enable, if I notice a lags pattern I will try to take a video clip through obs, if you need to measure indicators with certain software or inside the dota itself with commands, I can also do it, just let me know what's required of me.

tonymonsalo commented 9 months ago

Oh, sorry, I misread the ETL. It's reporting 60fps, not 30fps.

Can you try adding "+dota_debug_change_cursor_during_pending_order 1" on the command line? This will make the mouse cursor change to the coaching cursor which is brighter, while you have an order that the server hasn't acknowledged yet. This will make it visually obvious when there's input lag, as your mouse will stay bright longer than normal. Basically every time you click the cursor will be bright until you hear back from the server that it got the order, so you'll be able to see any lag visually.

Another thing to try is setting "cl_interp_ratio 0". This effectively turns off the client side smoothing of data, which will make things more responsive, but at the cost of making any jitter due to lost packets more obvious.

Played several games with "+dota_debug_change_cursor_during_pending_order 1". For me, looked like cursor always changed for a same amount of time (didn't seen any extra long duration of changed cursor). As i understood, game unit should make their actions after the cursor changed to the initial "skin"?

I've tried to measure something

https://github.com/ValveSoftware/Dota2-Gameplay/assets/20268195/4d770d7a-5b28-4a8f-9996-9c8897fdbafb

(this video is also with cl_interp_ratio 0) image

Aeswaaaaa commented 9 months ago

We just shipped a client update that we believe fixes the client input latency bug. Please let me know if you see the problem in any new matches!

Do you have the ability to run old dota 2 builds locally on your computer? I just gathered some information, but to finalize it, I need to get an old build of Dota 2. Or that someone else has access to it.

mercdaddi commented 9 months ago

Many people have unoptimized computers. I think it's not always about the game. There are many factors that affect input lag. I tried "cl_clock_recvmargin_enable", almost the same. Nowadays, more emphasis is placed on input latency based on time of day.

my brotha whaat did you just type?

Andreixzc commented 9 months ago

Is your network settings set to 'high-end network'? image

mercdaddi commented 9 months ago

Is everyone also getting the "excessive frame time clamped...acting as if the frame only took 100 MS?" I get that and the missing tick in the console in game. The frame time bug is worse, as it drops me from 230ish FPS to 15-50 for about 5 seconds. Happens much more when clicking on heroes and things are going on. It will happen 20-30 times a game, but then work like butter when not. It feels like it is alt-tabbing, but I dont have tab binded as tab. I made it LEFT arrow key so it wouldn't alt-tab out when I clicked it (I just use windows key and exclusive fullscreen)

I have tried every combo fathomable of fullscreen, borderless, and all their optimizations both on and off in windows. I have unplugged/replugged every single monitor/device. I think I have tried all the console commands, but tbh I am not good in console and may have fucked them up, or maybe somehow made my game run worse. I have tried all NVIDIA settings in control panel, and combo of video settings in dota. I have tried system restore, and clean install of windows 11, Steam, and Dota. I prefer to use a 3 monitor setup. Not sure what else to do. I have not tried factory reset.

I will say, for some reason the game runs almost entirely smooth at like 120-140 fps. Sometimes gives me 144, sometimes have to set it to 120 but its pretty normal then (the input lag still there, but not 4 second 100 FPS drop.)

I have a 3080, I7 12 core, BenQ 240HZ 1440P and play on 2560x1440. 1GB fiber on Ethernet. DP cable.

jeffhill commented 9 months ago

@tonymonsalo The timing in your last video looks correct to me. The delay before the cursor changes is networking delays. The delay after the cursor changes is entirely client animation / interpolation / rendering, to make Dota appear to animate smoothly. Could you try the same test in hero demo mode? I'd expect overall latency to be better - but the delay from the cursor changing to the hero appearing to move should be the same.

tonymonsalo commented 9 months ago

@tonymonsalo The timing in your last video looks correct to me. The delay before the cursor changes is networking delays. The delay after the cursor changes is entirely client animation / interpolation / rendering, to make Dota appear to animate smoothly. Could you try the same test in hero demo mode? I'd expect overall latency to be better - but the delay from the cursor changing to the hero appearing to move should be the same.

https://github.com/ValveSoftware/Dota2-Gameplay/assets/20268195/b6058232-7105-4a8e-8922-8d38e50bff04 https://github.com/ValveSoftware/Dota2-Gameplay/assets/20268195/a95caaf7-d9c0-49b4-9512-21a5ebbd9e34

@jeffhill Yesterday i found my old SSD with installed dota of 2022 year (7.31 release). I'm playing counter strike with my friend by hosting "map de_inferno" in my console, and then he connects with "connect \<ip>:\<port>" in his console. Today i will try to do the same in dota (with old and maybe new version), and will try to measure whatever i can (if i will be able to host/connect)

IgorHoruzha commented 9 months ago

@jeffhill @tonymonsalo I made some measurements in the lobby and found that it takes approximately ~0.48-0.58 seconds from clicking to the first movement. Is it possible that I made an error in my measurements? Can the movement be measured using the console or another precise measurement method to eliminate human factor?

https://github.com/ValveSoftware/Dota2-Gameplay/assets/29505510/8fa85773-be38-4ebb-bdcc-9d80f6677c7e

UPD. I feel like have also experienced this issue. I thought that my PC was not efficient enough or there was an issue with my Ethernet connection. I was updating it, but it doesn't fully solve the issue, even after about two-three PC changes.

IgorHoruzha commented 9 months ago

@jeffhill @tonymonsalo I made some measurements in the lobby and found that it takes approximately ~0.48-0.58 seconds from clicking to the first movement. Is it possible that I made an error in my measurements? Can the movement be measured using the console or another precise measurement method to eliminate human factor?

first_move_Lycan.mp4 UPD. I feel like have also experienced this issue. I thought that my PC was not efficient enough or there was an issue with my Ethernet connection. I was updating it, but it doesn't fully solve the issue, even after about two-three PC changes.

And feel like I still experience the ~issue sometimes.

tonymonsalo commented 9 months ago

@jeffhill @tonymonsalo I made some measurements in the lobby and found that it takes approximately ~0.48-0.58 seconds from clicking to the first movement. Is it possible that I made an error in my measurements? Can the movement be measured using the console or another precise measurement method to eliminate human factor?

first_move_Lycan.mp4 UPD. I feel like have also experienced this issue. I thought that my PC was not efficient enough or there was an issue with my Ethernet connection. I was updating it, but it doesn't fully solve the issue, even after about two-three PC changes.

I don't know, maybe you changed "cl_interp" value in console; or maybe because you use windowed mode

Can the movement be measured using the console or another precise measurement method to eliminate human factor?

I was also hoping that there are some better way, but i didn't found it

IgorHoruzha commented 9 months ago

@jeffhill @tonymonsalo I made some more precise measurements. (Than My previous one.) I used:

-console -novid +dota_debug_change_cursor_during_pending_order 1 +cl_interp_raito_0

In my test, it takes approximately 0.68 seconds (2.62s - 1.94s) for the hero to start moving. Additionally, the time for changing the cursor back and beginning the move is "the same".

There was almost no difference between 2.62 and 3.25 seconds (0.63s) - just very short movement. However, since 1.94s it took 0.65 seconds (3.27s - 2.62s) to observe the next significant hero movement. This essential movement occurred between 3.25 and 3.27 seconds, lasting only 0.02 seconds, a very short time. The same behavior was observed for the next hero movement.

UPD: I use Clipchamp for measurements. UPD: First cursor change time and physical mouse click time IMO is almost the same time(~1.92-1.94s of the video). UPD: To record the video I use Snipping Tool

jeffhill commented 9 months ago

The really useful test is to compare in a lobby vs. hero demo or a locally hosted lobby. I would expect that the time it takes for the cursor to change is different - on a server, you'll have some latency, and on a locally hosted lobby the cursor should immediately change. However, the delay from the cursor changing back to the hero moving should be exactly the same between server lobby and hero demo mode / locally hosted lobby.

IgorHoruzha commented 8 months ago

@jeffhill @tonymonsalo

I have tested the typical movements of Lycan in the hero demo mode.

In My opinion, the minimum error in measurements is ~0.03 seconds. This occurs because Clipchamp sometimes alters the time I enter, reducing it by one second.

The approximate delay per frame change ranges from approximately 0.33 to 0.35 seconds.

Frame changes time:

0.90, 1.23, 1.58, 1.93, 2.23, 2.58, 2.91, 3.23, 3.58, 3.91, 4.23, 4.57, 4.90, 5.23, 5.57, 5.90, 6.23

It appears that My ping can indeed influence these numbers. As a result, the delay is about half of what it was during My previous test in the lobby. My usual ping to East/West Europe servers is 23-40ms.

@tonymonsalo The timing in your last video looks correct to me. The delay before the cursor changes is networking delays. The delay after the cursor changes is entirely client animation / interpolation / rendering, to make Dota appear to animate smoothly. Could you try the same test in hero demo mode? I'd expect overall latency to be better - but the delay from the cursor changing to the hero appearing to move should be the same.

https://github.com/ValveSoftware/Dota2-Gameplay/assets/20268195/b6058232-7105-4a8e-8922-8d38e50bff04 https://github.com/ValveSoftware/Dota2-Gameplay/assets/20268195/a95caaf7-d9c0-49b4-9512-21a5ebbd9e34

@jeffhill Yesterday i found my old SSD with installed dota of 2022 year (7.31 release). I'm playing counter strike with my friend by hosting "map de_inferno" in my console, and then he connects with "connect :" in his console. Today i will try to do the same in dota (with old and maybe new version), and will try to measure whatever i can (if i will be able to host/connect)

@tonymonsalo Do You have any demo hero or local-hosted measurements? It appears Your tests were conducted in a server-hosted lobby, as indicated by the cursor change.

tonymonsalo commented 8 months ago

However, the delay from the cursor changing back to the hero moving should be exactly the same between server lobby

In demo mode it is 50ms-90ms to restore cursor, and 50ms to hero move after cursor restored. (first two videos - are differently started demo modes) In a locally hosted lobby: cursor restoring takes 80-100ms (maybe it can be 50-100; but i didn't catch such), then, hero starts moving after around 50ms. venge1_demo_50_50 venge2_demo_67_50 db1_lobby_80_50 db_lobby_100_50

Then i played turbo game: First video (game just started) is showing that hero makes move after 80ms from cursor restored: venge1_turbo_80 These videos (almost end of game) shows that this delay is 50ms: venge2_turbo_50 venge3_turbo_50

Another turbo game shows 80ms for move after cursor restored: db1_turbo_80 db2_turbo_80

Looks like sometimes there are happening extra 30ms for moving. ((and what if these 30ms can also happen during pending_order?))

Hope this revealed something 🙃

tonymonsalo commented 8 months ago

@jeffhill @tonymonsalo

I have tested the typical movements of Lycan in the hero demo mode.

In My opinion, the minimum error in measurements is ~0.03 seconds. This occurs because Clipchamp sometimes alters the time I enter, reducing it by one second.

The approximate delay per frame change ranges from approximately 0.33 to 0.35 seconds.

Frame changes time:

0.90, 1.23, 1.58, 1.93, 2.23, 2.58, 2.91, 3.23, 3.58, 3.91, 4.23, 4.57, 4.90, 5.23, 5.57, 5.90, 6.23

It appears that My ping can indeed influence these numbers. As a result, the delay is about half of what it was during My previous test in the lobby. My usual ping to East/West Europe servers is 23-40ms.

@tonymonsalo The timing in your last video looks correct to me. The delay before the cursor changes is networking delays. The delay after the cursor changes is entirely client animation / interpolation / rendering, to make Dota appear to animate smoothly. Could you try the same test in hero demo mode? I'd expect overall latency to be better - but the delay from the cursor changing to the hero appearing to move should be the same.

https://github.com/ValveSoftware/Dota2-Gameplay/assets/20268195/b6058232-7105-4a8e-8922-8d38e50bff04 https://github.com/ValveSoftware/Dota2-Gameplay/assets/20268195/a95caaf7-d9c0-49b4-9512-21a5ebbd9e34 @jeffhill Yesterday i found my old SSD with installed dota of 2022 year (7.31 release). I'm playing counter strike with my friend by hosting "map de_inferno" in my console, and then he connects with "connect :" in his console. Today i will try to do the same in dota (with old and maybe new version), and will try to measure whatever i can (if i will be able to host/connect)

@tonymonsalo Do You have any demo hero or local-hosted measurements? It appears Your tests were conducted in a server-hosted lobby, as indicated by the cursor change.

Yes, just commented

tonymonsalo commented 8 months ago

@tonymonsalo Do You have any demo hero or local-hosted measurements? It appears Your tests were conducted in a server-hosted lobby, as indicated by the cursor change.

People got this issue exactly after 7.3x patch released. And i didn't noticed internet connection issues for the last months (ping is primarily 30-40ms) By the way, what is your PC configuration? Maybe there are some extra-unique hardware incompatibility with whatever in new updates happened

IgorHoruzha commented 8 months ago

@tonymonsalo Do You have any demo hero or local-hosted measurements? It appears Your tests were conducted in a server-hosted lobby, as indicated by the cursor change.

People got this issue exactly after 7.3x patch released. And i didn't noticed internet connection issues for the last months (ping is primarily 30-40ms) By the way, what is your PC configuration? Maybe there are some extra-unique hardware incompatibility with whatever in new updates happened

Processor 13th Gen Intel(R) Core(TM) i5-13600KF, 3500 MHz, 14 Core(s), 14 Logical Processor(s)
System type 64-bit operating system, x64-based processor
Edition Windows 11 Pro
OS build 22621.3007
Experience Windows Feature Experience Pack 1000.22681.1000.0
BIOS Version/Date American Megatrends Inc. 1604, 12/15/2023
SMBIOS Version 3.5
Motherboard Asus PRIME Z790-P WIFI
Video Card NVIDIA GeForce GT 1030
Ram Kingston FURY DDR5-5200 32768MB PC5-41600 (Kit of 2x16384) Beast AM5 Black (KF552C36BBEK2-32)

Hyper-V - VM Monitor Mode Extensions Yes
Hyper-V - Second Level Address Translation Extensions Yes
Hyper-V - Virtualization Enabled in Firmware No
Hyper-V - Data Execution Protection Yes

Mouse Xtrfy M42 RGB USB White
Keyboard Xtrfy K4 TKL RGB Kailh Red USB White
Monitor 27 DELL UP2716DA (210-AXWI)

BIOS settings are modified for now.

IgorHoruzha commented 8 months ago

@tonymonsalo Do You have any demo hero or local-hosted measurements? It appears Your tests were conducted in a server-hosted lobby, as indicated by the cursor change.

People got this issue exactly after 7.3x patch released. And i didn't noticed internet connection issues for the last months (ping is primarily 30-40ms) By the way, what is your PC configuration? Maybe there are some extra-unique hardware incompatibility with whatever in new updates happened

Possibly, You are right; I'm not ready to claim that I experienced the exact same issue before 7.3x. I just feel like I encountered something that, in My opinion, appeared quite similar.

IgorHoruzha commented 8 months ago

However, the delay from the cursor changing back to the hero moving should be exactly the same between server lobby

In demo mode it is 50ms-90ms to restore cursor, and 50ms to hero move after cursor restored. (first two videos - are differently started demo modes) In a locally hosted lobby: cursor restoring takes 80-100ms (maybe it can be 50-100; but i didn't catch such), then, hero starts moving after around 50ms. venge1_demo_50_50 venge2_demo_67_50 db1_lobby_80_50 db_lobby_100_50

Then i played turbo game: First video (game just started) is showing that hero makes move after 80ms from cursor restored: venge1_turbo_80 These videos (almost end of game) shows that this delay is 50ms: venge2_turbo_50 venge3_turbo_50

Another turbo game shows 80ms for move after cursor restored: db1_turbo_80 db2_turbo_80

Looks like sometimes there are happening extra 30ms for moving. ((and what if these 30ms can also happen during pending_order?))

Hope this revealed something 🙃

In my opinion I managed to trigger You data(~50-100ms demo mode). I was changing PC configurations to check are there any difference.

In cases: 1) 2 real cores 2.2HGz (0.67s = 67ms to move)

2 real cores 2.2HGz source video 2) 3 real cores 2.2HGz (0.68s = 68ms to move) 3 real cores 2.2HGz source video 3) 4 real cores 1.9HGz (1.00s = 100ms to move) 4 real cores 1.9HGZ source video 4) 14 real cores 5HGz (0.67s = 67ms) And even 14 real cores 5HGz source video.

This setting was configured in the BIOS.

@tonymonsalo What is Your PC configuration?

PS. I apologize it looks like I was confused about the measurement counters. So changed this message a lot of times.

IgorHoruzha commented 8 months ago

The approximate delay per frame change ranges from approximately 0.33 to 0.35 seconds.

I've just realized that the 0.33-second per frame change is because the Snipping Tool's maximum recording speed is 30 FPS.

1 second is 1000ms.
1000ms/30FPS = 1frame per ~33.333....seconds

Therefore, it seems there have been an error in My measurements.

Bliddddddd3 commented 8 months ago

@jeffhill I've been researching input lag in s2 games (cs; dota) for 2 years, I wrote a post on what might have a connection to the lag appearing in Dota2 or what might help in finding the cause

https://github.com/ValveSoftware/Dota2-Gameplay/issues/15930

jeffhill commented 8 months ago

As of the client update on Monday, we've found and fixed a source of one tick (30ms) of input latency on dedicated servers that would come and go, based on exactly when in the frame your orders would be received by the server. It should now be the case that the delay from "cursor goes back to normal" -> "my hero is moving" should be the same in both hero demo mode and when playing on dedicated servers.

Thanks for all your help, @tonymonsalo!

Aeswaaaaa commented 8 months ago

As of the client update on Monday, we've found and fixed a source of one tick (30ms) of input latency on dedicated servers that would come and go, based on exactly when in the frame your orders would be received by the server. It should now be the case that the delay from "cursor goes back to normal" -> "my hero is moving" should be the same in both hero demo mode and when playing on dedicated servers.

Thanks for all your help, @tonymonsalo!

@jeffhill

cl_interp_ratio cl_clock_recvmargin_enable

should I leave it at 0? or can I reset it to the default value?

IgorHoruzha commented 8 months ago

@Aeswaaaaa @tonymonsalo Would You like to discuss the Input lag issue more? If so was the Input lag fixed for You? Have experienced this issue #16166?

Aeswaaaaa commented 8 months ago

@Aeswaaaaa @tonymonsalo Would You like to discuss the Input lag issue more? If so was the Input lag fixed for You? Have experienced this issue #16166?

I don't know if these problems are related to each other, but the input lag is present

JCMC05 commented 4 months ago

was there a fix to it? im having input lag since the act 3 droped and i cant fix it

tonymonsalo commented 4 months ago

@Aeswaaaaa @tonymonsalo

Would You like to discuss the Input lag issue more?

If so was the Input lag fixed for You?

Have experienced this issue #16166?

Sorry, provtikal etot comment

WongBater commented 4 months ago

Also have input lag issue since act 3 dropped when alt tabbing back into Dota 2

YazanKhwaireh commented 4 months ago

Also have input lag issue since act 3 dropped when alt tabbing back into Dota 2

I also do have the same issue , when i alt tabbing back into data 2 during the picking phase or buying items or moving my hero it takes a time to issue the order , its start happeing after the update of act 3 , my pc is kinda okey i7 8700k with 2080 and 32 RAm and i still encouter this issue

WongBater commented 4 months ago

Also have input lag issue since act 3 dropped when alt tabbing back into Dota 2

I also do have the same issue , when i alt tabbing back into data 2 during the picking phase or buying items or moving my hero it takes a time to issue the order , its start happeing after the update of act 3 , my pc is kinda okey i7 8700k with 2080 and 32 RAm and i still encouter this issue

Hey, try using Window Borderless if you are using Exclusive Full screen. It fixed it for me.

JCMC05 commented 4 months ago

Also have input lag issue since act 3 dropped when alt tabbing back into Dota 2

I also do have the same issue , when i alt tabbing back into data 2 during the picking phase or buying items or moving my hero it takes a time to issue the order , its start happeing after the update of act 3 , my pc is kinda okey i7 8700k with 2080 and 32 RAm and i still encouter this issue

Hey, try using Window Borderless if you are using Exclusive Full screen. It fixed it for me.

i already play on window boderless it helps for some people but the majority this dosent fix

JCMC05 commented 4 months ago

Also have input lag issue since act 3 dropped when alt tabbing back into Dota 2

I also do have the same issue , when i alt tabbing back into data 2 during the picking phase or buying items or moving my hero it takes a time to issue the order , its start happeing after the update of act 3 , my pc is kinda okey i7 8700k with 2080 and 32 RAm and i still encouter this issue

https://github.com/ValveSoftware/Dota2-Gameplay/issues/19894#issuecomment-2226487827 we are trying to bring attention to the problem on other posts

VetaLioSTV commented 4 months ago

after ACT 3 its re-appeared again. Please fix!

19970

19894

20131

19983

19761