• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
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

Screen tearing in pi 4

Scheduled Pinned Locked Moved Help and Support
tearingmarqueepi 4
21 Posts 7 Posters 5.3k 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.
  • J
    jigidyjim
    last edited by jigidyjim 9 Jan 2021, 04:18

    Raspberry Pi 4
    Retropie v 4.7.1
    Mame lr-2003
    Primary display: Asus VA27EHE
    Secondary display (using PiMarquee2): VSDisplay 14.9

    Hi all - most of my games work great so far, but I tried 2 horizontal scrollers (wonder boy and super Mario ) and both had what looked like severe screen tearing.

    I’ve seen a lot of posts on this, but they are all before Retropie 4.7 came out which removed the beta label, so I don’t know if things have changed or not since.

    Any ideas on if those threads are still relevant for how to address this? Or did things change in 4.7?

    I have no idea if the second display maybe also impacts things. I can try unplugging it and see.

    Thanks in advance.

    J 1 Reply Last reply 10 Jan 2021, 23:25 Reply Quote 0
    • J
      jigidyjim @jigidyjim
      last edited by 10 Jan 2021, 23:25

      Based on an older thread I tried changing my mame video mode, but it didn’t help.

      The preferred mode in the mame menu says:

      87-0 1920x1080 @ 60hz n/a (148.5Mhz, phsync, pvsync, preferred, d (.... then it is cut off)

      I tried using

      87-14 1280x720 @ 60 hz n/a (74.25 MHz, phsync, pvsync, driver)

      But still saw tearing (or what I think is tearing, the screen stutters/glitches).

      Any tips?

      J 1 Reply Last reply 17 Jan 2021, 23:18 Reply Quote 0
      • J
        jigidyjim @jigidyjim
        last edited by 17 Jan 2021, 23:18

        Still working on this one....

        based on this thread I was wondering if I was somehow using vc4-fkms-v3d, which according to the thread, may be my problems.

        Sure enough, I opened my boot.cfg, and it looks like this:

        [pi4]
        # Enable DRM VC4 V3D driver on top of the dispmanx display stack
        dtoverlay=vc4-fkms-v3d
        max_framebuffers=2
        
        [all]
        #dtoverlay=vc4-fkms-v3d
        overscan_scale=1
        

        I switched the dtoverlay to use vc4-kms-v3d, and I didn't see the normal glitching/tearing that I see (though I only tested 5 minutes). However, two things broke: the second display, and the audio. (I really have no idea what I'm doing here, I just changed the parameter to see what would happen).

        I think the only 2 things I've installed are Pi Marquee 2, and the Bevel Project. I don't remember editing that boot config file myself, but it's entirely possible I did when following some instructions somewhere...

        If anyone has more advice, I'd love to hear it! Seems like I might be getting close to a solution somewhere...

        R S 2 Replies Last reply 18 Jan 2021, 19:33 Reply Quote 0
        • R
          Ranma @jigidyjim
          last edited by 18 Jan 2021, 19:33

          @jigidyjim

          I have the same issue on my new Pi 400 and haven't found anything that works consistently. I certainly couldn't get the fkms change to work at all. The machine just wouldn't boot. I can set the G-sync thing on which works well for 3D games but breaks 2D ones by introducing the tearing again.

          But I notice that it isn't just games that tear. Using Kodi I have to set the GUI to 30fps or the screen pretty much tears apart trying to navigate it. Is this a related issue that isn't unique to the Retroarch part of Retropie? Is this a GPU driver issue at the end of the day?

          J D 2 Replies Last reply 19 Jan 2021, 00:47 Reply Quote 0
          • J
            jigidyjim @Ranma
            last edited by 19 Jan 2021, 00:47

            @ranma are you using Pi Marquee 2 as well? I’m starting to think this might be where my issue is. After reading a bit more about fake mode and max_framebuffers, it seems like fake mode combines them into one frame buffer. I’m wondering if that’s how Pi Marquee 2 works but I have no idea yet.

            1 Reply Last reply Reply Quote 0
            • D
              dankcushions Global Moderator @Ranma
              last edited by 19 Jan 2021, 10:58

              pure kms will cause problems for anything that relies on the old firmware layer (for example omx videos, iirc). this marquee thing may well rely on that stuff also, so if you want to stop tearing you're probably out of luck unless you stop using it.

              J 1 Reply Last reply 19 Jan 2021, 17:01 Reply Quote 0
              • J
                jigidyjim @dankcushions
                last edited by 19 Jan 2021, 17:01

                @dankcushions thanks for the info. Out of curiosity, is there anything official in retropie to support a second display on the pi 4 that I could look at using instead? Pi Marquee 2 was the only way I could find to drive the second display.

                D 1 Reply Last reply 20 Jan 2021, 01:35 Reply Quote 0
                • D
                  dankcushions Global Moderator @jigidyjim
                  last edited by 20 Jan 2021, 01:35

                  @jigidyjim not that i'm aware of. i don't know how the 2 displays are driven within kms, but it's presumably possible. one for the pi marquee people to look into, i suppose.

                  1 Reply Last reply Reply Quote 0
                  • S
                    senseless @jigidyjim
                    last edited by senseless 30 Jan 2021, 12:38

                    @jigidyjim I managed to get this up and running using KMS. The tearing is no longer an issue for me and overall video performance seems better.

                    I followed this thread and instructions from bluestang: https://retropie.org.uk/forum/topic/27299/low-framerate-on-main-emulationstation-menu-pi-4/115?lang=nl

                    Initially using option 1 I lost audio in emulationstation and games. I needed to run the audio config of retropie and ensure that in the sound settings of emulationstation the audio card is on default and the audio device is on master.

                    Took me quite some time to get everything working again but no more tearing. I also included the v3d_freq_min=500 option to ensure emulationstation runs at a stable 60 fps.

                    The only thing that doesn't run anymore is my startup video and I get error messages about a failed component to create 'vc.ril.hvs'which does not seem to have any impact and is directly related to using KMS (I think). UPDATE: setting the OMX Player to use hardware accelation fixed it, but downside it that it does not display preview video's anymore.. weird.

                    Hope this helps anyone attempting this.

                    B J P 3 Replies Last reply 30 Jan 2021, 15:36 Reply Quote 0
                    • B
                      bluestang @senseless
                      last edited by 30 Jan 2021, 15:36

                      @senseless

                      The KMS video driver will never work with OMXplayer since it was designed to work with FKMS only.

                      Once you switch over you can only use VLC. I would disable all OMX options in ES if you are using KMS.

                      1 Reply Last reply Reply Quote 0
                      • J
                        jigidyjim @senseless
                        last edited by 30 Jan 2021, 19:29

                        @senseless awesome thanks!!!

                        Just to clarify since I don’t see it mentioned in that thread - are you also using a marquee display? My rough understanding is that if I do all that my marquee will break?

                        J S 2 Replies Last reply 31 Jan 2021, 02:38 Reply Quote 0
                        • J
                          jigidyjim @jigidyjim
                          last edited by 31 Jan 2021, 02:38

                          I went over to the raspberry pi forums and it sounds like the official move to kernel 5.10 is almost here, so I might just wait for that instead!

                          1 Reply Last reply Reply Quote 0
                          • S
                            senseless
                            last edited by 31 Jan 2021, 10:44

                            @bluestang

                            Thanks, I didn't know that. Just dived into the whole retropie world and learning on the job :). Having a blast and dusting off my unix knowledge in the process haha. Good to hear the 5.10 release is coming and waiting for this is probably the best option for now ;).

                            1 Reply Last reply Reply Quote 0
                            • S
                              senseless @jigidyjim
                              last edited by 31 Jan 2021, 10:54

                              @jigidyjim said in Screen tearing in pi 4:

                              marquee display?

                              I'm not sure I fully understand your question or that we are talking about the same thing but I use bezels for all my systems and they still work/display during a game.

                              1 Reply Last reply Reply Quote 0
                              • P
                                phos @senseless
                                last edited by phos 2 Jan 2021, 20:34 1 Feb 2021, 20:04

                                @senseless

                                Would you be willing to create and share an IMG of your RetroPie install with KMS? I have followed the instructions from @bluestang as well as instructions elsewhere on the forums and have not been able to get KMS to boot on Pi 4.

                                If I had a working IMG, I could at least confirm it may be just a conflict between my VGA666 and KMS and not an error on my side.

                                Thank you, would be quite helpful to myself and others trying to get KMS working.

                                B 1 Reply Last reply 2 Feb 2021, 00:56 Reply Quote 0
                                • B
                                  bluestang @phos
                                  last edited by 2 Feb 2021, 00:56

                                  @phos said in Screen tearing in pi 4:

                                  @senseless

                                  Would you be willing to create and share an IMG of your RetroPie install with KMS? I have followed the instructions from @bluestang as well as instructions elsewhere on the forums and have not been able to get KMS to boot on Pi 4.

                                  If I had a working IMG, I could at least confirm it may be just a conflict between my VGA666 and KMS and not an error on my side.

                                  Thank you, would be quite helpful to myself and others trying to get KMS working.

                                  Are you able to test KMS with a regular monitor or TV?

                                  If the problem exists with the VGA666 than you may need to seek help on the Raspberry Pi forums.

                                  P 1 Reply Last reply 2 Feb 2021, 02:14 Reply Quote 0
                                  • P
                                    phos @bluestang
                                    last edited by 2 Feb 2021, 02:14

                                    @bluestang

                                    I don't have the proper HDMI cable to test, although I could get one.

                                    I made a post detailing my issue. Trying to boot ES after the Pi boot up freezes via SSH only returns an SDL error.

                                    https://retropie.org.uk/forum/topic/29488/working-kms-image-with-newest-retropie-on-pi-4-help-with-config-with-vga666?_=1612231814343

                                    I did also try installing Raspberry Pi OS instead of RetroPie and I also get a freeze on boot up in RPiOS with KMS on. So, it could very well be an issue related to VGA666.

                                    B 1 Reply Last reply 14 Feb 2021, 17:35 Reply Quote 0
                                    • B
                                      bluestang @phos
                                      last edited by 14 Feb 2021, 17:35

                                      @phos said in Screen tearing in pi 4:

                                      @bluestang

                                      I don't have the proper HDMI cable to test, although I could get one.

                                      I made a post detailing my issue. Trying to boot ES after the Pi boot up freezes via SSH only returns an SDL error.

                                      https://retropie.org.uk/forum/topic/29488/working-kms-image-with-newest-retropie-on-pi-4-help-with-config-with-vga666?_=1612231814343

                                      I did also try installing Raspberry Pi OS instead of RetroPie and I also get a freeze on boot up in RPiOS with KMS on. So, it could very well be an issue related to VGA666.

                                      Looks like VGA666 is not supported under KMS yet.

                                      Keep an eye on this PR and when it’s merged give it go:

                                      https://github.com/raspberrypi/linux/pull/4141

                                      1 Reply Last reply Reply Quote 0
                                      • J
                                        jigidyjim
                                        last edited by 15 Feb 2021, 04:29

                                        I finally updated to kernel 5.10 now that it has been released officially.

                                        However, I'm still trying to figure out how I can switch to the kms driver, so that I can get rid of my screen tearing.

                                        My problem is that I am using Pi Marquee 2 to power my second display. If I switch to the kms driver, that stops working.

                                        I looked through the source code of Pi Marquee 2, and it looks like it using "omxiv" to display pngs to the second display. And from what I've been reading, omxiv is based on omxplayer, and omxplayer will never be supported on the kms driver. At least, that is my very shallow understanding of the current state of the world.

                                        But really I don't need the video support in all this as I'm not using it at all. All I'm using this for is displaying a simple png to the second display (though the image fades as it switches images are a nice touch!). I'm wondering if anyone knows of a way to do that other than omxiv? if such a program exists that can do that, maybe I'll try editing the python script myself and pointing it at some other program. No idea if it's that simple, but thought I'd ask!

                                        mituM 1 Reply Last reply 15 Feb 2021, 04:41 Reply Quote 0
                                        • mituM
                                          mitu Global Moderator @jigidyjim
                                          last edited by 15 Feb 2021, 04:41

                                          @jigidyjim said in Screen tearing in pi 4:

                                          I'm wondering if anyone knows of a way to do that other than omxiv?

                                          Try using fbi, it's an image viewer that works on the console also.

                                          J 1 Reply Last reply 15 Feb 2021, 05:04 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