Retroarch crash using vulkan [SOLVED]

Hey all,

I have a issue where vulkan will crash/force close retroarch using any core (gl works perfectly fine), I am able to use vulkan fine in standalone dolphin emulator. I’m getting an odd wayland error running retroarch in verbose “[ERROR] [Wayland]: Failed to connect to Wayland server.”. Any help would be greatly appreciated. Let me know if you need any other logs/info.

Libretro Testing/Nightly PPA
Retroarch Version: 1.7.3-r201808092235-e235a09-77~ubuntu18.04.1

System Info

System:    Host: GL552VW Kernel: 4.15.0-30-generic x86_64 bits: 64 gcc: 7.3.0
           Desktop: Cinnamon 3.8.8 (Gtk 3.22.30) Distro: Linux Mint 19 Tara
Machine:   Device: laptop System: ASUSTeK product: GL552VW v: 1.0 serial: N/A
           Mobo: ASUSTeK model: GL552VW v: 1.0 serial: N/A
           UEFI: American Megatrends v: GL552VW.300 date: 09/06/2016
Battery    BAT0: charge: 36.5 Wh 95.0% condition: 38.4/48.0 Wh (80%) model: ASUSTeK ASUS status: Discharging
CPU:       Quad core Intel Core i7-6700HQ (-MT-MCP-) arch: Skylake-S rev.3 cache: 6144 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 20736
           clock speeds: max: 3500 MHz 1: 900 MHz 2: 900 MHz 3: 900 MHz 4: 900 MHz 5: 900 MHz 6: 900 MHz
           7: 900 MHz 8: 900 MHz
Graphics:  Card-1: Intel HD Graphics 530 bus-ID: 00:02.0
           Card-2: NVIDIA GM107M [GeForce GTX 960M] bus-ID: 01:00.0
           Display Server: x11 (X.Org 1.19.6 ) drivers: nvidia (unloaded: fbdev,vesa) FAILED: modesetting
           Resolution: [email protected]
           OpenGL: renderer: GeForce GTX 960M/PCIe/SSE2 version: 4.6.0 NVIDIA 396.51 Direct Render: Yes
Audio:     Card Intel Sunrise Point-H HD Audio driver: snd_hda_intel bus-ID: 00:1f.3
           Sound: Advanced Linux Sound Architecture v: k4.15.0-30-generic
Network:   Card-1: Intel Wireless 7265 driver: iwlwifi bus-ID: 02:00.0
           IF: wlp2s0 state: up mac: dc:53:60:f6:1a:17
           Card-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
           driver: r8169 v: 2.3LK-NAPI port: d000 bus-ID: 03:00.1
           IF: enp3s0f1 state: down mac: 2c:56:dc:2b:71:a4
Drives:    HDD Total Size: 1250.3GB (32.6% used)
           ID-1: /dev/sda model: HGST_HTS721010A9 size: 1000.2GB
           ID-2: /dev/sdb model: Samsung_SSD_850 size: 250.1GB
Partition: ID-1: / size: 916G used: 380G (44%) fs: ext4 dev: /dev/sda2
RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors:   System Temperatures: cpu: 47.0C mobo: N/A gpu: 0.0:46C
           Fan Speeds (in rpm): cpu: 1300
Info:      Processes: 255 Uptime: 1:17 Memory: 1996.1/15467.1MB Init: systemd runlevel: 5 Gcc sys: 7.3.0
           Client: Shell (bash 4.4.191) inxi: 2.3.56 

Error Log

[libretro INFO] Checking if required firmware is present.
[libretro INFO] Firmware found: /home/mrturcot/Emulation/RetroArch BIOS/system/scph5501.bin
[libretro INFO] Firmware SHA1: 0555C6FAE8906F3F09BAF5988F00E55F88E9F30B
[INFO] Environ GET_VARIABLE beetle_psx_hw_renderer:
[INFO] 	hardware
[INFO] Requesting Vulkan context.
[INFO] Skipping SRAM load..
[INFO] Version of libretro API: 1
[INFO] Compiled against API: 1
[INFO] Environ GET_VARIABLE beetle_psx_hw_renderer_software_fb:
[INFO] 	enabled
[INFO] Environ GET_VARIABLE beetle_psx_hw_internal_resolution:
[INFO] 	1x(native)
[INFO] Environ GET_VARIABLE beetle_psx_hw_adaptive_smoothing:
[INFO] 	enabled
[INFO] Environ GET_VARIABLE beetle_psx_hw_widescreen_hack:
[INFO] 	disabled
[INFO] [Audio]: Set audio input rate to: 44099.31 Hz.
[INFO] [Video]: Video @ 960x720
[INFO] [Video]: Using HW render, Vulkan driver forced.
[ERROR] [Wayland]: Failed to connect to Wayland server.
[INFO] Vulkan dynamic library loaded.
[INFO] [Vulkan]: App: Beetle PSX (version 0)
[INFO] [Vulkan]: Engine: parallel-psx (version 0)
[INFO] [Vulkan]: Detecting screen resolution 1920x1080.
[INFO] [GLX]: Window manager is Mutter (Muffin).
[INFO] [GLX]: X = 0, Y = 0, W = 960, H = 720.
[INFO] [Vulkan]: Using GPU: Intel(R) HD Graphics 530 (Skylake GT2)
[INFO] [Vulkan]: Queue family 0 supports 1 sub-queues.
[INFO] [Vulkan]: Swapchain supports present mode: 0.
[INFO] [Vulkan]: Swapchain supports present mode: 1.
[INFO] [Vulkan]: Swapchain supports present mode: 2.
[INFO] [Vulkan]: Creating swapchain with present mode: 2
[INFO] [Vulkan]: Using swapchain size 960 x 720.
[INFO] [Vulkan]: Got 3 swapchain images.
X Error of failed request:  BadDrawable (invalid Pixmap or Window parameter)
  Major opcode of failed request:  149 ()
  Minor opcode of failed request:  4
  Resource id in failed request:  0x6400006
  Serial number of failed request:  46
  Current serial number in output stream:  51

