Game Counter-Strike 2 freezes in nvidia driver
Computer information:
Manufacturer: Gigabyte Technology Co., Ltd.
Model: B550 GAMING X V2
Type: desktop
Touch input is not supported
CPU:
CPU Manufacturer: AuthenticAMD
Processor brand: AMD Ryzen 5 5600 6-Core Processor
Processor family: 0x19
CPU model: 0x21
CPU stepping: 0x0
Processor type: 0x0
Clock frequency: 4467 MHz
Logical processors: 12
Physical processors: 6
Hyper-Threading: Supported
FCMOV: Supported
SSE2: Supported
SSE3: Supported
SSSE3: Supported
SSE4a: Supported
SSE41: Supported
SSE42: Supported
AES: Supported
AVX: Supported
AVX2: Supported
AVX512F: Not supported
AVX512PF: Not supported
AVX512ER: Not supported
AVX512CD: Not supported
AVX512VNNI: Not supported
SHA: Supported
CMPXCHG16B: Supported
LAHF/SAHF: Supported
PrefetchW: Not supported
OS version:
"EndeavourOS Linux" (64-bit)
Kernel name: Linux
Kernel version: 6.7.6-zen1-1-zen
X server manufacturer: The X.Org Foundation
X server version: 12302004
X Window System window manager: KWin
Steam client version: steam-runtime_0.20231127.68515
Video card:
Driver: NVIDIA Corporation NVIDIA GeForce GTX 1080 Ti/PCIe/SSE2
Driver version: 4.6.0 NVIDIA 550.54.14
OpenGL version: 4.6
Color depth: 24 bit/pixel
Refresh rate: 164Hz
Manufacturer ID: 0x10de
Card ID: 0x1b06
Revision not defined
Number of screens: 1
Number of logical video cards: 1
Main resolution screen: 2560 x 1440
Desktop resolution: 2560 x 1440
Main size screen: 23.62" x 13.39" (27.13" diag), 60.0cm x 34.0cm (68.9cm diag)
Basic video memory: 11264 MB
Sound card:
Audio Device: Nvidia GPU 82 HDMI/DP
Memory:
RAM: 31993 MB
Virtual reality devices:
VR headset: not detected
Miscellaneous:
Interface language: Russian
LANGUAGE: ru_RU.UTF-8
Total disk space: 835832 MB
Most free disk: 177071 MB
Disk space:
Number of SSDs: 1
SSD sizes: 1000G
Number of hard drives: 0
Number of removable media: 0
The game Counter-Strike 2 works well only with the nvidia-535xx driver. All other drivers such as nvidia or nvidia-beta.
In this case Nvidia Beta: (inxi -G)
Graphics:
Device-1: NVIDIA GP102 [GeForce GTX 1080 Ti] driver: nvidia v: 550.54.14
Display: wayland server: X.Org v: 23.2.4 with: Xwayland v: 23.2.4
compositor: kwin_wayland driver: X: loaded: nvidia
gpu: nvidia,nvidia-nvswitch resolution: 2560x1440~165Hz
API: EGL v: 1.5 drivers: nvidia,swrast,zink
platforms: gbm,wayland,x11,surfaceless,device
API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: nvidia mesa v: 550.54.14
renderer: NVIDIA GeForce GTX 1080 Ti/PCIe/SSE2
API: Vulkan v: 1.3.276 drivers: nvidia surfaces: xcb,xlib,wayland
Counter-Strike 2 with nvidia or nvidia-beta or earlier drivers up to version 535 starts to work with freezes.
Video proof:
https://github.com/ValveSoftware/csgo-osx-linux/assets/115931219/6c063862-d11a-4a9f-ab95-86679c8ba68a
At the same time, up to and including version 535 (nvidia-535xx-dkms), everything works well!
As I can see you are using Wayland compositor. Current proprietary NVIDIA modules to work more properly on Wayland need modeset. But for some reason you need to pass it manually to your kernel on boot. You have more information about that on ArchWiki.
Add nvidia_drm.modeset=1 to your kernel parameters. Then on working system check if you passed this parameter correctly by using this command cat /sys/module/nvidia_drm/parameters/modeset. It should output Y. If not, then you didn't enabled modeset properly.
As I can see you are using Wayland compositor. Current proprietary NVIDIA modules to work more properly on Wayland need modeset. But for some reason you need to pass it manually to your kernel on boot. You have more information about that on ArchWiki.
Add
nvidia_drm.modeset=1to your kernel parameters. Then on working system check if you passed this parameter correctly by using this commandcat /sys/module/nvidia_drm/parameters/modeset. It should output Y. If not, then you didn't enabled modeset properly.
I use nvidia-drm.modeset=1 in this case. It is added to the GRUB bootloader, which means it boots faster than the kernel. And yes, the command sudo cat /sys/module/nvidia_drm/parameters/modeset answers Y.