Pi400 poor performance - especially in DosBox
Pi Model or other hardware: 400
Power Supply used: Official Pi PowerSupply
RetroPie Version Used (eg 3.6, 3.8.1, 4.1 - do not write latest): 4.7.1
Built From: Raspberry Pi Imager 1.6.2
USB Devices connected: Mouse Dongle
Controller used: Keyboard
I'm having severe performance issues with my Pi 400. It's connected to a 1024x786 LCD (but I tried 1080p TV and 2k PC display as well).
It seems to be an issue with every emulator (e.G. Mario Land2 on GB doesn't run smoothly) but I've mostly noticed it in DosBox as I have better comparison there. I tried to run Tie Fighter but once in combat (with 3D graphics) it takes about 2 seconds per frame.
To have a comparison I've installed Dosbian as a reference and the game is running smoothly with >60fps. So it doesn't seem to be a hardware issue.
Other games run okayish (e.G. Doom) but subjectevly never perfect and I got sound stuttering in almost every game from time to time. I've tried DosBox-staging and different configs with all kinds of cycles or output (surface, opengl, etc) to no avail.
From my observations it seems to be connected to the distribution/OS in some way as it's not really emulator specific. I've tried updating RetroPie as well as OS but didn't make a difference.
And it seems performance related at least... when I change GFX settings within the games that run poorly it does make a difference.
Any ideas why my Pi400 is so slow with RetroPi? I'm really out of ideas.
(e.G. Mario Land2 on GB doesn't run smoothly)
this had occasional slowdowns on the real hardware, so emulation will correctly slowdown on occasion. it's difficult to tell from your description whether it is accurate emulation or bad performance.
i don't know what DosBox + TieFighter performance is expected to be (PC emulation can be tricky), but if you have an 8-16-bit console game (these are comfortably emulated by pi4) that you are confident is slowing down in excess of the original game, please provide a verbose log as per https://retropie.org.uk/forum/topic/3/read-this-first
For some reason, your display is running at 720x576 @ 50hz
[INFO] [Video]: Timings deviate too much. Will not adjust. (Display = 50.00 Hz, Game = 60.10 Hz) ... [INFO] [GL]: Detecting screen resolution 720x576.
Can you try changing the resolution from the Runcommand launch menu to 720p @ 60 Hz or 1080p @ 60 Hz and see if it makes a difference ?
The display I'm currently using is only 1024x768... so probably no? 😅
@good_punk That's strange, since the display list of supported resolution is
[INFO] [DRM]: Mode 0: (1024x600) 1024 x 600, 59.851860 Hz [INFO] [DRM]: Mode 1: (1920x1080) 1920 x 1080, 60.000000 Hz [INFO] [DRM]: Mode 2: (1920x1080) 1920 x 1080, 59.940201 Hz [INFO] [DRM]: Mode 3: (1920x1080i) 1920 x 1080, 30.000000 Hz [INFO] [DRM]: Mode 4: (1920x1080i) 1920 x 1080, 29.970100 Hz [INFO] [DRM]: Mode 5: (1920x1080) 1920 x 1080, 50.000000 Hz [INFO] [DRM]: Mode 6: (1920x1080i) 1920 x 1080, 25.000000 Hz [INFO] [DRM]: Mode 7: (1280x720) 1280 x 720, 60.000000 Hz [INFO] [DRM]: Mode 8: (1280x720) 1280 x 720, 59.940201 Hz [INFO] [DRM]: Mode 9: (1280x720) 1280 x 720, 50.000000 Hz [INFO] [DRM]: Mode 10: (800x600) 800 x 600, 60.316540 Hz [INFO] [DRM]: Mode 11: (720x576) 720 x 576, 50.000000 Hz [INFO] [DRM]: Mode 12: (720x576i) 720 x 576, 25.000000 Hz [INFO] [DRM]: Mode 13: (720x480) 720 x 480, 60.000000 Hz [INFO] [DRM]: Mode 14: (720x480) 720 x 480, 59.940060 Hz [INFO] [DRM]: Mode 15: (720x480i) 720 x 480, 30.001110 Hz [INFO] [DRM]: Mode 16: (720x480i) 720 x 480, 29.970030 Hz [INFO] [DRM]: Mode 17: (640x480) 640 x 480, 60.000000 Hz [INFO] [DRM]: Mode 18: (640x480) 640 x 480, 59.940475 Hz [INFO] [DRM]: Mode 19: (720x400) 720 x 400, 70.081665 Hz
There's no 1024x768 here, from what I see. What resolutions are available in the Runcommand launch menu ?
@good_punk well, any sort of 60hz mode will be an improvement. currently you're running at 50hz which is going to jerky for 60hz content (ie, most games).
[INFO] Threaded video stats: Frames pushed: 2550, Frames dropped: 2.
you're not actually dropping frames in SNES - it looks to be entirely down to this bad display mode. you could globally set an appropriate one via raspi-config.
There's no 1024x786 resolution available that's why I left it at "default" (or auto?)
I've just force the resolution to 1024x600 60hz... now there are no warnings/errors in the log... not sure if the performance improved have to check that more thouroughly. The screen was not completely filled and had black borders.
Okay, thanks... 60hz actually makes the console games run smoothly. :)
Unfortunately it doesn't help with the DOS performance... so there's a different problem here.
From comparison it seems that DosBox on Dosbian runs 50% faster or even more...
Just tested Master of Orion 2 and the first Command&Conquer (both not really heavy games). They run perfectly on Dosbian but have irregular stuttering (in video and sound) on RetroPie.
Is it possible that the standard DosBox and DosBox-staging emulators are just that much slower than the one that comes with Dosbian? (quote from their website: "Based on DosBox-SVN and DosBox-ECE, It guarantees you a decent speed in games and good performances in software emulation.")
I also tried to disable sound but doesn't seem related.
@good_punk Not sure what tweaks Dosbian added to their Dosbox versions, one thing I see is that they've disabled the KMS GPU driver in their config
[pi4] # Enable DRM VC4 V3D driver on top of the dispmanx display stack #dtoverlay=vc4-fkms-v3d max_framebuffers=2
Either Dosbox or Dosbox-Staging should be ok, start with the default configuration and try to find a fixed
cyclesvalue that's suitable for each game (on ARM,
cycles = autodoesn't work so well). You can ask in the Dosbox-Staging topic or look in the Dosbox Staging wiki for pointers.