A Look at Nintendo Switch Emulation in 2021

By

A little less than twelve months ago, I had written a guide on how to emulate Nintendo Switch games on Linux. It has since garnered over 20k unique readers. It’s by far the most popular article I have written on Boiling Steam. It’s clear to me that the Nintendo Switch is a hot topic, and it only makes logical sense to follow up with how Nintendo Switch emulation has progressed since the months have gone by.

As it stands, the current two emulators that we know of for desktop is Yuzu – developed by the same developers who worked on Citra, the 3DS emulator – and Ryujinx. And if you can believe it, there’s a Switch emulator for Android called Skyline. It’s “built from the ground up”, mostly in the C language, though apparently the developers have taken a lot of reference from Ryujinx’s source code.

To my knowledge, this is the best way I can describe the difference between Yuzu and Ryujinx:

Yuzu:

  • Written in C++; may contain memory leaks
  • Yuzu aims for performance rather than accuracy (games may run a lot faster, but random crashing is frequent)

Ryujinx:

  • Written in C#; uses slightly less RAM than Yuzu
  • Aims for accuracy rather than performance (games may not run as fast, but more games are compatible out of the box, and crashes are far less frequent)
  • More feature-rich, like Amiibo support and online multiplayer via WLAN

Both emulators are available for Windows and Linux (I believe Ryujinx had support for MacOS some time ago, but currently isn’t there). Both emulators are also open-source – Yuzu is under the GPLv2 license, while Ryujinx falls under the MIT license.

Now, you might ask, what’s the point of emulating Switch games on a computer rather than playing directly on the Switch? Well, there’s a few reasons:

  • The Switch, due to being underpowered, is capable of only displaying on a TV or monitor at a maximum of 1080p resolution. Some games also suffer framerate locks. For example, Zelda: Breath of the Wild is locked to 30 FPS. With emulation, not only can the framerate be unlocked to 60 FPS via mods, but can support higher resolutions than 1080p, depending on how capable your hardware is
  • You can play online multiplayer via Ryujinx’s LDN builds, without having to pay for a Nintendo Switch Online subscription
  • Input configuration and customization – you can use a lot more controllers than just your Joycons or your Switch Pro pad. You can use your Xbox controller, your PlayStation controller, your Wii Remote/Nunchuk, maybe you can even plug in and configure a racing wheel for a good ol’ round of Mario Kart
  • Maybe you’re lazy like me – you only have one monitor, with only one HDMI output. With emulation, you don’t have to constantly swap out HDMI connections between your PC and your Switch (for those of us who prefer playing on a bigger screen)

Now, what’s new with these emulators since the time I wrote the how-to? Well, there’s a lot. Like, a lot. Too much to cover in one article. So besides the numerous bug fixes and optimization tweaks, I will go over some of the more interesting stuff.

The developers of both Yuzu and Ryujinx publish blog posts – Yuzu does so on a monthly basis, while Ryujinx tends to blog whenever a new feature have been added – that go into detail of what has been added, fixed, changed, or removed. So let’s start with Yuzu.

Yuzu Improvements - Applet Overhaul, Buffer/Texture Cache Rewrite

In the month of April 2021, Yuzu has implemented an on-screen keyboard (OSK) function. This keyboard can be navigated with a gamepad. This is in addition to the applet overlay the developers have implemented; previously, any in-game errors had to be dealt with a keyboard and mouse. Now, any errors can be exited with a gamepad. Linux received some building TLC – in addition to users now being able to use an AppImage for easy execution, SDL2 has now been made an external depenency for easier compilation.

Yuzu OSK

Input improvements were made in March; buttons can now be configured as toggle to hold. January saw the release of a buffer cache rewrite – which would allow not only cleaner code, but also provide a significant boost in performance. This is in tandem with the texture cache rewrite that was made in November of last year – shadows for most games are now displayed properly, and this rewrite yielded a 10-30% performance increase.

Last November, the Yuzu devs added online support, but in just a matter of hours, they dropped it. No reasons have been stated, but if anything, it was more than likely due to legal reasons. Or it could be the fact that there was a backlash from the community, because having access to the multiplayer builds required being at a high tier on their Patreon (or so I heard…).

