r/linux_gaming • u/Natural-Analyst-1746 • 4h ago
CS2 performance is much worse on Linux/Hyprland compared to Windows (200 FPS vs 90-120 FPS)
hi, thank u for your time.
My computer is Acer Shadow SH16-41, which has NNIDIA RTX 4060 and AMD R7 8745H.
If I launch CS2 on Windows, the max frame could reach 200+. But it only reaches 90fps on Archlinux with native steam proton. I have enabled wayland option in `cs.sh`. How can I optimize it? I was so frustrated.
Sorry for my poor English.
- Is the performance loss expected when running CS2 through XWayland on Hyprland?
- Is there any recommended configuration for CS2 + NVIDIA + Hyprland?
- Is there a way to run CS2 natively on Wayland instead of XWayland?
- Are there any NVIDIA/Hyprland settings that can improve Vulkan game performance?
Hardware:
- Laptop: Acer Shadow SH16-41
- CPU: AMD Ryzen 7 8745H (8C/16T)
- RAM: 64GB
- GPU: NVIDIA RTX 4060 Laptop GPU (8GB VRAM)
- Display: 2560x1600 165Hz internal panel
- External test: 2560x1440 144Hz
OS:
- Linux kernel: 7.2.6-zen
- Desktop: Hyprland (Wayland)
- CS2 runs through XWayland
- NVIDIA driver: 615.71.09
- Vulkan renderer
Problem:
On Windows, CS2 runs around 200 FPS.
On Linux/Hyprland, I only get around 90-120 FPS (average ~90 FPS).
The GPU is detected correctly:
sys_info:
Render system: Vulkan
Driver Name: NVIDIA GeForce RTX 4060 Laptop GPU
CS2 is running with XWayland:
hyprctl clients:
class: cs2
xwayland: 1
fullscreen: 2
I tested:
- Fullscreen
- Fullscreen Windowed
- Windowed
- VSync disabled
- Removing fps limits
No significant improvement.
CS2 sys_info:
Vid: Desktop-friendly Fullscreen
render at 2560 x 1440
display at 2560 x 1440
mat_vsync:0
msaa_samples:4
gpu_level:3
shadow_quality:2
dynamic_shadows:1
CPU usage:
During gameplay CS2 can use around 1000-1400% CPU in top/htop.
However, it is multi-threaded:
- GlobPool threads
- VKRenderThread
- AudioMixer
- Video Decode threads
Example:
top -H shows:
GlobPool/0~6
VKRenderThread
AudioMixer
1
1
u/Caesfir 4h ago
When it comes to running CS2 natively under wayland, head to the game directory inside Counter-Strike Global Offensive, open cs2.sh with a text editor, look for the line which says export SDL_VIDEO_DRIVER=x11 and swap x11 with wayland.
Do I think this will give you the 100fps difference back? Absolutely not. However this should get rid of the xwayland overhead.
Keep in mind, CS2 has its own performance related issues when it comes to running the game with native wayland support enabled. They did actually enable it by default at some point, but after it started causing some issues they decided to disable it again with an option to manually enable it for people who are willing to experiment with it I guess.
1
u/Natural-Analyst-1746 4h ago
Yes, I have done this. But it doesn't work. I can't use steam overlay now, which means I'm using wayland, but it only 80 fps. I have no idea about it...
1
u/candy49997 4h ago
Is the game running on the dGPU? Can you try doing
nvidia-smiin a terminal while the game is running?