• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
RetroPie forum home
  • Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login

Good news regarding tearing and low EmulationStation performance on Pi 4

Scheduled Pinned Locked Moved General Discussion and Gaming
performancevsyncpi 4kernel 5.4
194 Posts 38 Posters 58.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.
  • S
    stoo @bluestang
    last edited by 19 Jan 2021, 01:18

    @bluestang Hey, could you give me a quick tutorial for installing upstream SDL2 and MESA to test them out?

    B 1 Reply Last reply 23 Jan 2021, 03:14 Reply Quote 0
    • B
      Brunnis @bluestang
      last edited by Brunnis 20 Jan 2021, 21:23

      @bluestang said in Good news regarding tearing and low EmulationStation performance on Pi 4:

      @brunnis @dankcushions

      Give upstream SDL2 a whirl and fresh build of MESA too, it seems to improve if not fix the Pi4 30 FPS EmulationStation issue.
      In a rom selection screen with video snaps, I am getting upwards of 120 fps!

      That's quite an interesting change. No time to test at the moment, but looking forward to seeing more reports from people using it. By the way, how well does RetroPie keep up with upstream SDL2?

      B B 2 Replies Last reply 23 Jan 2021, 03:40 Reply Quote 0
      • B
        bluestang @stoo
        last edited by 23 Jan 2021, 03:14

        @stoo said in Good news regarding tearing and low EmulationStation performance on Pi 4:

        @bluestang Hey, could you give me a quick tutorial for installing upstream SDL2 and MESA to test them out?

        Not a quick tutorial and it will break your current image. RetroPie will adopt these things when they are ready, and at this point SDL2 upstream is a constant WIP.

        1 Reply Last reply Reply Quote 1
        • B
          BuZz administrators @Brunnis
          last edited by BuZz 23 Jan 2021, 03:40

          @brunnis regarding keeping up to date. It depends on whether we encounter issues with upstream. We will update when we are sure everything is ok and our rebased customisations work etc. Until recently sdl2 Kms driver had issues so we were waiting.

          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

          1 Reply Last reply Reply Quote 2
          • S
            Setiawan
            last edited by 23 Jan 2021, 11:03

            Anyone have any luck using the full KMS driver over composite? I've created a support topic regarding this, but perhaps someone here has had some luck with it?

            P 1 Reply Last reply 23 Jan 2021, 15:33 Reply Quote 0
            • P
              philcsf @Setiawan
              last edited by philcsf 23 Jan 2021, 15:33

              @setiawan Not tried composite, but I've encountered similar issues where the full KMS driver isn't respecting some of the config.txt video options.

              Right now, I'm having to choose between:

              • Tearing issues, but supporting deep blacks via FKMS (hdmi_pixel_encoding=2)
              • Fixed tearing, but limited-range blacks via KMS ('hdmi_pixel_encoding' is ignored, so all blacks are slightly grey, which doesn't look great on an OLED)
              S S 2 Replies Last reply 23 Jan 2021, 16:04 Reply Quote 0
              • S
                Setiawan @philcsf
                last edited by 23 Jan 2021, 16:04

                @philcsf Quite a bummer. It is a pre-release kernel I guess so I can only hope that these problems get sorted or clarified some time soon.

                1 Reply Last reply Reply Quote 0
                • B
                  bluestang @Brunnis
                  last edited by bluestang 23 Jan 2021, 22:23

                  @brunnis

                  If you unplug your controller/joystick for about 3-5 secs and then replug it back in does the framerate jump back to 60 FPS again? Anytime the framerate dips to 30 FPS in the main menu if I unplug/replug my controller the framerate will go back to 60 FPS.

                  My Setup:

                  • RPi4 4GB, stock clock speeds.
                  • 64-bit RPiOS with RetroPie built from the setup script.
                  • Cosmic Rise theme (Hursty)
                    -- this theme seems to cause the 30 FPS anomaly fairly quickly.
                  • I'm using emulationstation-dev.sh from the master RetroPie branch with the build flag -DUSE_MESA_GLES=On instead of -DGL=On in emulationstation.sh
                    -- this will link the GLESv2 driver vs GL one.
                  • RetroPie's SDL v2.0.10
                  • Stock 19.3.2 MESA drivers

                  What has been true in all my testing is that the clock speeds of the ARM or GPU will influence the framerate, if either one dips below a certain threshold the framerate will be reduced. (seems obvious =] )

                  Thresholds to trigger 30 FPS:

                  GPU MHz < 450 Mhz
                  ARM MHz < 900 Mhz

                  What befuddles me is that the framerate is not affected when you go to the options menu or a game system w/ roms menu. Every time you are in those menus the framerate is 60 FPS.

                  1 Reply Last reply Reply Quote 0
                  • B
                    BorisVivienne
                    last edited by 25 Jan 2021, 16:53

                    So the latest update is supposed to fix this? I've updated everything but NES games like Metroid stil get me frustrated.

                    Omar Khayyam
                    "Be happy for this moment. This moment is your life."

                    D 1 Reply Last reply 26 Jan 2021, 11:08 Reply Quote 0
                    • D
                      dankcushions Global Moderator @BorisVivienne
                      last edited by 26 Jan 2021, 11:08

                      @borisvivienne update of what? nothing is included in retropie as yet.

                      1 Reply Last reply Reply Quote 0
                      • topic:timeago-later,about a month
                      • G
                        GreenHawk84
                        last edited by 6 Mar 2021, 18:58

                        I was able to get the ES menu scrolling smoothly by placing force_turbo=1 in Boot config.txt. Probably already been said but just confirming here. I guess it will do until things are fixed under the hood.

                        B 1 Reply Last reply 6 Mar 2021, 19:20 Reply Quote 0
                        • B
                          bluestang @GreenHawk84
                          last edited by 6 Mar 2021, 19:20

                          @greenhawk84 You can force the gpu to a min frequency which will fix the 30 FPS issue in Emulation Station with the caveat that the GPU frequency will always be at 500 Mhz.

                          gpu_freq_min=500 in your /boot/config.txt will do the trick and you remove the force_turbo=1 option.

                          G 1 Reply Last reply 6 Mar 2021, 21:58 Reply Quote 1
                          • G
                            GreenHawk84 @bluestang
                            last edited by 6 Mar 2021, 21:58

                            @bluestang would there be any greater advantage to using the GPU freq option vs turbo?

                            B 1 Reply Last reply 6 Mar 2021, 22:10 Reply Quote 0
                            • B
                              bluestang @GreenHawk84
                              last edited by 6 Mar 2021, 22:10

                              @greenhawk84 just forcing the min frequency will still allow for other components to downclock especially if you are overclocked.

                              G 1 Reply Last reply 13 Mar 2021, 02:27 Reply Quote 0
                              • G
                                GreenHawk84 @bluestang
                                last edited by GreenHawk84 13 Mar 2021, 02:27

                                @bluestang okay, I switched over to the gpu freq at 500 for the slow ES menu, and it works the same as you said. I also tried Soul Calibur on Flycast using the KMS driver, and the tearing was resolved. I also tried Tekken 3 on psxrearmed and it seemed good. Just testing this out some more. I am not sure if these hiccups/tears were present in early Pi4 Retropie, because I wanted to see what users reported, such as this video on Youtube:

                                This reviewer does not seem to notice or mention anything about tearing which was highly noticeable for me in Flycast/Soul Calibur before testing the KMS driver. Was there some sort of regression as things were updated?

                                One last thing, since there is a lot of editing of config.txt, is there a place to get the true default file in case we mess something up?

                                B 1 Reply Last reply 13 Mar 2021, 05:14 Reply Quote 0
                                • B
                                  bluestang @GreenHawk84
                                  last edited by bluestang 13 Mar 2021, 05:14

                                  @greenhawk84 said in Good news regarding tearing and low EmulationStation performance on Pi 4:

                                  This reviewer does not seem to notice or mention anything about tearing which was highly noticeable for me in Flycast/Soul Calibur before testing the KMS driver. Was there some sort of regression as things were updated?

                                  The FKMS driver has always had the issue of screen tearing in emulators. I think people are just noticing it more as the Pi4 userbase grows and threads like this one continue to get more posts seeking for help.

                                  The crux of the problem has always been that the Raspberry Pi dev team had no easy way of fixing the proprietary Broadcom firmware that controls the GPU in FKMS. Early attempts were made but were unsuccessful. FKMS was dubbed "Fake Kernel Mode Setting", where the firmware wraps the Linux display API - KMS/DRM calls from the MESA driver to the GPU.

                                  Since the Broadcom software was not an easy fix, the Raspberry Pi team decided to ditch the firmware altogether and create a display kernel driver that uses KMS/DRM the standard Linux way. This effort is now what is being referred to as the KMS driver. All the display controls are executed by the ARM CPU and directly through the Linux display API - KMS/DRM bypassing the Broadcom firmware altogether. You can also enable the KMS sound driver as well which can passthrough multi-channel HDMI sources.

                                  In the end, KMS will have more features and will offer several options for the user to configure.

                                  One last thing, since there is a lot of editing of config.txt, is there a place to get the true default file in case we mess something up?

                                  https://github.com/RPi-Distro/pi-gen/blob/master/stage1/00-boot-files/files/config.txt

                                  R 1 Reply Last reply 13 Mar 2021, 13:44 Reply Quote 3
                                  • R
                                    Ranma @bluestang
                                    last edited by 13 Mar 2021, 13:44

                                    @bluestang

                                    That is fantastic info and thanks for sharing this. Count me as a new Pi 4 (400 actually) user who has been a bit confused by the tearing. We seem to have had lots of people saying the Pi 4 is great for emulation and quite powerful but few talking about the tearing issue, so yes it was a bit of a surprise. I'm glad it's known and that work is being done on it, and I can't wait for it to bear fruit. I long to be able to place the Pi 400 as my main machine in the living room, but I'm resolved to waiting for now. Luckily my Pi 3 punches above it's weight thanks to the Retropie team and I am very thankful indeed for that. :-)

                                    1 Reply Last reply Reply Quote 0
                                    • G
                                      George Spiggott
                                      last edited by 14 Mar 2021, 16:14

                                      Does anyone know if KMS is now at a stage where it is possible and practical to use the new audio drivers with it rather than the legacy ones?

                                      Currently running:
                                      Retropie 4.8.9 on a Pi Zero 2W (Overclock Settings: CPU 1400Mhz)
                                      ES-DE on a GMKtec K6 (Windows 11, 32GB RAM)

                                      B 1 Reply Last reply 14 Mar 2021, 22:26 Reply Quote 0
                                      • B
                                        bluestang @George Spiggott
                                        last edited by 14 Mar 2021, 22:26

                                        @george-spiggott said in Good news regarding tearing and low EmulationStation performance on Pi 4:

                                        Does anyone know if KMS is now at a stage where it is possible and practical to use the new audio drivers with it rather than the legacy ones?

                                        Yes. I’ve been using the vc4-hdmi driver without any issues.

                                        1 Reply Last reply Reply Quote 0
                                        • G
                                          George Spiggott
                                          last edited by 15 Mar 2021, 22:16

                                          @bluestang Great news, How did you set it up in your config file?

                                          Currently running:
                                          Retropie 4.8.9 on a Pi Zero 2W (Overclock Settings: CPU 1400Mhz)
                                          ES-DE on a GMKtec K6 (Windows 11, 32GB RAM)

                                          B 1 Reply Last reply 16 Mar 2021, 00:38 Reply Quote 0
                                          145 out of 194
                                          • First post
                                            145/194
                                            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.

                                            This community forum collects and processes your personal information.
                                            consent.not_received