There’s so many other things that I could get into here, including NVDEC emulation, but for the sake of brevity, you can check their blog for more information.

During my testing, I honestly haven’t seen much of a change in performance since last year. In fact, random crashing remains just as frequent, from starting the game, in-game, alt-tabbing, or going in and out of fullscreen mode. But then again, “NVIDIA” could be the one-word answer for that – I know AMD and Intel users reap a lot more benefits with the Mesa drivers. That, or maybe I just haven’t tested enough to genuinely see any difference. I will say this, though – last year, I wouldn’t be surprised if Yuzu ate up to 20 GB of memory, and even more so the longer I had the game running. Nowadays, I haven’t seen Yuzu go past 8 GB. Well done, Yuzu team!

One greivance that I have – I know I mentioned this before, but I will say it again – is that Patreon supporters who are at the $5 tier or higher get early access to the new features that get added to Yuzu. This effectively creates a paywall for those who want new features earlier on. This is in addition to the fact that the early access build requires Windows – a lot of workarounds are needed to use the early access build on Linux, workarounds that are hard to explain. I had been a $5 supporter for some time just to see if I could use an early access build, but since there’s no Linux client available for it I had to ask for support in their Discord channel. I went back and forth with a developer for a few hours – I appreciated his help and patience, but after all that time I got nowhere.

Also, just take a look at their monthly revenue:

Yuzu Patreon income

Contemplate that for a minute. Over $20k a month, that’s $240k worth of dough rolling in on a yearly basis. Even the Godot engine isn’t making as much as that:

Godot engine Patreon

Anyway. This again proves how popular Switch emulation is.

Ryujinx Improvements - Shader Caching, Amiibo Support, Online Multiplayer

For a long time I was wondering why I couldn’t get past 45 FPS on Super Smash Bros. Ultimate. That is, until I got some help from the folks over on their Discord group (special thanks to GNU/Samantas5855 in particular). I couldn’t get MangoHUD to work – they told me to compile the develop branch of MangoHUD, then run Ryujinx with this command: MANGOHUD_DLSYM=1 MANGOHUD_CONFIG=gl_bind_framebuffer=0 mangohud ./Ryujinx

On Mario Kart 8, I was getting pretty smooth gameplay at 50 FPS, but it wouldn’t go past that. Again, I got some help, and was given another command to enable threaded optimization on NVIDIA: __GL_THREADED_OPTIMIZATIONS=1 __GL_SYNC_TO_VBLANK=0

To further increase the performance, I compiled and installed GameMode by Feral. Now whenever I run Ryujinx, I use this: MANGOHUD_DLSYM=1 MANGOHUD_CONFIG=gl_bind_framebuffer=0 mangohud __GL_THREADED_OPTIMIZATIONS=1 __GL_SYNC_TO_VBLANK=0 gamemoderun ./Ryujinx

Mario Kart 8 on Ryujinx

Mario Kart ran 60 FPS for the most part after that! But, for the testing I’ve done so far, only that game and Super Mario 3D World/Bowser’s Fury could reach 60 FPS on a fairly consistent basis. Every other game I tried suffered from a lot of caching, or whatever the heck else it was doing. Caching requires a good deal of patience, but it will pay off – more on shader caching later.

Ryujinx is far less of a headache to use – on Yuzu, there’s a 50/50 chance that the game will crash as soon as you launch it. Even if the game launches successfully, you could get into a random menu and experience a crash there, or if you decide to go fullscreen mode, you may encounter the same thing. With Ryujinx, though crashes are still going to happen, they occur far less. In fact, there are some games that are playable on Ryujinx, but not on Yuzu. For instance, after the beginning cutscene in Super Mario Maker 2, Yuzu crashed. I was able to keep playing on Ryujinx. I couldn’t play Super Mario Party on Yuzu (black screen during intro, although audio is playing); I could with Ryujinx. Mario Kart 8 hangs after the splash screen on Yuzu; Ryujinx is able to play this.

Super Mario Party on Ryujinx

Ryujinx also has some unique features that Yuzu doesn’t have. For instance, it has Amiibo support – just go to the appropriate screen in-game, then in the Settings menu, add your Amiibo from there. You don’t need an actual Amiibo to do this, either. Here’s another awesome feature they have – online multiplayer, using the Switch’s built-in wireless LAN feature.

