Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retroarch crashes on startup when vulkan driver is enabled (on nvidia GPU, but not iGPU) #45

Open
exerf opened this issue Jul 17, 2021 · 3 comments

Comments

@exerf
Copy link

exerf commented Jul 17, 2021

It seems that the snap package of retroarch has issues working properly with the vulkan driver.

I have both Intel Xe integrated graphics as well as an nvidia GTX 1650 Ti GPU. I have drivers for both installed, and have only the discrete nvidia GPU enabled (not hybrid mode). Here is my log output:

[INFO] RetroArch 1.9.6 (Git 119788593c)
[INFO] === Build =======================================
[INFO] CPU Model Name: 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
[INFO] Capabilities:  MMX MMXEXT SSE SSE2 SSE3 SSSE3 SSE4 SSE4.2 AES AVX AVX2
[INFO] Built: Jul  1 2021
[INFO] Version: 1.9.6
[INFO] Git: 119788593c
[INFO] =================================================
[INFO] [Input]: Found input driver: "x".
[INFO] [Environ]: SET_PIXEL_FORMAT: RGB565.
[INFO] Cannot resolve save file path.
[INFO] Cannot resolve save state file path.
[INFO] Version of libretro API: 1
[INFO] Compiled against API: 1
[INFO] [Audio]: Set audio input rate to: 48000.00 Hz.
[INFO] [Video]: Video @ fullscreen
[ERROR] [Wayland]: Failed to connect to Wayland server.
[INFO] [Vulkan]: Vulkan dynamic library loaded.
[INFO] [Vulkan]: Found vulkan context: vk_x
[INFO] [Vulkan]: Detecting screen resolution 1920x1080.
[INFO] [X/Vulkan]: Window manager is GNOME Shell.
[INFO] [X/Vulkan]: X = 0, Y = 0, W = 1920, H = 1080.
[INFO] [X/Vulkan]: Using true fullscreen.
INTEL-MESA: warning: Vulkan is not yet fully supported on gen12
INTEL-MESA: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0

INTEL-MESA: warning: Vulkan is not yet fully supported on gen12
INTEL-MESA: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0

[INFO] [Vulkan]: Found GPU at index 0: Intel(R) Xe Graphics (TGL GT2)
[INFO] [Vulkan]: Found GPU at index 1: Intel(R) Xe Graphics (TGL GT2)
[INFO] [Vulkan]: Using GPU index 0.
[INFO] [Vulkan]: Using semaphores for WSI acquire.
[INFO] [Vulkan]: Using GPU: Intel(R) Xe Graphics (TGL GT2)
[INFO] [Vulkan]: Queue family 0 supports 1 sub-queues.
X Error:  BadDrawable
  Request Major code 149 ()
  Request Minor code 4
  ResourceID 0x3400009
  Error Serial #74
  Current Serial #80

It's interesting that retroarch finds the integrated Xe GPU, but not the nvidia one. I assume that is a clue to the cause of the crashing, at least in my case?

For what it's worth, when the integrated Xe GPU is enabled, using vulkan with RA does not cause a crash on startup. Here is the log output when the iGPU is enabled (again, not hybrid):

[INFO] RetroArch 1.9.6 (Git 119788593c)
[INFO] === Build =======================================
[INFO] CPU Model Name: 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
[INFO] Capabilities:  MMX MMXEXT SSE SSE2 SSE3 SSSE3 SSE4 SSE4.2 AES AVX AVX2
[INFO] Built: Jul  1 2021
[INFO] Version: 1.9.6
[INFO] Git: 119788593c
[INFO] =================================================
[INFO] [Input]: Found input driver: "x".
[INFO] [Environ]: SET_PIXEL_FORMAT: RGB565.
[INFO] Cannot resolve save file path.
[INFO] Cannot resolve save state file path.
[INFO] Version of libretro API: 1
[INFO] Compiled against API: 1
[INFO] [Audio]: Set audio input rate to: 48000.00 Hz.
[INFO] [Video]: Video @ fullscreen
[ERROR] [Wayland]: Failed to connect to Wayland server.
[INFO] [Vulkan]: Vulkan dynamic library loaded.
[INFO] [Vulkan]: Found vulkan context: vk_x
[INFO] [Vulkan]: Detecting screen resolution 1920x1080.
[INFO] [X/Vulkan]: Window manager is GNOME Shell.
[INFO] [X/Vulkan]: X = 0, Y = 0, W = 1920, H = 1080.
[INFO] [X/Vulkan]: Using true fullscreen.
INTEL-MESA: warning: Vulkan is not yet fully supported on gen12
INTEL-MESA: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0

