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

CS-2 Unplayable on linux

Open gaurishmehra opened this issue 2 years ago • 10 comments

Your system information

  • System information from steam : https://gist.github.com/gaurish-mehra/1473f5e851660d56ee60b1aa53b35d80
  • Have you checked for system updates?: Yes

Please describe your issue in as much detail as possible:

firstly cs2 on linux ( igpu) is lagging so bad to the point that it is unplayable, i used to get 100-250fps on lowest settings in csgo, with the lowest settings on cs2 i barely get 40fps as for some main issues they include:

  1. no sound ( fixed by using some launch args)
  2. black screen while changing the resolution in fullscreen mode ( not windowed fullscreen, that's fine)
  3. unplayable lag, pinning i-pgu to 100% when nothing is going on 4)somehow getting more fps on highest settings ( 45fps) than on lowest (40fps)

Steps for reproducing this issue:

  1. Download CS-2
  2. Open the game
  3. Cry

gaurishmehra avatar Sep 29 '23 02:09 gaurishmehra

I use the following args to get a 5-10fps boost and fix the no sound issue :

mangohud %command% -dxvk -sdlaudiodriver pipewire +fps_max 0 -nojoy -high -fullscreen +mat_disable_fancy_blending 1 +cl_forcepreload 1 -limitvsconst -forcenovsync +r_dynamic 0 +mat_queue_mode 2 +mat_queue_mode 2 -disable_d3d9ex -r_emulate_g -softparticlesdefaultoff

gaurishmehra avatar Sep 29 '23 02:09 gaurishmehra

I use the following args to get a 5-10fps boost and fix the no sound issue :

mangohud %command% -dxvk -sdlaudiodriver pipewire +fps_max 0 -nojoy -high -fullscreen +mat_disable_fancy_blending 1 +cl_forcepreload 1 -limitvsconst -forcenovsync +r_dynamic 0 +mat_queue_mode 2 +mat_queue_mode 2 -disable_d3d9ex -r_emulate_g -softparticlesdefaultoff

i don't think dxvk does anything on cs2 but maybe valve could build cs2 with it included for now if it gets better performance then their native vulkan

emko avatar Sep 29 '23 05:09 emko

I use the following args to get a 5-10fps boost and fix the no sound issue :

mangohud %command% -dxvk -sdlaudiodriver pipewire +fps_max 0 -nojoy -high -fullscreen +mat_disable_fancy_blending 1 +cl_forcepreload 1 -limitvsconst -forcenovsync +r_dynamic 0 +mat_queue_mode 2 +mat_queue_mode 2 -disable_d3d9ex -r_emulate_g -softparticlesdefaultoff

the only launch option that does anything there is the sdl audio driver one, every other launch option either doesn't exist or doesn't work in cs2 anymore and some (+cl_forepreload 1) would cause worse performance in csgo

sylveonsylvia avatar Sep 29 '23 06:09 sylveonsylvia

I use the following args to get a 5-10fps boost and fix the no sound issue : mangohud %command% -dxvk -sdlaudiodriver pipewire +fps_max 0 -nojoy -high -fullscreen +mat_disable_fancy_blending 1 +cl_forcepreload 1 -limitvsconst -forcenovsync +r_dynamic 0 +mat_queue_mode 2 +mat_queue_mode 2 -disable_d3d9ex -r_emulate_g -softparticlesdefaultoff

the only launch option that does anything there is the sdl audio driver one, every other launch option either doesn't exist or doesn't work in cs2 anymore and some (+cl_forepreload 1) would cause worse performance in csgo

Tbh i have no clue what any other launch args are doing ( other than the audio one) a friend gave them to me, and they did give me a little ( 5-10)fps boost

gaurishmehra avatar Sep 29 '23 08:09 gaurishmehra

I use the following args to get a 5-10fps boost and fix the no sound issue : mangohud %command% -dxvk -sdlaudiodriver pipewire +fps_max 0 -nojoy -high -fullscreen +mat_disable_fancy_blending 1 +cl_forcepreload 1 -limitvsconst -forcenovsync +r_dynamic 0 +mat_queue_mode 2 +mat_queue_mode 2 -disable_d3d9ex -r_emulate_g -softparticlesdefaultoff

