csgo-osx-linux icon indicating copy to clipboard operation
csgo-osx-linux copied to clipboard

Game crashes with "VK_ERROR_DEVICE_LOST"

Open hcwf opened this issue 1 year ago • 3 comments

Your system information

  • System information from steam: https://gist.github.com/hcwf/f29485dfd9e8ef7aba70b4cb93d5cd50
  • Steam Runtime Diagnostics: https://gist.github.com/hcwf/a4297ad82f4fc9b56f011ac9a5410514
  • Have you checked for system updates?: Yes

Please describe your issue in as much detail as possible:

The game randomly crashes after a while of playing, sometimes crashing the whole computer and forcing it to restart. The intervals at which this happens are random, it could happen right in the first match of the day, shortly after another crash or after hours of gaming. The crashes only happen when I'm in a match, never when I'm in the menu or tabbed out of the game.

When the game crashes both my monitors freeze, the audio cuts out and I can not interact with the game or my OS for about 10-20 seconds. After that either my PC reboots or the game and Steam as a whole crash and close itself.

I've already enabled logging with "-condebug" as startup command and all crashes I recorded have to do with the Vulkan drivers. In all instances the drivers fail with VK_ERROR_DEVICE_LOST. Here's a short snippet from the last crash I just encountered:

05/27 15:37:01 [RenderSystem] FrameSync() - bailing out of vkWaitForFences( fenceCount = 1 ) after 0.257536 seconds, error = VK_TIMEOUT
05/27 15:37:01 CSwapChainBase::QueuePresentAndWait() looped for 22 iterations without a present event.
05/27 15:37:01 [RenderSystem] FrameSync() - bailing out of vkWaitForFences( fenceCount = 2 ) after 0.250720 seconds, error = VK_TIMEOUT
05/27 15:37:22 [RenderSystem] ERROR! VK call failed! result = VK_ERROR_DEVICE_LOST ( vkQueueWaitIdle( VulkanQueue() ) )
05/27 15:37:22 [RenderSystem] CSwapChainVulkan::SwapBuffers(): waited for 20.26 seconds
05/27 15:37:22 [RenderSystem] CSwapChainVulkan::SwapBuffers vkAcquireNextImageKHR - completed result = VK_ERROR_SURFACE_LOST_KHR
05/27 15:37:22 [RenderSystem] Vulkan swapchain out-of-date, suboptimal, or surface lost - recreating.  Result: (VK_ERROR_SURFACE_LOST_KHR)
05/27 15:37:22 [RenderSystem] ERROR! VK call failed! result = VK_ERROR_DEVICE_LOST ( vkQueueWaitIdle( VulkanQueue() ) )
05/27 15:37:22 [RenderSystem] The selected graphics queue does not support presenting a swapchain image.

The full log and another can be found here: https://gist.github.com/hcwf/92d9921f92e1046ccab4db04b5092ff1 and here: https://gist.github.com/hcwf/cac299680a37f482aeb89b3d7420e756

Steps for reproducing this issue:

  1. Start the game.
  2. Play for an indeterminate timeframe.
  3. Have the game or your entire PC crash while in a match.

hcwf avatar May 27 '24 16:05 hcwf

Hello @hcwf, your system is configured to use AMDVLK. Can you test how the game behaves with mesa/RADV? If it's a driver specific issue, then that should be reported to your video driver vendor.

kisak-valve avatar May 27 '24 17:05 kisak-valve

Hello @hcwf, your system is configured to use AMDVLK. Can you test how the game behaves with mesa/RADV? If it's a driver specific issue, then that should be reported to your video driver vendor.

Hey @kisak-valve, thanks for getting back to me. I switched to RADV drivers for CS2, however I still crash with the same error. Here's the Gist of the recent crash: https://gist.github.com/hcwf/a4e3a1c6cb1d07ce567fe5f588c7bc39

hcwf avatar Jun 01 '24 20:06 hcwf

Hello @hcwf, your system is configured to use AMDVLK. Can you test how the game behaves with mesa/RADV? If it's a driver specific issue, then that should be reported to your video driver vendor.

Hey @kisak-valve, thanks for getting back to me. I switched to RADV drivers for CS2, however I still crash with the same error. Here's the Gist of the recent crash: https://gist.github.com/hcwf/a4e3a1c6cb1d07ce567fe5f588c7bc39

Hello @hcwf

I have a question that isn't directly related to the current topic but pertains to the AMD driver in general. If you don't have MangoHud or GOverlay installed, could you please install them and compare how many watts your 7900 XTX card uses? My XT card doesn't seem to utilize its maximum power; it only uses about 80% of what's specified. In my case, it should use 331 watts, but it maxes out at 265 watts across several games I've tested. I also noticed in CoreCtrl and Lact that this value is set as the maximum (I changed it, and it reached 330 watts for a while, but after a restart, it maxed out at 290 watts again). I'm not sure what the issue is or if it's resolvable.

Additionally, I observed that while playing CS2, the card dropped to 1.2 GHz but maintained a stable FPS. Some strange things are happening. I also had the "device lost" issue at one point, but it seems to have stopped after a Vulkan update.

Thank you for your help and time.

Best regards,

ilievi187 avatar Aug 07 '24 10:08 ilievi187

I had the same error while running Counter Strike 2 on Ubuntu with Vulkan.

Updating the kernel to 6.8 solved the problem.

Zeskbest avatar Jan 02 '25 08:01 Zeskbest