Cannot achieve stable performance on brand-new i3 system and lakka / linux

I built a system for the sole purpose of emulation and as of right now I can’t get stable performance in any SNES emulator (using Super Mario World as the test game.) I just desperately want to get this working and I can’t understand why I’m having so many performance issues.

The system is a Skylake i3-6100 (3.7ghz dual core) with 8gb RAM, 128gb SSD, and a GTX 960 video card. Thermals and components have been thoroughly tested for stability with no issues.

The monitor in this case is a TV, a Vizio D50 which I selected because it has the lowest latencies for gaming. This build is for living room/HTPC usage.

First I tried Windows 10 w/ RetroArch. Everything worked, but I wanted to use my PS3 controllers, and after a day of messing around with SCP I just gave up. Could not get the controllers to be read consistently by the OS. Otherwise, performance was fine.

Then I tried Lakka. With Lakka I was able to get the controllers hooked up but the performance was poor because the TV runs at 4K native and I could not find any way to output 1080 from Lakka or change the config. Also, I was having issues with audio crackling over HDMI and game speed fluctuating up and down.

I wiped all of that and installed the latest Ubuntu with RetroArch. I was able to set the display to 1080p/60hz with no issue. However RetroArch reads the refresh rate at 40-45hz. Performance in menus is about 42 fps, feels choppy. Running Super Mario World with any SNES emulator has very poor performance. Noticeable slowdown, audio crackling constantly, game speed moving up and down, and low frame rate.

I have tried threaded video on/off, hard g-sync on/off, and even turning v-sync off. None of this improved performance in any way. The game still ran poorly in all cases on all emulators.

Again I WAS able to achieve good results with the same system on Windows so I know it isn’t the display or the hardware. But Windows has its own set of problems (mainly controllers, but also general OS cruft like auto updates) that I don’t want to deal with. I assumed RetroArch would run better on Lakka or Ubuntu but I just can’t get good results. Any help would be greatly appreciated.

Also: I tried running the native Nvidia drivers instead of Nouveau. However with the NVidia drivers the video outputs as interlaced for the entire OS for… some reason. I have no idea why, but that eliminated that.

EDIT: For comparison I tried Higan standalone and it works pretty well. If retroarch running bsnes (any version) or snes9x is a 2/10 in terms of performance/slowdown and audio, higan standalone is 7/10. There is a bit of screen tearing, and a little slowdown too. But no audio problems and it’s playable.

You can try manually setting your refresh rate to 60.0, though it’s likely not exactly 60, so you’ll have to play with it to get good sync: video_refresh_rate = “whatever” in your ~/.config/retroarch/retroarch.cfg

Yes on Windows the rate is a solid/fixed 59.950, so I changed it to that here. It makes a minor improvement in performance but the game is still running at well under 60 fps with occasional crackles and speed fluctuation. This is with threaded video on OR off.

retroarch is designed to run synchronized to the vertical refresh of your monitor, if it’s not being detected properly then it’s going to run funky. i’m fairly certain your prob isn’t a bug with retroarch but an issue with xorg and/or nouveau, most likely it’s not detecting and configuring itself and/or your display properly. if you want a second opinion outside of retroarch install mesa-utils if you don’t have it already and run glxgears and report back what it outputs (it should be running with vsync by default).

for support on this issue try here first: https://ubuntuforums.org/forumdisplay.php?f=332

some resources to check out: https://wiki.archlinux.org/index.php/Nouveau https://wiki.archlinux.org/index.php/Kernel_mode_setting#Forcing_modes_and_EDID

if you want to run retroarch w/o relying on vsync you’ve got 2 options at this time.

use only audio sync (what higan does): go into settings -> video and disable vsync go into settings -> audio and set audio sync enabled to on and set audio latency <= 16ms, if you’re not able to run with a latency that low then you’re better off…

use frame throttling via the system clock: go into settings -> frame throttle and set maximum run speed to 1.0x

Yes I dug into this more and the issue is twofold, (1) the display is 4K, and there is no way to force resolution in lakka (2) the display refresh rate is not read properly by noveau, must use proprietary drivers. I got it (sort of) working in Ubuntu.