INTEL-MESA: warning: Vulkan is not yet fully supported on gen12
INTEL-MESA: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0

[INFO] [Vulkan]: Found GPU at index 0: Intel(R) Xe Graphics (TGL GT2)
[INFO] [Vulkan]: Found GPU at index 1: Intel(R) Xe Graphics (TGL GT2)
[INFO] [Vulkan]: Using GPU index 0.
[INFO] [Vulkan]: Using semaphores for WSI acquire.
[INFO] [Vulkan]: Using GPU: Intel(R) Xe Graphics (TGL GT2)
[INFO] [Vulkan]: Queue family 0 supports 1 sub-queues.
[INFO] [Vulkan]: Using resolution 1920x1080
[INFO] [Vulkan]: Using RGB565 format.
[INFO] [Vulkan]: Loading stock shader.
[INFO] [udev]: Pad #0 (/dev/input/event256) supports force feedback.
[INFO] [udev]: Pad #0 (/dev/input/event256) supports 16 force feedback effects.
[INFO] [Joypad]: Found joypad driver: "udev".
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [DBus]: Suspended screensaver via DBus.
[INFO] [Video]: Found display server: x11
[INFO] [PulseAudio]: Requested 24576 bytes buffer, got 18432.
[INFO] [Display]: Found display driver: "vulkan".
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [SRAM]: SRAM will not be saved.
[INFO] [Playlist]: Loading history file: [/home/exerf/snap/retroarch/648/.config/retroarch/content_history.lpl].
[INFO] [Playlist]: Loading history file: [/home/exerf/snap/retroarch/648/.config/retroarch/content_music_history.lpl].
[INFO] [Playlist]: Loading history file: [/home/exerf/snap/retroarch/648/.config/retroarch/content_video_history.lpl].
[INFO] [Playlist]: Loading history file: [/home/exerf/snap/retroarch/648/.config/retroarch/content_image_history.lpl].
[INFO] [Playlist]: Loading favorites file: [/home/exerf/snap/retroarch/648/.config/retroarch/content_favorites.lpl].
[INFO] [PulseAudio]: Pausing.
[INFO] [X/Vulkan]: Resized fullscreen resolution to 1920x1080.
[INFO] [PulseAudio]: Unpausing.
[INFO] [PulseAudio]: Pausing.
[INFO] [PulseAudio]: Unpausing.
[INFO] [Config]: Saved new config to "/home/exerf/snap/retroarch/648/.config/retroarch/retroarch.cfg".
[INFO] [Core]: Content ran for a total of: 00 hours, 00 minutes, 00 seconds.

If you compare the two outputs, the first line in the Xe scenario that appears beyond the point at which the nvidia scenario ends (because of the crash) is:

[INFO] [Vulkan]: Using resolution 1920x1080

Not sure if that is indicative of anything.

@exerf
Copy link
Author

exerf commented Jul 19, 2021

I also tried installing Retroarch from the Ubuntu PPA using the instructions on the Retroarch website. Surprisingly, this resulted in a similar X Error: BadDrawable error message (when using the vulkan driver on the nvidia GPU). So maybe the problem is (at least in part) the nvidia driver.

@hizzlekizzle
Copy link
Collaborator

Yeah, I think this is a GPU-switching problem.

@gouchi
Copy link
Member

gouchi commented Mar 24, 2022

Is it still an issue with latest stable ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants