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

    An input lag investigation

    Scheduled Pinned Locked Moved General Discussion and Gaming
    input lag
    36 Posts 11 Posters 62.4k 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.
    • davejD
      davej @ScOULaris
      last edited by davej

      @ScOULaris said in An input lag investigation:

      I'm having a hard time choosing. Why is it that OpenGL inherently has more input lag than Dispmanx? Is there theoretically anything that can be done to achieve parity between the two?

      The GL driver has to do lots of extra processing (i.e. running the shader) that the Dispmanx driver doesn't. Keep in mind the shader has to be run for every pixel on the screen - which for a 1080 screen is about 1.5 million times. You can see where the extra lag comes from.

      Lag parity isn't possible because of this. With a really fast video card it could be reduced but that's not an option on the Pi.

      S 1 Reply Last reply Reply Quote 0
      • S
        silentq
        last edited by

        Question about the NES and SNES input lag fix. Should I remove the video hard sync and frame settings after applying the fix? I know those were previously known ways to fix the input lag slightly but will that throw anything off with these new fixes in place?

        1 Reply Last reply Reply Quote 0
        • BuZzB
          BuZz administrators
          last edited by

          Video hard sync does nothing on the rpi

          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

          S 1 Reply Last reply Reply Quote 0
          • S
            silentq @BuZz
            last edited by

            @BuZz Should this be removed from the Git page then?
            https://github.com/retropie/retropie-setup/wiki/Overclocking#improving-input-lag-and-delay

            BuZzB 1 Reply Last reply Reply Quote 0
            • BuZzB
              BuZz administrators @silentq
              last edited by

              @silentq yes. The wiki is edited by the community so mistakes do happen.

              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 0
              • S
                ScOULaris @davej
                last edited by

                @davej said in An input lag investigation:

                @ScOULaris said in An input lag investigation:

                I'm having a hard time choosing. Why is it that OpenGL inherently has more input lag than Dispmanx? Is there theoretically anything that can be done to achieve parity between the two?

                The GL driver has to do lots of extra processing (i.e. running the shader) that the Dispmanx driver doesn't. Keep in mind the shader has to be run for every pixel on the screen - which for a 1080 screen is about 1.5 million times. You can see where the extra lag comes from.

                Lag parity isn't possible because of this. With a really fast video card it could be reduced but that's not an option on the Pi.

                Hm. So I understand how a shader can add more input delay (increasingly in correlation with the complexity of the shader). Would lowering the Retroarch rendering resolution to 720p instead of the default 1080p for SNES have any impact on input delay since it's half of the pixels that need to be processed by the shader?

                davejD 1 Reply Last reply Reply Quote 0
                • BuZzB
                  BuZz administrators
                  last edited by BuZz

                  The default is not 1080p. The default is the video output resolution, so depends on your screen. afaik it will affect it, as the final scale from render res to video output res is done via dispmanx. I tend to run my tv in 720p for retropie anyway switching it in /boot/config.txt

                  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

                  S 1 Reply Last reply Reply Quote 0
                  • S
                    ScOULaris @BuZz
                    last edited by

                    @BuZz said in An input lag investigation:

                    The default is not 1080p. The default is the video output resolution, so depends on your screen. afaik it will affect it, as the final scale from render res to video output res is done via dispmanx. I tend to run my tv in 720p for retropie anyway switching it in /boot/config.txt

                    Yeah for me the video output resolution is 1080p, so the default render resolution right now is 1080p for all of my emulators as well. Should lowering the render resolution to 720p theoretically lessen input lag because the shader overhead is lessened, or would it actually increase input delay because it would add an extra scaling step to bring the render resolution up to the video output res?

                    1 Reply Last reply Reply Quote 0
                    • BuZzB
                      BuZz administrators
                      last edited by

                      It should reduce lag in theory, but instead of doing that, if your tv upscales from 720p well, you could just use a 720p video mode. It is possible that screens that have a delay due to post processing could be quicker at a lower res also.

                      dispmanx also scales with a filter by default, so it might look better with a 720p video mode with the tv doing the scaling vs dispmanx (I prefer it on my tv)

                      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 0
                      • davejD
                        davej @ScOULaris
                        last edited by

                        @ScOULaris said in An input lag investigation:

                        Hm. So I understand how a shader can add more input delay (increasingly in correlation with the complexity of the shader). Would lowering the Retroarch rendering resolution to 720p instead of the default 1080p for SNES have any impact on input delay since it's half of the pixels that need to be processed by the shader?

                        Yes, but probably not as much as you'd think. You'll also have poorer image quality to deal with. crt-pi's scan lines work best when scaling up 4x or more. If you are going to use a lower resolution than that I'd suggest using integer scaling - and don't go below 3x.

                        Scaling in the display hardware is essentially free but you are probably better off setting your Pi to a 720p screen mode and letting your TV do the upscaling. Try both and see which works best. If the scan lines are hard to see with such as low resolution, try setting MASK_TYPE to 0.

                        1 Reply Last reply Reply Quote 0
                        • BuZzB
                          BuZz administrators
                          last edited by BuZz

                          Just to detail my tv/kodi setup downstairs:

                          /boot/config.txt contains

                          hdmi_group=1
                          hdmi_mode=4
                          

                          which is 720 @ 60hz

                          /opt/retropie/configs/all/autostart.sh contains

                          sudo mount -t cifs -o username=blah,password=blah //mynas/retropie /home/pi/RetroPie
                          kodi #auto
                          emulationstation #auto
                          

                          kodi is configured to display and output at 1080p (it can change video mode itself)

                          then I exit kodi, and I'm ready to game (in 720p)

                          the only other thing I have to do is switch the tv to game mode and back.

                          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 0
                          • scrappbrappS
                            scrappbrapp
                            last edited by

                            how do you change the display driver to Dispmanx? i assume mine is running stock, i never knew how to change.. Ive also yet to learn about shaders, so I'm not too worried about losing that ability.

                            1 Reply Last reply Reply Quote 0
                            • BuZzB
                              BuZz administrators
                              last edited by

                              you can do it via the configuration editor (in advanced mode)

                              https://github.com/retropie/retropie-setup/wiki/Configuration-Editor

                              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 0
                              • scrappbrappS
                                scrappbrapp
                                last edited by

                                thank you, i found it.
                                Unfortunately, i think I noticed WORSE play on dispmanx.... I can tell that the video quality is worse... but mashing jump in mario world created a worse experience than before with GL. Also trying to do a "speed run" caused me to not have some jumps registered, thus plowing right into enemies...

                                1 Reply Last reply Reply Quote 0
                                • scrappbrappS
                                  scrappbrapp
                                  last edited by

                                  This post is deleted!
                                  1 Reply Last reply Reply Quote 0
                                  • S
                                    silentq
                                    last edited by

                                    I updated from binary and source and changed over to dismanx, I thought the video smoothing was supposed to be gone? I even tried to turn it off in retroarch.cfg for lr-fceumm by make video_smoothing="false" and its still there? Am I missing something?

                                    BuZzB 1 Reply Last reply Reply Quote 0
                                    • BuZzB
                                      BuZz administrators @silentq
                                      last edited by

                                      @silentq need to build latest retroarch from source. It only recently got support for switching scaling mode

                                      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

                                      BuZzB 1 Reply Last reply Reply Quote 0
                                      • BuZzB
                                        BuZz administrators @BuZz
                                        last edited by

                                        At least as I remember

                                        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 0
                                        • S
                                          silentq
                                          last edited by silentq

                                          Not sure if this is a bug, its not really major but I noticed using the dismanx driver that the retroarch status notifications at the bottom of the screen don't show anymore. Status messages like when you save or load state or a input remapping status don't show. Just thought I would mention it its not major but figured I would add that.

                                          1 Reply Last reply Reply Quote 0
                                          • RionR
                                            Rion
                                            last edited by

                                            Sorry to reply to and old thread but this is the updated link to the same Thread at the libretro forums. I think this one is more up to date.

                                            @Brunnis
                                            An input lag investigation

                                            FBNeo rom filtering
                                            Mame2003 Arcade Bezels
                                            Fba Arcade Bezels
                                            Fba NeoGeo Bezels

                                            1 Reply Last reply 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.