ValveSoftware / csgo-osx-linux

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

FPS Stutters in new Vulkan option #2891

Open RealAstolfo opened 2 years ago

RealAstolfo commented 2 years ago

Your system information

OS: Gentoo Base System release 2.8 x86_64 Kernel: 5.15.7-gentoo Resolution: 1920x1080 WM: dwm CPU: AMD Ryzen 7 5800X (16) @ 4.550GHz GPU: NVIDIA GeForce RTX 3060 Ti

Please describe your issue in as much detail as possible:

Describe what you expected should happen and what did happen. Please link any large pastes as a Github Gist.

After manually replacing libtcmalloc_minimal with a system compiled varient, the game will launch with -vulkan, but experiences stutters (most likely when loading new things, since it happens whenever i move my mouse to view new areas)

RyanBlakeIT commented 2 years ago

Similar issue to OP, but different OS and hardware. Also was able to use -vulkan flag without replacing any libraries.

OS: Ubuntu 20.04 Kernel: 5.11.0-41-lowlatency Resolution: 1920x1080 CPU: Intel i5-2500K GPU: nVIDIA GeForce RTX 2060 SUPER Driver(s) used: nVIDIA 470 & 495

When first launching the game, I had more stutters as it seemed to be loading content into GPU memory, but was just brief moments of this happening. However, after playing for a round or two of Deathmatch, it became unusable. FPS tanked to 60fps, latency went up to 40ms (even though the scoreboard showed 5ms), and when I looked around, it would jump between frames. Exiting and removing the -vulkan flag resulted in restoration of framerate. This performance hit persisted even after leaving the game and going back to the main menu.

romanstingler commented 2 years ago

Maybe this is related to texture caching, have you tried texture streaming in the video settings menu. I have an AMD Pro DUO (Dual Fury)(using/enabled only 1 GPU) and had stutters only the first run, but on consecutive runs I get similar fps drops to OpenGL.

PS: I have disabled pre-shader-caching, as mesa should cache the things on its own.

Or, possibly it's an NVIDIA Driver issue.

Further testing is welcome.

PS2: on OpenGL I get 260fps on a timedemo, on Vulkan I get 306fps with 1% fps at (202fps Vulkan and 192 on opengl) on 2nd run.

What I can say I'm very happy and thankful, that Valve is working on these things. This will definitely increase Valve's reputation in the Linux and osx community.

CrezyDud commented 2 years ago

maybe shader compilation, dxvk caches shader, should lag less as game goes on

ghost commented 2 years ago

Maybe it's just a coincidence, but the stuttering happens less often when I turn off mangohud. OS: Arch Linux CPU: Intel(R) Core(TM) i5-7600K CPU @ 3.80GHz GPU: NVIDIA Corporation NVIDIA GeForce GTX 1060 3GB/PCIe/SSE2 Kernel: 5.15.6-225-tkg-pds Resolution: 1920x1080 DE: KDE

CrumblyLiquid commented 2 years ago

I've been getting micro-stutters too, enabling texture streaming seems to fix the issue for me. Nevermind, doesn't work after all

OS: Manjaro Linux x86_64 
CPU: AMD Ryzen 5 5600G with Radeon Graphics (12) @ 3.900GHz 
GPU: AMD ATI 30:00.0 Cezanne 
Memory: 3520MiB / 28024MiB 
Kernel: 5.15.6-2-MANJARO 
Resolution: 2560x1440 
DE: Plasma 5.23.4 
WM: KWin
romanstingler commented 2 years ago

In case of stuttering issues, could you please check that

