ValveSoftware / Dota-2

Tracker for issues specific to Linux and Mac in the Reborn client. If you have a general issue or non-system-specific feature request please go to dev.dota2.com
469 stars 38 forks source link

Dota 2 hangs when closing - Arch Linux / Nvidia Proprietary Drivers / Vulkan #1992

Open 32bitcolor opened 2 years ago

32bitcolor commented 2 years ago

Your system information

Please describe your issue in as much detail as possible:

Describe what you expected should happen and what did happen. Please link any large pastes as a Github Gist.

When I try to close Dota 2, I get the "are you sure..." prompt, I click "Yes", but the game never quits: the screen just sits there and does nothing. I'm forced to open System Monitor and kill the dota2 process in order for it to close.

Launch options: -sdl_displayindex 0 -phased_window_create Using Vulkan renderer, latest Nvidia proprietary drivers,

Steps for reproducing this issue:

  1. Open Dota 2
  2. Close Dota 2
  3. Click Yes on the confirmation prompt, watch the game hang-on-closing.
fee1dead88 commented 2 years ago

I'm experiencing the exact same issue. kill -9 DOTAPID will close the program or killing all steam processes. Otherwise the process will not close. My setup is similar to the user above Arch, Nvidia, Vulkan.

32bitcolor commented 2 years ago

It's probably worth noting that the -sdl_displayindex 0 -phased_window_create launch options are set because I'm on a laptop with an external monitor, and that's the only way I can get the game to launch on the correct monitor.

wyrrl commented 2 years ago

The issue disappears when I roll back to nvidia-470xx using: yay -S nvidia-470xx-dkms nvidia-470xx-utils lib32-nvidia-470xx-utils

r3pek commented 2 years ago

Just to add that it's not Arch exclusive. Happens the same thing on Fedora (35 in this case)

r3pek commented 2 years ago

OK, looks like it's the same as https://github.com/ValveSoftware/Dota-2-Vulkan/issues/392

jakepacheco commented 2 years ago

This happens to me as well using Vulkan (everything is fine on openGL) on EndeavourOS with up-to-date nvidia drivers. System Information Gist pulled from steam.

32bitcolor commented 2 years ago

This happens to me as well using Vulkan (everything is fine on openGL) on EndeavourOS with up-to-date nvidia drivers. System Information Gist pulled from steam.

I looked over your SysInfo Gist @jakepacheco and it looks like you're on the 495 nvidia drivers. I rolled mine back to 470 and haven't had any issues. Same on elementaryOS 6 Odin and Manjaro.

starcraft66 commented 2 years ago

Can reproduce this bug using nvidia 495 drivers and the vulkan backed on NixOS.

qmained commented 2 years ago

The same for me, I use Manjaro with nvidia 495.44

lzaldivarkt commented 2 years ago

Same here, Ubuntu 20.10, nvidia driver 495.

rodrigomessias commented 2 years ago

I'm also having this issue, started immediately after switching from 470 to 495 drivers. Running Manjaro KDE with vulkan

mbenlioglu commented 2 years ago

Can reproduce on Ubuntu 21.10 with nvidia 495.44

AnzoDK commented 2 years ago

Same with nvidia 495.44 Arch Linux on Zen kernel

danslo commented 2 years ago

Definitely related to the 495 driver, can confirm this issue.

skoruppa commented 2 years ago

Ubuntu 20.04 with nvidia 495.44. Exact same issue

domadden commented 2 years ago

I'm on Manjaro with 5.15.2-2 kernel, nvidia 495.44 drivers, and also have the same issue. An annoying but simple workaround is alt-tab and stop the game in Steam using the big blue Stop button in the library.

nascheme commented 2 years ago

Backtrace from gdb attached. The hang only happens when Vulcan is enabled, OpenGL doesn't show an issue. However, with OpenGL, the initial screen with Aghanim causes the GPU to peg at 100% and causes the rest of the system to lag. Switching to a different screen (e.g. user stats) makes the GPU drop to about 10%. That problem doesn't happen with Vulcan (about 30% GPU on my system, GTX 1070 Ti).

Hard to make much of the backtrace without symbols. Maybe a race condition in vkDestoryDevice or some issue in the libGLX_nvidia.so library?

dota_exit_hang.txt

