Retroarch crash using vulkan [SOLVED]


#1

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] Environ SET_HW_RENDER.
[INFO] Requesting Vulkan context.
[INFO] Environ SET_HW_RENDER_CONTEXT_NEGOTIATION_INTERFACE.
[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

#2

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.


#3

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


#4

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.


#5

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.


#6

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.