ValveSoftware / Dota-2

Tracker for issues specific to Linux and Mac in the Reborn client. If you have a general issue or non-system-specific feature request please go to dev.dota2.com
469 stars 38 forks source link

[LINUX] After new patch, huge fps drop from 120-240 to 30-60, all lagging, its unplayable. No opengl #2264

Open koreanfan opened 1 year ago

koreanfan commented 1 year ago

Your system information

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. Before this patch all works good with opengl with 120-240 fps. With new patch no opengl and game launch with vulkan. Huge fps drops to 30-60, massive lags, vulkan eat more ram with every played match, pc start lagging and freezing cuz no available memory.

Steps for reproducing this issue:

  1. Update dota
  2. start match
  3. with every played match you got memory leak
  4. you need reboot if you want to free your ram
AngryPenguinPL commented 1 year ago

Yes, similar issue here. I've been trying to avoid Vulkan for the last few months and have been using OpenGL. On it I had a much higher FPS, stable even during powerful team fights. In addition, OpenGL did not give me graphics problems like Vulkan. To sum up, Dota with Vulkan is unplayable for me on Radeon RX580 8GB with Mesa 23.0.0.

I have some regrets and feel a bit cheated because I spent a lot of money on it in the last few years and now day by day the game became unplayable. It's a pity, because even on my older PC, where I had a very old Radeon HD5850, I could still play Dota on Linux with OpenGL smoothly on it. (I still have it and ran dota when I was coming back to my family home for the weekend). Interestingly, this Radeon will still allow to play Dota smoothly - but on Windows...

As for me, bad news about the abandonment of OpenGL.

arcsaber commented 1 year ago

tl;dr I also suffer from this mysterious memory leak, as far as I can see there are no fixes besides buying more ram. It seems that the ram fills up slower if shader precaching is enabled and my graphics settings are lowered.

voronind commented 1 year ago

I preffered OpenGL. It worked better. Now it's unplayable.

FanFanFantastic commented 1 year ago

Dear Devs, Why would you drop openGL support!? Game is so dark running on Vulkan, and it's now unplayable

riloraspopo commented 1 year ago

ryzen 5500u Vega 7, got same problem... everything its fine on opengl. but after using vulkan, fps drop and unplayable i guess...

in same setting 1080p high setting, open gl got 60fps constant some time spike 53... but on vulkan. just got 48 and spike near to 20...

running on endeavoros.. try changing driver, kernel, and still no luck.. should i back again to windows...?

kamikazechaser commented 1 year ago

Same issue running on MXLinux Ryzen 4650G APU. Used to run 60fps capped on OpenGL med settings. Now I'm consistently getting anywhere between 29-40. The main dashboard FPS is even worse even when the animations and videos are disabled. Shutting down the game also takes forever.

Not sure if OpenGL was considered too legacy to maintain internally...it did work properly...enough to justify any overhead in maintenance. Vulkan seems like a hit or miss on Linux right now.

eazy12 commented 1 year ago

Actually fells better for me after patch - I used Vulkan for years (Fedora 37, Intel i5-4690, Nvidia 750 Ti). Did you try to let Vulkan compile the cache and let it store in Steam's settings? As I know Vulkan is trying to cache things, probably is busy with that.

OpenGL is fine with Dota 2 but generally slows Valve's work on Source 2 and support of Proton.

AngryPenguinPL commented 1 year ago

@eazy12

Actually fells better for me after patch - I used Vulkan for years (Fedora 37, Intel i5-4690, Nvidia 750 Ti). Did you try to let Vulkan compile the cache and let it store in Steam's settings? As I know Vulkan is trying to cache things, probably is busy with that.

OpenGL is fine with Dota 2 but generally slows Valve's work on Source 2 and support of Proton.

Maybe because you are using nvidia card.

And yes I always wait for the game to compile vulkan shaders before launching it. It's not help. The Vulkan implementation in Dota has clear problems with AMD cards or maybe it's a problem with RADV - I don't know but for sure smth is horrible broken that make this game unplayable.

BTW. there is even mesa bug where is mentioned that in Dota Vulkan works worse than OpenGL - but the title suggests only 10-20%, which for me is a much bigger difference than 20%... https://gitlab.freedesktop.org/mesa/mesa/-/issues/8075

k1ake commented 1 year ago

Maybe because you are using nvidia card.

Nah, i've got 1070ti and it got really poor performance on vulkan so i had to use opengl. But now i've got no choice and had to use it.

Even on lowest possible settings with dropped down resolution i have huge lags when spells with lots of particles are casted and fps drops on camera movement :P

DarrenMcG1 commented 1 year ago

Also getting crashes on Arch with mesa and mesa-git. Game crashes if I go over 60-70fps but if I have it set to 60 max it is 'playable'

Journal entry:

Process 19293 (dota2) of user 1000 dumped core.

                                                  Stack trace of thread 19296:
                                                  #0  0x00007f8d7b26718b n/a (/run/host/usr/lib/amdvlk64.so + 0xa6718b)
                                                  ELF object binary architecture: AMD x86-64
kisak-valve commented 1 year ago

Hello @DarnMik, amdvlk64.so is a pretty clear indicator that you're using AMDVLK with the game, not mesa. It would be worthwhile to also test what happens when you run the game with mesa/RADV.

DarrenMcG1 commented 1 year ago

Hi @kisak-valve, Ah so it is! I have removed the amdvlk package and I can have my settings maxed again without crashing but I still only get max 60fps before the last patch I was getting ~180

gmelikov commented 1 year ago

+1, Debian testing, Ryzen 5800u, just basic "install" without any custom changes with AMD drivers. openGL version was far more stable.

Not a scientific observation, but on vulkan any effect like fire, light or "magic skill effects" will affect FPS very much (great example - intro about "Muerta" new character which have a ton of such effect, it was 1-2FPS). So, even max settings worked pretty "well" until any of such effects used.

Happy to try to get any artifacts, if you pin me at some docs to use them.

ax-ross commented 1 year ago

Same problem, after remove opengl I have terrible lags.

Weirdo1312 commented 1 year ago

I have this problem too with an RX 580, not only the fps is bad but the frametimes are also super unstable even on the lowest possible settings and with using a frame rate limiter https://gist.github.com/barfin/c6f335f74740efc3b28f0b2c030e86d6 image

danginsburg commented 1 year ago

Can those of you experiencing problems report if adding -vulkan_disable_steam_shader_cache to your Launch Options improves things for you?

Weirdo1312 commented 1 year ago

Can those of you experiencing problems report if adding -vulkan_disable_steam_shader_cache to your Launch Options improves things for you?

i tried it and it changed nothing

AngryPenguinPL commented 1 year ago

@danginsburg No changes for me with -vulkan_disable_steam_shader_cache

What do I have to add.

See these screenshots with mangohud for me on Radeon RX580 8GB, fps is weak, but importantly gpu usage is very low. And shouldn't it be like that?

Screenshots ![Screenshot_20230322_173034](https://user-images.githubusercontent.com/3121142/226973934-37321242-9745-4ba1-bfb4-ef137b7ef3c8.png) ![Screenshot_20230322_173045](https://user-images.githubusercontent.com/3121142/226973941-74e67647-3e8d-4b64-af21-a7d29ad520bc.png) ![Screenshot_20230322_173054](https://user-images.githubusercontent.com/3121142/226973943-c8fd0985-8b26-4ae3-bc6c-a94bfa4e1d4b.png) ![Screenshot_20230322_173122](https://user-images.githubusercontent.com/3121142/226973947-99ea563e-4a80-4e33-9cfc-324ada562aca.png)
koreanfan commented 1 year ago

Today i tested dota 2 on arch linux with mesa 23 and amdvlk 2022.Q4.4-3. Almost no difference, but with amdvlk i got little higher fps and less lags. With amdvlk also i got memory leak. If i try launch steam with mesa 23 radv and use command RADV_PERFTEST=gpl then game totally freezing with 10-25 fps, slideshow, almost all ram was eaten from 1-2 minutes, system lagging like a shit, only trash slideshow. I think issue with memory leak can not be fixed because developers from mesa, vulkan, amd and valve just don't want do it, cuz for them its easier redirect issue from one to another and don't spent time for fixing it. Also why they use garbage vulkan api in dota??? I lost double-triple fps, from 120-240 fps to 30-60 fps. Just bring back opengl to dota, we don't need this vulkan on linux and macos. Also i install windows 10 22h2 with latest updates and with latest amd video driver and with directx i got 100-200 fps (even with opengl on linux i got more fps 120-240). And this trash vulkan on windows gave me 70-100fps with lags. I dont know why i am write this, anyway developers didn't read this...

kamikazechaser commented 1 year ago

No improvements on my end after disabling shader cache. For those interested, this is also being tracked on the mesa repos -> https://gitlab.freedesktop.org/mesa/mesa/-/issues/8075

zmike commented 1 year ago

Does anyone have a simple way to reproduce this? Ideally from a demo game since I doubt anyone's going to appreciate me stopping the game in my debugger while playing ranked?

Do any graphical settings affect this at all? Can some people who have the issue post their graphics settings?

Weirdo1312 commented 1 year ago

Does anyone have a simple way to reproduce this? Ideally from a demo game since I doubt anyone's going to appreciate me stopping the game in my debugger while playing ranked?

Do any graphical settings affect this at all? Can some people who have the issue post their graphics settings?

I haven't found a reliable way to reproduce this bug but i remember it happening when i using max settings in a bot match it was all fine until the timer reached 00:00 and the runes appeared

hansbogert commented 1 year ago

Can confirm, max settings on 580 with vulkan was pretty smooth dips to 80-90. Now it's dips to 40 and in general a micro stutters all over the place after the Muerta update.

zmike commented 1 year ago

Okay, repro method aside, is anyone experiencing this issue with a driver that is not RADV?

AngryPenguinPL commented 1 year ago

Okay, repro method aside, is anyone experiencing this issue with a driver that is not RADV?

RX580 8GB with mesa radv and amdvlk gives me almost same performance. No difference... Radv when game start about +30 FPS Radv in team fights 10-25

amdvlk when game start ~30 Amdvlk in team fight 10-30

zmike commented 1 year ago

Okay, repro method aside, is anyone experiencing this issue with a driver that is not RADV?

RX580 8GB with mesa radv and amdvlk gives me almost same performance. No difference... Radv when game start about +30 FPS Radv in team fights 10-25

amdvlk when game start ~30 Amdvlk in team fight 10-30

Interesting. Do you have resizable BAR enabled?

AngryPenguinPL commented 1 year ago

Okay, repro method aside, is anyone experiencing this issue with a driver that is not RADV?

RX580 8GB with mesa radv and amdvlk gives me almost same performance. No difference... Radv when game start about +30 FPS Radv in team fights 10-25 amdvlk when game start ~30 Amdvlk in team fight 10-30

Interesting. Do you have resizable BAR enabled?

Unfortunately not.

zmike commented 1 year ago

I suppose that's a tough ask for GPUs of that generation.

Alright, so amd in general from the 5XX/apu series and then I saw someone reporting the issue with a Nvidia 10XX. Anyone seeing the issue who isn't covered by one of these GPU types?

AngryPenguinPL commented 1 year ago

@zmike I don't know if it's hard for the gpu, but I don't think so. See my post above. I have given screenshots there (they are wrapped) which show the GPU usage and it is very low. https://github.com/ValveSoftware/Dota-2/issues/2264#issuecomment-1479905949

It seems to me that if the GPU could not cope, the GPU usage would be high. Meanwhile, I have a few %. While CPU utilization is also around 40-50% so the CPU is not a bottleneck either. Of course, the problem may relate to a specific generation of GPUs - because most people report problems on Polaris.

But the gpu itself works fine in other games. Dying Light 1 or 2 in Proton, Hunt Showdown, Witcher 3 New gen update or Vampire: The Masquerade – Bloodhunt etc work flawlessly. In the dota itself in opengl it worked very well, less so in vulkan. But with the muerta update vulkan became unplayable, and the game did not get improved graphics requiring a stronger system. Something went wrong with this update.

hansbogert commented 1 year ago

New update without dead reckoning, et voila, back to normal for me!

AngryPenguinPL commented 1 year ago

Yes, now works much better. 65 fps instead 25 but still worse than on OpenGL :(

rosshadden commented 1 year ago

Unfortunately ever since the Muerta update, attempting to demo any heroes or play any arcade games result in Dota crashing. I know that's not directly answering your question but it is frustrating. Especially since I am a lab monster, constantly practicing and experimenting.

On Thu, Mar 30, 2023, 16:55 Mike Blumenkrantz @.***> wrote:

Does anyone have a simple way to reproduce this? Ideally from a demo game since I doubt anyone's going to appreciate me stopping the game in my debugger while playing ranked?

Do any graphical settings affect this at all? Can some people who have the issue post their graphics settings?

— Reply to this email directly, view it on GitHub https://github.com/ValveSoftware/Dota-2/issues/2264#issuecomment-1490947109, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFDKVARUFAJBK25MXIXTXTW6XXMHANCNFSM6AAAAAAVSCCQWQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

zmike commented 1 year ago

We're working on this actively, even if we're not replying to everyone. Keep the reports coming, ideally with specific in-game scenarios where you've noticed issues.

Also for anyone new commenting, please provide all of your system specs including GPU/CPU/RAM, GPU driver version, desktop environment.

ProtonAbyss commented 1 year ago

I'm having trouble connecting to matches initially in both the character select and also when the match starts.

In the character select, it will display a black screen and then disconnect me after about 20 seconds. When I reconnect, it will show a static character select screen that I cannot interact with for some time.

When the match starts, it will again show a black screen with no indication that things will resolve.

This happens with or without shader precatching and on a fresh OS install. It's gotten progressively worse since the latest update that removed the Muerta event.

In addition to the above problems, random crashes during effects will happen, such as if someone uses glimmer cape, but this has been a reoccuring issue with Dota 2 for many years on linux.

System: Kubuntu 22.04 CPU: Xeon X5675 Memory: 24 GB GPU: GTX 970 Nvidia Driver: 525.89.02

Edit: It seems things are resolved now. Similar to the comment below me, I'm getting smooth fps and no longer see the black screen. Things also seem more stable now.

Weirdo1312 commented 1 year ago

I played some matches and frame times were pretty smooth and the fps was stable and around 90

OS: Arch Linux CPU: I5 4690 Memory: 12 GB DDR3 GPU: AMD RX 580 Kernel: 6.2.10-zen1-1 vulkan driver: radv 23.0.2

kamikazechaser commented 1 year ago

FPS has improved after the recent update (From 25-30 -> 45-60), however I still need to restart after a couple games (4-5 turbos) because the FPS starts dropping back to 25.

OS: MX Linux CPU: Ryzen 4650G APU Memory: 16 GB GPU: Renoir APU (See CPU) Kernel: 5.10.52-antix.1-amd64-smp Mesa: 22.0.5

ProtonAbyss commented 1 year ago

The latest update has introduced a new bug: My computer is now freezing often. It happens randomly during matches (10-20% of my games).

It's not a complete computer freeze, but rather a situation where my keyboard and the desktop environment become unresponsive (cannot close dota) and the dota screen becomes static (no longer animating). The mouse tracking/cursor works, however I cannot send mouse click events.

Since dota seems to be preventing mouse and keyboard button events from being sent to the system, I cannot close dota or even use reisub to safely reboot the computer. I have to resort to a hard shutdown.

edit: This is not a Dota bug. It happened outside of dota 2.

kisak-valve commented 1 year ago

Hello @ProtonAbyss, sys-req hotkeys should be handled entirely by the kernel. As far as I know, userspace can't interfere with it. Your issue is unrelated to the issue reported here. Please open a separate issue report.

klllr commented 1 year ago

don't know if the new update caused the same problem for me, or it was the previous one (since i haven't played since mid-2022), but my framerate dropped from stable ~140ish to ~75/40 on radv and to ~95/60 on amdvlk (where the first number represents starting fps, and the second one is for mid-/late-game) on the lowest preset possible (with all checkboxes disabled, rendering still at 100% though).

AMD ryzen 1600x, AMD radeon 5700XT, 48GB ram, arch linux, mesa 23.0.2-2, amdvlk 2022.Q4.4-3, wayland/sway (i guess i could win some fps by upgrading the cpu, but it wasn't an issue before, so i don't know if this is a correct course of action to solve what seems to be a software issue with a hardware upgrade :-)

with both radv and amdvlk there are microfreezes when spells/items animations are being displayed, but on amdvlk the freezes are much rarer, e.g the new grenade causes game to stutter on the first use, but all (or most of them) consequent uses are smooth, while freezing in radv happens pretty much every single time this or any other spell is being cast.

(vulkan_disable_steam_shader_cache doesn't change anything in both cases it seems)

on the other hand, between mid-2022 and today i've underclocked my ram by about 400 MHz to increase system stability, so the freezes can probably be attributed to that, but i don't think 50% fps drop can be explained by this. anyway, i'll try to overclock ram and see if there's any effect and will write an update

upd: seems like 7.33b solved the issue for me

fry- commented 1 year ago

I have the same issues described here: Lower FPS than it used to be (60 -> 30 FPS with same settings) and FPS start to get lower with every game played. I noticed it since the last days of the Muerta event game.

Here are the computer specs: PC with GT1030 graphics

I've also tested on two other computers.

Cippo95 commented 1 year ago

Game micro-stuttering all the time. dota2_issue

OS: Fedora 37 CPU: AMD Ryzen 5 3500X GPU: NVIDIA RTX 2060 Super GPU Driver: 525.116.03

StellarHarbour commented 1 year ago

Replying to https://github.com/ValveSoftware/Dota-2/issues/2264#issuecomment-1545885385

What you using to show this overlay?

Cippo95 commented 1 year ago

@SegoItCh It is called MangoHud: https://github.com/flightlessmango/MangoHud
You can configure it easily with Goverlay: https://github.com/benjamimgois/goverlay

Cippo95 commented 1 year ago

I think that I have found the issue for me and it was caused by playing alone vs bots.
Playing in a custom lobby connects you to a server with bots and the game works fine.
Probably while playing alone all the bots are controlled by the CPU and this makes the game stutter (a lot).

It would be good to make clear that performances can be degraded when selecting to practice alone.

metaory commented 1 year ago

opengl support must continue to work with -gl launch option.

its not btw!

metaory commented 1 year ago

ok the FPS drop is not as bad once you allow processing of vulkan shaders to complete

still it's a significant FPS drop

ahmafi commented 1 year ago

The game is almost unplayable, I get fps drop about every minute. No matter what heroes are in the game. Adding -vulkan_disable_steam_shader_cache didn't change anything.

System Information ``` Processor Information: CPU Vendor: GenuineIntel CPU Brand: 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz CPU Family: 0x6 CPU Model: 0x8c CPU Stepping: 0x1 CPU Type: 0x0 Speed: 4700 Mhz 8 logical processors 4 physical processors HyperThreading: Supported FCMOV: Supported SSE2: Supported SSE3: Supported SSSE3: Supported SSE4a: Unsupported SSE41: Supported SSE42: Supported AES: Supported AVX: Supported AVX2: Supported AVX512F: Supported AVX512PF: Unsupported AVX512ER: Unsupported AVX512CD: Supported AVX512VNNI: Supported SHA: Supported CMPXCHG16B: Supported LAHF/SAHF: Supported PrefetchW: Unsupported Operating System Version: "Fedora release 37 (Thirty Seven)" (64 bit) Kernel Name: Linux Kernel Version: 6.2.11-200.fc37.x86_64 X Server Vendor: The X.Org Foundation X Server Release: 12201009 X Window Manager: GNOME Shell Steam Runtime Version: steam-runtime_0.20230118.0 Video Card: Driver: NVIDIA Corporation NVIDIA GeForce MX450/PCIe/SSE2 Driver Version: 4.6.0 NVIDIA 525.105.17 OpenGL Version: 4.6 Desktop Color Depth: 24 bits per pixel Monitor Refresh Rate: 59 Hz VendorID: 0x8086 DeviceID: 0x9a49 Revision Not Detected Number of Monitors: 2 Number of Logical Video Cards: 1 Primary Display Resolution: 1536 x 864 Desktop Resolution: 1536 x 1728 Primary Display Size: 18.90" x 10.63" (21.65" diag) 48.0cm x 27.0cm (55.0cm diag) Primary VRAM: 2048 MB Sound card: Audio device: Realtek ALC257 Memory: RAM: 15763 MB VR Hardware: VR Headset: None detected Miscellaneous: UI Language: English LANG: en_US.UTF-8 Total Hard Disk Space Available: 242557 MB Largest Free Hard Disk Block: 23550 MB Storage: Number of SSDs: 2 SSD sizes: 1000G,256G Number of HDDs: 0 ```
Banthex commented 1 year ago

My game is completly unplayable now with vulkan. I have a 7900 xtx with arch. Great job valve.

fry- commented 1 year ago

Hello again, I've changed my hardware a bit and reinstalled Windows 10 and Lubuntu 22.04 as dual boot on that machine. System Information can be found here. Now I can directly compare Windows and Linux performance with the same hardware:

It really feels unplayable in Linux now and it makes me sad that I have to use Win10 for Dota2.

dmknght commented 1 year ago

Same here. I set FPS limit to 150. I got 70-90 FPS when I played early game stage, and about 40-60 during late game. Now I only get 40 when the match starts

Now I can directly compare Windows and Linux performance with the same hardware:

    Windows with DirectX11: Best quality option results in ~60 FPS, lowest quality option results in ~110 FPS
    Linux with Vulkan: Lowest quality option results in ~30 FPS with small screen freezes (< 1 sec) every minute or so

When the game used OpenGL, the performance was similar on my PC. I read somewhere that Vulkan is the reason of memory leak and performance issue