RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    x86 Vulkan driver option for various emulators not showing up (but dolphin works)

    Scheduled Pinned Locked Moved Help and Support
    vulkandriverx86ubunturetroarch
    17 Posts 4 Posters 6.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      movisman
      last edited by movisman

      Hi all,

      Just wanted to see if anyone had Vulkan support working on RetroPie (x86 build) for the lr-beetle-psx emulator and lr-parallel-n64 emulators? I am having trouble getting Retroarch to recognise that Vulkan is even an option? Also, PPSSPP only shows 'opengl', and I believe in the later builds Vulkan should be supported there too.

      I have Dolphin working brilliantly on Vulkan with Ubershaders working well to reduce stuttering, but am not too sure why I don't have it as a driver option for the Retroarch emulators above, which I believe should be supported. I wanted to try and enhance the PSX environment, and possibly the n64 one, or at least have a play around.

      I am running RetroPie on Ubuntu MATE 16.04 LTS, and by default Vulkan drivers were not installed. So I installed 'mesa-vulkan-drivers' and any relevant dependencies, which instantly let me select Vulkan in Dolphin, but I cannot find the Vulkan driver option anywhere within Retroarch. I am using the default modesetting driver within the environment.

      I am using an integrated Intel card (HD4600), not sure if this is a factor because i'm not running nVidia or anything like that. I wouldn't have thought so considering Dolphin works so well?

      Does anyone have any ideas?

      @herb_fargus - sorry to tag you direct but I understand from some other posts you have an x86 install running, and you are using Beetle via the Vulkan driver - I really hope perhaps you have some ideas or tips?

      Cheers!

      mituM herb_fargusH 2 Replies Last reply Reply Quote 0
      • mituM
        mitu Global Moderator @movisman
        last edited by

        @movisman Does retroarch --features list Vulkan as supported ? It might be a build issue, maybe you're missing the libvulkan-dev package during compilation. RA does not detect it and doesn't compile Vulkan support. Did you build Dolphin from source or installed it from a binary package ?

        M 1 Reply Last reply Reply Quote 0
        • M
          movisman @mitu
          last edited by

          @mitu

          Hi there,

          Thanks for the reply - if I run retroarch --features, I actually get the following back:
          Vulkan:
          Vulkan video driver: no

          So this is probably a clue! Also, libvulkan-dev is not installed on my system, I didn't realise that was required too. I only installed mesa-vulkan-drivers and that in turn installed libvulkan1.

          I have libvulkan-dev available in the default repository to install though, if I install this, what would be the next steps?

          As for Dolphin, I installed this via the setup script which was from source. This one works fine.

          Thanks!

          mituM 1 Reply Last reply Reply Quote 0
          • mituM
            mitu Global Moderator @movisman
            last edited by

            @movisman said in x86 Vulkan driver option for various emulators not showing up (but dolphin works):

            I have libvulkan-dev available in the default repository to install though, if I install this, what would be the next steps?

            Reinstalling RetroArch from source would be the next step, then check if you find the Vulkan option in the Video output driver.

            M 2 Replies Last reply Reply Quote 0
            • M
              movisman @mitu
              last edited by

              @mitu

              Okay great, thanks for the help with this.

              So, if libvulkan-dev is a prerequisite for Vulkan in RetroArch, i'll shortly perform the following:

              Install libvulkan-dev
              Update RetroArch from source via the setup script so it picks up the availability of the driver and compiles accordingly.

              Will let you know how it goes!

              Thanks again.

              1 Reply Last reply Reply Quote 0
              • herb_fargusH
                herb_fargus administrators @movisman
                last edited by

                @movisman I was using it on my windows gaming laptop with just a standalone retroarch install.

                If you read the documentation it will answer 99% of your questions: https://retropie.org.uk/docs/

                Also if you want a solution to your problems read this first: https://retropie.org.uk/forum/topic/3/read-this-first

                1 Reply Last reply Reply Quote 0
                • M
                  movisman @mitu
                  last edited by movisman

                  @mitu @herb_fargus

                  Ah, thanks for replying Herb - and no worries at all. Not sure why I thought you were running it on Linux!

                  @mitu - thanks for the help with this, I installed the libvulkan-dev module and reinstalled/updated everything, and now Vulkan support appears when I run the "retroarch --features" command.
                  The Vulkan driver will also load when I manually change the video driver in retroarch.cfg to:
                  video_driver = "vulkan"

                  Which it did not do previously.

                  The shader I was using is now broken, but I understand this is because Vulkan needs the 'slang' shaders, which I can get from here a bit later:
                  https://github.com/libretro/slang-shaders

                  However - one question remains about the lr-beetle-psx emulator. How can I confirm if this is running in hardware mode? Or is the hardware mode in this emulator another build entirely? I see a lot of posts about changing the core rendering mode to 'vulkan' but this option doesn't appear to be there. Same goes for the n64 emulator. Any ideas how I can confirm this or why that core rendering option doesn't appear?

                  Regardless, I tried 2x resolution and everything works, but unfortunately games like Doom have awful black horizontal lines and rendering issues unless I fall back to native. This is the same in GL mode which is why I have doubts that the emulator is using the Vulkan driver. However it could just be that these games render badly on anything except native whatever driver you are using.

                  I have updated it from source also since installing libvulkan-dev.

                  Cheers!

                  mituM herb_fargusH 2 Replies Last reply Reply Quote 0
                  • mituM
                    mitu Global Moderator @movisman
                    last edited by

                    @movisman You might have better luck asking about the lr-beetls-psx's Vulkan usage on the libretro forums, the developers might give you a clue. From the docs:

                    Render: 'software' 'vulkan' and 'opengl'. The last two options will enable and/or speedup enhancements like upscaling and texture filtering. To use 'vulkan', the frontend must be using a Vulkan video driver first, or else it will default the 'opengl' renderer.

                    What I understand from the above is: if the frontend (RetroArch) used Vulkan, then the core will load it. You can check by launching RA with verbose logging from the runcommand launch menu and then looking in the log file (/dev/shm/runcommand.log).

                    M 1 Reply Last reply Reply Quote 0
                    • herb_fargusH
                      herb_fargus administrators @movisman
                      last edited by herb_fargus

                      @movisman last I checked it's core specific ie you need lr-beetle-hw not just lr-beetle, not sure if there is an install module for that specific core, I think the one that's included with the setup script is just the regular beetle one. That may be why

                      If you read the documentation it will answer 99% of your questions: https://retropie.org.uk/docs/

                      Also if you want a solution to your problems read this first: https://retropie.org.uk/forum/topic/3/read-this-first

                      1 Reply Last reply Reply Quote 0
                      • M
                        movisman @mitu
                        last edited by

                        @mitu @herb_fargus

                        Hi both,

                        Thanks a lot for both of your input on this, I really appreciate it and it's saved me a fair amount of time.

                        @mitu - exactly what you said seems correct, I studied the runcommand.log in verbose mode and can see it's automatically loading the Vulkan driver if available, as long as retroarch.cfg is set to use Vulkan as the video driver.

                        If I change retroarch.cfg back to 'gl', the runcommand.log changes accordingly to use OpenGL, as Vulkan is not available.

                        I'm not sure which of the two is necessarily better yet as still need to do a proper test, but it definitely seems to be engaging the correct driver. Also the 'slang' shaders apply with no issue and work fine when Vulkan is in use.

                        @herb_fargus - I thought that too looking at most posts on forums, etc, and was going to ask if a separate module could potentially be made available for the HW core. However, looking at the github page for libretro-beetle-psx (where the RetroPie script module builds from), and checking out some of their code, it looks like they have merged them, so it chooses Vulkan if available and falls back accordingly. I may be wrong on this but I don't think a specific core is required any more, especially after running the above tests and seeing a lot of Vulkan related stuff within their Github page.

                        Cheers!

                        herb_fargusH 1 Reply Last reply Reply Quote 0
                        • herb_fargusH
                          herb_fargus administrators @movisman
                          last edited by

                          @movisman said in x86 Vulkan driver option for various emulators not showing up (but dolphin works):

                          it looks like they have merged them, so it chooses Vulkan if available and falls back accordingly. I may be wrong on this but I don't think a specific core is required any more,

                          Just goes to show how often I use it! I vaguely remember hearing about this, this is good news indeed if that's the case. Retroarch has it's problems but I feel like they are going in the right direction

                          If you read the documentation it will answer 99% of your questions: https://retropie.org.uk/docs/

                          Also if you want a solution to your problems read this first: https://retropie.org.uk/forum/topic/3/read-this-first

                          M 1 Reply Last reply Reply Quote 0
                          • M
                            movisman @herb_fargus
                            last edited by

                            @herb_fargus

                            Yeah I think so too.
                            Doing a quick test, it seems using Vulkan on n64 isn't that great (at least for me), but to be fair i'm running a quad core i5 and HD4600 so not exactly amazing specs. I also need to fiddle with the settings to work out if any specific combination performs well when using the Vulkan driver. GL runs really well on defaults though, so for now i'll probably stick with that even if 2D stuff doesn't appear to look quite as nice. PSX I haven't noticed a huge difference between the two in performance, but again I can't ramp things up too much past 2x resolution because of my hardware. To be honest though i'm quite happy, at the mo just getting to grips with Linux and seeing what I can do with the x86 only emulators on the machine that I have. But Dolphin is way better on Vulkan, mainly because of that ubershaders option (which doesn't load for me on OpenGL).

                            Cheers for the help.

                            1 Reply Last reply Reply Quote 0
                            • M
                              movisman
                              last edited by movisman

                              @mitu Ha, ok so i'm a bit confused.

                              Looking at this file:
                              https://github.com/libretro/beetle-psx-libretro/blob/master/Makefile

                              It looks like when the emulator is compiled, it detects what the hardware is capable of and then compiles the 'hw' core appropriately, if for say, Vulkan support is detected or whatever.

                              Not too sure about libretro-parallel-n64 and this does the same thing.

                              Now, my vulkan driver is loading in RetroArch and all good there, but in the Beetle PSX emulator I am missing the core options such as Renderer, Adaptive Smoothing etc. So I guess I am not using HW mode after all. I need to check about the parallel-n64 emulator and if this has any specific HW options i'm not seeing.

                              Trouble is, my knowledge on this stuff is quite poor (but I am doing some research to learn), and so i'm not exactly sure what is going on when RetroPie-Setup is building these emulators from source.

                              Do I need to compile them from elsewhere in order for them to detect that I have OpenGL/Vulkan available and to present these extra options?

                              @BuZz - would you be kind enough to point me in the right direction with how your scripts build these emulators? I know I am on x86 and the main target is Pi, but am wondering if it could be compiling with different options or whatever so the HW stuff doesn't get enabled?

                              I'm just a bit confused here I think so hoping someone can clear things up for me.

                              Thanks again.

                              1 Reply Last reply Reply Quote 0
                              • M
                                movisman
                                last edited by

                                So I cloned the Beetle PSX .git and then ran a 'make' which generated the .so file, but it's the same as the one RetroPie installs. Definitely out of my depth with regards to working out how to get the HW core installed/detected when compiled!

                                1 Reply Last reply Reply Quote 0
                                • M
                                  movisman
                                  last edited by

                                  @herb_fargus @mitu
                                  Ok, so I figured this out (i think).

                                  I think that the RetroPie install script for lr-beetle-psx just does a basic make command which doesn't include OpenGL or Vulkan - to get the hardware core enabled for me I ran in a terminal:

                                  git clone --depth=1 https://github.com/libretro/beetle-psx-libretro.git

                                  I changed to the directory it created, and then ran a make command with some additional parameters which I found within https://github.com/libretro/beetle-psx-libretro/blob/master/Makefile :

                                  make HAVE_VULKAN=1 HAVE_OPENGL=1

                                  There are other parameters but i'm not too sure what they do.

                                  This then compiled the core with the extra options. I then took the .so file it created and placed it into the /opt/retropie/libretrocores/lr-beetle-psx directory.
                                  For now I just backed up the old one and renamed the HW one to match so there was no need to change emulators.cfg.

                                  Now when launching I have the full suite options available, software, opengl, and vulkan. And it definitely works properly now because the adaptive smoothing on Vulkan helps to smooth out the 2D elements better when raising the render resolution.

                                  @BuZz - is it viable for me to raise an enhancement request on github to either have another optional emulator added for compiling the HW version, or somehow have the existing script detect what you have available and compile accordingly?

                                  Thank you very much.
                                  Cheers

                                  BuZzB 1 Reply Last reply Reply Quote 0
                                  • BuZzB
                                    BuZz administrators @movisman
                                    last edited by

                                    @movisman I may be up for including, but I will need to test/confirm it working myself first. I see you have a ticket open anyway - I will look at it if/when I have some time (or someone else can), but it's not going to a be a high priority for me.

                                    To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

                                    M 1 Reply Last reply Reply Quote 0
                                    • M
                                      movisman @BuZz
                                      last edited by

                                      @buzz

                                      Thanks a lot - yeah I thought i'd open an enhancement anyway as I did some reading and one of the Retroarch devs confirmed the SW and HW cores are identical, except the HW one has the additional options. Both are the same if you run in software mode:
                                      https://www.reddit.com/r/emulation/comments/7hxke8/psa_psx_beetle_hw_is_absolutely_amazing/dquv1jp/

                                      So I figured it would probably be a useful enhancement enabling HW support at some stage - albeit I appreciate not high priority.

                                      @psyke83 has kindly done a bit of work already to enable and i'm happy to test this out:
                                      https://github.com/RetroPie/RetroPie-Setup/pull/2279

                                      Thanks again.

                                      1 Reply Last reply Reply Quote 0
                                      • First post
                                        Last post

                                      Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                                      Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.