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

    Retropie 4.3 INput Lag - Help Wanted

    Scheduled Pinned Locked Moved Help and Support
    retropie4.3inputlaglr-mame2003
    36 Posts 9 Posters 10.7k 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.
    • M
      mikemolang
      last edited by

      Hey folks,

      I have a clean install of Retropie 4.3, a good monitor set to Game Mode, and simple keyboard (ipac2) controllers. I am using lr-mame2003 and full zipped 0.78 roms. (There is additional info in the video showing settings I am using.)

      I am getting what I feel is an acceptable amount of lag. But I need to know; am I just being picky, or am I doing something wrong? You can see the video of it in action at:

      Thank you for reading.
      MML

      1 Reply Last reply Reply Quote 0
      • dankcushionsD
        dankcushions Global Moderator
        last edited by

        great video! if only all reports came like this...

        does the delay only happen with spinner games? what about buttons only?

        M 1 Reply Last reply Reply Quote 0
        • M
          mikemolang @dankcushions
          last edited by mikemolang

          @dankcushions

          Thank you dankcushions.

          My Retropie is set for 1920 x 1080 at 60 frames per second. However, the camera that I used to determine my input lag runs at 29.97 frames per second. So, I need to double the number of frames seen on the camera to convert back to Retropie frames.

          Arkanoid Spinner Input Lag = 12 Retropie frames
          Arkanoid Keyboard Input Lag = 12 Retropie frames

          Asteroids Keyboard Input Lag = 8 Retropie frames
          The lag is the same to start moving once key is pressed and to stop after key is released, as expected.

          Dig Dug Keyboard Input Lag = 10 Retropie frames

          Best,
          MML

          M 1 Reply Last reply Reply Quote 0
          • DarksaviorD
            Darksavior
            last edited by Darksavior

            I use a pad, so I can't speak from experience, but have you tried the same games in lr-fbalpha or another version of mame? Trying a different emulator might have different results.

            M 1 Reply Last reply Reply Quote 0
            • M
              mikemolang @Darksavior
              last edited by

              @darksavior said in Retropie 4.3 INput Lag - Help Wanted:

              have you tried the same games in lr-fbalpha or another version of mame

              Thanks for the suggestion, darksavior.

              Right now I am trying to baseline the performance of Retropie in general. Trying other emulators may be a good future step if I determine that others are able to get measurably better results than I am already getting.

              I would like to hear from folks regarding the actual input lag they experience so I know if there is reason for me to try to improve on what I have, or if I have already achieved pretty much the best that I can expect.

              Best,
              MML

              1 Reply Last reply Reply Quote 0
              • M
                mikemolang @mikemolang
                last edited by

                This post is deleted!
                1 Reply Last reply Reply Quote 0
                • R
                  rsn8887
                  last edited by rsn8887

                  10-12 frames of lag is hardly acceptable! I would say 1-3 frames might be acceptable. Games like Street Fighter become almost unplayable at more than 3 frames of lag. Some later levels in Super Mario World such as the ice levels in Special World will be almost impossible with the lag you reported.

                  M 1 Reply Last reply Reply Quote 0
                  • M
                    mikemolang @rsn8887
                    last edited by

                    @rsn8887

                    Thank you. That is what I thought, too.

                    Can you tell me how many frames of input lag you are getting for these titles, and how you measured it? Also, what configuration changes were made to get there, as compared to a clean install?

                    Thanks!
                    MML

                    1 Reply Last reply Reply Quote 0
                    • R
                      rsn8887
                      last edited by

                      I did only test with Mario World on SNES (jump button lag). Since you have the test setup I would do some more debugging to single out the cause of the issue. For example, do you also experience this lag in other games and systems? If not, it is a specific issue of the Retroarch mame core itself.

                      I did not make any configuration changes to my system apart from disabling on board wifi.

                      The only solution I found to reduce the input lag I experienced was to use Dualshock 4 PlayStation controllers with the official Sony USB Wireless Adapters, as explained in the Retropie docs.

                      I bet there are other ways to reduce input lag, but that is what worked for me.

                      1 Reply Last reply Reply Quote 0
                      • DarksaviorD
                        Darksavior
                        last edited by Darksavior

                        Try a usb controller to rule out the joystick isn't the problem. Try another monitor or tv to rule that out. Not all game mode's are created equal. Also, check if that "AMA" setting is on, it supposedly decreases response time.

                        M 1 Reply Last reply Reply Quote 0
                        • R
                          rsn8887
                          last edited by

                          I just figured out that my solution of using DS4 controllers with the Sony USB wireless dongle only works well for one player. I have two DS4 controllers and two dongles and the second player has very large input lag.

                          So this problem of input lag, especially for multiplayer, is far from being solved it seems.

                          1 Reply Last reply Reply Quote 0
                          • K
                            Kookamunga
                            last edited by Kookamunga

                            Have you tried reducing the resolution of the mame core? I keep mine at 640x480 where the aspect ratio will allow, and everything seems to run quite well, with hardly any discernable lag. Most of these games are close to this resolution as a source anyways, so taxing the Pi with such a high resolution seems unnecessary. I use HQScale2x as a shader, which eliminates most of the downfall of running a lower resolution on an LCD display, with minimal performance degradation.

                            M 1 Reply Last reply Reply Quote 0
                            • M
                              mikemolang @Darksavior
                              last edited by mikemolang

                              @darksavior

                              I tried a Buffalo classic USB gamepad. First I tried it while the Logitech and the ipac2 were still connected, then I removed the Logitech and the ipac2. I rebooted the system between each change. There was no change.

                              I tried a 7 year old 27" Sanyo HDTV with HDMI, set to Game mode. It was no better, and seemed slightly worse.

                              My monitor is a BenQ GL2760H, which I purchased because it gets rave reviews for being a fast gaming monitor.
                              (https://www.amazon.com/gp/product/B00IZBIMLK/ref=oh_aui_detailpage_o06_s02?ie=UTF8&psc=1)

                              I turned AMA on, and there was no change.

                              I would love it if someone out there is willing to run a test using the following, and tell me their input lag. I need an apples to apples comparision:

                              Raspberry Pi 3B
                              Retropie 4.3, clean install, no configuration changes except mapping input control
                              arknoidu.zip 0.78 ROM
                              lr-mame2003 emulator
                              Keyboard input
                              Extra points for using a BenQ GL2760H!!!

                              Another thought...
                              I copy my ROMs to the microSD card (128GB SanDisk). Are there any known problem with that, versus running them from a USB thumb drive?

                              Best,
                              MML

                              1 Reply Last reply Reply Quote 0
                              • M
                                mikemolang @Kookamunga
                                last edited by mikemolang

                                @kookamunga

                                Regarding, "Have you tried reducing the resolution of the mame core? I keep mine at 640x480 where the aspect ratio will allow"

                                No, I have not, but I am willing to try. Can you point me to where I should make that change?

                                THANKS!!!
                                MML

                                chipsnblipC K 2 Replies Last reply Reply Quote 0
                                • chipsnblipC
                                  chipsnblip @mikemolang
                                  last edited by

                                  @mikemolang

                                  https://github.com/RetroPie/RetroPie-setup/wiki/Speed-Issues#resolution

                                  also try toggling on/off the v-sync and threaded video settings in retroarch

                                  M 1 Reply Last reply Reply Quote 0
                                  • K
                                    Kookamunga @mikemolang
                                    last edited by

                                    @mikemolang While the game is booting, repeatedly press select on your gamepad. From there you will get a menu asking you your default options, and you can select the default resolution for either just the current rom you are loading, or for the core across the board. Once you have changed the default resolution, then you can select launch game. From then on, every game you load that uses that core will run at that resolution. The only core I run higher than 640x480 is GBA, which I run at 1280x720 strictly because of the aspect ratio. Your mileage may vary, as each TV handles lower resolutions differently. But on my Toshiba 50" TV, color somehow seems more vibrant, and everything seems more responsive. You may also need to change your aspect ratio on your TV so as not to stretch the image.

                                    1 Reply Last reply Reply Quote 0
                                    • M
                                      mikemolang @chipsnblip
                                      last edited by mikemolang

                                      @chipsnblip

                                      Thanks.

                                      These were already set by default:

                                      • Edit /opt/retropie/configs/all/retroarch.cfg
                                        list itemvideo_threaded = true
                                        video_smooth = false
                                        audio_driver = alsathread
                                        rewind_enable = false

                                      I decreased the Render Resolution to 640 x 480 in the runcommand menu, just before the game starts. It had no effect on input lag, although the image was a little degraded.

                                      I am using my TV's native resolution 1080p (1920x1080).

                                      Game Mode has been enabled throughout all testing, and the monitor is set to the only HDMI port when it powers on, which is where the Raspberry Pi is plugged in.

                                      I forgot to retest the toggling on/off the v-sync and threaded video settings in retroarch. I am pretty sure that I already tried those, but will try again tomorrow.

                                      Someone, please... Do a clean install and get definitive numbers based on the same set up so that we can be sure that there really is something here, or not. It seems uncanny to me that with such a basic, clean setup (RP3B, Retropie 4.3, lr-mame2003, 0.78 ROM, Game Mode fast monitor, simple keyboard or simple USB controller input), that I should be getting anything that is significantly different than anyone else. I have nothing custom or configured going on here. to confound things. I think that is the first step (as opposed to continually modifying the config). For all we know, what I am getting with this configuration and ROM set is the same as what anyone else would get.

                                      Tomorrow I hope to try a clean install yet again and only hook up a single wired USB keyboard. I also plan to try a different microSD card. I also will ty to test on the 46" Samsung HDTV (8 years old?). But still, lets do some good science; someone please try to duplicate my results.

                                      Thanks all. I really do appreciate the help.

                                      Best,
                                      MML
                                      .

                                      M K 2 Replies Last reply Reply Quote 0
                                      • M
                                        mikemolang @mikemolang
                                        last edited by

                                        @mikemolang

                                        Well, technically it is tomorrow already, so instead of going to bed, I had to keep working.

                                        Clean install to a 8GB microSD. Configured Logitech K-400 keyboard only. Same story.

                                        Brought the rig into the familyroom and hooked up to the 46" Samsung (approx. 8 years old), set it to Game Mode. Same story.

                                        Is there a way to run diagnostic on a the Raspberry Pi?

                                        Best,
                                        MML

                                        1 Reply Last reply Reply Quote 0
                                        • K
                                          Kookamunga @mikemolang
                                          last edited by

                                          @mikemolang you changed the rendering resolution, but did you also try changing the output resolution?

                                          1 Reply Last reply Reply Quote 0
                                          • dankcushionsD
                                            dankcushions Global Moderator
                                            last edited by

                                            render/output resolution has absolutely zero effect here.

                                            can you show the same lag issue using button (not keyboard) input on another mame2003 game? on your video it doesn't appear to show any noticeable lag when you it 'start' on your ipac.

                                            spinner input uses a different code path in mame2003 so it's possible that has unique issues.

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