Retroarch on DRM/KMS doesn't work anymore

Vulkan has its own KMS-type environment but I don’t think we support it…?

I’m really just a dumb user, but in a blog artcle on libretro.com, the Vulkan API was mentioned as a way to reduce input lag by making it possible to apply double buffering (apart from the fact it’s obviously a lower level API). I thought that was Vulkan over X (like the Feral games ports) but I’m not sure that was specified.

Edit : here is the relevant post : https://www.libretro.com/index.php/retroarch-1-3-6-released/

Oh nice, we do support VK_KHR_display.

Yes, you can set the max swapchain images with vulkan and it should potentially reduce latency vs just letting the OS/GPU do whatever it wants.

From the nvidia driver readme : “The Vulkan WSI extensions VK_KHR_display and VK_KHR_display_swapchain define how to present in the absense of a window system, which is interesting in the context of the following sections.”

Very cool, it should work. I have to find a workaround this segfault. Maybe I’ll eventually try to recompile RA or another distro. (KDE Neon here based on Ubuntu 16.04)

So, in order to make use of VK_KHR_display, I should also start retroarch from the console or from X ?

Thanks again for your nice replies :slight_smile:

Here is what I get before the segfault : ERROR] [Vulkan]: Failed to open Vulkan loader. [ERROR] [Vulkan]: Failed to create Vulkan context. [INFO] [Vulkan]: Detecting screen resolution 320x240. [INFO] [Vulkan]: Using resolution 320x240 [INFO] [Vulkan]: Using RGB565 format.

From console, with your XServer killed, I think.

Okay so I managed to get RetroArch running with Vulkan/Nvidia, from a Manjaro liveCD (under X ; segfault from the console). That’s an improvement ! So there is something related to my Neon/Ubuntu 16.04 stack and/or Retroarch build that trigger a segfault.

This is quite cool as I can use heavy shaders along with a lower latency (and I have spare time for the frame delay option) although I made no comparison with a KMS over Intel scenario :slight_smile:

Hmm, by the way, theorically, does the Vulkan mode in an X context allow double buffering ? (as, under Manjaro, Retroarch doesn’t segfault in Vulkan mode under X, but does when started from the console… Maybe because it assumes it has to be started in a KMS context, which doesn’t work on Nvidia… Hmm…