Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Counter Strike 2 - Huge performance loss compared to Windows client #3325

Open
MacTavishAO opened this issue Sep 29, 2023 · 141 comments
Open

Counter Strike 2 - Huge performance loss compared to Windows client #3325

MacTavishAO opened this issue Sep 29, 2023 · 141 comments
Labels

Comments

@MacTavishAO
Copy link

Your system information

  • System information from steam (Steam -> Help -> System Information) in a [gist](https://gist.github.com/):
  • Have you checked for system updates?: Yes

Please describe your issue in as much detail as possible:

Below are the screenshots from native linux client with vulkan and CS2 running through Wine + DXVK, respectively.
20230929034453_1
20230929040743_1

I've played the Limited Test on Windows and there seems to be performance loss of anywhere between 40 to 60% compared to Windows client.

Steps for reproducing this issue:

  1. Run the game on the same hardware with both Operating Systems.
  2. Compare how they perform.
@MacTavishAO
Copy link
Author

MacTavishAO commented Sep 29, 2023

One temporary solution could be compiling the game against DXVK and adding "-dxvk" launch option until native Vulkan implementation matures enough.

In both screenshots the game is GPU limited, everything at low except for model and texture at very high, FSR disabled, AA set to CMAA2 and the game is running with RX6800

@szmarczak
Copy link

szmarczak commented Sep 29, 2023

I have the opposite (nvidia gpu, map: Mirage).

DX11
100% FPS on Windows - 600-700 FPS
99% FPS on Windows - 300 FPS

Vulkan
100% FPS on Linux - 700 FPS
99% FPS on Linux - 600 FPS

@henrym11106
Copy link

henrym11106 commented Sep 29, 2023

This appears to be limited to AMD GPUs on Linux. I also get about 50% better FPS on Win10 vs Arch with AMDGPU and x11, and there are also graphical bugs (#3287) with AMD and Linux that do not occur on Windows or with Nvidia on Linux.

R9 390 GPU load is always at 100%, Ryzen 3500x CPU between 20-40% on all cores.

@emko
Copy link

emko commented Sep 29, 2023

I have the opposite (nvidia gpu, map: Mirage).

DX11 100% FPS on Windows - 600-700 FPS 99% FPS on Windows - 300 FPS

Vulkan 100% FPS on Linux - 700 FPS 99% FPS on Linux - 600 FPS

what GPU ? and what resolut/setting you on? even when i set my game to 1080p and settings to low i get sub 200fps on my Nvidia 3080 and really bad frame pacing spikes into the 40-80ms randomly but often so like from 200fps to 30-60fps for a split second

@sawb
Copy link

sawb commented Sep 29, 2023

I have the same issue with a 7900x+7900XT on Arch and Hyprland. I average about 150 with bad stutters and max around 220. The whole time the game is rendering on Linux, my GPU is pegged at 100% usage. With the same settings i am locked to 400 most of the time on Windows.

However, I also had poor performance with DXVK through Proton when trying during the beta. I'm not sure if anything has changed since then.

@x0r13
Copy link

x0r13 commented Sep 29, 2023

Same issue here:

OS: Ubuntu 22.04 jammy
Kernel: x86_64 Linux 6.2.0-33-generic
DE: KDE 5.92.0 / Plasma 5.24.7
CPU: AMD Ryzen 5 5600 6-Core @ 12x 3,5GHz
GPU: AMD Radeon RX 6600 (navi23, LLVM 15.0.7, DRM 3.49, 6.2.0-33-generic)
RAM: 6596MiB / 32007MiB

I get around 170fps with drops to ~100fps from time to time. On my 2nd SSD I habe win10 and there I get 350-400fps with drops to like 280fps.

@an0nfunc
Copy link

I have the same issue with a 7900x+7900XT on Arch and Hyprland. I average about 150 with bad stutters and max around 220. The whole time the game is rendering on Linux, my GPU is pegged at 100% usage. With the same settings i am locked to 400 most of the time on Windows.

However, I also had poor performance with DXVK through Proton when trying during the beta. I'm not sure if anything has changed since then.

Does your console show something like

[RenderSystem] FrameSync() - bailing out of vkWaitForFences( fenceCount = 1 ) after 0.255553 seconds, error = VK_TIMEOUT

while its stuttering?

@sawb
Copy link

sawb commented Sep 29, 2023

Replying to #3325 (comment)

No, there are no errors in my game console. And also not sure what changed, but now I am only getting ~20 FPS in game without it utilizing more than about 30% of my GPU.

Edit: actually just changed from rt kernel to mainline and I'm getting 400 FPS now. Not sure if an update happened, but I was also getting bad FPS on mainline kernel yesterday.

Edit again: back down to 30-100 FPS in game while still on mainline kernel. No change on my system

@spinzed
Copy link

spinzed commented Sep 29, 2023

This appears to be limited to AMD GPUs on Linux. I also get about 50% better FPS on Win10 vs Arch with AMDGPU and x11, and there are also graphical bugs (#3287) with AMD and Linux that do not occur on Windows or with Nvidia on Linux.

R9 390 GPU load is always at 100%, Ryzen 3500x CPU between 20-40% on all cores.

It is not. With nvidia proprietary drivers and no launch params I observe significantly lower avg framerate and common stuttering (a few times a second) compared to Windows 10. With gamemoderun %command%, the stutters are gone but I observe 30-40% lower framerate again compared to Windows 10. In the second case, the gpu usage is pegged at 100% with no sudden drops and the cpu usage is about 60-70%.

@Yuri-K7
Copy link

Yuri-K7 commented Sep 29, 2023

#3325 (comment) Which card and which driver version ?

@spinzed
Copy link

spinzed commented Sep 29, 2023

#3325 (comment) Which card and which driver version ?

GTX 1050 4GB (notebook), 535.113.01

@Yuri-K7
Copy link

Yuri-K7 commented Sep 29, 2023

#3325 (comment) Which card and which driver version ?

GTX 1050 4GB (notebook), 535.113.01

Well non RTX nvidia card have bad vulkan support so that would not be surprising. They lack some vulkan extensions, VKD3D also suffers bad performance with pascal nvidia cards.

@spinzed
Copy link

spinzed commented Sep 29, 2023

#3325 (comment) Which card and which driver version ?

GTX 1050 4GB (notebook), 535.113.01

Well non RTX nvidia card have bad vulkan support so that would not be surprising. They lack some vulkan extensions, VKD3D also suffers bad performance with pascal nvidia cards.

Is that true? I played csgo with -vulkan with updated dxvk binaries (v2.2) and I had better avg framerate than with opengl. Also, considering that others with newer nvidia cards have the same issue, I don't think it is due to bad vulkan support.

@Yuri-K7
Copy link

Yuri-K7 commented Sep 29, 2023

Is that true?

DXVK is not VKD3D, it doesn't suffers bad perf on pascal cards and yes opengl has bad perf. For the rest I can't say, the rest of the thread was claiming that nvidia cards was not impacted.

@mystchonky
Copy link

mystchonky commented Sep 29, 2023

#3325 (comment) Which card and which driver version ?

GTX 1050 4GB (notebook), 535.113.01

Well non RTX nvidia card have bad vulkan support so that would not be surprising. They lack some vulkan extensions, VKD3D also suffers bad performance with pascal nvidia cards.

I have a turing card (GTX 1650) which has all the required extensions and I can comfortably say that the performance is definitely not the same

@spinzed
Copy link

spinzed commented Sep 29, 2023

DXVK is not VKD3D, it doesn't suffers bad perf on pascal cards and yes opengl has bad perf. For the rest I can't say, the rest of the thread was claiming that nvidia cards was not impacted.

Interesting... But that should not matter in this case since vkd3d isn't being used. I have seen comments of people in r/linux_gaming with turing and higher nvidia cards that had the issue and of people that had pascal cards and had no issues. Seems quite random whom it affects.

@adamnejm
Copy link

adamnejm commented Sep 29, 2023

I performed a rudimentary static benchmark between different backends on Windows and Linux.

Benchmarks

setpos -2090 3100 100; setang -7 130 0 setpos 1700 2220 30; setang 0 -144 0 setpos -2470 -2072 2057; setang 28 57 0
Windows DirectX ~451 FPS 100% cs2-windows-dx-1 635 FPS - Performance: 100% cs2-windows-dx-2 426 FPS - Performance: 100% cs2-windows-dx-3 293 FPS - Performance: 100%
Windows Vulkan ~402 FPS ~89% cs2-windows-vk-1 551FPS - Performance: 87% cs2-windows-vk-2 380FPS - Performance: 89% cs2-windows-vk-3 276FPS - Performance: 94%
Linux Vulkan ~360 FPS ~80% cs2-linux-vk-1 471FPS - Performance: 74% cs2-linux-vk-2 354FPS - Performance: 83% cs2-linux-vk-3 256FPS - Performance: 87%

Note: The brightness for Windows Vulkan is only borked on screenshots, it was OK in-game.

TL;DR

Windows Vulkan performs up to 11% worse than Windows DirectX.
Linux Vulkan performs up to 9% worse than Windows Vulkan.
Linux Vulkan performs up to 20% worse than Windows DirectX.


Software

Game Build: Sep 28 16:47:43
System: ArchLinux
Kernel: 6.5.5-arch1-1
Nvidia: 535.113.01-2
Filesystem: ext4 inside LVM on the same logical volume as /home
Windowing: X11 (awesome v4.3-1602-g485661b70 LuaJIT)
Overlay: Linux: MangoHud; Windows: Afterburner + RivaTuner

Hardware

Processor: AMD Ryzen 5600X
Graphics: MSI RTX 3070 SUPRIM X 8GB (non-LHR)
Motherboard: MSI MAG B550 Tomahawk
Memory: Corsair Vengeance SL 3600MHz (2x8GB)

Nvidia

DRM enabled: nvidia_drm.modeset=1 with nvidia nvidia_modeset nvidia_uvm nvidia_drm modules loaded
Coolbits: 12
PowerMizer: Perfer Maximum Performance
OpenGL Image Settings: High Performance
OpenGL Sync to VBlank: off
OpenGL Allow Flipping: off
Force (Full) Composition Pipeline: off
Resizable BAR: enabled

In-game settings

Resolution: 2560x1440 stretched to 3440x1440
Refresh Rate: 144 Hz
Boost Player Contrast: Enabled
Wait for Vertical Sync: Disabled
Multisampling Anti-Aliasing Mode: CMAA2
Texture Filtering Mode: Anisotropic 4X
Shader Detail: Low
Particle Detail: Low
Ambient Occlusion: Medium
High Dynamic Range: Quality
FidelityFX Super Resolution: Disabled

Misc

Global CPU scaling governor:
performance

Launch parameters:
__GL_SHADER_DISK_CACHE_SKIP_CLEANUP=1 SDL_AUDIO_DRIVER=pipewire mangohud %command%

Related system-wide environment variables:

export NVD_BACKEND="direct"       # VA-API backend
export LIBVA_DRIVER_NAME="nvidia" # VA-API driver
export PROTON_HIDE_NVIDIA_GPU=0   # Report as Nvidia
export PROTON_ENABLE_NVAPI=1      # Enable NVAPI library
export VKD3D_CONFIG="dxr"         # Enable DirectX Raytracing

@JacKeTUs
Copy link

JacKeTUs commented Sep 29, 2023

these bugfixes don't fixed performance for me
It fixes some graphic artifacts from here: #3287

@emko
Copy link

emko commented Sep 30, 2023

I performed a rudimentary static benchmark between different backends on Windows and Linux.

wonder if there is a debug tool to record the stutter to see what exactly causes it?

@MacTavishAO
Copy link
Author

MacTavishAO commented Sep 30, 2023

I used in-game benchmark tool to record some stats. They were recorded in Inferno with same spawn location as a T player. The game is GPU limited in all scenarios, with same in-game graphics settings using an RX6800.

Launch arguments used to start a benchmark: -novid -nojoy -high -bench -benchframes 10000 -benchnoexit -warmtime 120 +map de_inferno -nobots +mp_warmup_offline_enabled true +mp_humanteam T

Performance loss for Linux Vulkan vs. Windows DX11: 40,93%
Performance loss for Windows Vulkan vs. Windows DX11: 17,9%
Performance loss for Linux Vulkan vs. Windows Vulkan: 28,05%

Windows DX11:

   Bench started at 120.001316
   Bench ended at 141.322387
   469.02 FPS 2.132 ms
   Settings: WarmTime: 120.000000, BenchTime: 86400.000000, BenchFrames: 10000
   Frames: 10000
   Total time: 21.321071
   --- Sample statistics:
   Total samples: 10000
   Total sample time: 21321.070896 ms
   Average frame time: 2.132107 ms (469.019593 FPS)
   Minimum frame time: 1.196500 ms (835.771038 FPS)
   Maximum frame time: 5.243900 ms (190.697770 FPS)
   Standard deviation: 0.360411 ms
   --- Sample statistics after sorting and discarding the lowest and highest 10% (20% total discarded):
   Total samples: 8000
   Total sample time: 16906.226201 ms
   Average frame time: 2.113278 ms (473.198448 FPS)
   Minimum frame time: 1.662900 ms (601.359082 FPS)
   Maximum frame time: 2.805400 ms (356.455421 FPS)
   Standard deviation: 0.182494 ms

Windows Vulkan:

   Bench started at 120.001572
   Bench ended at 145.955724
   385.29 FPS 2.595 ms
   Settings: WarmTime: 120.000000, BenchTime: 86400.000000, BenchFrames: 10000
   Frames: 10000
   Total time: 25.954151
   --- Sample statistics:
   Total samples: 10000
   Total sample time: 25954.151002 ms
   Average frame time: 2.595415 ms (385.294822 FPS)
   Minimum frame time: 1.612000 ms (620.347399 FPS)
   Maximum frame time: 4.090200 ms (244.486825 FPS)
   Standard deviation: 0.311289 ms
   --- Sample statistics after sorting and discarding the lowest and highest 10% (20% total discarded):
   Total samples: 8000
   Total sample time: 20653.900802 ms
   Average frame time: 2.581738 ms (387.336033 FPS)
   Minimum frame time: 2.186300 ms (457.393762 FPS)
   Maximum frame time: 3.071800 ms (325.542028 FPS)
   Standard deviation: 0.168463 ms

Linux Vulkan:

   Bench started at 120.000298
   Bench ended at 156.035308
   277.51 FPS 3.604 ms
   Settings: WarmTime: 120.000000, BenchTime: 86400.000000, BenchFrames: 10000
   Frames: 10000
   Total time: 36.035010
   --- Sample statistics:
   Total samples: 10000
   Total sample time: 36035.010408 ms
   Average frame time: 3.603501 ms (277.507898 FPS)
   Minimum frame time: 2.006523 ms (498.374578 FPS)
   Maximum frame time: 94.568443 ms (10.574352 FPS)
   Standard deviation: 1.072100 ms
   --- Sample statistics after sorting and discarding the lowest and highest 10% (20% total discarded):
   Total samples: 8000
   Total sample time: 28524.990077 ms
   Average frame time: 3.565624 ms (280.455838 FPS)
   Minimum frame time: 3.124315 ms (320.070157 FPS)
   Maximum frame time: 4.183387 ms (239.040769 FPS)
   Standard deviation: 0.309257 ms

@emko
Copy link

emko commented Sep 30, 2023

@MacTavishAO that frame time on Linux Vulkan is exactly what i am seeing that makes it unplayable, trying to find out if there is some kind of tool to profile the performance some how to find the reason for it so Valve can fix it or maybe they already know

Linux Vulkan

   Bench ended at 150.243155
   330.68 FPS 3.024 ms
   Settings: WarmTime: 120.000000, BenchTime: 86400.000000, BenchFrames: 10000
   Frames: 10000
   Total time: 30.240617
   --- Sample statistics:
   Total samples: 10000
   Total sample time: 30240.616911 ms
   Average frame time: 3.024062 ms (330.681085 FPS)
   Minimum frame time: 1.530037 ms (653.578946 FPS)
   Maximum frame time: 77.594879 ms (12.887448 FPS)
   Standard deviation: 1.031739 ms
   --- Sample statistics after sorting and discarding the lowest and highest 10% (20% total discarded):
   Total samples: 8000
   Total sample time: 23802.351021 ms
   Average frame time: 2.975294 ms (336.101253 FPS)
   Minimum frame time: 2.346618 ms (426.145213 FPS)
   Maximum frame time: 3.821702 ms (261.663520 FPS)
   Standard deviation: 0.413560 ms

@MacTavishAO
Copy link
Author

MacTavishAO commented Sep 30, 2023

Shader stutter workaround for AMDVLK:

  1. Install fossilize. AUR or GitHub.
  2. Open your terminal.
  3. Run export VK_ICD_FILENAMES="/usr/share/vulkan/icd.d/amd_icd32.json:/usr/share/vulkan/icd.d/amd_icd64.json"
  4. Run fossilize-replay /mnt/kioxia/SteamLibrary/steamapps/shadercache/730/fozpipelinesv6/steam_pipeline_cache.foz (Your SteamLibrary folder is going to be different, adjust it for your system)
  5. While fossilize-replay running, go to ~/.cache/AMD/VkCache and find the cache name. It's easy to find, just look for the one growing in size.
  6. After fossilize-replay is finished, copy the cache.parc to /mnt/kioxia/SteamLibrary/steamapps/shadercache/730/AMDv1 and rename it to steamapp_shader_cache.parc (create AMDv1 folder if doesn't exist)

Most shader stutters are eliminated this way. It's night and day.

@KeironO
Copy link

KeironO commented Sep 30, 2023

It is performing quite badly on my 6750XT.

image

https://flightlessmango.com/logs/4453

Will try the Fossilize workaround posted above to see if it helps :/

@MacTavishAO
Copy link
Author

Will try the Fossilize workaround posted above to see if it helps :/

Make sure you launch the game using amdvlk.

@KeironO
Copy link

KeironO commented Sep 30, 2023

Will try the Fossilize workaround posted above to see if it helps :/

Make sure you launch the game using amdvlk.

How exactly do I ensure this?

@KeironO
Copy link

KeironO commented Sep 30, 2023

➜  fozpipelinesv6 export VK_ICD_FILENAMES="/usr/share/vulkan/icd.d/amd_icd32.json:/usr/share/vulkan/icd.d/amd_icd64.json"
➜  fozpipelinesv6 fossilize-replay steam_pipeline_cache.foz 
Fossilize ERROR: Got parse error: 1
Fossilize WARN: Did not replay blob (tag: AppInfo, hash: 0000000000000000). See previous logs for context.
Fossilize ERROR: Failed to create instance.
Fossilize ERROR: Failed to create Vulkan device, bailing ...

@MacTavishAO
Copy link
Author

MacTavishAO commented Sep 30, 2023

Will try the Fossilize workaround posted above to see if it helps :/

Make sure you launch the game using amdvlk.

How exactly do I ensure this?

Most if not all distro's come with mesa drivers, amdvlk is AMD's own open source driver, you need to install it manually.
There isn't a universal way to install it, if you're using arch, it's amdvlk.
AMD themselves release Ubuntu debs here. If you're using Ubuntu or Ubuntu based distro you need to install both i386 and amd64 debs.

@KeironO
Copy link

KeironO commented Sep 30, 2023

How large is the parc file?

@MacTavishAO
Copy link
Author

MacTavishAO commented Sep 30, 2023

How large is the parc file?

It depends on your GPU and amdvlk version. It was bigger than 1.3 GB for me.
Make sure you launch the game using AMDVLK after compiling the shaders. VK_ICD_FILENAMES="/usr/share/vulkan/icd.d/amd_icd32.json:/usr/share/vulkan/icd.d/amd_icd64.json" %command%

@rariema
Copy link

rariema commented Feb 7, 2024

positive way - did not test AMDVLK, only Mesa

mesa 24.0, rx6600, 5600g
~10% avg. gain

My "Bench": T side Mirage, unlimited ammo, smoke, frag grenade and ak. Hit record and then I try to throw smokes and he grenades at the same spots and do some spraying, look at the smokes, and go on. Back at the start i stop the benchmark.
Take the numbers with a grain of salt, cause of the method and i changed some gpu and cpu settings since then.

cs2_mesa24

Screenshot_20240207_115948

https://flightlessmango.com/games/26503/logs/4877

@flaphoschi
Copy link

I will try to check that. An improvement of 10% through Mesa 24 would be awesome.

@MacTavishAO
Copy link
Author

In a positive way or a negative way?

In a positive way. Took a quick glance and below were my FPS more or less on 5700X, RX6800 system running Plasma 6 RC2. Vulkan renderer still needs more work but it's better than it was before I'd say.

Inferno Mid;

Windows DX11: 450~
Mesa-git 24.1 w/ SDL_VIDEO_DRIVER=x11: 400~
Mesa-git 24.1 w/ SDL_VIDEO_DRIVER=wayland: 410~

Nuke T Base;

Windows DX11: 640~
Mesa-git 24.1 w/ SDL_VIDEO_DRIVER=x11: 530~
Mesa-git 24.1 w/ SDL_VIDEO_DRIVER=wayland: 540~

I changed back and forth between x11 and wayland SDL_VIDEO_DRIVER by editing cs2.sh. Default is x11.

@oyvindln
Copy link

oyvindln commented Feb 8, 2024

It seems to perform better at the start of a match but at least in my case (RX 6600, R5600X, Mesa 24.00, plasma 5.27 on ubuntu 23.10, steam installed via official .deb ) the gpu utilization starts fluctuation more and more the longer the game has been running and the framerate seems to worsen as well (and my GPU is nowhere close to temperature throttling and works fine under full load for other apps so it's not that). Seems I'm not the only person noticing some issues with gpu utilization:
https://gitlab.freedesktop.org/mesa/mesa/-/issues/10443

No idea if this is a driver problem or a game issue.

Tested with wayland sdl driver but that seemed to screw up the colors so not sure it's properly functional yet.

@GenocideStomper
Copy link

GenocideStomper commented Feb 9, 2024

Replying to #3325 (comment)

I have a similar issue, and I'm running Nvidia on X11. So I think it's more likely a game issue, or the game's implementation of vulkan.

@x0r13
Copy link

x0r13 commented Feb 16, 2024

R5 5600 + RX6800

After todays patch, I wanted to try if I can see any performance improvement. I deleted my shader cache and started the game, went to de_ancient and to my surprise, MangoHUD reported over 400fps with peaks into ~460fps. GPU was working overtime, and I was even able to hear slight coil whine for the first time with this card in CS2.

When running though water, fps only dropped to about ~360fps. Previously I had about 200-220fps with drops to 140fps in the water.

When going into another map (de_nuke) fps were all of a sudden the same as before (200-250fps). GPU not stressed anymore, and no more coil whine. So I loaded a 3rd map (de_inferno) and also, everything was as bad a ever.

I have no idea why fps were so good when loading the first map. I had absolutely no shader generation stutters, everything was buttery smooth.

Will try again later if it was because of deleted shaders.

@oyvindln
Copy link

oyvindln commented Feb 16, 2024

Just from some quick testing it seems that there being other players on the map is having a drastic effect performance in some way (seemingly causing a bottleneck somewhere that's at least not showing up as either gpu utilization or close to maxed out cpu cores) even if they are not visible and maybe even if they're dead? Loading into an empty dust2 map with no other players using the console and kicking the auto-added bots I get GPU limited with my RX 6600 and R5 5600X as expected and the performance is in the 400s fps range. Bot match with 10 people in it drops me closer to 300-350, joininga deachmatch on the same match puts me closer to 200 on average though it varies a lot. The fps and gpu util also drastically goes up at the match end screen.

FPS on Default DX11 renderer on windows is actually a bit lower than on linux when running around dust2 with no other players but doesn't suffer nearly the same hit and bottlenecking when joining a server with other players on it or adding bots.

Vulkan renderer on windows seems to have similar behaviour as on linux, with high fps and the gpu being utilized if you load a map on your own (fps was about the same as with dx11 on empty dust2) but gpu utilization is nowhere near full and fps a fair bit worse than dx11 mode if joining a deathmatch and may or may not get lower over time.

@MacTavishAO
Copy link
Author

Finally got around to testing it on an arms race game. Game drops to 90~ and stays there. No matter what you think, 5700X paired with RX6800 shouldn't drop to 90s. Weak APUs on Windows manage to hold higher FPS. Unacceptable.

@rariema
Copy link

rariema commented Mar 15, 2024

do you still have this with the

Fixed a threading bug that could lead to a frame rate hitch, especially if all CPUs were busy.

update?

@nipnipj
Copy link

nipnipj commented Apr 8, 2024

Low performance. I had this kind of issue with games that are Playstation ports.

@EysseW
Copy link

EysseW commented Apr 8, 2024

To be honest, I think many of us are mainly unhappy with how movements feels way less smooth in cs2 compared to cs:go. I installed cs2 on my windows install, hoping to be able to play again, but was disappointed to find it still feels like I have 40 fps the entire time, despite my frame rate being perfectly fine.

@Jonas-Sander
Copy link

To be honest, I think many of us are mainly unhappy with how movements feels way less smooth in cs2 compared to cs:go.

No, not me. Please don't include me in your statement if it's just your personal opinion.

@EysseW
Copy link

EysseW commented Apr 9, 2024

"I think" and "most of us" should indicate I didn't state you were.

@upbox-org
Copy link

To be honest, I think many of us are mainly unhappy with how movements feels way less smooth in cs2 compared to cs:go. I installed cs2 on my windows install, hoping to be able to play again, but was disappointed to find it still feels like I have 40 fps the entire time, despite my frame rate being perfectly fine.

No, you are wrong, at least in my case and I think in many others too.
The frame rate is unfortunately not perfectly fine.

@EysseW
Copy link

EysseW commented Apr 9, 2024

Y'all can't read. I said the frame rate was fine on my windows setup. Linux does have lower frame rates indeed, and the issue is real, but part of it also comes from the less smooth movement of cs2. That's all.

@emko
Copy link

emko commented Apr 9, 2024

Y'all can't read. I said the frame rate was fine on my windows setup. Linux does have lower frame rates indeed, and the issue is real, but part of it also comes from the less smooth movement of cs2. That's all.

objectively wrong, just check the frame pacing on linux vs windows, people have posted graphs..... on windows its way way more stable and smooth on linux it spikes to 80ms+ constantly and its all over the place, on windows it does not do this and is perfectly smooth not going from 300+fps to sub 10fps random stutters that happen all the time

@EysseW
Copy link

EysseW commented Apr 9, 2024

That complies to what I said?

@MacTavishAO
Copy link
Author

MacTavishAO commented Apr 26, 2024

No improvements with the latest update.

@EXtremeExploit
Copy link

On the latest update: https://steamcommunity.com/games/CSGO/announcements/detail/4199120329626448731

Added console output that may be helpful for advanced users to diagnose performance problems. When a very long frame occurs, a brief profile of the frame is printed. At the end of a match, a summary is printed.

This could be useful for cs devs to know the cause of the insane stutters (we already know its shader compilation) than what we already have (?

@MacTavishAO
Copy link
Author

I'll take a look and try to provide a gist later.

@oyvindln
Copy link

oyvindln commented May 1, 2024

Arms race matches on the shoots maps seems to be one of the worst offenders when it comes to microstutter if people need suggestions on something to test quickly. Whether the stutters are still long enough to trigger this effect I don't know, as one or two of the recent updates that fixed some thread stuff seem to have made the impact a little less but it's extremely noticeable.

@MacTavishAO
Copy link
Author

This output is printed to console right after a game of Arms Race on Shoots. I had to set cl_frametime_summary_report_detailed to true to get additional information to display.

FPS starts off high and drops to around a third of it by the end of the game.

[VProf] 
[VProf] -- Performance report --
[VProf] Summary of 63361 frames.  (0 frames excluded from analysis.)
[VProf] FPS: Avg=170.4, P1=79.7
[VProf] 
[VProf]                                                       All frames         Active frames   
[VProf]                                                         Avg    P99        N    Avg    P99
[VProf] ---------------------------------------------------- ------ ------   ------ ------ ------
[VProf]                                           FrameTotal   5.87  12.54    63361   5.87  12.54
[VProf]                                       Frame Boundary   2.40   7.21    63361   2.40   7.21
[VProf]                                     Client Rendering   1.70   3.60    63361   1.70   3.60
[VProf]                                    Client Simulation   1.23   3.11    63361   1.23   3.11
[VProf]                                           PanoramaUI   0.51   1.37    63361   0.51   1.37
[VProf]                                           Prediction   0.37   2.20    63361   0.37   2.20
[VProf]                                          Unaccounted   0.25   0.88    63361   0.25   0.88
[VProf]                                           Networking   0.17   1.06    23780   0.46   1.49
[VProf]                                       Client Physics   0.11   0.77    23808   0.29   1.26
[VProf] LatchAndSaveLastSimulationValuesForInterpolationList   0.08   1.10    23772   0.22   1.73
[VProf] 
[VProf] VProfLite stopped.

@MacTavishAO
Copy link
Author

MacTavishAO commented May 3, 2024

So I have played another game of Arms Race on Shoots to upload performance metrics recorded by mangohud at 1000ms intervals: https://flightlessmango.com/games/4777/logs/5280

It's still not adequate enough to show performance issues so I'm leaving gists of raw recordings too: https://gist.github.com/MacTavishAO/efea87313030ff986dc2697e52d9546b

As can be seen on CSV recordings, CPU utilization starts at mid-20s and climbs all the way up to mid-40s and settles there whilst GPU utilization starts high (98+) but it slowly goes down to as low as 55% by the end.

This results in significantly lower FPS after a while. I should also mention that this game only took 5 minutes for someone to win. Performance impact would've been much worse otherwise as I have seen sub 90 on longer games.

@Retalak
Copy link

Retalak commented May 30, 2024

Having just switched back to Linux after being on Windows for a few years, the performance is very apparently worse on Linux. It's unplayable, I'll just boot up Windows when I want to play CS for now. Valve pls fix.

@gamertyke
Copy link

I know this is a pretty undetailed report, but I switched from a 12900K to a 7800X3D yesterday and the performance difference is HUGE. The frame times are incredibly consistent and spike free on the 7800X3D, unlike the Intel.

@dylif
Copy link

dylif commented Jun 19, 2024

I know this is a pretty undetailed report, but I switched from a 12900K to a 7800X3D yesterday and the performance difference is HUGE. The frame times are incredibly consistent and spike free on the 7800X3D, unlike the Intel.

That's really interesting. On my 13900HX, I have pretty bad frame times, which are slightly improved when disabling my e-cores. Note that I'm using the latest kernel (6.9.5) on Arch/KDE/X11 with an RTX 4090 Mobile. On Wayland, cs2 is borderline unplayable.

@gamertyke
Copy link

Just to expand for those who may be interested, after extensive testing I've found that KDE performs better than Gnome by a small margin and X11 outperforms Xwayland (and forced native Wayland) by a large margin.

@dylif
Copy link

dylif commented Jul 3, 2024

Just to expand for those who may be interested, after extensive testing I've found that KDE performs better than Gnome by a small margin and X11 outperforms Xwayland (and forced native Wayland) by a large margin.

How can I force native wayland? I'd like to give it a try. TIA.

@gamertyke
Copy link

How can I force native wayland? I'd like to give it a try. TIA.

in the game dir, find cs2.sh and change export SDL_VIDEO_DRIVER line. either change to wayland or comment it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests