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
471 stars 38 forks source link

Linux: low FPS on both 3080 and 6900XT #2367

Open pshirshov opened 1 year ago

pshirshov commented 1 year ago

Your system information

Please describe your issue in as much detail as possible:

I have a Threadripper 3970X system with NVidia 3080 and Radeon 6900XT. Both cards are connected to x16 PCIe 4.0 slots. I'm using 144Hz 4K display.

Under Windows the game makes 200+ FPS on 3080 and about 190 FPS on 6900XT. That's with "best looking" settings.

Under Linux the game makes about 70-90 FPS on both 6900XT and 3080. I tried both Wayland and X11 sessions, various resolutions, various quality settings. Even in windowed 1280x720 mode with lowest quality and AMD FidelityFX on it still would be 70-90 FPS.

I don't observe such behavior with other games, e.g. Quake RTX makes 20 FPS with 4K and RTX at max under Linux and 17 FPS on Windows. Without RTX it makes 1000+ FPS under both OS.

Just in case I tried to run the system with just one card, it doesn't make any difference.

I've tried to change adaptive sync and refresh rate settings in KDE, it doesn't make any difference.

Switching between amdvlk and mesa vulkan doesn't make any difference.

Another observation is that amdgpu-top shows that the GPU load never exceeds 70% and power consumption never exceeds 80W. The CPU is literally idle.

Thermals are not an issue at all, the cards are water cooled.

So, clearly something is very wrong with dota. It's barely playable...

dinhokusanagi commented 1 year ago

Captura de tela de 2023-06-18 17-44-32 Captura de tela de 2023-06-18 17-45-20

danginsburg commented 1 year ago

Does reducing the number of threads make a difference - for example adding -threads 16 to your command line?

dinhokusanagi commented 1 year ago

It makes no difference, Dota only runs well on my machine on Microsoft Windows is 160fps

pshirshov commented 1 year ago

Seems like it doesn't make any significant difference. The game underperforms significantly but the hardware is underloaded.

Screenshot_20230619_145007

dinhokusanagi commented 1 year ago

Until the end of the match this number of FPS tends to fall a lot

pshirshov commented 1 year ago

In my case there is no performance degradation during the matches but I'm extremely disappointed by overall performance under Linux.

dinhokusanagi commented 1 year ago

In case I have it, I start the match with 100fps and finish with an average 30 SPF with many work on the screen

dinhokusanagi commented 1 year ago

This problem is old and honestly already lost hopes of Valve to conceive

pshirshov commented 1 year ago

Reducing threads number to one has significant performance penalty, framerate drops to 30-50 but the core is still underloaded. For me it looks like there is some kind of a logging routine or sleep call which breaks things.

dinhokusanagi commented 1 year ago

I believe that if Valve allowed the Dota Wheel to Proton, it could be a faster solution

pshirshov commented 1 year ago

The menu doesn't suffer from this problem though, it shows 200+ FPS.

pshirshov commented 1 year ago

After some experiments I figured out that "performance" frequency governor and manual overclock might improve situation significantly.

I locked my multiplier at 42 instead of default 37 and set governor to performance, so now I'm getting between 100-150 FPS.

I guess that the actual problem is that for some strange reason Dota can't load cores enough for turbo boost to kick in.

bugreportsupplier commented 9 months ago

I'm experiencing a similar issue after upgrading from an i7-8700K (6c/12t) + 1080 Ti (~5 y.o system) to a Threadripper 7970x (32c/64t) + 4090 this December. Previously, the game used to run at 130 to 170 FPS, but after the upgrade, the FPS decreased to around 80-50, with drops to as low as 35 frames. I have a 165Hz monitor, so I'd ideally like to run the game at 160+ average FPS.

After some tinkering, I was able to significantly improve the situation by using taskset and limiting the number of threads to 8. The following launch command increased my FPS to around 115-130 in the game and 260 in the Demo mode: taskset -c 0-7 %command% -threads 8 . Using 8 threads seems to be a sweet spot for my system, since decreasing the count slightly lowers the performance, while increasing the count to 10, 12, or more significantly degrades it. Note that I also tried swapping the GPU for the old 1080 Ti, but did not observe meaningful changes in the results.

pshirshov's observation about cores being underclocked is pretty interesting. Looking at the graphs, I can see the 8 cores allocated to Dota boost up to 4.8Ghz throughout the testing, but never consistently and at the same time. After running the baseline tests, I tried switching my governor to performance from the default powersave mode using cpupower. This resulted in more consistent boosts across the 8 cores used by Dota, with at least 6 of them running at 4.8GHz, and occasionally boosting up to 5.2GHz. Unfortunately, this didn't have a huge effect on the FPS, but it did help to improve the lows.

To summarize for anyone looking for solutions: