Lakka build w/ Vulkan X-free context and/or Nvidia KMS


Hi everyone !!

In my quest for lag-free retro-gaming, I’m still not 100% happy although I do appreciate A LOT the efforts made so far.

When using a proper GFX card, like an Nvidia one, the situation is not optimal :

  • you either use Lakka but have to use the open source drivers that are very far from the proprietary ones, which raises tons of issues
  • you either use a regular Linux distro but you have the choice between
  1. use X + OpenGL and you have more lag than with KMS (and triple buffering is forced)
  2. use X + Vulkan but I’m not sure this is better as far as lag is concerned (does it apply double buffering ?)
  3. use X-free Vulkan context + Vulkan : it DOES work but you can either start the menu or a single game but not start a game via the menu as it seems some kind or resource is not freed
  4. use console KMS but it segfaults
  5. use Wayland but it raises other issues (X-wayland adds even more input lag ; Wayland is not properly supported with Nvidia + Kwin etc…)

Those issues were double checked under Arch Linux & Ubuntu LTS + latest Retroarch + latest Nvidia proprietary drivers.

My question / bounty suggestion is : are some other Nvidia users looking for a lag-free experience ? Wouldn’t it be possible to make a special Lakka image (or include it in the regular) that would include Nvidia proprietary drivers + fix the Vulkan context (or KMS) related issues ?

An input lag investigation

Hi there. I’m using retroarch in KMS mode. The laptop has a nvidia card 8400series. The lag is almost always imperceptible.

I’m using the last higan’s core available on retroarch. I choose balanced ones, due to the processor is too slow.

In order to get works in KMS mode, you have to compile it with the options --enable-kms --enable-egl.

Then something like this it will appear

[INFO] [GL]: Found GL context: kms
[INFO] [GL]: Detecting screen resolution 1280x800.
[INFO] [EGL] Found EGL client version >= 1.5, trying eglGetPlatformDisplay
[INFO] [EGL]: EGL version: 1.4
[INFO] [EGL]: Current context: 0x557330b16740.
[INFO] [KMS]: New FB: 1280x800 (stride: 5120).
[INFO] [GL]: Vendor: nouveau, Renderer: NV86.


I believe that the point is not having to use nouveau.


Yep, indeed :slight_smile: Also, except if I’m mistaken, the Arch & Ubuntu builds of RA are already built with kms enabled. As I said above, with the proprietary driver, the X-free Vulkan context almost works (but the KMS mode segfaults). So I’m pretty sure we’re close to a good solution.

BTW : can you use shaders with nouveau ?


That laptop is too slow. I can’t use any of them.