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

    Using Vulkan with RetroPie

    Scheduled Pinned Locked Moved Help and Support
    vulkanvulkan retropievulkandriver
    11 Posts 4 Posters 2.4k 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.
    • TPRT
      TPR
      last edited by TPR

      I've installed the Vulkan video drivers on my Pi 5 using sudo apt install mesa-vulkan-drivers mesa-utils vulkan-tools.

      I've seen a build where they are getting Naomi 2 games to run close to full speed and they have the following line in their retroarch.cfg:

      video_driver = "vulkan"

      I've done a re-install of retroarch again after installing the Vulkan drivers but if I add that to my .cfg file the games just crash back to emulationstation.

      Any help on how to get that running and how to make retroarch see that I've installed that driver?

      Thank you.

      1 Reply Last reply Reply Quote 1
      • TPRT
        TPR
        last edited by TPR

        Doing more research I found a post on reddit and followed these steps:

        Add the green highlighted parts of sdl2.sh and system.sh from this dev repo to yours. https://github.com/cmitu/RetroPie-Setup/commit/192144f215c9ed0f717531a242f447ab9d325701

        Edit your system.sh, go to "[[ "$__has_dispmanx" -eq 1 ]] && __platform_flags+=(dispmanx)" and then add the following:
        # Pi4/5 have Vulkan working under KMS on Debian 12 (bookworm) or newer
        if (isPlatform "rpi4" || isPlatform "rpi5") && [[ "$__os_debian_ver" -ge 12 ]]; then
        __platform_flags+=(vulkan)
        fi

        It should look like this when it's done:
        [[ "$__has_dispmanx" -eq 1 ]] && __platform_flags+=(dispmanx)
        # Pi4/5 have Vulkan working under KMS on Debian 12 (bookworm) or newer
        if (isPlatform "rpi4" || isPlatform "rpi5") && [[ "$__os_debian_ver" -ge 12 ]]; then
        __platform_flags+=(vulkan)
        fi
        else
        __platform_flags+=(videocore dispmanx)
        fi

        Edit your system.sh , go to "platform_rpi5", and add the vulkan flag after "gles31". It should look like this:
        function platform_rpi5() {
        cpu_armv8 "cortex-a76"
        __platform_flags+=(rpi gles gles3 gles31 vulkan)

        IMPORTANT: Re-install sdl2, retroarch, and flycast-dev from source again in that order. Open a game with flycast-dev, go to the retroarch menu, change the driver to vulkan, save config, and exit.

        This actually worked! I can now select Vulkan from the RA drivers menu...

        But...

        Naomi 2 games still seem to lag and stutter. So what else could I be doing to improve that performance?

        TPRT 1 Reply Last reply Reply Quote 1
        • TPRT
          TPR @TPR
          last edited by

          Update! In Core Options I turned set Alpha Sorting to "Per-Strip" and now VF4 is lightning fast!

          TPRT 1 Reply Last reply Reply Quote 0
          • TPRT
            TPR @TPR
            last edited by

            So here's another question for all of you and maybe @mitu will know the answer....

            I went back and forth testing Vulkan and GL with Naomi 2 games and to be honest I didn't notice too much of a difference once I set the Alpha Sorting to Per-Strip.

            So my question is... SHOULD I be seeing that much of a difference? Or does Vulkan not really add to much in terms of performance to these games?

            abjA 1 Reply Last reply Reply Quote 0
            • abjA
              abj @TPR
              last edited by

              @TPR
              Let's wait for official support of vulkan drivers. For now, it is not clear if it's make difference.

              `Please be patient, my English is not very good.`

              TPRT 2 Replies Last reply Reply Quote 0
              • TPRT
                TPR @abj
                last edited by

                @abj 100% totally understood. Was just wanting to make sure I didn't do something wrong and was supposed to be seeing an improvement.

                It's funny... I keep seeing in other forums (Reddit, etc....) people talking up Vulkan... but then I get it installed and I'm all "Huh... maybe this is oversold?"

                But I hear you... I'm all for waiting for the official support.

                I'm impressed with how much stuff I've been able to get going on the Pi 5 already.... but I'm also not in any rush either!

                Thank you!

                A 1 Reply Last reply Reply Quote 0
                • A
                  akamming @TPR
                  last edited by

                  Re: Using Vulkan with RetroPie

                  Hi,

                  i am also experimenting with vulkan (on my 64 bit pi4 bookworm install)

                  I basically followed the standard manual setup on a pi4, but using the a modified retropie setup script: I merged this commit in the latest version of the setup script: https://github.com/RetroPie/RetroPie-Setup/pull/3785

                  happy to see that libretro indead now supports vulkan, but i would also like to use PPSSPP with vulkan. I see it was compiled now with vulkan, cause i can select the option.

                  good news is: Under X11 it works and has a better perfomance that on OpenGL.
                  bad news: Without X11 i get an error "vulkan subsystem 13 not supported"

                  anyone recognize this error and know how to get arround it?

                  1 Reply Last reply Reply Quote 0
                  • sugarfreeS
                    sugarfree
                    last edited by

                    It looks like a known issue, see: https://github.com/hrydgard/ppsspp/issues/14672

                    1 Reply Last reply Reply Quote 0
                    • TPRT
                      TPR @abj
                      last edited by

                      @abj said in Using Vulkan with RetroPie:

                      @TPR
                      Let's wait for official support of vulkan drivers. For now, it is not clear if it's make difference.

                      I haven't been following this so I apologize but did vulkan ever get official support?

                      sugarfreeS 1 Reply Last reply Reply Quote 0
                      • sugarfreeS
                        sugarfree @TPR
                        last edited by

                        @TPR

                        It's not merged yet, but I'm sure it will be when the time comes. See: https://github.com/RetroPie/RetroPie-Setup/pull/3785.

                        To answer your previous question: yes, the Vulkan driver provides noticeble better performance with the Flycast, Dolphin, and PPSSPP emulators. The extent of the improvement depends on the game.

                        TPRT 1 Reply Last reply Reply Quote 0
                        • TPRT
                          TPR @sugarfree
                          last edited by

                          @sugarfree said in Using Vulkan with RetroPie:

                          @TPR

                          It's not merged yet, but I'm sure it will be when the time comes. See: https://github.com/RetroPie/RetroPie-Setup/pull/3785.

                          To answer your previous question: yes, the Vulkan driver provides noticeble better performance with the Flycast, Dolphin, and PPSSPP emulators. The extent of the improvement depends on the game.

                          OK thanks. Those are the emulators I've been using it on.

                          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.