Retropie Lag on Pi Zero
-
I had previously put together a Retropie system on a RP2 for emulating Atari/NES/SNES & Genesis only. Aside for a few games like Yoshi's Island, the performance has been great. I have read a lot of posts about the Pi Zero being able to run the 8/16-bit games without any issues, so I decided to build a system with the latest Pi Zero (1.3). I downloade the current RetroPie image (Pi0/1) yesterday, imaged my SD card and installed a few NES/SNES ROMs. Without making any modifications, I found that the system is very laggy, with game play noticeably slow and the audio being distorted. Is there a setting that I need to modify for better performance?
I realize that since I am using a Pi Zero, I won't be able to play any N64 or PS1 games reliably, but I wasn't expecting any issues with a game like Tetris on the NES. Performance with NES, SNES & Genesis games has been fairly poor. Everything is a bone-stock install. Is it possible to have an SD card that is too big for the Pi Zero to read properly. I am using a 32GB card at the moment - because that is what I had. Could that be the cause of my problems?
-
@dsfrancis The Pi 2 has 1G RAM and runs at 900MHz. The Pi Zero has only 512M (half) RAM, but runs at 1000MHz. The important thing with the Zero is to split the RAM according to your needs. Graphical heavy applications should have at least 256M, in my opinion. Try 256. If that still gives issues then try 320. This can be configured via sudo raspi-config from the CLI or the RetroPie Configuration menu.
-
In hindsight 320M is probably overkill for a Zero.
-
Also the Pi2 is quad core. The Zero is a single core. The Zero is basically a shrunken Pi 1 overclocked.
-
memory split won't do anything. 2d emulators hardly use any VRAM. plus if you don't have enough VRAM it'll just crash :)
also no 2d cores are multithreaded so it doesn't matter about the number of cores, just that the pi 0 has an earlier generation of ARM CPU (the same as the pi1) so 1MHz of Pi 0 is much weaker than 1MHz of Pi2.
Overclocking should help.
-
@dankcushions Why should a Pi Zero need to be overclocked to play 8/16 bit systems? Seriously? What a pile of shit.
-
@columboscoat emulation is hard :)
-
@dankcushions You seem to be of two minds. At the same time. It is resource light yet requires an overclock... which is the correct answer?
-
@columboscoat how do you mean? it doens't need much VRAM, but it requires a lot of CPU (especially when we're dealing with these very low IPC arm cpus).
-
@dankcushions IPC is all relative I suppose... The 30 year old SNES ran at ~20 odd MHz... Yeah emulation is hard...
-
"Performance with NES, SNES & Genesis games has been fairly poor."
Why don't you just buy a RPi3? Problem solved right?
BTW via the RGUI menu you can overclock the emulated SNES FX chip. Some games like Yoshi's Island and Mario Kart will run without any lag.
-
@PetroRie I am building a Retropie system into an old NES cartridge as a gift for a friend - thus I am using a Pi Zero. I've been reading up on a bunch of potential solutions and I've found that it may be getting hot and throttling down - which goes with the performance I have been seeing. Sometimes it almost plays normally, but it seems to slow down/speed up from time to time.
Someone also mentioned that it could be my power supply/ the pi isn't getting enough power. I'm using a 5V 2.5A phone charger I bought from Amazon, but someone suggested that a 5V 2.5A power supply might work better. I've also heard both sides of the argument about overclocking. I may do that - but I think I'll wait until I get a heatsink installed before I ramp it up any more.
-
@dsfrancis You can use the RPi3 but you need to desolder a couple connectors. It should work the same way, I never understood why no one did this. You can desolder for an example the USB connector and use a connector which comes on the cartridge, but you still need to solder the wires from the pcb to the connectors. That is how I could do it.
-
@PetroRie Yeah, I'll probably do that for my next build. I had just seen so many people claiming that the Pi Zero's could still handle the 8/16 bit games well and I thought I could do a quick and dirty build without the need for any real modifications/soldering.
-
@dsfrancis said in Retropie Lag on Pi Zero:
@PetroRie I am building a Retropie system into an old NES cartridge as a gift for a friend - thus I am using a Pi Zero. I've been reading up on a bunch of potential solutions and I've found that it may be getting hot and throttling down - which goes with the performance I have been seeing. Sometimes it almost plays normally, but it seems to slow down/speed up from time to time.
I've had good results with a Pi1B when overclocked to the raspi-config Turbo setting. It won't speed up the CPU (both are 1000Mhz) but the speed ups to memory and core help - particularly if you are using shaders. Also, in the Retroarch settings, set the Audio Resampler Driver to "nearest" - it's less CPU intensive than the default one.
-
@columboscoat said in Retropie Lag on Pi Zero:
@dankcushions IPC is all relative I suppose... The 30 year old SNES ran at ~20 odd MHz... Yeah emulation is hard...
Emulating CPUs is relatively easy. Emulating all the custom graphics and audio hardware is another matter - particularly as you have to get all the bits you're emulating running in sync and at the speed they would on the original console.
Your memory split suggestions are way off. I did most of the performance testing when developing the crt-pi shader using a 256M Pi1B. I just leave it as the default (64M).
-
At least the pi Zero was cheap. I am not happy with it at all. I opened up the case so that the air could circulate more freely and tried to slightly overclock it. It may have slightly improved performance, but now it crashes a lot. I was pretty modest with the overclocking. I may go back and re-image the SD and start from scratch. These are my overclock settings:
arm_freq=1050
gpu_freq=500
core_freq=500
sdram_freq=500
sdram_schmoo=0x02000020
over_voltage=2
sdram_over_voltage=2 -
@dsfrancis 2.5a is good. Problem is phone chargers. 2.5a Phone chargers fluxuate their power because of how it rapid charges phones. You need to get a power supply made for the pi.
-
@dsfrancis said in Retropie Lag on Pi Zero:
At least the pi Zero was cheap. I am not happy with it at all. I opened up the case so that the air could circulate more freely and tried to slightly overclock it. It may have slightly improved performance, but now it crashes a lot. I was pretty modest with the overclocking. I may go back and re-image the SD and start from scratch. These are my overclock settings:
arm_freq=1050
gpu_freq=500
core_freq=500
sdram_freq=500
sdram_schmoo=0x02000020
over_voltage=2
sdram_over_voltage=2From my overclocking tests on my Pi1 when writing the crt-pi shader, overclocking the gpu_freq was the thing that most increased the temperature - which makes sense as it's the majority of the chip. It was unstable at 450MHz with an open case. As a result, I targeted crt-pi at the default gpu_freq (250MHz) because I new people would want to put Pis in small cases with little ventilation.
The default gpu_freq for a Pi0 is 300MHz - by running it at 500MHz you're actually massively overclocking it.
My overclock settings on my Pi1 are:
arm_freq=1000
core_freq=500
sdram_freq=600
over_voltage=6I suggest you try these settings and see how they work for you.
-
@davej Those settings seem to be working a bit better for me. My games are playing a bit smoother and I'm not crashing anymore. It's nowhere near as nice as playing on my pi2, but it is at least serviceable now.
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.