my demo looks good, (it's a 32tick demo) and the recording was done on the same machine (sorry for quality, but I game on lowest settings, tested default video settings - no issues) https://www.youtube.com/watch?v=ZLA5MY2ZvpI

At the end you can see the mangohud logging summary, and also during game the frametime graph never spikes extremely.

please no comments on the gameplay

If you have 2 monitors, please try to plug in only 1 and test again. The more info we have, the easier it is to narrow down and fix.

romanstingler commented 2 years ago

@kisak-valve and all others maybe https://www.phoronix.com/scan.php?page=news_item&px=GNOME-NV-HRR-Fraction will change experience for GNOME users on Nvidia cards.

shoober420 commented 2 years ago

Same issue here on Gentoo

System Info: https://github.com/shoober420/rootscripts/blob/main/home/shoober420/sysinfoamd

beerbaron23 commented 2 years ago

Very simular issue here to what RyanBlakeIT describes, happening on Radeon GPU hardware.

additional issue is that the game will crash while loading a map about 50% of the time (freezes during map loading screen, need to kill the game manually).

Ubuntu 21.04 Radeon R9 280x 3gb i5 Haswell 3.1ghz 16gb ram Steam overlay disabled via -no-browser switch.

All csgo settings on highest, no fxaa, motion blur or texture streaming enabled.

romanstingler commented 2 years ago

Could you try these launch options (if not already set - remove high if you have it or threads for testing) +fps_max 0 -novid -nojoy -fullscreen

Does this happen only during DM or does this also happen on workshop aim maps or local bot games? I will do some tests after work.

Please note: using personal demo file @ 1920x1080

no -threads launch option 299fps -threads 1 -> 154fps -threads 2 -> 272fps -threads 4 -> 290fps (I think not using threads option defaults to 4 if CPU has at least 4 cores) -threads 8 -> 269fps -threads 12 -> 267fps -threads 16 -> 272fps IMPORTANT -threads option with more than 16 will crash the game (tested on 96 core machine)

So using the game without is probably the best.

I tested -vulkan on DM, and it lagged really hard in the beginning.

So I joined DM as spectator and moved around the whole map(s) and after some time as probably the whole shader cache has been stored, I had no issues after all.

This is probably because all have pre-shader cache activated (default) in steam client, and then they download the shader caches. For Vulkan they are not yet available, so the shader cache has to be created, and therefore it lags until the cache is fully stored.


Further testing possibility use single mesa shader cache file (mesa 21.1+ required) put MESA_DISK_CACHE_SINGLE_FILE=1 in your /etc/environment or export it.

Reboot your system

This will create a folder ~/.cache/mesa_shader_cache_sf where the single shader cache file (there will be multiple files, but the cache is stored in a single file) will reside. the old ~/.cache/mesa_shader_cache folder can be removed after testing.

shoober420 commented 2 years ago

@romanstingler

Nice find! Using MESA_DISK_CACHE_SINGLE_FILE=1 fixed the stuttering issue for me. Removing -high and -threads had no effect. The -preload command line parameter could be another possible option to test in this scenario. I'm on mesa git master https://github.com/mesa3d/mesa/commit/3077d968568213bfe2990ddc4ada2763d9701418.

romanstingler commented 2 years ago

@shoober420 nice to hear, I wonder if this could also solve the stuttering issues of NVIDIA users

@kisak-valve maybe some can test the MESA_DISK_CACHE_SINGLE_FILE and after some test results are present, talking to the mesa guys to defaulting the single disk cache file would be beneficial

RyanBlakeIT commented 2 years ago

@romanstingler My startup options are very similar to what you suggested:

gamemoderun %command% -vulkan -novid -nojoy -high -tickrate 128 -fullscreen -refresh 165 +exec autoexec.cfg

Also tested without -high and same results. I already have performance mode enabled for all CPU cores and only have a single monitor connected.

Since I am not using nouveau drivers, I don't see the mesa version and my shaders cache doesn't update. However, I did try installing the nouveau drivers again and when I try to launch CSGO, it goes to a black screen and then crashes/quits (no dialog error message). I confirmed that I was running mesa version 21+ when testing.

Here is my version information using nVIDIA proprietary drivers:

glxinfo | grep 'version'

server glx version string: 1.4 client glx version string: 1.4 GLX version: 1.4 OpenGL core profile version string: 4.6.0 NVIDIA 495.44 OpenGL core profile shading language version string: 4.60 NVIDIA OpenGL version string: 4.6.0 NVIDIA 495.44 OpenGL shading language version string: 4.60 NVIDIA OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 495.44 OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20 GL_EXT_shader_group_vote, GL_EXT_shader_implicit_conversions,

I will test with pre-shader cache off and update this post.

romanstingler commented 2 years ago

@RyanBlakeIT maybe your shader cache is too big (nvidia drivers) and the garbage collector is cleaning things up.

you could try setting __GL_SHADER_DISK_CACHE_SKIP_CLEANUP=1 it works also for vulkan

Maybe testing steam beta (selectable in steam settings).

RyanBlakeIT commented 2 years ago

@romanstingler That setting change has definitely helped, much better framerate and, so far, minimal stutters, similar to OpenGL.

I will test in Valve DM later and share results.

Update: Tested with DM and it was awful with lots of lag and stuttering as I initially reported in my first comment.

romanstingler commented 2 years ago

@RyanBlakeIT for how long have you tried testing it?

I found this https://www.reddit.com/r/wine_gaming/comments/8ih53x/tutorial_how_to_reduce_stuttering_nvidia/

And the author wrote it can take up to 1h of gameplay until all shaders are stored(Quake Champions) Have you tried DM and joining as spectator and flying through the map and waiting until this game is over and join the next map and see if it stutters?

You could also try deleting the whole cache folder and creating a new one, or add a specific path to the CSGO launch options (all described in the reddit post).

RyanBlakeIT commented 2 years ago

@romanstingler I learned that the cache is really at ~/.cache/nvidia/GLCache (mainly for awareness for others who may be looking in ~/.nv/ to no avail).

After purging the cache and trying again, it did much better, but towards the end of the match, the latency went from 30ms to 48ms (even though, again, the scoreboard showed the same latency when netgraph reported it being lower). The game also went down to 48-60 fps and the game became extremely choppy.

Prior to testing, I joined a community server that I run and joined as a spectator then stepped away and let it gather the data. That ran for about 20-30 minutes.

I ran an output on the GPU to monitor it for any spikes and, as you can see, there weren't any (this ran every 15 seconds and I let the jittering stay for about 30 seconds before quitting CSGO).

Command ran: nvidia-smi --query-gpu=timestamp,name,pci.bus_id,driver_version,pstate,pcie.link.gen.max,pcie.link.gen.current,temperature.gpu,utilization.gpu,utilization.memory,memory.total,memory.free,memory.used --format=csv -l 15 > results-file.csv results-file.csv

While unrelated, I noticed that when I quit CSGO with the -vulkan flag, CSGO will not exit unless I kill the processes or reboot the system.

Let me know if I could provide any additional logs or data points that would help get this resolved.

Update: When I get stuttering and low fps, if I pull up the console, the stuttering ceases (tested when spectating on a server with bots). Soon as I exit the console, the stuttering resumes.

holyjoespb commented 2 years ago

After steam download pre-compiled shaders the problem went away

du -hs .local/share/Steam/steamapps/shadercache/730/* 1,1M .local/share/Steam/steamapps/shadercache/730/DXVK_state_cache 4,0K .local/share/Steam/steamapps/shadercache/730/fozmediav1 7,5M .local/share/Steam/steamapps/shadercache/730/fozpipelinesv6 4,0K .local/share/Steam/steamapps/shadercache/730/mesa_shader_cache 346M .local/share/Steam/steamapps/shadercache/730/nvidiav1 323M .local/share/Steam/steamapps/shadercache/730/swarm

RyanBlakeIT commented 2 years ago

Tried both precompiled shaders and Steam Beta, but still have same experience. Left game running overnight in spectator mode following players in first person, but that did not help.

shoober420 commented 2 years ago

@RyanBlakeIT

On my Nvidia machine, I would actually uninstall Mesa, since it's not needed when using Nvidia proprietary drivers. I would say Nvidia needs to update their drivers. I don't think Mesa changes effect Nvidia proprietary.

RyanBlakeIT commented 2 years ago

@shoober420 After uninstalling anything mesa-related and reinstalling my desktop environment along with the Steam app (which did reinstall some mesa items), I have yet to see a complete slowdown yet (but I've also only played 20 minutes thus far). However, I'm still getting the micro-stutters when I spin and see an enemy and when I kill an enemy in close quarters (those are the most noticable times).

Also still not exiting CSGO app on quit with the -vulkan flag (I do not have this issue without vulkan enabled).

These are the packages reinstalled with ubuntu gnome desktop and when reinstalling the steam desktop app: apt list mesa | grep install

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libegl-mesa0/focal,now 21.3.2~kisak1~f amd64 [installed,automatic] libgl1-mesa-dri/focal,now 21.3.2~kisak1~f amd64 [installed,automatic] libgl1-mesa-dri/focal,now 21.3.2~kisak1~f i386 [installed,automatic] libgl1-mesa-glx/focal,now 21.3.2~kisak1~f i386 [installed,automatic] libglapi-mesa/focal,now 21.3.2~kisak1~f amd64 [installed,automatic] libglapi-mesa/focal,now 21.3.2~kisak1~f i386 [installed,automatic] libglu1-mesa/focal,now 9.0.1-1build1 amd64 [installed] libglx-mesa0/focal,now 21.3.2~kisak1~f amd64 [installed,automatic] libglx-mesa0/focal,now 21.3.2~kisak1~f i386 [installed,automatic] mesa-vulkan-drivers/focal,now 21.3.2~kisak1~f amd64 [installed,automatic] mesa-vulkan-drivers/focal,now 21.3.2~kisak1~f i386 [installed,automatic]

shoober420 commented 2 years ago

@RyanBlakeIT

I was force uninstalling Mesa on Arch/Gentoo using my Nvidia machine. I'm sure you can do it on Debian/Ubuntu, but it will ask to reinstall after a system update if you don't do some tweaks to the deps. Nvidia just needs to update it's blob to handle the shaders I bet.

RyanBlakeIT commented 2 years ago

@shoober420 Thanks for the advice. While I was not able to fully remove mesa and nouveau, I did remove everything, went back into runlevel 3, and was able to install the .bin version of the nVIDIA drivers, which seem to behave better.

Steps thus far:

Edited: /etc/gdm3/custom.conf Uncommented: WaylandEnable=false

Edited: /etc/default/grub GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1 nomodeset nvidia.NVreg_EnablePCIeGen3=1 nouveau.blacklist=1 modprobe.blacklist=nouveau" Then: update-grub

Ran: apt purge 'nvidia' update-initramfs -u

Rebooted

Installed ./NVIDIA-Linux-x86_64-470.94.run

I also reinstalled Steam using the .deb package; however, that required reinstalling some of the mesa and, I believe, nouveau packages. So those are dependencies of Steam and therefore cannot be fully removed.

While the micro-stuttering is not fixed, CSGO did not hang when I quit with the -vulkan flag set.

After about 2-3 rounds of Deathmatch, at the 2 minutes remaining mark, the game stuttering went way up and made the game unplayable.

s-tui captured CPU utilization and results-file-vulcan captured GPU utilization. I'm not seeing anything standing out here, but wanted to share in case someone sees something I'm not. s-tui_log_2021-12-19_23_06_04.csv results-file-vulkan.csv

@kisak-valve Do you have any troubleshooting steps you'd like me to try in order to isolate the issue?

shoober420 commented 2 years ago

@RyanBlakeIT

Try running this command after installing everything.

sudo dpkg --remove --force-remove-reinstreq mesa

Keep in mind, running apt-get update might pull Mesa back in again. If it doesn't, just manually install it again after testing.

RyanBlakeIT commented 2 years ago

@shoober420 Appreciate the help. Please see below:

dpkg --remove --force-remove-reinstreq mesa
dpkg: warning: ignoring request to remove mesa which isn't installed

apt list *mesa* | grep install

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libegl-mesa0/focal-updates,now 21.0.3-0ubuntu0.3~20.04.5 amd64 [installed,automatic]
libegl-mesa0/focal-updates,now 21.0.3-0ubuntu0.3~20.04.5 i386 [installed,automatic]
libgl1-mesa-dri/focal-updates,now 21.0.3-0ubuntu0.3~20.04.5 amd64 [installed]
libgl1-mesa-dri/focal-updates,now 21.0.3-0ubuntu0.3~20.04.5 i386 [installed]
libglapi-mesa/focal-updates,now 21.0.3-0ubuntu0.3~20.04.5 amd64 [installed,automatic]
libglapi-mesa/focal-updates,now 21.0.3-0ubuntu0.3~20.04.5 i386 [installed,automatic]
libglu1-mesa/focal,now 9.0.1-1build1 amd64 [installed,automatic]
libglx-mesa0/focal-updates,now 21.0.3-0ubuntu0.3~20.04.5 amd64 [installed,automatic]
libglx-mesa0/focal-updates,now 21.0.3-0ubuntu0.3~20.04.5 i386 [installed,automatic]
mesa-va-drivers/focal-updates,now 21.0.3-0ubuntu0.3~20.04.5 i386 [installed,automatic]
mesa-vulkan-drivers/focal-updates,now 21.0.3-0ubuntu0.3~20.04.5 amd64 [installed,automatic]
mesa-vulkan-drivers/focal-updates,now 21.0.3-0ubuntu0.3~20.04.5 i386 [installed,automatic]

apt list *nouveau* | grep install

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libdrm-nouveau2/focal-updates,now 2.4.105-3~20.04.2 amd64 [installed,automatic]
libdrm-nouveau2/focal-updates,now 2.4.105-3~20.04.2 i386 [installed,automatic]
xserver-xorg-video-nouveau/focal,now 1:1.0.16-1 amd64 [installed,automatic]
shoober420 commented 2 years ago

@RyanBlakeIT

It looks like Mesa is packaged alot differently in Ubuntu than Arch/Gentoo. It appears like they split it apart quite a bit. Try doing this

sudo dpkg --remove --force-remove-reinstreq libegl-mesa0 libgl1-mesa-dri libglapi-mesa libglu1-mesa libglx-mesa0 mesa-va-drivers mesa-vulkan-drivers

I would also remove the nouveau packages as well, along with any other Mesa related things that get installed from the Steam dep list.

If Steam doesn't start after force uninstalling them, I would at least try to remove mesa-vulkan-drivers mesa-va-drivers xserver-xorg-video-nouveau libdrm-nouveau2

RyanBlakeIT commented 2 years ago

@shoober420 Looks like dpkg doesn't want me to do that:

dpkg --remove --force-remove-reinstreq libegl-mesa0 libgl1-mesa-dri libglapi-mesa libglu1-mesa libglx-mesa0 mesa-va-drivers mesa-vulkan-drivers
dpkg: dependency problems prevent removal of libegl-mesa0:amd64:
 libegl1:amd64 depends on libegl-mesa0.

dpkg: error processing package libegl-mesa0:amd64 (--remove):
 dependency problems - not removing
dpkg: dependency problems prevent removal of libgl1-mesa-dri:amd64:
 xorg depends on libgl1-mesa-dri; however:
  Package libgl1-mesa-dri:amd64 is to be removed.
 steam-libs-amd64 depends on libgl1-mesa-dri.

dpkg: error processing package libgl1-mesa-dri:amd64 (--remove):
 dependency problems - not removing
dpkg: dependency problems prevent removal of libglapi-mesa:amd64:
 libgl1-mesa-dri:amd64 depends on libglapi-mesa (= 21.0.3-0ubuntu0.3~20.04.5).
 libegl-mesa0:amd64 depends on libglapi-mesa (= 21.0.3-0ubuntu0.3~20.04.5).

dpkg: error processing package libglapi-mesa:amd64 (--remove):
 dependency problems - not removing
dpkg: dependency problems prevent removal of libglu1-mesa:amd64:
 xorg depends on libglu1-mesa; however:
  Package libglu1-mesa:amd64 is to be removed.

dpkg: error processing package libglu1-mesa:amd64 (--remove):
 dependency problems - not removing
dpkg: dependency problems prevent removal of libglx-mesa0:amd64:
 libglx0:amd64 depends on libglx-mesa0.

dpkg: error processing package libglx-mesa0:amd64 (--remove):
 dependency problems - not removing
dpkg: dependency problems prevent removal of mesa-va-drivers:i386:
 va-driver-all:i386 depends on mesa-va-drivers.

dpkg: error processing package mesa-va-drivers:i386 (--remove):
 dependency problems - not removing
(Reading database ... 155269 files and directories currently installed.)
Removing mesa-vulkan-drivers:amd64 (21.0.3-0ubuntu0.3~20.04.5) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
Errors were encountered while processing:
 libegl-mesa0:amd64
 libgl1-mesa-dri:amd64
 libglapi-mesa:amd64
 libglu1-mesa:amd64
 libglx-mesa0:amd64
 mesa-va-drivers:i386

dpkg --remove --force-remove-reinstreq libdrm-nouveau2
dpkg: dependency problems prevent removal of libdrm-nouveau2:amd64:
 xserver-xorg-video-nouveau depends on libdrm-nouveau2 (>= 2.4.38).
 libxatracker2:amd64 depends on libdrm-nouveau2 (>= 2.4.66).
 libgl1-mesa-dri:amd64 depends on libdrm-nouveau2 (>= 2.4.66).

dpkg: error processing package libdrm-nouveau2:amd64 (--remove):
 dependency problems - not removing
Errors were encountered while processing:
 libdrm-nouveau2:amd64

The irony is that I went with Ubuntu because it was said to be the only OS that's supported for PC with Steam as I have worked with gentoo for years (emerge is such a great package manager) and I didn't want to spend all day and night troubleshooting technical issues due to incompatibility. So much for that idea. :smile:

shoober420 commented 2 years ago

@RyanBlakeIT

Dang, I'm shocked it won't let you force uninstall anything. What a bummer lol. I also originally started using Debian because of compatibility too, but discovered that Steam runs just as well, or even better on other distros (even the Steam Deck is using Arch). Good to know Ubuntu locks everything down, I had no idea. I'm sure Nvidia will release a new driver fix soon.

Come to think of it, did you try the beta vulkan Nvidia drivers? I remember using these drivers instead of the normal ones.

https://developer.nvidia.com/vulkan-driver

RyanBlakeIT commented 2 years ago

@shoober420 I wish I had better news but I uninstalled the installed drivers (which were newer than the beta version) and installed the beta, but still having the same behavior. It stutters after a while of running, so I don't think it has to do with shader cache but something else.

@kisak-valve Any troubleshooting suggestions?

I ordered another SSD and will install either arch or gentoo on it (if you have a particular suggestion, let me know).

RyanBlakeIT commented 2 years ago

Installed Arch Linux with KDE Plasma but still having the stuttering issue after a while of gameplay.

At first it was stuttering while it cached the shaders, but after that finished, it became very smooth until after a couple rounds of DM when it dropped down to 60fps and was very choppy.

Got this error in console:

image

Resource materials/panorama/images/icons/equipment/world.svg failed to load. 0: Reinitialized 4 predictable entities

Manually typed the above because copy and paste isn't working for some reason. Screenshot from clipboard.

System Info: https://gist.github.com/RyanBlakeIT/818fc7a5c23e0b3e32d9067dc10a0155

lionblaze55 commented 2 years ago

@RyanBlakeIT I believe the issue that is unrelated to cache generation is being tracked in #2901

RyanBlakeIT commented 2 years ago

@lionblaze55 Didn't realize there was a separate issue created for this. Will repost there.

kleinermob commented 2 years ago

have you tried disabling Mangohud? For me Mangohud causes my fps to drop and stutter significantly when looking at smokes for some reason.

RyanBlakeIT commented 2 years ago

@kleinermob I'm not using Mangohud. Thanks for the suggestion, though.

fgf-23 commented 2 years ago

I can confirm the stuttering. It stutters a lot in the first few minutes, but gets gradually less over the next, like, 10 minutes, but still happens and is very annoying so I removed -vulkan again. I'm kinda surprised -vulkan was made to the public in this stutter state. My Launch Options: -novid -nojoy -nohltv -tickrate 128 +fps_max 144 -vulkan. I play on 64 players servers. Hardware: RX 6600 XT, 5600X CPU, B550 mainboard, NVME SSD. Software: Arch Linux with latest updates and default mesa 21.3.2-1, vulkan-radeon 21.3.2-1.

I remember one other game stuttering similarly extremely back before DXVK was a thing I think, namely Path Of Exile. The solution there worked and I had no stutters at all. I don't remember the solution, but using a search engine can maybe help in CSGO's case as well. But AFAIR it had something to do with shaders being compiled in realtime i.e. when they are required/used which caused the stutters, instead of in advance. POE is free to play to test the solution there, if someone want's to test it and maybe it can be transferred to CSGO's case.

ThaChillera commented 2 years ago

I never tried -vulkan before today's update, but I can confirm that after today's update there are still stutters. But, vulkan performs about 2,5x better than opengl, when not stuttering :) So please fix soon valve!

provokateurin commented 2 years ago

Wanted to try the latest update to see how much better the Vulkan performance is now, but for some reason my fps are locked to 60 now on Vulkan. On standard OpenGL they are not locked at 60 and I looked in the console and they are locked at 400 fps so it should definitely go over 60 fps. I did not change any setting between OpenGL and Vulkan.

romanstingler commented 2 years ago

@jld3103 have you updated any GPU driver? this is most likely a driver thing. give us some infos. which distro, gpu, driver, rebooted after updates?

provokateurin commented 2 years ago

I already tried vulkan a few days ago and my fps were not locked, so it's probably an issue with the update.

distro: arch linux
kernel: 5.16.1
gpu: ryzen 5 3400g/vega 11
driver: amdgpu
mesa: 21.3.4

I did after all updates, but let me try it.

EDIT: Reboot didn't help

provokateurin commented 2 years ago

@romanstingler should I open a new issue? My problem isn't directly related to the stuttering, but I guess to the update that should make it stutter less.

romanstingler commented 2 years ago

@jld3103 this is probably related to something in your system. (X11/Wayland session? GNOME/KDE or some other) I have Gnome on Wayland and the same specs here there is no vsync/fps cap.

Try setting the fps cap manually. Delete the shader caches (~/.cache/mesa_shader_cache and .steam/steam/steamapps/shadercache) Try using single shader cache file (set MESA_DISK_CACHE_SINGLE_FILE=1 in /etc/environment) try vblank_mode=0 as launch option - use this : vblank_mode=0 %command% -vulkan -fullscreen -nojoy -novid maybe as boot parameter amdgpu.ppfeaturemask=0xffffffff

if you have set everything reboot the pc

provokateurin commented 2 years ago

I tried setting the fps cap manually and a lower value than 60 worked. I was already using the single shader cache file. I'll try the other options when I have time later today.

provokateurin commented 2 years ago

I tried everything and it didn't help. I disabled mangohud and used the steam overlay for fps and it showed more than 60! I then added mangohud back and both reported 60 at most. I think I saw something about mangohud limiting fps sometimes. I wonder why it happened only after the update though :thinking: . Thanks for your help anyway :) Nice to see Valve finally embracing Vulkan.

provokateurin commented 2 years ago

As @LazinessCreator reported already, I also see a lot less stuttering without mangohud.

romanstingler commented 2 years ago

@jld3103 please consider these lines in the mangohud.conf

### VSync [0-3] 0 = adaptive; 1 = off; 2 = mailbox; 3 = on
# vsync=

it should be set to vsync=1 which is apparently OFF ... no comment But yeah without mangohud it is smoother.

provokateurin commented 2 years ago

Wut i have it set to 0 because i thought that means off. I have it also set to 0 for OpenGL and either it's different there too or it is just broken.

romanstingler commented 2 years ago

@jld3103 it is different, don't ask me I'm not the developer, but it is in the description

RyanBlakeIT commented 2 years ago

Wanted to report that I installed Manjaro (5.15 kernel with KDE Plasma) on this same computer but I installed a GeForce 1650 as I am gifting the computer to my brother-in-law (I built a new computer and used the GTX 2060 SUPER for it). I upgraded to the nVIDIA beta driver 510.39.01. After doing this, I played for over 30 minutes in deathmatch without any stuttering or performance degradation with -vulkan enabled. I do not use mangohud.

Munzu commented 2 years ago

Just got the newest update for CSGO and the Nvidia driver version 510.47.03.

When I first started the game, I had 20fps in the menu but that seemed to go away after I just opened the settings and now I can't reproduce it anymore. I still get some stutters where the screen freezes up for a split second but it's a lot less frequent than before. Before it was unplayable.

Also, now CSGO quits properly when I exit.

jr1991-g commented 2 years ago

This is my DXVK cache. I've been playing competitive for some time, almost no stutters. Just drop it in the shader cache folder and enjoy. csgo_linux64.zip

Edit: uploaded updated dxvk cache.