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.2k 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.
    • B
      bluestang @bluestang
      last edited by

      @ecto the audio crackling sounds like an issue with RetroArch specifically. What did you update with it? RetroPie is still on version 1.8.9...

      ectoE 1 Reply Last reply Reply Quote 0
      • ectoE
        ecto @bluestang
        last edited by

        @bluestang I just updated retroarch with retropie_setup so that should be ok. Let me check ...

        believing the data from /opt/retropie/emulators/retroarch/retropie.pkg its on 1.8.8. I will have to shoo away the kids from the TV to check it on thr pi... ;)

        1 Reply Last reply Reply Quote 0
        • ectoE
          ecto @roslof
          last edited by ecto

          @roslof OK I tried thenoaudiooption, and have indeed no audio in any emu. :(

          But when trying lr-pcsx, it runs at normal speed! As soon as I remove thenoaudiooption, audio is back, but lr-pcsx runs too fast and has the crackling.
          So far, I've tested amiberry (runs ok), scummvm (runs ok) and redream (runs ok)... sooo it's probably a retroarch/pulseaudio problem (as can also be seen in the syslog I posted earlier).

          What I haven't done (I read here about that): start the desktop (as I have none) to change the audio output...

          EDIT
          Ok, I forgot to run the mixer setup in the retropie setup. I now have non-stuttering (non-kms) sound and the emus run at a normal speed.
          I still have an error message that some mixer element couldn't be found, but anyhow.

          B 1 Reply Last reply Reply Quote 0
          • RanmaR
            Ranma @ecto
            last edited by

            @ecto
            I thought gpu_freq was not needed on the Pi 4 as per this -

            • "It is recommended when overclocking to use the individual frequency settings (isp_freq, v3d_freq etc) rather than gpu_freq, as since it attempts to set core_freq (which cannot be changed on the Pi 4), it is not likely to have the desired effect."

            • from here . https://www.raspberrypi.org/documentation/configuration/config-txt/overclocking.md

            I only set v3d_freq myself on my Pi 400 and it performs well. Dunno, but could it be causing your problem? Also, I could have sworn I read here somewhere that the noaudio option was no longer needed. If I find this I'll post back.

            ectoE 1 Reply Last reply Reply Quote 0
            • ectoE
              ecto @Ranma
              last edited by

              @ranma Thanks for looking into that. I have somewhat solved my problem (see my edit some posts above).
              You are probably right about the overclocking, but as I never had problems with these settings, I will just let them be ;)

              1 Reply Last reply Reply Quote 0
              • B
                bluestang @ecto
                last edited by

                @ecto In RetroArch, do you have alsathread selected as your audio driver?

                ectoE 1 Reply Last reply Reply Quote 0
                • ectoE
                  ecto @bluestang
                  last edited by ecto

                  @bluestang I don't know. I'm away from my Retropie, but I will report back.
                  Just for clarification: If I want to use kms sound driver (by removingnoaudio), Retroarch should use alsathread as audiodriver?
                  Do I have to switch the audio output somewhere else? I've read that this can be done in desktop environment? Because when I switched back to broadcom audio, I had to use the mixer to enable hdmi output.

                  B 1 Reply Last reply Reply Quote 0
                  • B
                    bluestang @ecto
                    last edited by bluestang

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

                    @bluestang I don't know. I'm away from my Retropie, but I will report back.
                    Just for clarification: If I want to use kms sound driver (by removingnoaudio), Retroarch should use alsathread as audiodriver?
                    Do I have to switch the audio output somewhere else? I've read that this can be done in desktop environment? Because when I switched back to broadcom audio, I had to use the mixer to enable hdmi output.

                    In RetroArch your audio driver should be set to alsathread. In fresh installs or updates that may not be the case...regardless of audio config I’ve always used alsathread in my setup.

                    The KMS audio driver only has HDMI output where the Broadcom audio has HDMI and Headphones. When you switch back to Broadcom audio you may need to select the output that is applicable to you. RetroPie’s audio settings menu should allow you to select the output for the Broadcom audio.

                    ectoE 1 Reply Last reply Reply Quote 1
                    • ectoE
                      ecto @bluestang
                      last edited by ecto

                      @bluestang That did the trick! My retroarch was set to alsaand after changing it to alsathread the crackling went away after enabling KMS. Now everything works as expected! Thanks so much!

                      Now there is still the error messages in the syslog left (but those don't seem to have any negative effect?!
                      Also, whenever I start a game I get the message lvl0: VolumeControl::init() - Failed to find mixer elements. But that, too, doesn't have any negative effect.

                      Anyways thanks for helping me out!

                      B 1 Reply Last reply Reply Quote 0
                      • B
                        bluestang @ecto
                        last edited by

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

                        @bluestang That did the trick! My retroarch was set to alsaand after changing it to alsathread the crackling went away after enabling KMS. Now everything works as expected! Thanks so much!

                        Now there is still the error messages in the syslog left (but those don't seem to have any negative effect?!
                        Also, whenever I start a game I get the message lvl0: VolumeControl::init() - Failed to find mixer elements. But that, too, doesn't have any negative effect.

                        Anyways thanks for helping me out!

                        You need to set the volume controls in EmulationStation to Audio Card -> Default and Audio Device -> Master.

                        ectoE 2 Replies Last reply Reply Quote 0
                        • ectoE
                          ecto @bluestang
                          last edited by ecto

                          @bluestang Thanks again! All problems resolved. All emus and ports working!

                          A little info for anyone playing Hexen 2: As the Hexen 2 port uses SDL 1, there are some fullscreen issues. I resolved that by launching hexen2 with XINIT: in the launch script. It works ok, but there are some small sound issues.

                          EDIT
                          I found a Hexen II port that supports SDL2, so no more problems anymore!

                          Another EDIT
                          lr-vecx doesn't seem so like kms?! I can't get it to work right with either hard- nor software rendering. With hardware rendering, there is no graphics at all, and with software rendering the graphics are very choppy.

                          1 Reply Last reply Reply Quote 0
                          • ectoE
                            ecto @bluestang
                            last edited by ecto

                            @bluestang A little update: I could not get rid of the sound (driver?) problems. I always found hundreds of ALSA lib pcm.c:8424:(snd_pcm_recover) underrun occurred errors in the runcommnd.log.
                            So I reverted back todtoverlay=vc4-kms-v3d,noaudioand dtparam=audio=on.

                            EDIT
                            looked up the exact error mesage

                            B 1 Reply Last reply Reply Quote 0
                            • B
                              bluestang @ecto
                              last edited by

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

                              @bluestang A little update: I could not get rid of the sound (driver?) problems. I always found hundreds of ALSA lib pcm.c:8424:(snd_pcm_recover) underrun occurred errors in the runcommnd.log.
                              So I reverted back todtoverlay=vc4-kms-v3d,noaudioand dtparam=audio=on.

                              EDIT
                              looked up the exact error mesage

                              what emulator is causing this?

                              1 Reply Last reply Reply Quote 0
                              • B
                                bluestang
                                last edited by

                                @brunnis @George-Spiggott @dankcushions

                                There have been some clock improvements since 5.10.17 kernel's release...

                                I am running the latest 5.10.33 kernel through sudo rpi-update and I have my display set to 1080p @ 120 Hz (hdmi_group=1 and hdmi_mode=63) on the KMS driver and I am getting a constant 120 FPS in EmulationStation. More graphic intensive themes (i.e. Cosmic Rise) will result in 60 FPS but I do not see the dreaded dip to 30 FPS whatsoever.

                                I no longer have to set gpu_freq_min=500 either. I do have overclocked settings, but the governor is set to balanced and the clock freq is throttling down as reported by bcmstat.sh.

                                If your feeling adventurous give it a go and I'd be interested in your results.

                                DarksaviorD 1 Reply Last reply Reply Quote 1
                                • DarksaviorD
                                  Darksavior @bluestang
                                  last edited by Darksavior

                                  Got 1440p working btw. No more uneven scanlines

                                  hdmi_enable_4kp60=1
                                  hdmi_group=2
                                  hdmi_mode=87
                                  hdmi_cvt=2560 1440 60 3
                                  
                                  1 Reply Last reply Reply Quote 0
                                  • saccublendaS
                                    saccublenda @philcsf
                                    last edited by

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

                                    @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)

                                    I've noticed too that the hdmi_pixel_encoding is ignored with KMS and kernel 5.10.17-v7l+. Is there a workaround for this?

                                    GreenHawk84G 1 Reply Last reply Reply Quote 0
                                    • GreenHawk84G
                                      GreenHawk84 @saccublenda
                                      last edited by

                                      Extremely stoked for what could become of Retropie with new video drivers.

                                      Also still concerned about how all our video snaps are going to be handled with KMS. I spent sooo much time on video snaps and making sure all my games have videos.

                                      1 Reply Last reply Reply Quote 0
                                      • Y
                                        yamanobe
                                        last edited by

                                        I'm sorry, can someone please tell me where to change the final settings?
                                        My retropie has tearing all the time, and when I add "dtoverlay = vc4-kms-v3d-pi4, noaudio" to config.xml, I get splash screen and screen saver hiccups.

                                        1 Reply Last reply Reply Quote 0
                                        • dankcushionsD dankcushions referenced this topic on
                                        • 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.