danslo commented 2 years ago

@nascheme I have the same issue with GL, so I have disabled the Aghanim's dashboard entirely, see: https://www.reddit.com/r/DotA2/comments/rkyk50/how_to_disable_the_dashboard_cinematic_entirely/ I know this doesn't fix the original issue (I'd love to go back to Vulkan), but at least it gives a temporary workaround.

gardotd426 commented 2 years ago

I don't have an issue on hanging with closing, but the game is unplayable on 495 drivers. I have a 3090 and 5900X and the game is constantly freezing for about 10 seconds. It'll do it every 5 or 10 seconds and then pick up again, and run at the full 240 fps, but then freeze again.

felipec commented 2 years ago

Same here with nvidia 495.46, but if I recall correctly the same thing happened on my previous laptop with intel drivers and OpenGL.

jrgarcia11 commented 2 years ago

Experiencing this issue with OS: Manjaro Linux x86_64 kernel: 4.19.223-1-MANJARO NVIDIA Driver Version: 495.44 Dota Rendering API: vulkan

I looked over your SysInfo Gist @jakepacheco and it looks like you're on the 495 nvidia drivers. I rolled mine back to 470 and haven't had any issues. Same on elementaryOS 6 Odin and Manjaro.

Any tips for rollback in the meantime? nvidia-settings doesn't seem to make switching drivers trivial. Is it as simple as reinstalling mhwd-nvidia-470xx (from AUR)?

Briaoeuidhtns commented 2 years ago

I was having the same issue, but seems to be fixed with either nvidia 510.39 or a game update

AnzoDK commented 2 years ago

I was having the same issue, but seems to be fixed with either nvidia 510.39 or a game update

Yup - the nvidia 510.39 driver fixed it (arch [with paru] paru -S nvidia-beta<-dkms> nvidia-utils-beta lib32-nvidia-utils-beta nvidia-settings-beta)

EDIT: Think it might have been this line in the changelog from Nvidia's driver page :

Fixed a bug which caused Vulkan applications to hang when the __GL_THREADED_OPTIMIZATIONS environment variable was set to enable threaded optimizations in the NVIDIA driver.

nascheme commented 2 years ago

I can also confirm that the 510.39 driver fixed it for me (Debian testing distribution). I can run with Vulkan enabled now. I didn't re-enable the Aghanim animation on the home screen but I suspect that's fixed too (in terms of using 100% GPU). The framerate in game seems decent with Vulkan enabled, bottleneck still seems to be the CPU.

BTW, the 510.39 driver fixed my issues with Firefox video acceleration as well. Previously Youtube videos played in Firefox would cause the UI to drag. So, whatever Nvidia has done seems to have fixed some things, not just Dota 2.

pilak commented 2 years ago

Please how to install NVIDIA 510 drivers on Ubuntu? Actually I have laptop with nvidia optimus technology so I cannot install manually the latest drivers. Have to wait I guess for the official ubuntu version :/

For now I have to kill it manually with the command below

kill -9 $(pgrep -f dota2)

qw34ty commented 2 years ago

where can you download nvidia 510 from ?

gardotd426 commented 2 years ago

@pilak @qw34ty Honestly if you're on Ubuntu I would just wait until 510 comes out of beta and is available in the graphics-drivers PPA. The only way to install 510 on Ubuntu right now is manually using the .run file. That is 100% NOT recommended. You ALWAYS want to go through your package manager for something like Nvidia drivers.

Part of using Ubuntu means not having access to the latest software, it's a static release distribution. 510 is a beta driver, it's not in any distribution's repos (it's in the AUR but it is not in the Arch repos).

Most people using 510 are likely going to be on distros like Arch or Manjaro where they can install the driver through the AUR or use a community repo like nvidia-all from TKG (which is how I install my Nvidia drivers on Arch), it all still goes through the package manager, though - and that's key.

qw34ty commented 2 years ago

@gardotd426 problem with PPA drivers is that they not including the 32-bit compatability libraries which breaks steam dependencies, and when you apt install the 32-bit lib, it removes the 64-bit libs, so installing the .run file like this was the only way i could get it working, currently on 495.

qw34ty commented 2 years ago

FYI, found link for beta.

