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

    Raspberry Pi 4 - Forced VSYNC?!

    Scheduled Pinned Locked Moved Help and Support
    raspberrypi4sdl2vsync
    14 Posts 2 Posters 2.9k 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.
    • F
      FranceMSR @mitu
      last edited by

      @mitu sorry but you wrote "I remember being a SDL2 issue with its KMS video driver." as kind of sort of SDL-ONLY-RELATED internal driver, not Raspberry Pi one :-)

      As I said before, I'll try SDL 2.0.14 and I'll report the result

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

        @francemsr Yes, it's the SDL2 driver, not the Linux kernel or Mesa drivers.

        F 1 Reply Last reply Reply Quote 0
        • F
          FranceMSR @mitu
          last edited by

          @mitu good, thanks.

          Just for testing purpose: is there a way to use glxgears closing EmulationStation?

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

            @francemsr You can install the desktop part as a Port and start it from EmulationStation - https://retropie.org.uk/docs/FAQ/#where-did-the-desktop-go

            F 1 Reply Last reply Reply Quote 0
            • F
              FranceMSR @mitu
              last edited by

              @mitu ok, I thought there was a different way instead of pass from Desktop Environment.

              Thanks for now

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

                @francemsr You can instruct the RetroPie launcher (runcommand) to start an emulator/program via xorg by adding XINIT to its command in emulators.cfg - for instance this is how steamlink is started (see here).

                F 1 Reply Last reply Reply Quote 0
                • F
                  FranceMSR @mitu
                  last edited by

                  @mitu oh good thing!

                  F 1 Reply Last reply Reply Quote 0
                  • F
                    FranceMSR @FranceMSR
                    last edited by

                    Built SDL2 with --enable-video-kmsdrm parameter, this is the result of pre-build configuration

                    SDL2 Configure Summary:
                    Building Shared Libraries
                    Building Static Libraries
                    Enabled modules : atomic audio video render events joystick haptic sensor power filesystem threads timers file loadso cpuinfo assembly
                    Assembly Math   :
                    Audio drivers   : disk dummy oss alsa(dynamic) sndio(dynamic)
                    Video drivers   : dummy rpi x11(dynamic) kmsdrm(dynamic) opengl opengl_es1 opengl_es2 vulkan
                    X11 libraries   : xcursor xdbe xinerama xinput2 xinput2_multitouch xrandr xscrnsaver xshape xvidmode
                    Input drivers   : linuxev linuxkd
                    Enable virtual joystick APIs : YES
                    Using libsamplerate : YES
                    Using libudev       : YES
                    Using dbus          : YES
                    Using ime           : YES
                    Using ibus          : YES
                    Using fcitx         : YES
                    

                    When Raspberry Pi starts EmulationStation crashes on Creating window... log. Maybe I break something, any idea? This happens both with dtoverlay=vc4-fkms-v3d and dtoverlay=vc4-kms-v3d

                    P.S.: Building without --enable-video-kmsdrm option bring me to console with error related on creation of OpenGL window

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

                      Try to disable the rpi video driver when configuring SDL2.

                      F 1 Reply Last reply Reply Quote 0
                      • F
                        FranceMSR @mitu
                        last edited by FranceMSR

                        @mitu Built SDL 2.0.14 with

                        --disable-video-rpi --enable-video-kmsdrm
                        

                        The FPS problem still exists with 5.4 kernel, or newer one after full SO upgrade (in this case with fkms or kms), and in this way when emulator is closed EmulationStation is frozen.

                        Anyway I found a solution, if VERTICAL SYNC is enabled also on emulator (I added a command line parameter for this) also Raspberry Pi v4 version is ok.

                        If you don't have any other idea I'll stop the investigation, I don't love VSYNC because if a user has a 50 Hz monitor all games with nominal 60 FPS framerate runs at 50 FPS.

                        Really appreciate your help

                        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.