i don't think dxvk does anything on cs2 but maybe valve could build cs2 with it included for now if it gets better performance then their native vulkan

yes, the -dxvk and -vulkan are the exact same in terms of performance as i have seen

gaurishmehra avatar Sep 29 '23 08:09 gaurishmehra

I am having the same problem. CS2 runs poorly on linux, sitting at a average of 120 fps, even on my ultra-optimized gentoo installation. On windows, i get 2,5x as much FPS. Sounds are delayed, even with a low mixahead value, input feels laggy, and various other minor issues affects overall experience. Unfortunately, I am forced to stay playing on Windows until Linux binaries are playable.

If im not mistaken, -dxvk, -r_emulate_g and -opengl has no effect on CS2. The loaded shared objects remained the same on my end each test (/proc/pid/maps).

Yeah I learnt that most of the launch options I was using had barely any effect, the sound issue seems to be fixed but the black screen issue and poor performance still persists

gaurishmehra avatar Oct 04 '23 01:10 gaurishmehra

I am having the same problem. CS2 runs poorly on linux, sitting at a average of 120 fps, even on my ultra-optimized gentoo installation. On windows, i get 2,5x as much FPS. Sounds are delayed, even with a low mixahead value, input feels laggy, and various other minor issues affects overall experience. Unfortunately, I am forced to stay playing on Windows until Linux binaries are playable.

If im not mistaken, -dxvk, -r_emulate_g and -opengl has no effect on CS2. The loaded shared objects remained the same on my end each test (/proc/pid/maps).

same issue , i have around 120-140 fps on average on hight at 2560x1080 and in windows i have like 250 on ultra

ilievi187 avatar Nov 14 '23 20:11 ilievi187

I get random rendering stalls on Ubuntu 22.04 LTS. According to mangohud the stalls result in 50+ ms frametimes which seem to be related to having lots of noise nearby. The weird thing is that none of my CPU cores are even near 100% (more like 40–60 %) and GPU is running around 30–40 % while the framerate is stalling. I've tried the flag -sdlaudiodriver pipewire or -sdlaudiodriver pulse or -sdlaudiodriver alsa and none of those fix the stall problem.

The stall goes away once the game is making less sound, no matter how complex the visual scenery is.

I think the audio engine is just really buggy in this game. This stall issue may or may not be related to the audio engine startup failures that result in no audio getting out of the system even though the game settings claim that the correct audio device is selected.

Here are the launch options I'm currently using:

DXVK_FRAME_RATE=120 DXVK_ASYNC=1 mangohud %command% -threads 9 -vulkan -nojoy -sdlaudiodriver pipewire +fps_max 0 +fps_max_ui 0

The fps_max and fps_max_ui must be set to zero because the in-game FPS limiter is so buggy that it causes random stuttering all the time no matter what FPS you select in the settings for it.

mikkorantalainen avatar Aug 10 '24 14:08 mikkorantalainen

The fps_max and fps_max_ui must be set to zero because the in-game FPS limiter is so buggy that it causes random stuttering all the time no matter what FPS you select in the settings for it.

I am also noticing this, it seems to be fine for a few seconds then stuttery for a few seconds. Is this the same as what you are experiencing?

EDIT: those dxvk env vars you have wouldn't do anything since cs2 vulkan on linux runs natively?

fxzzi avatar Aug 25 '24 23:08 fxzzi

I get random rendering stalls on Ubuntu 22.04 LTS. According to mangohud the stalls result in 50+ ms frametimes which seem to be related to having lots of noise nearby. The weird thing is that none of my CPU cores are even near 100% (more like 40–60 %) and GPU is running around 30–40 % while the framerate is stalling. I've tried the flag -sdlaudiodriver pipewire or -sdlaudiodriver pulse or -sdlaudiodriver alsa and none of those fix the stall problem.

The stall goes away once the game is making less sound, no matter how complex the visual scenery is.

I think the audio engine is just really buggy in this game. This stall issue may or may not be related to the audio engine startup failures that result in no audio getting out of the system even though the game settings claim that the correct audio device is selected.

I still got the issue that the game freeze when there's a lot of sound, have anyone managed to fix it?

yoni13 avatar Oct 10 '25 08:10 yoni13