• 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.0k 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.
  • G
    George Spiggott @bluestang
    last edited by George Spiggott 16 Mar 2021, 21:18

    @bluestang I did all that apart from starting the desktop. I have no desktop AFAIK on Retropie. I currently am not getting any sound.

    After the upgrade I have the following:

    Kernel: 5.10.17-v7l+
    Mesa: 19.3.2-1~bpo10+1~rpt3

    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 2 Replies Last reply 16 Mar 2021, 22:34 Reply Quote 0
    • B
      bluestang @George Spiggott
      last edited by 16 Mar 2021, 22:34

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

      @bluestang I did all that apart from starting the desktop. I have no desktop AFAIK on Retropie. I currently am not getting any sound.

      After the upgrade I have the following:

      Kernel: 5.10.17-v7l+
      Mesa: 19.3.2-1~bpo10+1~rpt3

      I had to install the desktop and then make sure that the sound output was enabled by clicking the sound applet in the desktop taskbar.

      I don’t believe there is an option in raspi-config for this yet as the KMS driver is still in testing.

      Although this specific sound issue, is something I’ve come across before and warrants a fix by the RPi dev team IMHO.

      1 Reply Last reply Reply Quote 0
      • G
        GreenHawk84
        last edited by GreenHawk84 17 Mar 2021, 02:34

        Today I was playing around with overclocks by monitoring the ARM freq live while I flipped the ES menu and started games. I noticed that Mortal Kombat 2 Plus (mk2p) on Mame2003 Plus had significant tearing vs. Mortal Kombat 2 (regular mk2) on Mame2016. Not sure if maybe different cores are handling this differently? Just something I noticed.

        FYI I have decided to leave my ARM clock as default for now.

        1 Reply Last reply Reply Quote 0
        • R
          roslof @akamming
          last edited by roslof 17 Mar 2021, 14:06

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

          I noticed some errors on the console. Haven't noticed them before. The only change i lately did was the move to 5.4 using the kms driver. So i think it is related.

          mmal: mmal_vc_component_create: failed to create component 'vc.ril.hvs' (1:ENOMEM) 
          mmal: mmal_component_create_core: could not create component 'vc.ril.hvs' (1)
          

          All works fine, dos anyone know what they mean and how to fix (or how they can be supressed, alle seems to work fine...)?

          @akamming I just started tinkering with KMS and my console also displays these errors each time a video snap plays (using VLC). Like you, I'm having no visual/audio issues, but these errors appear on the console. The Interwebs were not much help. Were you ever able to find a solution?

          B S 2 Replies Last reply 21 Mar 2021, 01:19 Reply Quote 0
          • B
            bluestang @George Spiggott
            last edited by bluestang 21 Mar 2021, 01:17

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

            @bluestang I did all that apart from starting the desktop. I have no desktop AFAIK on Retropie. I currently am not getting any sound.

            After the upgrade I have the following:

            Kernel: 5.10.17-v7l+
            Mesa: 19.3.2-1~bpo10+1~rpt3

            Update - @George-Spiggott

            There are 2 routes you can choose:

            1. The most simplest one is to delete the .asoundrc file in your home directory. This will enable audio output from the KMS audio driver, however, mixing is not available. So if you have a BGM or any other music audio playing in the background it will not play as this configuration only allows for a single audio source output.

            2. The PulseAudio solution will overcome the mixing limitation as described above. Check to see if you have PulseAudio installed -- apt policy pulseaudio. If not, install from apt and then run systemctl --user enable pulseaudio. Reboot and you should have sound from the KMS audio driver.

            RPiOS ditched the default ALSA sound configs in favor of PulseAudio back in Dec '20.

            1 Reply Last reply Reply Quote 0
            • B
              bluestang @roslof
              last edited by bluestang 21 Mar 2021, 01:19

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

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

              I noticed some errors on the console. Haven't noticed them before. The only change i lately did was the move to 5.4 using the kms driver. So i think it is related.

              mmal: mmal_vc_component_create: failed to create component 'vc.ril.hvs' (1:ENOMEM) 
              mmal: mmal_component_create_core: could not create component 'vc.ril.hvs' (1)
              

              All works fine, dos anyone know what they mean and how to fix (or how they can be supressed, alle seems to work fine...)?

              @akamming I just started tinkering with KMS and my console also displays these errors each time a video snap plays (using VLC). Like you, I'm having no visual/audio issues, but these errors appear on the console. The Interwebs were not much help. Were you ever able to find a solution?

              MMAL is incompatible with the KMS driver. These are just msgs that are gracefully saying that it is incompatible.

              R 1 Reply Last reply 21 Mar 2021, 03:55 Reply Quote 0
              • R
                roslof @bluestang
                last edited by 21 Mar 2021, 03:55

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

                MMAL is incompatible with the KMS driver. These are just msgs that are gracefully saying that it is incompatible.

                Thanks bluestang. By chance, are you aware of a way to suppress these messages?

                B 1 Reply Last reply 21 Mar 2021, 17:01 Reply Quote 0
                • B
                  bluestang @roslof
                  last edited by 21 Mar 2021, 17:01

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

                  Thanks bluestang. By chance, are you aware of a way to suppress these messages?

                  Not really...there is ongoing work with the KMS video driver to support hw acceleration video decoding using V4L2 codecs. I believe Kodi is already using them...10-bit and 8-bit HDR hw video decoding are part of the KMS feature set.

                  MMAL is a Broadcom blob, whereas V4L2 is open-source API and is standard on Linux distros.

                  I failed to mention to you that using the KMS driver, as it currently stands, disables hw acceleration of video decoding. Eventually, this will be fixed in KMS but I don't see it as too big of a deal since I don't consume a lot of video media on my Pi4. Video snaps in ES typically are not that cpu intensive so it seems to be OK for the time being.

                  1 Reply Last reply Reply Quote 1
                  • S
                    SaturnX @roslof
                    last edited by SaturnX 24 Mar 2021, 02:33

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

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

                    I noticed some errors on the console. Haven't noticed them before. The only change i lately did was the move to 5.4 using the kms driver. So i think it is related.

                    mmal: mmal_vc_component_create: failed to create component 'vc.ril.hvs' (1:ENOMEM) 
                    mmal: mmal_component_create_core: could not create component 'vc.ril.hvs' (1)
                    

                    All works fine, dos anyone know what they mean and how to fix (or how they can be supressed, alle seems to work fine...)?

                    @akamming I just started tinkering with KMS and my console also displays these errors each time a video snap plays (using VLC). Like you, I'm having no visual/audio issues, but these errors appear on the console. The Interwebs were not much help. Were you ever able to find a solution?

                    @roslof @akamming I just moved my Pi4 onto the full KMS driver on kernel 5.10.17 and noticed the same errors on my console when I have video snaps on (VLC). Likewise, I don’t experience any audio/video issues and turning off video snaps and rebooting stops the errors.

                    Been trying to scour the web but nothing came up. Just wanted to share that I’m seeing the same and also looking for a solution.

                    B 1 Reply Last reply 24 Mar 2021, 02:39 Reply Quote 0
                    • B
                      bluestang @SaturnX
                      last edited by 24 Mar 2021, 02:39

                      @saturnx

                      https://retropie.org.uk/forum/topic/25370/good-news-regarding-tearing-and-low-emulationstation-performance-on-pi-4/162?_=1616553266707

                      S 1 Reply Last reply 24 Mar 2021, 03:15 Reply Quote 1
                      • 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.

                          quicksilverQ RanmaR 2 Replies Last reply 1 Apr 2021, 21:19 Reply Quote 0
                          • quicksilverQ
                            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
                            • RanmaR
                              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
                              • ectoE
                                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?

                                  ectoE 1 Reply Last reply 16 Apr 2021, 13:38 Reply Quote 0
                                  • ectoE
                                    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 RanmaR 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?

                                      ectoE B 3 Replies Last reply 16 Apr 2021, 14:35 Reply Quote 0
                                      • ectoE
                                        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
                                          • 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