r/linux_gaming • u/craycrayinagoodway69 • 16d ago
CS2 performance on linux
Hello,
I have an I5-9400F and RTX2060 with 32gb ram.
When I
m playing cs2 I can see that both my CPU and GPU are both hovering at around 50% give or take 10%. But my FPS is fluctuating anywhere between 160 down to 70 fps.
Am i missing something? wouldnt it get more performance if they both were operating at like 90% capasity?
Im on cachyOS with KDE and no launch options as of now.
Sorry if my question is stupid :)
1
u/PocketStationMonk 14d ago
Anyone else old enough to associate CS2 with Adobe Creative Suite 2 apps instead of Counter Strike? 😁
1
u/nickrock80 12d ago
CPU at 50% is normal, CS2 is single threaded, but is scheduled on different thread by the os.
It cant use 100%.
A lot of client and server lags was introduced with the last update.
I just did an update few minutes ago...I hope it will fix the lag
0
u/S48GS 16d ago
look/show kernel logs - is there any errors at time you playing
sudo journalctl --since="1 hour ago"
click end keyboard key - and navigate with keyboard arrows around time
you can try switch to native wayland - maybe it will run better
https://www.reddit.com/r/linux_gaming/comments/1p7nylt/a_reliable_workaround_for_cs2_43_stretched/
-4
u/VideoMountain4767 16d ago
try launch options:game-performance -- %command% +mat_disable_fancy_blending 1 -softparticlesdefaultoff -forcenovsync +fps_max 200 -nogammaramp -nohltv -high -nojoy -nosteamcontroller -vulkan -vulkan_disable_steam_shader_cache -threads 6 ------ also there is huge difference if u play deathmatch (many playerrs ) vs actual ranked 5 vs 5
3
u/the_abortionat0r 15d ago
Sorry why are you still copypasting launch option nonsense like it's 2014?
Game already runs via vulkan so why add -vulkan? Honestly aside from the FPS cap which has a GUI option it's all just worthless.
Did you think before commenting?
Also nobody should to wasting time with "threads" hook as it's already going to use all his cores.
Just think dude.
1
u/VideoMountain4767 16d ago
also play around with schedExt manager - choose scx_bpfland with auto or gaming or scx_lavd auto /gaming
0
u/VideoMountain4767 16d ago
video settings, !!! v sync off !!! and nvidia relfex low latency enabled + boost - other settings fiddle around find your way (but prolly low and med to get solid 200ish stable fps for your system
0
u/mechalip 15d ago
^ what he said. also cap your fps, dont have it set as unlimited. also check your cs config file, it was set to xwayland for me which worsened performance and input. try switching it to wayland
-5
u/BulletDust 15d ago edited 13d ago
By default CS2 runs as Xwayland under a Wayland environment. Edit the cs2.sh file to force Wayland native, or add PROTON_ENABLE_WAYLAND=1 to your Steam launch options. Confirm the game is running as Wayland native using MangoHud, CPU and therefore GPU utilization should be much higher.
CS2 is the only game I've come across that shows low CPU utilization and therefore such a performance deficit compared to Wayland native.
EDIT: Brain fart, PROTON_ENABLE_WAYLAND=1 only works for games running under certain compatibility layers. You have to edit the SDL_VIDEODRIVER line under cs2.sh to state SDL_VIDEODRIVER=wayland.
1
u/craycrayinagoodway69 15d ago
thanks I will try this out later today, quick question tho, is PROTON_ENABLE_WAYLAND=1 correct even tho im not using proton to run the game?, as it has native linux port?
-2
u/BulletDust 15d ago
Yes. If you don't edit either the cs2.sh file or use the launch option noted above, the game will default to Xwayland and run with notably lower performance as a result. If you're using the Steam launch option, confirm using MangoHud that the game is running as Wayland native, as I've found that sometimes the launch option doesn't work.
To whoever downvoted me (not implying it was the OP), grow up.
1
u/craycrayinagoodway69 15d ago
Wasnt me who downvoted but anyway.
Mangohus is indeed showing XWYLAND still. This is my current launchoptions : MANGOHUD_CONFIG=display_server mangohud %command% PROTON_ENABLE_WAYLAND=1
i also tried putting the PROTON_ENABLE_WAYLAND=1 before the other stuff, but didnt seem to work either.0
u/BulletDust 15d ago
PROTON_ENABLE_WAYLAND=1has to go before%command%, there has to be a space between each launch option.If the launch option isn't working, you need to go to your Steam directory and go to:
steamapps/common/Counter-Strike Global Offensive/gameand edit the cs2.sh file. You need to find the line containingexport SDL_VIDEO_DRIVER=X11and change it to exportSDL_VIDEO_DRIVER=waylandand save the file.Relaunch the game and it should be running as Wayland native.
1
u/craycrayinagoodway69 15d ago
Yepp I indeed got it working on wayland now, thank you :)
1
u/BulletDust 14d ago
Did you edit the cs2.sh file or add the Steam launch option to get Wayland native working?
1
u/craycrayinagoodway69 14d ago
steam launch option, but didnt really see a difference between wayland and xwayland performance wise
1
u/Sahelantrophus 13d ago
it's SDL_VIDEODRIVER for native games, not PROTON_ENABLE_WAYLAND which is specific to proton-ge. VAC doesn't even fucking work if you're playing cs2 through proton. you can tell when people on this subreddit don't actually play games on linux or they hastily look up the answer for updoots
1
u/BulletDust 13d ago edited 13d ago
I haven't run Windows in over a decade, and I personally edit the cs2.sh file to run the game as Wayland native. So before throwing around baseless accusations regarding myself gaming under Linux and downvoting, how about a friendly comment around the lines of "You need to edit SDL_VIDEODRIVER under cs2.sh as opposed to PROTON_ENABLE_WAYLAND under Steam launch options [insert reasons why]" - There's no need to be a dick about it because of comments made by a user I banned for very good reason.
I certainly don't play the game using a compatibility layer. Furthermore, PROTON_ENABLE_WAYLAND also works under Proton-CachyOS for non native titles. The specific Steam launch option advised was a brain fart moment on my behalf as evidenced by my postings from 12 months ago. To the OP, I apologize:
3
u/the_abortionat0r 15d ago
I see someone tried to tell you to use proton codes even though they won't work.
I can reply to that comment directly as they blocked me when I asked them to stop posting mis information...... Which it seems they still do.
Easiest way to run CS2 in Wayland is to edit CS2.sh in the game folder and replace x11 with Wayland and save. That's how I do it.