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
472 stars 38 forks source link

[Linux] [Vulkan] Dota2 Freezes up when alt-tabbing in a game #1345

Open BrendanBall opened 7 years ago

BrendanBall commented 7 years ago

Platform: Linux Description: Dota2 reliably completely freezes up every time I try alt tab while in a actual game, ie. this doesn't happen when in the main menu or even the picking phase. I am forced to SIGKILL Dota2. When it freezes up it seems to lock up the cpu as I can hear my fan speed going full blast. This seems to only happen when using vulkan.

NOTE: This only started happening as soon as 7.07 patch came out. I've been playing fine without any such issues for almost a year now.

Reproduce: Start Dota2 using vulkan, ie. add launch options -vulkan -vconsole. Start a bot match. get to the playing stage, ie. when the game has actually started. Alt+Tab, ie. lose window focus. Alt+Tab back to Dota2 and it should freeze up at this point. Have fun killing Dota2.

System Information: Distro: Arch Linux Window Manager: i3 GPU: NVIDIA Corporation GeForce GTX 650 Ti/PCIe/SSE2 Driver Version: 4.6.0 NVIDIA 387.22 OpenGL Version: 4.6 Desktop Color Depth: 24 bits per pixel Monitor Refresh Rate: 60 Hz VendorID: 0x10de DeviceID: 0x11c6 Revision Not Detected Number of Monitors: 1 Number of Logical Video Cards: 1 Primary Display Resolution: 1920 x 1080 Desktop Resolution: 1920 x 1080 Primary Display Size: 18.78" x 10.55" (21.54" diag) 47.7cm x 26.8cm (54.7cm diag) Primary Bus: PCI Express 16x Primary VRAM: 2048 MB Supported MSAA Modes: 2x 4x 8x 16x

gdrewb-valve commented 7 years ago

In the future please file Vulkan issues in Dota-2-Vulkan.

BrendanBall commented 7 years ago

ah sorry, can you maybe add a note to the readme of this repo? I didn't know it was split into separate repos.

danginsburg commented 7 years ago

I'm not able to repro this problem so far. The NVIDIA 387.22 driver added a new feature that is likely at the root of this problem (from release notes: http://www.nvidia.com/download/driverResults.aspx/126185/en-us)

"Improved performance of fullscreen Vulkan applications using X11 swapchains. This optimization will cause more events that trigger an out-of-date swapchain, such as when entering or leaving fullscreen mode. (This is commonly encountered when using the alt-tab key combination, for example.) Applications that do not properly respond to the VK_ERROR_OUT_OF_DATE_KHR return code may not function properly when these events occur. See section 30.8 of the Vulkan specification"

If you run with -con_logfile you should see the following in the log when you alt-tab:

vkQueuePresentKHR failed with error -1000001004 Vulkan swapchain out-of-date or suboptimal, recreating. Result code: (-1000001004)

On my system, I'm able to bring back Dota and it works fine. There is specific handling in Dota 2 7.07 for out-of-date swapchain so I'm not sure what is happening to cause it to freeze up on your machine. Questions:

If it's not the steam overlay, maybe we could glean something from your console.log. Please run with -con_logfile and upload <dota 2 install dir>/game/dota/console.log

BrendanBall commented 7 years ago

Hi @danginsburg thanks for trying to reproduce it. I disabled steam overlay - still breaks Then I enabled steam beta channel - still breaks EDIT: see https://gist.github.com/BrendanBall/0a8da569aae6cc2aa1e6ff64d04d3fa2 for the console.log file

admshao commented 7 years ago

I'm also randomly affected by this, although only twice in the past 4 or 5 days, but always when alt tabbing.

I don't have a console.log for now

https://gist.github.com/admshao/d09240196acd9db68b2d374fabc5e8fb

anko commented 6 years ago

I believe I'm also seeing this problem. My symptoms are identical to @BrendanBall's. However, it locks up my machine so badly that I can't even kill the process, so I need to hard reset. CPU usage spikes dramatically when it happens.

The issue is inconsistent, usually requiring a few alt-tabs until it happens. I've only observed it happen when in-game, not in menus.

See this gist for -con_logfile log, and Steam's Help → System Information dump.

anko commented 6 years ago

Read some ValveSoftware/Dota-2-Vulkan; here are some entries that looked like this same issue, based on descriptions and console.log files posted:

czarnyckm commented 6 years ago

I update the issue Freezing all system, when alt+tab game [LINUX] #233

Ace5040 commented 6 years ago

seems like fixed here after dota update with macos vulkan support archlinux, lxqt, nvidia 396.24