RetroArch icon indicating copy to clipboard operation
RetroArch copied to clipboard

[gl/glcore/vulkan] RA menu uses 100% of GPU resources in fullscreen mode (G-sync related)

Open felixlang opened this issue 4 years ago • 2 comments

Edit: This is a G-sync related problem. I was mistaken in the OP when I thought that G-sync had no effect.

When G-sync is enabled in Fullscreen mode or in Fullscreen+Windowed mode in the GPU driver settings, then the RetroArch menu will have this problem of 100% GPU usage. If G-sync is disabled at the driver level, then GPU usage by RA is normal.

The only RA setting that seems to have some effect is "Max swapchain images" under Video -> Synchronization. With that setting at 3 (default) or 4, GPU usage is at 100%. When set at 1 or 2, then the GPU sits between 85-95% instead. Changing RA's v-sync swap interval setting has no effect at all.

Even if v-sync is disabled in the RA video settings, the RA menu will still use 100% of the GPU, as long as G-sync is enabled at the video driver level.

Description

While sitting in the RetroArch menu, using either the gl, glcore, or vulkan video drivers, the retroarch.exe process is using 100% of my GPU. This only happens when RA is in either exclusive fullscreen or windowed fullscreen mode. When using normal windowed mode, the GPU usage is greatly reduced (around 5-10% on average, although it will spike upward to a sustained 30-33% after a minute or so, even if RA is only sitting idle in the background).

Once any piece of content is loaded, GPU usage drops to normal levels depending on the core in use. Then when the content is closed and the RA menu is reloaded, GPU usage spikes back up to 100% again.

Alt-tabbing away from RA causes GPU usage to drop, until the window is refocused.

This problem occurs with every RA menu driver (tested ozone, xmb, rgui, glui). It does not occur when using the D3D11 video driver.

My GPU is a Nvidia GTX 980 Ti with the latest driver installed (445.75). My monitor is an Acer Predator with hardware G-sync support.

Expected behavior

The RetroArch menu should only need minimal GPU resources to operate.

Actual behavior

The RetroArch menu always uses 100% of GPU resources.

Steps to reproduce the bug

  1. Start RetroArch in fullscreen or windowed fullscreen mode, using the gl, glcore, or vulkan video drivers.
  2. Check GPU usage with any hardware monitor (I am using Microsoft's Process Explorer v16.31)

Bisect Results

[Try to bisect and tell us when this started happening]

Version/Commit

You can find this information under Information/System Information

  • RetroArch: 1.8.5 stable / Mar 19 2020 / 532fd88e2f

Environment information

  • OS: Windows 7 Pro 64-bit SP1 (all updates installed)
  • Compiler: MinGW 9.2.0 (64-bit)
  • Intel core i7 6700K CPU @4.00 GHz

felixlang avatar Apr 02 '20 07:04 felixlang

I cannot seem to reproduce what you are experiencing, my GPU usage sits at a mere 2% when navigating the menu - although I am on Windows 10 with a newer Nvidia card (2070 Super). Can you check and see if RA is set to "prefer maximum performance" or if there's some other personalized setting in the nVidia Control Panel that could be affecting this?

Ryunam avatar Apr 02 '20 12:04 Ryunam

I cannot seem to reproduce what you are experiencing, my GPU usage sits at a mere 2% when navigating the menu - although I am on Windows 10 with a newer Nvidia card (2070 Super). Can you check and see if RA is set to "prefer maximum performance" or if there's some other personalized setting in the nVidia Control Panel that could be affecting this?

Using Nvidia Profile Inspector 2.1.3.20 to check the settings for retroarch.exe, all of the basic settings are at their defaults, with the exception of Threaded Optimization. That was set to "Off" for some reason. However I changed it back to the default "Auto" and also tried setting it "On" but this made no difference, and I am still getting 100% GPU usage by RA in fullscreen regardless of that setting.

"Power Management Mode" is set to the default "Optimal Performance" setting. I tried changing it to "Adaptive" but this also made no difference.

The only settings that are not at the defaults are a couple of the "Other" entries. Although these changes were not made by me - likely presets by Nvidia. Two of the changed settings are related to Optimus, which would make no difference on my system since I only have a single GPU. There is also an "Unknown" setting that has been changed - "0x2082C57D" is set to "0x00000005" which is a shared setting for 72 different profiles.

felixlang avatar Apr 03 '20 00:04 felixlang

I have a similar issue on AMD (2d:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Device 73ef (rev c1). Using i3 if the retroarch windows was maximized (not displayed and the emulation paused) it used ~30-40% of my GPU. adding another window to that (invisible!) workspace and making RA not fullscreen lowers the gpu use to ~2-3%

Using Vulkan GPU API. I can check other output combinations and try to disable freesync if it'd be helpful.

High use persists whether I'm in menu or the game is autopaused.

barnaba avatar Aug 28 '23 16:08 barnaba