Raspberry Pi as a retro gaming console using Lakka
A short overview of a few Raspberry Pi retro-gaming projects, and which one I personally like best.
There are, as is well known, many different projects that promise to turn a Raspberry Pi into a retro games console, but how are you supposed to keep an overview with all that rampant growth? On top of that, these days there are also many SteamOS-like distributions, some of which also support retro gaming. One example would be EmuDeck, like the one that exists for the Steam Deck.
That is exactly how it was for me too, and I first had to search for a while until I found a really good and usable solution. Lakka, which I want to talk about here today.
Why not RetroPie?
First of all, since it is one of the first search results for something like this, I tried RetroPie. I also already knew it from back in the day. In the end, though, I have to say that I cannot necessarily recommend RetroPie.
A cobbled-together interface
At first the system feels pretty cobbled together, because it is. There is EmulationStation as a front end for LibRetro and RetroArch, but apart from that, everything else is not exactly consistent.
For example, every settings menu drops you into a terminal interface based on ncurses. Sure, you do get something resembling user interfaces there, but in the style of the early 80s, like you might know from a Commodore 64 or DOS.
On top of that, gamepad support has somehow been forced into those ncurses-based menus so you can at least operate them with a controller. The downside of this approach is that it is incredibly ill-suited for use on a TV while the user sits a few meters away on a couch. Text input is especially "fun": without a keyboard it is not possible at all, because there is no on-screen keyboard. In other words, if you want to connect your Pi to Wi-Fi, you first need a keyboard. So RetroPie is not particularly usable with just a controller.
Another issue is that on first boot the whole system lags like crazy, so controller inputs sometimes do not arrive at all, or only with extreme delay. After a while, and after at least one reboot, the behavior settles down again.
What still remains is that emulators and system packages have to be installed or updated from time to time via the ncurses TUI.
Also, all our games run in RetroArch. That means every time we open the emulator menu, RetroArch jumps into our face, with what is probably the ugliest default theme RetroArch has to offer. You can change that in RetroArch in the end, but the design break between EmulationStation, ncurses TUIs, and RetroArch remains. So you regularly have to put up with 3 different user interfaces.
Software
RetroPie is based on Raspberry Pi OS, meaning a Debian derivative. On the RetroPie website, the old name Raspbian is even still mentioned, which does not even exist anymore. The newest version of RetroPie is also getting a bit long in the tooth.
The latest pre-made image of RetroPie is v4.8 Released March 14, 2022.
(See here)
So at the time of this article, 4 years ago. Whether I want an IoT device with internet access on a software stack that old in my home is questionable. Anyone who knows me a bit knows that I am generally not very convinced by point releases, but this is a whole new level of madness. Maybe RetroPie is still based on the OG Raspbian?
Furthermore, RetroPie, or at least the image for Pi 2, 3, and Zero 2 W, is a 32-bit distribution. That partly limits the choice of available emulators, because many have already dropped 32-bit support.
LibRetro cores come from, as far as I can tell, the RetroPie repository.
Lakka
Lakka is the official Linux distribution directly from the RetroArch project and is based on LibreELEC.
As a refresher: LibreELEC is a home theater Linux distribution that comes with Kodi. It is meant to turn a less smart TV into a smart TV. So it is mainly focused on multimedia, for watching your movie and series library, listening to music, or even IP-TV, Prime Video, Disney+, Netflix, etc.
LibreELEC itself is an immutable Linux distribution, meaning the base system cannot be modified at runtime. Updates happen during the boot process. The new version of the system is downloaded as an image and, when the system boots, it is applied over the existing one. Unfortunately, without snapshots. However, if you remove the SD card and manually copy an older image into the update folder, you can roll back to an older version if needed.
Since Lakka is built on LibreELEC, it works in a similar way. The nice thing about Lakka is that we finally get a consistent, solid, controller- and TV-friendly user interface, with an on-screen keyboard. Lakka implements its entire UI fully via RetroArch, with additional menu items that logically do not exist in RetroArch "desktop".
This gives you an integrated update manager that can update not only LibRetro cores but the entire system. Lakka also supports not only Raspberry Pi but almost any computer hardware you can find. Personally, I only need the Raspberry Pi version, which is also 64-bit. LibRetro cores are more up to date and come directly from the RetroArch project.
At the time of this article, Lakka ships with RetroArch 1.22.2, uses the LibreELEC 12.1 as it's base system and Linux 6.12. (6.18 is not yet stable enough on Raspberry Pi.)
Problems I ran into
However, I would be lying if I claimed everything is great with Lakka. So, the following:
Samba and Nautilus
To get your ROMs onto the Lakka box, we have three options: via SCP, Samba, or simply copy the ROMs onto the SD card and then put it back into the Pi.
Out of the box, Lakka provides access via Samba. But this only works on Windows (I assume) and on KDE with Dolphin. Access works without a username or password.
GNOME's Nautilus, on the other hand, always asks for a username and password, even though Lakka needs neither. If you enter nothing, you cannot connect. If you enter just anything, you at least reach the share, but you cannot open any of the other shared folders.
With KDE and Dolphin, on the other hand, everything works flawlessly. It does not ask for a username or password, and shared folders can be opened, with files copied and moved.
Bluetooth keyboards
Strictly speaking, not really a problem, since Lakka can be controlled wonderfully with a controller. But if you want to connect a Bluetooth keyboard for additional RetroArch or emulator hotkeys, you may need to use a wired keyboard. At least if your keyboard requires entering a code to pair successfully. Lakka does not seem to support that in general. Neither in the UI nor via bluetoothctl in the CLI is the corresponding code shown. Default codes like 0000, 1111, or 1234 do not work either.
With LibreELEC and Kodi, by the way, this did work with the same keyboard: a Logitech MX Keys Mini.
One thing I also find a bit dubious is that if you remove the pairing of a device, you have to restart RetroArch to pair the device again. Why, no idea.
No sound when the refresh rate is changed
RetroArch's default setting is to match the refresh rate to the emulator. So without an emulator running, the UI runs at maximum resolution and 60 Hz. Some emulators, PCSX ReARMed, Mupen64, etc., adjust the refresh rate to the content, meaning 50 Hz for PAL games.
This causes us to lose audio output in Lakka, unless we restart RetroArch. This seems to be a RetroArch issue rather than a Lakka one.
To fix the problem, navigate to Settings -> Video -> Output -> Automatic Refresh Rate Switch and set it to OFF.
This bug is known, but not fixed yet. See here.
Imaginary PS button
To be fair, you cannot really blame RetroArch for this issue, but the following is a bit impractical.
I use a DualShock 2 controller via a PlayStation-to-USB adapter. This makes the system think a DualShock 3 controller is connected. That controller has one more button than a DualShock 2, the PS button. On an Xbox controller, this would be the Guide button.
Because RetroArch assumes it is dealing with a controller that has one extra button, the button mapping is not quite correct, since the button indices are shifted by one. So you have to remap all buttons of the PlayStation controller so RetroArch knows which button does what. However, the PS button remains and cannot be removed. Normally it is used to open the RetroArch overlay. Due to the shift, L3 is now also the PS button.
The only workaround here is to define a hotkey. Then RetroArch expects you to press the hotkey first and then another button to trigger RetroArch functions, including the PS button. I used SELECT for this. SELECT itself remains available to the emulators, and L3 alone no longer opens the menu, instead it is SELECT + L3.
Downside: other shortcuts, like the one in PCSX ReARMed, L1 + L2 + SELECT to toggle analog mode, no longer work... It would be so much easier if you could simply remove the PS button from the "Toggle Menu" action. But no: either you bind this button to something else, or the default "PS" is applied. But there is no option to never bind it.
So I mapped "Button 8", which is the "Start" button, to Toggle Menu. That means I have to press SELECT + START to open the menu. Funnily enough, that is also a default setting if you do not use hotkeys. So why the PS button and the SELECT + START combo exist in parallel is beyond me.
Conclusion
Aside from the small difficulties, all in all it is, in my opinion, the best retro-gaming distribution for TV use.
For more RetroArch gaming, you can also browse under the tag Retro-Arch. I will be posting some reviews of old games there.