The wayland thing is a red herring. I believe the ‘X Error of failed request’ bit is the real issue, though I don’t know what it’s all about.

Application can not detect nvidia’s vulkan driver, just export VK_ICD_FILENAMES environment variable to proper ICD file. In my case: VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json

I even have the same issue on Ubuntu 18.04 LTS. Is the builds different from their app store than the ones from Libretro repository? (The difference is that I can install cores in Retroarch when installed from the app store, while the ones in Libretro repository, you have to install cores from repository.)

I switched to Vulkan from the settings to see how it performs. My GPU is Radeon RX 570 8GB, using Mesa 18.2.8 from the main repository and tried finding few others. RADV seems to be installed. I even installed libvulkan-dev since I thought that would fix the issue for starting Retroarch with Vulkan, but it didn’t.

Vulkan doesn’t work with the snap package currently. I’m trying to figure out why but haven’t really gotten anywhere with it, unfortunately.

Thanks, I’m not sure how mark this as solved. But I believe my issue was I didn’t close and relaunch retroatch after switching to Vulkan driver.

Hello, I have the same problem here. Shoud I create a new topic ? RetroArch 1.7.7 (snap version) on Ubuntu 19.04 with Nvidia GTX970 with driver 418. Kernel 5.0.0-23-generic. Retroarch failed to start every time I tried ti switch from “gl” video driver to “vulkan”. Error log below. It seems other people are affected :

Someone may have found a workaround by tweaking libvulkan symlink on the flatpack package :slight_smile:

I would try to symlink /snap/retroarch/210/usr/lib/x86_64-linux-gnu/ to my local /usr/lib/x86_64-linux-gnu/ instead of the outdated provided by the snap package. But I’m afraid to break everything by messing with the squashfs filesystem :slight_smile:

Or maybe there is something to do with LD_PRELOAD when launching retroarch ? (In my case, exporting VK_ICD_FILENAMES did not help)


retroarch -v [INFO] [recording] twitch streaming key empty [INFO] RetroArch 1.7.7 (Git 312f39c) [INFO] === Build ======================================= [INFO] CPU Model Name: Intel® Core™ i5-2500K CPU @ 3.30GHz [INFO] Capabilities: MMX MMXEXT SSE1 SSE2 SSE3 SSSE3 SSE4 SSE4.2 AVX AES [INFO] Built: May 26 2019 [INFO] Version: 1.7.7 [INFO] Git: 312f39c [INFO] ================================================= [INFO] Environ SET_PIXEL_FORMAT: RGB565. [INFO] Version of libretro API: 1 [INFO] Compiled against API: 1 [INFO] [Audio]: Set audio input rate to: 30000.00 Hz. [INFO] [Video]: Video @ fullscreen [ERROR] [Wayland]: Failed to connect to Wayland server. [INFO] Vulkan dynamic library loaded. [ERROR] [Vulkan]: Could not find instance extensions. Will attempt without them. [ERROR] Failed to create Vulkan instance (-9). [WARN] Failed to bind API (#9, version 1.0) on context driver “x-egl”. [WARN] Failed to bind API (#9, version 1.0) on context driver “kms”. [WARN] Failed to bind API (#9, version 1.0) on context driver “sdl_gl”. [INFO] Vulkan dynamic library loaded. [ERROR] [Vulkan]: Could not find instance extensions. Will attempt without them. [ERROR] Failed to create Vulkan instance (-9). [ERROR] [Vulkan]: Failed to create Vulkan context. [INFO] [Vulkan]: Detecting screen resolution 320x240. [INFO] [Vulkan]: Using resolution 320x240 Segmentation fault


Yeah, this is a known issue. Unfortunately, I haven’t been able to get any help with it from the Snap folks :confused: I’ve tried a few different strategies that I’ve seen online for symlinking but it doesn’t seem to have helped. I just tried one more thing, so we’ll see if it does any better…

So I guess I need to to uninstall snap package and re-install RetroArch with Ubuntu PPA ? I just have to backup first ~/snap/retroarch/210/.configl/retroarch and copy it (after reinstall) to ~/.config/retroarch ?

Edit : I dit it bravely … and now I have to edit retroarch.cfg to change every path involving “snap” Not too complicated : snap was “hardcoded” only in playlist cores and system folders. … And many *.lpl files :’(

1 Like

In the end : my retroarch is now unstable and half-working. I have to start from scratch a new retroarch install/config with the PPA. Hours of tweaking lost…

If only there was a clear warning on snapcraft / unbuntu software center, like “Retroarch snap package : not recommended, vulkan not supported” (A warning on the website is really not enough, in my humble opinion), I would not have wasted so much time.

(And having the flag “SOLVED” in the title of this topic is also really misleading)