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

CS2 randomly freezes and crashes

Open idarlund opened this issue 2 years ago • 19 comments

Your system information

  • System information from steam (Steam -> Help -> System Information) in a gist
  • Have you checked for system updates?: Yes
  • Currently running with Launch options: -vulkan -nojoy -novid -high +max_fps

Please describe your issue in as much detail as possible:

When playing CS2 the game freezes and I have to kill cs2 process, restart the game and rejoin the match. This happens randomly and I'm looking for a way to debug this. Is there a log I can look at, can I run CS2 from command line to see STDOUT/ERR, is there a way to turn on some logging or any other way to figure out why my game keeps on crashing/freezing?

Steps for reproducing this issue:

  1. Start game
  2. Join match
  3. Random freeze/crash

idarlund avatar Oct 16 '23 17:10 idarlund

Change your launch options to something like %command% -vulkan -nojoy -novid -high +max_fps > ~/cs2out.log 2> ~/cs2err.log

This creates separate log files under your home directory. They get overwritten each time you start the game, so they do not grow indefinitely (use >> to append, but I would not recommend that). Make a copy if there is something interesting. Of course you can modify the paths, just make sure the directory exists.

If you want a log containing stdout and stderr just like you would see in a terminal, use 2>&1 > ~/cs2out.log

You can open a terminal and use tail -f ~/cs2out.log to see what gets written to the file live. Although there may be buffering here.

Tejes avatar Oct 18 '23 12:10 Tejes

I tried with logging to the files and tailing them while playing. The freeze happened, but unfortunately nothing appeared in the log files. I did however check dmesg and I found this:

[drm:amdgpu_job_timedout [amdgpu]] ERROR ring gfx_0.0.0 timeout, but soft recovered

idarlund avatar Oct 19 '23 16:10 idarlund

Hello @idarlund, this issue should also be mentioned to your video driver vendor.

kisak-valve avatar Oct 19 '23 16:10 kisak-valve

Yeah, I've added a post to a current thread here; https://gitlab.freedesktop.org/drm/amd/-/issues/1915#note_2133962

idarlund avatar Oct 19 '23 17:10 idarlund

Tried to use llvm like this instead, but it made the game virtually unplayable with a lot of stuttering. RADV_DEBUG=llvm %command% -nojoy -novid -high +max_fps > ~/cs2out.log 2> ~/cs2err.log

Is there a way to run "non-vulkan"?

EDIT: Tesing with -dxvk instead of -vulkan to see if it has any affect

idarlund avatar Oct 19 '23 17:10 idarlund

After playing some hours after i changed to -dxvk the game hasn't crashed once. I read different opinions here on github and reddit that this launch option does not do anything.

Have I just been lucky or does the option actually change API calls?

EDIT: I spoke too soon 😅 Froze two times during a match today; [33572.519338] [drm:amdgpu_job_timedout [amdgpu]] ERROR ring gfx_0.0.0 timeout, but soft recovered [34200.238572] [drm:amdgpu_job_timedout [amdgpu]] ERROR ring gfx_0.0.0 timeout, but soft recovered

However.. My question still applies; Does dxvk change anything?

idarlund avatar Oct 23 '23 17:10 idarlund

Are you running on an NVidia card? If so, I had the same issue, and was running driver 525. Switched to the 535 driver DKMS and have not had the problem since.

Maybe this could help.

ImpossibleExchange avatar Oct 27 '23 16:10 ImpossibleExchange

Are you running on an NVidia card? If so, I had the same issue, and was running driver 525. Switched to the 535 driver DKMS and have not had the problem since.

Maybe this could help.

Since my error message shows the driver "amdgpu", I'm probably not using Nvidia 😅

I have however upgraded to amdgpu-pro drivers with https://github.com/CosmicFusion/fedora-amdgpu-pro and using this launch option at the moment: vk_pro %command% -vulkan -nojoy -novid -high +max_fps > ~/cs2out.log 2> ~/cs2err.log

I have not had any freezes yet, but I won''t speak too soon as I did last time.. 🤞

I had to fix the spec files btw.. and my pull request got accepted. This should now be working for all with F36; https://github.com/CosmicFusion/fedora-amdgpu-pro/issues/29

idarlund avatar Oct 27 '23 16:10 idarlund

