Retropie 4.3 INput Lag - Help Wanted
-
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.
-
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.
-
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 -
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 -
https://github.com/RetroPie/RetroPie-setup/wiki/Speed-Issues#resolution
also try toggling on/off the v-sync and threaded video settings in retroarch
-
@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.
-
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
. - Edit /opt/retropie/configs/all/retroarch.cfg
-
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 -
@mikemolang you changed the rendering resolution, but did you also try changing the output resolution?
-
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.
-
Yes, I can show the same lag issue using button (not keyboard) input on another mame2003 game. See videos here:
These resulted in the following numbers:
-
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
I am willing to send my Pi, microSD, power supply, cables, and a Buffalo Gamepad to any person that feels they are capable of looking it over, adding some value, and sending it back to me (I will pay postage both ways, of course). I need someone that has already proven that they can get Arkanoid 0.78 running cleanly under lr-mame2003 using Retropie 4.3 on a Pi3B with either a simple USB gamepad, or a USB keyboard.
If willing, let me know what your lag looks like for my stated config. I don't care if you send me a video, or just tell me. I trust you, I just want to know that you really have it working.
Next question: Anyone know of a simple PC in a box that will run Retropie? I have almost finished building a pretty sweet cabinet and really want to to put the electronics behind me and get this baby on line.
Best,
MML -
-
I tried arkanoid on mame2003 on my updated setup to 4.3. It's totally playable on my 4k samsung tv with its ~30ms input lag (according to rtings.com) with its game mode on.
I did notice arknoidu.zip gave me an upside down screen for player 2 so I also tested arkanoid.zip.
I'll try a clean 4.3 image when I can, but I don't alter much but enable the crt-pi shader at 1080p and setup my pad. My snes pad is connected to the gpio, but I have a usb controller and usb joystick and I don't notice input lag on those either. Microsd is not an issue, and you shouldn't need to use another one in your tests.
Hope it works for you on the samsung tv. I have a pi2 on an ~10yr old 32in samsung 720p and also have no issues with input lag on the games I've played on it.
One last option, besides trying another monitor/tv, is to enable the dispmanx driver that supposedly removes a frame. I don't notice the difference but others have. I don't use it because I can't use shaders with it.
Since you said you roughly get the same input lag when using other controllers/keyboards, I'm suspecting it's the monitor. I have an old 19in dell monitor I got for $20 and no issues with that. It only has color settings and thats it. No fancy gamemode's and ama and whatnot.
-
@mikemolang maybe it's just me, but i don't really see the lag in this second video. it's difficult to judge it, i suppose.
retropie absolutely has lag (it's inherent with LCD screens, and even CRT due to DAC), and maybe 6 frames is 'normal'. there are ways this can be marginally reduced, but they come with major side effects.
-
Thank you.
The Samsung played the same as the BenQ monitor, both which outperformed the Sanyo. Because of this (and the fact that the BenQ gets rave reviews as being a fast gaming monitor, I am really doubting it is a monitor problem. In fact, my bet is that anyone else running the same config as me is going to get the same results, whether they think theirs is fast, slow, or indifferent. As dankcushions said, "maybe 6 frames is 'normal'", Indeed, that is all I really want to prove at this point.
From the beginning I have wondered out loud if I was just being too critical, and said that I was really hoping that someone could provide factual data. So, I have a new idea!
TO ALL:
If you would be so kind, post a video as I did here (
If everyone's is the same as mine, I can be done.
If anyone's is better than mine, I can know what is different.
If mine is better than everyone else's... Well, you get the idea.Best,
MML -
@mikemolang i might do a video, but inputlag is a well researched topic for retropie, with all the "factual data" you could ever want. you should read https://retropie.org.uk/forum/topic/2019/an-input-lag-investigation
-
@dankcushions
Yes, I love his page. Read and re-read may times. And I still have the same basic question as before...For anyone's configuration that uses RPi3B, Retropie 4.3, lr-mame2003 emulator, and 0.78 ROMs, when playing these specific games, what is your input lag measured in frames, (or please provide a video so I can compute the input lag in frames).
Then, quantitatively, if everyone's input lag under these conditions (but with whatever controllers, monitors, etc. that they happen to use) is essentially the same as mine, I am done. No need to bother with different monitors, controllers, emulators, settings, or anything else. If they are the same, there is nothing more to learn. I got my answer.
If anyone's is better than mine, I can know how much better, I can learn what is different about THEIR SYSTEM (as opposed to learning all the things that can be made different in general), and then I can proceed to the next step (if warranted) by addressing the specific things that are different.
Until I have an apples-to-apples difference in terms of frame lag, suggestions of things to change and discussions of how different things act in different ways won't answer my question.
As my boss is fond of saying, "I asked what time it is, but you keep telling me how a watch works. I need to know what time it is." (BTW, that comment is not directed at you in particular. Please, take no offense.)
Regards,
MML -
@mikemolang what i'm saying is you already have an abundance of scientific data on that page. rather than recreate it in a new scenario, why not recreate the scenarios in the link and see how your system compares to them? only if your system has the same results as brunnis does it make sense to do mame2003-specific testing.
-
Fair question!
He has a different RPI, and older Retropie version, and (unless I am mistaken) some of the emulators he is using are not standard in retropie.
I am trying to baseline the modern hardware and retropie revision with default config.
It's ok if you choose not to upload a video.
Thanks,
MML -
@mikemolang said in Retropie 4.3 INput Lag - Help Wanted:
He has a different RPI,
he's the same RPI (RPI3B is the only RPI3, other than the compute module).
and older Retropie version
retropie version shouldn't matter. emulator version does, but look at the original libretro forum thread and it has been updated a few months ago with current data.
and (unless I am mistaken) some of the emulators he is using are not standard in retropie.
they are all available on retropie + pi3, except bsnes.
you're misunderstanding what i'm saying. we have a bunch of data on libretro and input lag. you're using a libretro emulator. this data is your baseline. you should retest with the same scenarios as brunnis, and then we rule out everything that isn't mame2003 and/or the specific games you're using.
comparing videos from two different cameras/setups isn't scientific. the only useful comparisons you could make are across emulators on your own setup. then you can find out if mame2003 and/or these games have specific issues.
-
on this link: https://forums.libretro.com/t/an-input-lag-investigation/4407
test cases 1 and 3 are basically 'vanilla retropie' - these would be the ones i would compare against.
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.