https://www.nvidia.com/content/DriverDownload-March2009/confirmation.php?url=/XFree86/Linux-x86_64/510.39.01/NVIDIA-Linux-x86_64-510.39.01.run&lang=us&type=TITAN

qw34ty commented 2 years ago

I was having the same issue, but seems to be fixed with either nvidia 510.39 or a game update

Dont think that game update does anything here, my install of steam + dota2 was done few days ago.

kisak-valve commented 2 years ago

Hello @qw34ty, your claim about PPAs is generally not true. It's specifically NVIDIA's third party repository for their CUDA driver, which is outside the launchpad PPA system, that does not provide 32 bit packages. Ubuntu's main repositories and https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa do have the packages.

qw34ty commented 2 years ago

Hello @qw34ty, your claim about PPAs is generally not true. It's specifically NVIDIA's third party repository for their CUDA driver, which is outside the launchpad PPA system, that does not provide 32 bit packages. Ubuntu's main repositories and https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa do have the packages.

Tried both of those PPA's the ubuntu offical had such poor performance was unusable, and the NVIDIA was broken as mentioned above.

gardotd426 commented 2 years ago

@kisak-valve the grapics-drivers PPA absolutely does provide the 32-bit packages for each driver version.

495: Screenshot_20220129_123421

That's the launchpad package information for nvidia-drivers-495, from the regular graphics-drivers PPA.

problem with PPA drivers is that they not including the 32-bit compatability libraries which breaks steam dependencies, and when you apt install the 32-bit lib, it removes the 64-bit libs

@qw34ty This isn't true at all. Again, look at the screenshot. That's from the grapics-drivers PPA. You can go look for yourself at the launchpad PPA site. Go click on nvidia-drivers-495 and look at the packages included. Yes, it 100% does include 32-bit drivers. And I've used this PPA several times and the drivers to not conflict, actually nvidia-driver-495 has 32-bit drivers in its Recommends:.

AbuShawarib commented 2 years ago

Confirmed, no longer hangs on updated driver version 510.47.03. I think it's safe to close this for now.

qw34ty commented 2 years ago

confirmed this is still an issue 1min+ loading and closing time.

| NVIDIA-SMI 510.47.03    Driver Version: 510.47.03    CUDA Version: 11.6     |
felipec commented 2 years ago

Same here. In Arch Linux with nvidia-beta 510.47.03-1 Dota 2 still hangs when closing.

danslo commented 2 years ago

Ubuntu 21.10 with the 510 driver and the game no longer hangs for me. RTX 3070

felipec commented 2 years ago

My laptop has a dual GPU, an AMD GPU, and an NVIDIA RTX 3060.

I'm running Dota 2 with prime-run. Not sure if that changes anything.

rodrigomessias commented 2 years ago

I'm also having this issue, started immediately after switching from 470 to 495 drivers. Running Manjaro KDE with vulkan

this has been fixed for me upgrading manjaro to 5.16.5 kernel + 510 drivers

nascheme commented 2 years ago

I don't have any issues with driver version 510.47.03. I usually play with the OpenGL render but Vulkan seems to work okay too. The GPU utilization seems about the same between -gl and -vulkan. I installed the drivers using the NVIDIA installer, using the --no-cc-version-check, which seems required when installing on Debian testing.

sharkguto commented 2 years ago

I'm also having this issue, started immediately after switching from 470 to 495 drivers. Running Manjaro KDE with vulkan

this has been fixed for me upgrading manjaro to 5.16.5 kernel + 510 drivers

for me did not work upgrade kernel version

qw34ty commented 2 years ago

Where can we get any additional information for why this is so slow ? it's basically under-performing my onboard ryzen3400g integrated graphics (on low settings).

pilak commented 2 years ago

the problem is now solved with drivers 510 but I agree with @qw34ty that the game has very much freeze phase always at the same place

I mean when loading heroes page for draft. it's noticeable because I often don't have time for ban phase then when game starting and the other when it ends...

EDIT: the problem does exist for years. but at start it was not that impacting. updates after updates the game is more and more slow (do you have stocks in Intel, AMD, etc ? :)) ) it seems that all media files event after event are not cleaned gradually, and thus the resources are more sollicitated. I heard about kind of things that would slow the game any comment about this?

felipec commented 2 years ago

@pilak Solved for you maybe, not for me.