FPS drops (visually) even though 60FPS is reported in many systems
-
Pi Model or other hardware: Pi4 2GB
Power Supply used: 5A two port adapter (second port is for custom RGB buttons)
Operating System: Raspbian GNU/Linux 10 (buster)
Kernel: Linux 5.10.63-v7l+RetroPie Version Used: Updated whole system a week ago
commit 24f9095e403d73583cde56d29dc76f0b53466332
Merge: 30b30a8 0326e12
Date: Tue Jan 4 04:21:24 2022 +0000Built From: Some custom image more than a year ago, I updated everything 2-3 times already, last time being a week ago, and this problem appeared yesterday!
USB Devices connected: USB hub, keyboard, two joysticks, custom RGB controller (virtual COM port)
Controller used: two USB Chinese arcade joysticks, 8 buttons each
Error messages received: no error messages
Emulator: visual FPS drops noticed on NES, SNES and GBA games so it's probably not an emulator issue.
I'm not completely incompetent with linux and stuff, but this made me pull my hair out (the little I have left).
tl;dr: Since yesterday, even though my games run full speed (60FPS reported in the upper right corner), I do see normal frame rate for couple of seconds, then it looks like 30 (or maybe even 15?) for couple of seconds, then it works butter smooth for couple of seconds again - rinse and repeat. It's not completely predictable, the period is not exactly 2 seconds, but it's like 2 seconds +/- 1 second. It's really noticeable when playing Super Mario Bros, especially when using dash button.
This happens on NES "Super Mario Bros", SNES "Super Mario All Stars" and GBA "Metroid Zero Mission". I think it doesn't happen on Sonic The Hedgehog for Genesis, but I'm not as familiar with that game... It probably happens on many, many games, I feel it might be happening on Super Mario Land 2, but that game is a bit slower so it's hard to tell if it's "work as intended" or stuttering...
Backstory:
Everything was working perfectly normal up until two days ago, I had some joystick problems for long time (they stopped working for a second every 10-50 seconds or so).
Updating the whole system helped and I didn't have the joystick problem anymore so I was really happy about it.
System update did break some games which I managed to fix in the meanwhile (genesis emulator doesn't open zipped folder anymore, the game have to bi zipped directly)
I fiddled with video filters, threaded video and stuff because Super Mario Land 2 for Gameboy had some graphical glitches, I don't know if this was the cause, but then this weird stuttering started to happen and I can't fix it anymore.I tried all combinations of Vsync, hard GPU sync, threaded video ON/OFF, turning shaders ON/OFF, changing resolution down to 800x600 (default is 1600x1200), trying both full screen and windowed mode... I tried pretty much all options I could find and disabled everything not necessary. I have also manually set all settings to default in options files, disabled all overrides because I thought maybe "I did something", but nothing helps... I tried overclock at 2GHz and no overclock, I tried changing scaling_governor to performance ...
Any ideas?
-
@zlutz said in FPS drops (visually) even though 60FPS is reported in many systems:
Built From: Some custom image more than a year ago, I updated everything 2-3 times already, last time being a week ago, and this problem appeared yesterday!
Third-party images are not suppprted, even if they are very old. Can you reproduce the issue on the default image?
-
@sleve_mcdichael said in FPS drops (visually) even though 60FPS is reported in many systems:
@zlutz said in FPS drops (visually) even though 60FPS is reported in many systems:
Built From: Some custom image more than a year ago, I updated everything 2-3 times already, last time being a week ago, and this problem appeared yesterday!
Third-party images are not supported, even if they are very old. Can you reproduce the issue on the default image?
I just fixed it and I don't think I can reproduce it anymore...
Well, maybe I can if I use the retroarch.cfg that was causing it.I went to the folder "OPT\retropie\configs\all" and I've seen that retroarch.cfg is 105kb with 3183 lines. I deleted it and renamed the backup "retroarch.cfg.rp-dist" from the same folder and the problem has disappeared!
There were a couple of backups in this folder, I used the one that had the same date when I updated the system (4th of January 2022) so it might be the default one?I knew it was something I did, but no matter what I tried - nothing worked until I deleted the complete cfg.
... and now the "quick menu" is completely different than before and I'll have to play with it some more to fine-tune it, but the problem is gone and that's the most important.
Thank you for quick response!
-
@zlutz said in FPS drops (visually) even though 60FPS is reported in many systems:
I went to the folder "OPT\retropie\configs\all" and I've seen that retroarch.cfg is 105kb with 3183 lines.
One of the pitfalls of using a system that someone else configured, and one of the reasons why providing support for them is not practical.
I deleted it and renamed the backup "retroarch.cfg.rp-dist" from the same folder and the problem has disappeared!
That was the right thing to do. The
rp-dist
version is created when a config file already exists so any custom edits aren't overwritten. It contains the basic settings equivalent to what is distributed with RetroPie, with only a few things defined and the rest left to default, but with several comments and examples to show you what they all do.Most of those 3000-odd lines were defining every event for every input for every (sixteen) players. The default file shows you how they work and gives a few dummy settings to outline the format, but doesn't define every single one (most of this is handled by autoconfig anyway, so it's not really necessary.) It's a lot easier to work with.
... and now the "quick menu" is completely different than before and I'll have to play with it some more to fine-tune it, but the problem is gone and that's the most important.
You probably got switched back to the default (RGUI) menu driver. It's this line in
retroarch.cfg
:# Menu driver to use. ("rgui", "xmb", "glui") menu_driver = "rgui"
...all assuming that it still works like the default, obviously. YMMV.
-
@sleve_mcdichael said in FPS drops (visually) even though 60FPS is reported in many systems:
One of the pitfalls of using a system that someone else configured, and one of the reasons why providing support for them is not practical.
Well, it was working very well for more than a year, I really think it was something I did.
I'll investigate later on the weekend and report back "what line was causing it". Maybe it will help someone else. -
Did you ever try to saves settings from retroarch menu ?
-
@zlutz said in FPS drops (visually) even though 60FPS is reported in many systems:
Well, it was working very well for more than a year, I really think it was something I did.
I don't mean because it stopped working. I mean because the config file is nonstandard.
-
OK, I fiddled with it for like two hours and I found the culprit!
I restored backup of my "bad config" and it was lagging and doing 30 frames per second - as expected.
Then I started deleting lines half of the file at a time and after a lot of problems with auto-generated cfg in NES folder, I found that removing this line stops the stuttering:video_vsync = "false"
To double-check it, I restored the original "retroarch.cfg.rp-dist" and added this line - it's 100% reproducible on my system. Put it on "false" and it's choppy, put it on "true" or remove it and it's not choppy.
Without this line, it is:
-> not choppy with vsync ON and any setting Max Swapchain images
-> not choppy with vsync OFF and Max Swapchain images 3 (default is 3).
-> choppy with vsync OFF and Max Swapchain images 1 or 2If I put this line in, it's choppy whether the vsync is OFF or ON
-> It's choppy with vsync OFF and any setting Max Swapchain images
-> it's choppy with vsync ON and Max Swapchain 3 (default is 3)
-> it's NOT choppy with vsync ON and Max Swapchain images 1 or 2.I guess something happens when retroarch.cfg has 'video_vsync = "false" ' line and Max Swapchain images is set to 3, behaviour is the same with Max Swapchain 1 and 2.
Also - why would vsync OFF make it choppy? It should make it less choppy with some potential screen tearing - it makes no sense!
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.