libretro / RetroArch

Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.
http://www.libretro.com
GNU General Public License v3.0
9.74k stars 1.77k forks source link

Linux wayland nvidia - high cpu usage when starting game #13623

Open andrewfader opened 2 years ago

andrewfader commented 2 years ago

So I have it recognizing vk_wayland but when I load a game I have high cpu usage like it's not using the gpu for vulkan rendering. Using the bsnes hd core.

[INFO] [Vulkan]: Found vulkan context: "vk_wayland".
[INFO] [Vulkan]: Detecting screen resolution: 2560x1440.
[INFO] [Vulkan]: Found GPU at index 0: "NVIDIA GeForce GTX 970".
[INFO] [Vulkan]: Using GPU index 0.
[INFO] [Vulkan]: Using fences for WSI acquire.
[INFO] [Vulkan]: Using GPU: "NVIDIA GeForce GTX 970".
[INFO] [Vulkan]: Queue family 0 supports 16 sub-queues.
[INFO] [Vulkan]: Using resolution 1864x1080.
[INFO] [Vulkan]: Using BGRA8888 format.
[INFO] [Vulkan]: Loading stock shader.
[WARN] [SDL]: Couldn't open haptic device of the joypad #0: Haptic: There are 0 haptic devices available
[INFO] [Joypad]: Found joypad driver: "sdl2".
[INFO] [Font]: Using font rendering backend: "freetype".
[INFO] [Video]: Found display server: "null".
[INFO] [PulseAudio]: Requested 24576 bytes buffer, got 18432.
[INFO] [Display]: Found display driver: "vulkan".
[INFO] [Environ]: SET_SUBSYSTEM_INFO.

Same problem with glcore

[INFO] [Video]: Set video size to: 1864x1080.
[WARN] [Wayland]: Compositor doesn't support zwp_idle_inhibit_manager_v1 protocol!
[WARN] [Wayland]: Compositor doesn't support zxdg_decoration_manager_v1 protocol!
[INFO] [EGL] Found EGL client version >= 1.5, trying eglGetPlatformDisplay
[INFO] [EGL]: EGL version: 1.5
[INFO] [GLCore]: Found GL context: "wayland".
[INFO] [GLCore]: Detecting screen resolution: 2560x1440.
[INFO] [EGL]: Current context: 0x3ce5ab68b51.
[INFO] [GLCore]: Vendor: NVIDIA Corporation, Renderer: NVIDIA GeForce GTX 970/PCIe/SSE2.
[INFO] [GLCore]: Version: 3.2.0 NVIDIA 510.47.03.
[INFO] [GLCore]: Using resolution 1864x1080.
[WARN] [SDL]: Couldn't open haptic device of the joypad #0: Haptic: There are 0 haptic devices available
[INFO] [Joypad]: Found joypad driver: "sdl2".
[INFO] [GLCore]: Loading stock shader.
[INFO] [slang]: Building pass #0 (N/A)
[INFO] [GLCore]: Not using frame history.
[INFO] [GLCore]: Not using framebuffer feedback.
[INFO] [Font]: Using font rendering backend: "freetype".
[INFO] [Video]: Found display server: "null".
[INFO] [PulseAudio]: Requested 24576 bytes buffer, got 18432.
[INFO] [Display]: Found display driver: "glcore".
[INFO] [Environ]: SET_SUBSYSTEM_INFO.
gouchi commented 2 years ago

Can you give us some feedback about high cpu usage with something like

while true; do echo -n "RetroArch ";ps -p `pidof retroarch` -o %cpu,%mem ; sleep 5; done

or

watch ps -p `pidof retroarch` -o %cpu,%mem

Thank you.

andrewfader commented 1 year ago
❯ while true; do echo -n "RetroArch ";ps -p `pidof retroarch` -o %cpu,%mem ; sleep 5; done
RetroArch %CPU %MEM
57.3  0.6
RetroArch %CPU %MEM
40.8  0.6
RetroArch %CPU %MEM
41.2  0.7
RetroArch %CPU %MEM
 196  2.8
RetroArch %CPU %MEM
 442  2.8
RetroArch %CPU %MEM
 572  2.8
RetroArch %CPU %MEM
 656  2.8
RetroArch %CPU %MEM
 718  2.9
RetroArch %CPU %MEM
 763  2.8
RetroArch %CPU %MEM
 808  2.8
RetroArch %CPU %MEM
 836  2.9
RetroArch %CPU %MEM
 861  2.8
RetroArch %CPU %MEM
 869  2.8
RetroArch %CPU %MEM
 880  2.8
RetroArch %CPU %MEM
 894  2.8
RetroArch %CPU %MEM
 909  2.8
RetroArch %CPU %MEM
 917  2.9
RetroArch %CPU %MEM
 923  2.8
RetroArch %CPU %MEM
 931  2.8
RetroArch %CPU %MEM
 941  2.8
RetroArch %CPU %MEM
 949  2.8
RetroArch %CPU %MEM
 957  2.8
RetroArch %CPU %MEM
 963  2.8
RetroArch %CPU %MEM
 970  2.8
RetroArch %CPU %MEM
 975  2.8
RetroArch %CPU %MEM
 976  2.8
RetroArch %CPU %MEM
 975  2.8
RetroArch %CPU %MEM
 981  2.8
RetroArch %CPU %MEM
 986  2.8
RetroArch %CPU %MEM
 991  2.8
RetroArch %CPU %MEM
 995  2.8
RetroArch %CPU %MEM
 998  2.8
RetroArch %CPU %MEM
1000  2.9
RetroArch %CPU %MEM
1003  2.8
RetroArch %CPU %MEM
1006  2.8
RetroArch %CPU %MEM
1007  2.8
RetroArch %CPU %MEM
1010  2.8
RetroArch %CPU %MEM
1013  2.8