ValveSoftware / Dota-2-Vulkan

Tracker for issues specific to the Vulkan version of Dota 2 on Windows, Linux, and macOS
98 stars 17 forks source link

Consistent stutter/freezes on Dashboard/Strategy/In-game screens #406

Closed deanrih closed 12 months ago

deanrih commented 2 years ago

Your system information

Please describe your issue in as much detail as possible:

There's a consistent and always happening stutter and freezes on Dashboard, Strategy and In-game as well as the transition between either of those.

First is, on the first 20 or 30 seconds into the game in Dashboard, there's one micro freeze. The other is when going into Strategy/Hero picking when transitioning from the Dashboard into the Strategy it was relatively quick (albeit still slower than OpenGL for some reason) on the first match, on subsequent matches, however, it got worst and the freeze becomes longer which is concerning that you might get disconnected or timed out, after going into the Strategy a moment after the first pick, there's a slight stutter no matter if the picker is an ally or the opponent. After that the transition from Strategy into In-game, which again, on the first match it was relatively fast and almost no stutter, but oftentimes, there's a micro freeze on the "Versus" screen or just a black screen and freeze and skip the versus screen altogether (the freeze time probably the same or longer than the versus showcase time), and then at in-game, at least for me, there's a very consistent freeze, when the hero spawning on the fountain, when the timer countdown is exactly at 1:25 or 1:24, the freeze happen for about one to 3 seconds at most, then after that the game runs normally, but still it will always happen at exactly around that time at the beginning of every match. And last but probably not least, when the game ends and we are leaving the match, the transition from in-game back to the dashboard after clicking the disconnect button is painfully long, again on the first match it was rather quick but still longer than OpenGL, but on subsequent matches, it took at the very least 10 seconds of black screen until I can hear the dashboard background music while the screen still displays nothing. with a total of about 12 to maybe 15 seconds if we include the "functioning" black screen.

Just want to mention that while yes I know this repository is specifically for Vulkan problems and expect it only happened on Vulkan, I just want to mention that these problems are non-existent on OpenGL, but the only dealbreaker with OpenGL is it was rather slow on average frame rate compared to Vulkan and whenever there's a new particle of a spell being casts, the game will stutter for a moment, which is not happening on Vulkan.

Quick System Information:

I've also attached some Console Logs here: https://gist.github.com/deanrih/7d7522f35023bb2f4052fdf2594715be

The OpenGL related is prefixed with gl_ and Vulkan related is prefixed with vk_, on Vulkan, specifically on Strategy, Gamestart, and disconnect, I have 4 log files because I tested it at least 4 times. The dashboard means while it's on the dashboard, disconnect means on disconnecting from in-game, gamestart means after the strategy has ended and going into in-game, which starts from the player showcase, and strategy means while it's on strategy screen/picking a hero, I also tried to clear the previous scenario logs before saving the new log file for new scenario, e.g clearing strategy logs before the gamestart scenario started.

Steps for reproducing this issue:

  1. Open Dota 2 with or without the aforementioned launch options above
  2. Wait for at least 1 minute in the dashboard
  3. Observe the game and frame time if mangohud is running
  4. One stutter/freeze occurred
  5. Create a new private lobby match
  6. Make sure the Bot AI is set to Ranked Matchmaking AI from the workshop so the bot will pick the hero one by one rather than all of the bot players at the same time to observe the stuttering
  7. Start the match
  8. Observe the game
  9. It took slightly longer than OpenGL (in my case) to go into the Strategy
  10. Wait for the bot to pick a hero
  11. Stutter occur
  12. Pick a hero and wait until the strategy time is over (not clicking the Skip button to simulate the real world scenario)
  13. Transitioning to Versus Showcase
  14. Some stutter happened and sometimes the versus showcase freeze entirely
  15. Got into the game (in-game)
  16. Observe the timer countdown, especially around 1:25
  17. A micro freeze for about 3 seconds occurs
  18. Finish the game or disconnect
  19. A slight freeze when clicking the dashboard button (?) from in-game
  20. Click disconnect
  21. The screen renders nothing and freezes for at least around 10 seconds
  22. Dashboard screen now renders normally
  23. Click leave game
  24. Back to step 5 to test subsequent matches.
deanrih commented 2 years ago

Forgot to mention that yes, adding -vulkan_disable_steam_shader_cache to the game launch option does "fix" these issues, but somehow I feel like this is shouldn't be the solution.

hildebro commented 1 year ago

Same exact problem on Ryzen 2600 + GTX 1080. On arch linux with newest drivers and kernel.

Disabling steam shader cache also fixes it for me

Apxdono commented 1 year ago

-vulkan_disable_steam_shader_cache partially solves the issue, but on X11 and Wayland there's still some stutter (which is more likely an input lag). On Wayland it even translates to desktop in a "Desktop friendly fullscreen", stuttering GTK applications (very noticeable in Electron apps or Chrome).

Can be mitigated by:

Specs: gist

Note: Issues on my PC are more related to https://github.com/ValveSoftware/Dota-2/issues/2049, which led here.

deanrih commented 1 year ago

This issue seems to be solved by my distro's recent update that includes the latest NVIDIA Driver which includes the required extension, VK_EXT_graphics_pipeline_library, however, I experience two problems while using that, or rather, not using the -vulkan_disable_steam_shader_cache, I've created a more detailed issue at #416.

ultimate255 commented 1 year ago

I'm also experiencing extreme stuttering / frame drops on the dashboard and the first few seconds after loading into a game.

I was experiencing this issue on both Vulkan and OpenGL, but it was especially worse on Vulkan. The -vulkan_disable_steam_shader_cache flag solved all of my issues entirely.

GPU: AMD RX 6800 (Mesa Vulkan Driver, vulkan-radeon) Distro: Manjaro (6.1.9-1 Kernel)

deanrih commented 12 months ago

Closing this as it seems the problem has been fixed by GPU Driver update I mentioned.

Sirox228 commented 5 months ago

hello, i'm using debian 12 with latest nvidia driver that have pipeline library extension, when i run vulkaninfo | grep VK_EXT_graphics_pipeline_library it shows that it is there, but when i run the game without -vulkan_disable_graphics_pipeline_library flag, it just freezes after a few seconds in menu. if i add it, then it works, but there are a lot of framedrops, adding -vulkan_disable_steam_shader_cache seems to change nothing.