Here’s how it works – you download one of their LDN builds. Launch your game, go into your game’s wireless LAN mode, and you can find other players throughout the world who are doing the same thing. That’s all there is to it!

At first, it kind of sucked. Performance wildly varied between clients; lag spikes were common. That’s when Ryujinx introduced shader cache. As the name implies, shaders are now written to cache (your hard drive), reducing the loading time between frames. Previously, shaders were loaded on the fly into your system’s RAM, and once the game was closed, those shaders would have to be loaded again. Now, since the shaders are cached, you only need to load the shaders once, then on subsequent launches of the game, you wouldn’t have to deal with loading shaders again. Games can still take a good minute or two to boot, but the more you play the game, the less time you’ll have to wait.

With shader cache, this would improve the performance between clients with their updated LDN build. Just a few days ago, LDN was updated once again. In tandem with the main branch, this build incorporates POWER (Performance Optimizations With Extensive Ramifications). This is what their blog post had to say:

Lowering CPU requirements and increasing headroom for higher end PCs, this update effectively unlocks full-speed gameplay for a vastly larger audience. Thanks to the joint efforts of gdkchan and riperiperi, users with all kinds of hardware can enjoy performance increases anywhere from 20%-100% and beyond, depending on the game and the user’s PC specifications.

At first, it may seem like there isn’t any performance benefit at all. So many shaders have to be compiled; it can take an hour or two to load everything a game has to offer. But after that, games for the most part will run smoothly. Mario Kart 8 was running buttery smooth at 60 FPS. I even managed to get quite a few races in with a few other players online. Heck, though Smash Ultimate wasn’t as smooth of an experience, I got a couple of rounds in with another player. It’s nuts! Check out my video below to see what it was like:

https://peertube.linuxrocks.online/videos/watch/24967161-cab5-463d-9088-bac95531229b

Video Comparison

Here I’ve recorded a few different games between each emulator on the same computer. System specs are as follows:

  • Pop!_OS 20.10
  • GTX 1660
  • i5-8400
  • 24 GB RAM

https://peertube.linuxrocks.online/videos/watch/ddb4c294-11b2-4d01-911d-e257ac57b0a5

You may have observed a few things:

  • Yuzu’s video playback is a bit sketchy; Ryujinx handles VP9 videos better
  • Yuzu is the clear winner for faster framerates and less stuttering (at least, on Smash and Hyrule Warriors)
  • Missing textures for Hyrule Warriors: Age of Calamity on Ryujinx
  • Ryujinx was able to get past the cutscene in Super Mario Maker 2; Yuzu couldn’t
  • MangoHUD config for Ryujinx isn’t up to par with Yuzu; I have not been able to find a fix for this yet

Now, while you might say Yuzu is a lot better, it is, but boy, crashes were so frequent through this emulator I almost gave up trying to make this video. So if you’re looking to get into Switch emulation yourself, you’ll still need patience with Yuzu anyway, because you’re almost consuming as much time restarting the emulator or game as you would waiting for shaders to compile on Ryujinx.

Switch Emulation Will Continue to Improve

I’m really astonished we can emulate a modern console, while being able to reap the benefits of 4K resolution and 60 FPS mods on certain games. I really want to thank the devs for both Yuzu and Ryujinx for making this possible.

While Ryujinx may not be as performance-friendly, I have faith it will continue to get better. In fact, Ryujinx will have Vulkan support soon, and as you can see on their blog post, Mario Kart 8 runs much better with that API than OpenGL, at least on AMD/Intel. Plus, even now I can play Mario Kart with random people on Discord…who would’ve thought?!

While Yuzu is the better option for now for playing Switch games on Linux, I’m looking forward to the time where I don’t encounter so many crashes. If GPUs weren’t so expensive these days, I’d definitely go with AMD – maybe I won’t have such a bad experience. (Or, perhaps, people are going to beckon to me, “Use Arch…”) Lately though, Ryujinx is my emulator of choice for online play; caching may take a while but after that it’s almost as good as Yuzu, and the less frequent crashes are definitely a plus.

If you need a refresher on how to emulate Nintendo Switch games on Linux, head over to my guide.