ValveSoftware / csgo-osx-linux

Counter-Strike: Global Offensive
http://counter-strike.net
787 stars 69 forks source link

CS2 randomly freezes and crashes #3495

Open idarlund opened 1 year ago

idarlund commented 1 year ago

Your system information

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
Tejes commented 1 year ago

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.

idarlund commented 1 year ago

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

kisak-valve commented 1 year ago

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

idarlund commented 1 year ago

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

idarlund commented 1 year ago

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 commented 1 year ago

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?

ImpossibleExchange commented 1 year ago

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.

idarlund commented 1 year ago

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

hoehermann commented 1 year ago

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.

capirotoviski commented 11 months ago

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.

benstigsen commented 10 months ago

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?

idarlund commented 10 months ago

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.

ImGonnaDie17 commented 9 months ago

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

idarlund commented 9 months ago

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

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

Slim0088 commented 7 months ago

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

Slim0088 commented 7 months ago

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

Slim0088 commented 7 months ago

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

Slim0088 commented 7 months ago

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

idarlund commented 7 months ago

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.