RPCS3 / rpcs3

PlayStation 3 emulator and debugger
https://rpcs3.net/
GNU General Public License v2.0
15.33k stars 1.91k forks source link

Unstable GPU performance in Bomberman ULTRA + Race the sun (OpenGL) #12741

Open spiraluc opened 2 years ago

spiraluc commented 2 years ago

Quick summary

When bomberman is maximalized, the RSX utilization GPU is ~70% & CPU ~60%, real HW utilization from HWmonitor is GPU ~78% CPU ~63%, however emulator have only 40FPS. When bomberman is minimalized the real HW utilization from HWmonitor grows up to GPU ~100% & CPU ~75%, however FPS grows to 56FPS.

This is the only game that behaves like this. Other games still perform the same regardless of maximized/minimized.

Some games (for example Race the sun-NPUB31532) behave a bit similarly, the GPU is not used anywhere near to the maximum (real or RSX utilization), but the emulator cannot reach 60FPS.

You can see everything in the attached photos.

(my pc is slow so i don't know if the problem is replicable)

Details

No response

Attach a log file

RPCS3log.zip

Attach capture files for visual issues

maximalized

minimalized

Race the sun

System configuration

CPU: Intel core i5 2430M GPU: NVIDIA GT525M (openGL 4.6 only) (driver v391.35) RAM: 8GB WIN 10 (v21H1)

Other details

No response

kd-11 commented 2 years ago

OpenGL window management is a black box, the driver is responsible for most of the behaviour there, not us. Unlike vulkan, there is very little you can control about how windows behave with OpenGL. The only thing we set is the size of the viewport. What I can suggest is to create a rpcs3 profile in NVIDIA control panel and create an aggressive profile with vsync disabled and all the performance optimizations turned on. NVIDIA's OpenGL driver is already really slow compared to Vulkan/DX11/DX12 on the same hardware.

spiraluc commented 2 years ago

I created an aggressive profile for the GPU, but it had no noticeable effect. It is interesting that when I click through the menu in game, there is a lag between each click and a short drop to 0 FPS.

Also, in the ``customization menu'' where there are only a few pictures, including a few flashing ones, the GPU utilization is low, but the FPS are extremely low. snapshot

kd-11 commented 2 years ago

You seem to have the exact same laptop I had many years ago, it is buried somewhere in storage. Dell inspiron 15R n115. The first thing with these laptops is that the NVIDIA card works as a "3D accelerator". It doesn't actually draw to the screen, the intel GPU does that. There is a mux between the 2 cards that is very finicky. The first thing I would try is to connect to HDMI using the port on the side of the laptop, that will connect directly to the NVIDIA display and bypass intel.

spiraluc commented 2 years ago

You are right that intel somehow cooperates with nvidia(they even shared the same IRQ addresses). INTEL utilization in HWinfo grows a little in every game, but not much. Snímek

So I tried the VGA and HDMI port, but it seems that intel cannot be bypassed. It didn't help, because these ports always connect the monitor to the intel. VGA HDMI

When I stop race the sun, I get some unusual errors. {Performance Sensor} PERF: Failed to get per core cpu usage: A counter with a negative denominator value was detected. (0x800007d6) E 0:01:56.406768 SIG: Thread [rsx::thread] is too sleepy. Waiting for it 23740.938µs already! ·E 0:01:56.430682 SIG: Thread [rsx::thread] is too sleepy. Waiting for it 47650.705µs already! ·E 0:01:56.478172 SIG: Thread [rsx::thread] is too sleepy. Waiting for it 95132.224µs already! RPCS3 perf.log Once i get error like this: ·F 0:03:23.828174 {RSX [0x00531f0]} SIG: Thread terminated due to fatal error: Unknown register name: unk (in file C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\rpcs3\Emu\RSX\GL\GLCommonDecompiler.cpp:36[:23], in function get_varying_register_location) RPCS3 error.log

I ran several OGL benchmark tests in program GPU Caps Viewer. NVIDIA (OGL 4.6 support) clearly won most of the test, but INTEL (OGL 3.2 support) almost always won in the OGL 3.X tests. Looks like nvidia doesn't like OGL 3.X rendering.

triangle intel triangle intel triangle nvidia triangle nvidia RGB triangle intel RGB triangle intel RGB triangle nvidia RGB triangle nvidia

Draw stress tests have the same FPS.

draw stress test intel draw stress test intel draw stress test nvidia draw stress test nvidia

spiraluc commented 2 years ago

Intel and Nvidia cooperation probably won't be the main problem. I tried the old build (rpcs3-v0.0.12-10950-264df111_win64) and it had much higher performance everywhere in the game. Unfortunately, I don't know exactly which build caused this.

RPCS3old.log ingame old ingame old ingame new ingame new game choose old game choose old game choose new game choose new customization menu old cust  menu old customization menu new cust  menu new

kd-11 commented 1 year ago

I'm not able to reproduce this. It is likely a CPU issue. You'll have to bisect to identify the offending commit. https://wiki.rpcs3.net/index.php?title=Help:Using_different_versions_of_RPCS3#How_to_find_the_build_that_caused_a_regression?

spiraluc commented 1 year ago

I tried to find the build that caused it and found out that the biggest FPS drop was caused by 'Initial Linux Aarch64 port (PPU only) #11315' (rpcs3-v0.0.20-13178-580bd2b2_win64).

RPCS3 old.log

game choose old

RPCS3 new.log

game choose new

(Maybe this whole problem is caused by the PPU decoder.)