• 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
    SaturnX @bluestang
    last edited by 24 Mar 2021, 03:15

    @bluestang ah thanks for that clarification!! Much appreciated.

    G 1 Reply Last reply 1 Apr 2021, 17:59 Reply Quote 0
    • G
      GreenHawk84 @SaturnX
      last edited by 1 Apr 2021, 17:59

      I am honestly confused by this whole tearing thing because my Pi4 setup runs a lot of stuff pretty great, even PS1 games, but then Flycast had bad tearing (if you look at the floor of the stage in Soul Calibur). Yet, I see posts and videos raving about Dreamcast performance on Pi4. Is this really an issue for 100% of up-to-date Pi4 builds using all default drivers? It makes me want to start fresh again, which is a royal pain, just to see if something went sideways along the way.

      Q R 2 Replies Last reply 1 Apr 2021, 21:19 Reply Quote 0
      • Q
        quicksilver @GreenHawk84
        last edited by quicksilver 4 Jan 2021, 22:19 1 Apr 2021, 21:19

        @greenhawk84 flycast is especially jittery for me beyond just what normal screen tearing looks like. So I primarily use redream for dreamcast emulation.

        1 Reply Last reply Reply Quote 1
        • R
          Ranma @GreenHawk84
          last edited by 2 Apr 2021, 08:27

          @greenhawk84
          Once I set gpu_freq_min to 500 then Emulationstation didn't cause me any issues, but yes in the 3D emulation like Dreamcast and N64 you will still see tearing. The way around this I found was to go into the video settings and set G-Sync to on. This got rid of the tearing (for some reason!) and now it performs well. Don't set that for 8/16 bit stuff though or you'll see problems there (I found). There are other ways around this (such as setting kms in your config) but for now I prefer this approach until these problems are resolved.

          1 Reply Last reply Reply Quote 0
          • E
            ecto @bluestang
            last edited by ecto 16 Apr 2021, 12:29

            @bluestang Hi, I just made the switch to kms / pulseaudio as by your tutorial some posts up.
            Now I seem to have audio crackling with lr-* cores. The standalone emulators work well.

            When I look into my syslog I find some errors. I don't know if it's related, though...

            Apr 16 11:48:57 retropie kernel: [   15.082526] vc4_hdmi fef05700.hdmi: ASoC: error at snd_soc_dai_startup on fef05700.hdmi: -19
            Apr 16 11:48:57 retropie kernel: [   15.125366] vc4_hdmi fef05700.hdmi: ASoC: error at snd_soc_dai_startup on fef05700.hdmi: -19
            Apr 16 11:48:57 retropie kernel: [   15.125771] vc4_hdmi fef05700.hdmi: ASoC: error at snd_soc_dai_startup on fef05700.hdmi: -19
            Apr 16 11:48:57 retropie kernel: [   15.126146] vc4_hdmi fef05700.hdmi: ASoC: error at snd_soc_dai_startup on fef05700.hdmi: -19
            Apr 16 11:48:57 retropie kernel: [   15.131393] vc4_hdmi fef05700.hdmi: ASoC: error at snd_soc_dai_startup on fef05700.hdmi: -19
            Apr 16 11:48:57 retropie kernel: [   15.131601] vc4_hdmi fef05700.hdmi: ASoC: error at snd_soc_dai_startup on fef05700.hdmi: -19
            Apr 16 11:48:57 retropie pulseaudio[587]: E: [pulseaudio] module-alsa-card.c: Failed to find a working profile.
            Apr 16 11:48:57 retropie pulseaudio[587]: E: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: "device_id="1" name="platform-fef05700.hdmi" card_name="alsa_card.platform-fef05700.hdmi" namereg_fail=false tsched=no fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes card_properties="module-udev-detect.discovered=1""): initialization failed.
            

            Also in the syslog, when I start retroach:

            Apr 16 11:50:04 retropie kernel: [   68.619700] process 'emulators/retroarch/bin/retroarch' started with executable stack
            Apr 16 11:50:07 retropie pulseaudio[587]: E: [alsa-sink-MAI PCM vc4-hdmi-hifi-0] alsa-sink.c: ALSA weckte uns auf, um neue Daten auf das Gerät zu schreiben, doch es gab nichts zum Schreiben!
            Apr 16 11:50:07 retropie pulseaudio[587]: E: [alsa-sink-MAI PCM vc4-hdmi-hifi-0] alsa-sink.c: Dies ist höchstwahrscheinlich ein Fehler im ALSA-Treiber »vc4«. Bitte melden Sie diesen Fehler den ALSA-Entwicklern.
            Apr 16 11:50:07 retropie pulseaudio[587]: E: [alsa-sink-MAI PCM vc4-hdmi-hifi-0] alsa-sink.c: Wir wurden durch das POLLOUT-Set geweckt, allerdings lieferte ein anschließender snd_pcm_avail() den Wert 0 oder einen anderen Wert < min_avail
            

            Sorry to bother you. I also looking for a fix.

            B 1 Reply Last reply 16 Apr 2021, 13:18 Reply Quote 0
            • B
              bluestang @ecto
              last edited by 16 Apr 2021, 13:18

              @ecto can you give me details about your setup? 32-bit or 64-bit? Is it fully updated via apt? What steps did you take to enable the KMS driver? What does your boot config look like?

              E 1 Reply Last reply 16 Apr 2021, 13:38 Reply Quote 0
              • E
                ecto @bluestang
                last edited by ecto 16 Apr 2021, 13:38

                @bluestang Yeah, sure!

                I have a 32bit setup and before switching to kms I did:

                apt update 
                apt full-upgrade
                

                I also edited vc4-hdmi.conf.

                I have now the kernelversion

                Linux retropie 5.10.17-v7l+ #1403 SMP Mon Feb 22 11:33:35 GMT 2021 armv7l GNU/Linux
                

                with the following config.txt:

                disable_overscan=1
                disable_splash=1
                
                over_voltage=6
                arm_freq=2100
                gpu_freq=750
                v3d_freq=800
                hdmi_enable_4kp60=1
                
                [pi4]
                dtoverlay=vc4-kms-v3d
                max_framebuffers=2
                
                [all]
                overscan_scale=1
                hdmi_ignore_cec_init=1
                dtparam=i2c_arm=on
                enable_uart=1
                

                Im reading this thread but haven't found an answer yet.

                EDIT
                There is something strange going on: The PSX games I testd crackled because they are running much too fast! I haven't seen any settings relating to that in retroarch, but I previously haven't noticed that.

                Also the buttonmap of my joypad (xbox360) has changed?!? But that might have something to do with my retroarch update... I (once again) made too many changes at one, I guess ^_^;

                R R 2 Replies Last reply 16 Apr 2021, 14:16 Reply Quote 0
                • R
                  roslof @ecto
                  last edited by 16 Apr 2021, 14:16

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

                  Im reading this thread but haven't found an answer yet

                  Shouldn't dtoverlay=vc4-kms-v3d read as dtoverlay=vc4-kms-v3d,noaudio?

                  E B 3 Replies Last reply 16 Apr 2021, 14:35 Reply Quote 0
                  • E
                    ecto @roslof
                    last edited by 16 Apr 2021, 14:35

                    @roslof I thought that noaudio should be omitted, but I'll try it.

                    1 Reply Last reply Reply Quote 0
                    • B
                      bluestang @roslof
                      last edited by 16 Apr 2021, 15:00

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

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

                      Im reading this thread but haven't found an answer yet

                      Shouldn't dtoverlay=vc4-kms-v3d read as dtoverlay=vc4-kms-v3d,noaudio?

                      @ecto

                      The noaudio option is if you want to continue to run the Broadcom firmware audio driver. The KMS driver is not only a video driver but also an audio HDMI driver as well.

                      It is purely up to the user which audio output they want.

                      B 1 Reply Last reply 16 Apr 2021, 15:05 Reply Quote 0
                      • B
                        bluestang @bluestang
                        last edited by 16 Apr 2021, 15:05

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

                        E 1 Reply Last reply 16 Apr 2021, 15:17 Reply Quote 0
                        • E
                          ecto @bluestang
                          last edited by 16 Apr 2021, 15:17

                          @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
                          • E
                            ecto @roslof
                            last edited by ecto 16 Apr 2021, 16:03

                            @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 17 Apr 2021, 03:36 Reply Quote 0
                            • R
                              Ranma @ecto
                              last edited by 16 Apr 2021, 17:18

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

                              E 1 Reply Last reply 16 Apr 2021, 20:33 Reply Quote 0
                              • E
                                ecto @Ranma
                                last edited by 16 Apr 2021, 20:33

                                @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 17 Apr 2021, 03:36

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

                                  E 1 Reply Last reply 17 Apr 2021, 07:28 Reply Quote 0
                                  • E
                                    ecto @bluestang
                                    last edited by ecto 17 Apr 2021, 07:28

                                    @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 17 Apr 2021, 13:44 Reply Quote 0
                                    • B
                                      bluestang @ecto
                                      last edited by bluestang 17 Apr 2021, 13:44

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

                                      E 1 Reply Last reply 17 Apr 2021, 14:34 Reply Quote 1
                                      • E
                                        ecto @bluestang
                                        last edited by ecto 17 Apr 2021, 14:34

                                        @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 17 Apr 2021, 15:03 Reply Quote 0
                                        • B
                                          bluestang @ecto
                                          last edited by 17 Apr 2021, 15:03

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

                                          E 2 Replies Last reply 19 Apr 2021, 07:46 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.

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