My machine running Ubuntu 22.04 "jammy" is also affected by this issue. Nothing interesting on the console. The backtrace looks like this:

#0  0x00007f806ee6692d in ?? () from target:/usr/lib/pressure-vessel/overrides/lib/x86_64-linux-gnu/vulkan/amdvlk64.so
…
#15 0x00007f806e871355 in ?? () from target:/usr/lib/pressure-vessel/overrides/lib/x86_64-linux-gnu/vulkan/amdvlk64.so
#16 0x00007f808015678d in ?? () from target:/usr/lib/pressure-vessel/overrides/lib/x86_64-linux-gnu/vulkan_imp_layer/2/libVkLayer_steam_fossilize.so
#17 0x00007f80737f2b54 in ?? ()
   from target:/media/Huge/Spiele/SteamLibraries/Linux/steamapps/common/Counter-Strike Global Offensive/game/bin/linuxsteamrt64/librendersystemvulkan.so
#18 0x000000ff01000003 in ?? ()
#19 0x0000000000000000 in ?? ()

I have no idea what pressure-vessel is, but it seems to point to the correct amdvlk64.so.

pressure-vessel-wrap[3105]: D: Exporting /opt/amdgpu/lib/x86_64-linux-gnu/amdvlk64.so because overrides/lib/x86_64-linux-gnu/vulkan_imp_layer/0/amdvlk64.so points to it
pressure-vessel-wrap[3105]: D: Will export read-only: /opt/amdgpu/lib/x86_64-linux-gnu/amdvlk64.so

This amdvlk64.so is provided by the most recent non-beta vulkan-amdgpu package version 23.20-1654522.22.04 as offered by amd's repository https://repo.radeon.com/amdgpu/5.7/ubuntu.

Noteworthy: The crash also happens with Ubuntu stock amd drivers and mesa implementation.

The issue persists about a week now. Previously, CS2 was running okay.

Steam system information provided here.

Update: Removing amdvlk and installing mesa-vulkan-drivers from https://launchpad.net/~kisak/+archive/ubuntu/kisak-mesa resolved this issue.

hoehermann avatar Nov 24 '23 14:11 hoehermann

o

Game works perfectly in gamersclub and faceit. I send a ticket to then and they showed me the path to the dump files, i recommend that everyone send to them. The path is: C/program files(x86)/steam/dumps, inside the dumps folder may have a file about the cs2 crash.

capirotoviski avatar Dec 11 '23 19:12 capirotoviski

Replying to https://github.com/ValveSoftware/csgo-osx-linux/issues/3495#issuecomment-1783181884

@idarlund any updates? Did it freeze after this or have things been working out?

benstigsen avatar Jan 28 '24 21:01 benstigsen

Replying to #3495 (comment)

@idarlund any updates? Did it freeze after this or have things been working out?

Yes, after using the pro-drivers my game have not crashed.

idarlund avatar Jan 29 '24 09:01 idarlund

Replying to https://github.com/ValveSoftware/csgo-osx-linux/issues/3495#issuecomment-1783181884

what is vk_pro? i cant open cs2 with that launch option, and if i take it off, my cs2 opens but keeps crashing mid game

ImGonnaDie17 avatar Feb 14 '24 22:02 ImGonnaDie17

Replying to https://github.com/ValveSoftware/csgo-osx-linux/issues/3495#issuecomment-1944833431

https://discussion.fedoraproject.org/t/gloriouseggroll-amdgpu-vulkan-switcher/37848

idarlund avatar Feb 14 '24 22:02 idarlund

ImpossibleExchange please send me the link where you downloaded this driver, I ask you, maybe this will help me

Slim0088 avatar Apr 17 '24 19:04 Slim0088

@ImpossibleExchange please send me the link where you downloaded this driver, I ask you, maybe this will help me

Slim0088 avatar Apr 17 '24 19:04 Slim0088

@ImpossibleExchange please send me the link where you downloaded this driver, I ask you, maybe this will help me

Slim0088 avatar Apr 17 '24 19:04 Slim0088

@ImpossibleExchange please send me the link where you download this driver

Slim0088 avatar Apr 17 '24 19:04 Slim0088

ImpossibleExchange please send me the link where you downloaded this driver, I ask you, maybe this will help me

His driver is irrelevant in this issue. He's talking about nvidia.

idarlund avatar Apr 18 '24 10:04 idarlund