ValveSoftware / csgo-osx-linux

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

CS-2 Unplayable on linux #3326

Open gaurishmehra opened 11 months ago

gaurishmehra commented 11 months ago

Your system information

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 commented 11 months ago

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

emko commented 11 months ago

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

sylveonsylvia commented 11 months ago

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

gaurishmehra commented 11 months ago

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 commented 11 months ago

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

b1tbrusher commented 11 months ago

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).

gaurishmehra commented 11 months ago

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

ilievi187 commented 10 months ago

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

mikkorantalainen commented 1 month ago

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.

Fxzzi commented 2 weeks ago

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?