Tokimeki.Memorial

Note: This website contains almost no TokiMemo content.
In fact, this picture is the only reference at this point.

2023: The Year of the Linux Shoebox

Post 00045 | November 8th 2023

A couple of posts ago, I showed off the media centre PC that I built in an Ikea storage box. "The shoebox" as I affectionally call it was upgraded with an AMD RX6600 graphics card to add some oomph to game performance. One of the benefits of AMD cards is how drivers are available for operating systems other than Windows which reveals my ulterior motive for choosing an AMD card: I have for a while been wanting to try out Linux as a gaming OS.

Windows definitely has its strong points, but it is terrible for anything other than desktop computing. You are pretty much screwed if you don't have keyboard and mouse nearby. They change settings all the time to promote their newest fad, and restart for updates at the most critical hours. Linux on the other hand has the opposite problem; It can be used as a desktop OS, but it truly shines when it's tasked with few tasks, like serving files, media and such. It's more of an appliance OS rather than a desktop OS. The main benefit is that distro makers can make their releases as lean as possible on Linux - fewer parts means fewer points of failure. Furthermore, the user interface can be whatever you want it to be: Get a desktop environment if you want to control it with a mouse, a command line interface if you want something low spec, or something third if you want to control it with something entirely different like a game controller.

The question is: Has Linux matured enough to work as a dedicated gaming OS where using it is less of a hassle than using Windows on a TV? Valve, the owner of the Steam gaming platform, has made great strides the last decade to make Linux more feasible, even letting you play Windows games on Linux with minimum setup (There's a check box you need to tick). This has without doubt been done to sell more Steam Decks, but that doesn't mean we can't all feast on the fruits of the labour.

There are tons of different Linux distributions available, but with my requirements but I managed to narrow it down to three: I want to be able to do as much as possible via a game controller and the faster I can get into a game, the better. It will primarily be used for emulation, but should also be able to run modern games. Finally, I want some way to backup and sync savedata as well as a way to record gameplay.

HoloISO

First up I tried HoloISO. This is basically the SteamDeck OS unofficially recreated to run on other hardware. SteamOS is set up to launch in something looking like Steam's "Big Picture" mode. It allows you to purchase, download, and launch Steam games all using your controller like you would on a game console. Furthermore, there is a option to reboot to a KDE-based desktop where you have access to an app store and a terminal. This is of course supposed to be controlled with a keyboard and mouse (on a Steam Deck, one of the touchpads get remapped to work as a mouse in this mode). It works well enough, but it feels like a Dr. Jekyll and Mr. Hyde scenario; A case of split personalities, where one of the personalities contains everything I am trying to avoid. Switching between modes require a reboot, meaning anything you launched in desktop mode shuts down. You can add desktop apps to the Big Picture mode, but they still rely on keyboard and mouse input and they close down when not in use. This is a good solution for a handheld like the Steam Deck where you are trying to conserve power, but on a full-fletched gaming PC, it's a bit too aggressive.

Being focused on Steam, it becomes a chore to play anything that isn't on sale on the storefront. For instance, I mainly use the shoebox for emulation, which can be achieved via EmuDeck. EmuDeck is a desktop app that you can run whenever you add new roms to the system. EmuDeck then downloads artwork and adds shortcuts to the Big Picture mode. The result looks very nice, but needing to exit to desktop to set it up is hardly ideal. Also, emulated games will be mixed in with Steam games which is not what I want.

In conclusion: Mostly usable for day to day use, but requires mouse and keyboard for anything off the well-trodden path. Multi-tasking isn't straight-forward.

ChimeraOS

Second on my list is ChimeraOS. In many ways, ChimeraOS is remarkably similar to HoloISO. There's still a split between a game mode and a desktop mode, although the developers of ChimeraOS has opted for Gnome instead of KDE as their desktop environment. It's certainly a pretty desktop envionment, but it is still a desktop environment requiring mouse and keyboard for advanced configuration. The OS hosts a neat website that allows you upload roms and install games from other store-fronts using another computer or smartphone on your home network. Other than that, it doesn't seem like there are many differences between it and HoloISO from a user perspective. ChimeraOS seems like a better HoloISO, but I have

Batocera

Right, third time lucky, right? Well, we are definitely off to a great start. Rather than booting into Big Picture mode like the previous two distros, Batocera uses EmulationStation as its front-end. This will look very familiar to anyone who has ever bought a Linux handheld from China or set up a Raspberry Pi as an emulation device. Simply pick your game system and a list of games appears - Select one, and you're in business. In fact, Batocera feels like RetroPie on steroids. If an emulator is available for Linux, chances are it'll be included in Batocera (with Switch emulators being a noticeable exception). Anything up to Wii U is included. How well they run depend on your hardware of course, but I was able to complete a few races in Ridge Racer 7 for PS3 on the shoebox without much hassle. For more modern games you can install Steam which will start in Big Picture mode much like on the other two distros. When you download a Steam game it will be added to EmulationStation as well, meaning you don't have to launch Steam to open a game after it has been installed.


Screenshot from Batocera. This is an example of one of the many different themes available.

The beauty of EmulationStation is how it is almost completely navigable via a controller. You might be wanting a keyboard and mouse around for initial setup but after that there really isn't much use. Most common settings can be changed in EmulationStation and seeing how most emulators are powered by RetroArch, you can also fine-tune your settings there via controller. If you need to access the settings page of any non-RetroArch-based emulator, there's a secret file browser that can be accessed by pressing F1 in EmulationStation. This opens up a file browser with shortcuts to various settings pages. There's also an app store in there that allows you to install apps. I can't remember if Steam comes preinstalled or if you need to install it from here. In any case, after everything has been installed an configured, you should be able to use the OS completely using a controller.

If you want to delve into more advanced configuration, rather than using a desktop mode Batocera expects you to do this remotely. All its rom folders and config files are available via a network share. Simply copy your roms and bios files to the respective folders and pick "Update Game List" from within the settings menu within EmulationStation. You can download box art and game info straight from Screenscraper using your controller. You normally don't need to tinker with the config files but if you do, these are also available on the network share. SSH support is also enabled if you prefer that. I much accessing the machine remotely to do configuration rather than having to use a keyboard from the sofa. I can sit with an actual computer, and browse the web for troubleshooting if I have any issues or if I notice I need to download a missing file.

As you can probably tell, I'm very pleased with Batocera; I don't think it can be done any easier without limiting functionality. I had two final requirements however: Backing up, syncing, and recording gameplay. I was pleased to see that Syncthing came pre-installed. Syncthing is a Peer-to-Peer sync client that allows you to sync multiple folders to multiple other Syncthing clients. That means I can backup my savedata to my NAS and sync keep my rom folders in sync on multiple devices all at the same time from one app. Syncthing is configured via a website, meaning you reach it from another computer, meaning I still don't need to balance a mouse on the sofa.

As for recording, while it is certainly doable, but hardly ideal. Apart from the record function built into Retroarch, it doesn't seem like there is a way of starting recording from the the system itself. Instead, you can ssh into the machine and use the command "batocera-record" to start a recording. This will record until you press the Q key and store the resulting file in the screenshots folder. This function is powered by the incredible versatile media encoder ffmpeg, which makes it even more baffling how little customisation the "batocera-record" allows. By default it records at 25 fps, with two different 30 fps modes available - one that compresses and one that doesn't. The command is a simple shell script, so you can edit it to fit your needs (run "nano /usr/bin/batocera-record" via ssh to access it). However, there's a good chance that this will break in a software update. Alternatively, you could just use ffmpeg directly with whatever options you desire, including hardware acceleration.

Nitpicks

While I am perfectly happy with my current setup, there still are a couple of things that could be better. For starters, controllers are a confusing mess. The situation is definitely miles better than it is on Windows - Pretty much any "normal" controller is plug and play no matter if it is made by Sony, Microsoft, Nintendo or a third party. Not at one point did I need to worry about drivers or 3rd party apps. I have a decent collection of different controllers, which brings me to my first problem: Controller layout. Even though there's a wide variety of controllers supported, it still has to conform to a standard Xbox controller layout with four face buttons. That also means confirm is mapped to A, the bottom face button. That means if you use a Nintendo controller, confirm is now mapped to B, which is usually cancel on this layout. I can't begin to describe how confused this yes-means-no scenario makes me.

This only becomes worse if you try to use a GameCube controller. If you ask me, the GameCube controller is one of the most intuitive controllers ever made. In the middle of the face buttons there's a big green button that means confirm, and a smaller red button that means cancel. X and Y are bean-shaped, making it easier to tell them apart due to their rotation. None of this translates well to the Xbox layout. The little red button suddenly becomes confirm and the big green button cancels. It's like having a killswitch that starts a machine and a button labelled start that turns it off. I would much prefer it if you had the option to select what type of controller you were using when you map them. Being able to define a controller as having a Saturn layout of a Nintendo 64 layout would take a lot of the guess-work out setting up unusual controllers.

Another thing that annoys me is how RetroArch settings doesn't stick. The batocera.conf file seems to always trump RetroArch's config file even if the file doesn't state any preference on a given setting. Sure, I can add my preferences to the config file, but that's done via keyboard, which is a shame when there is a perfectly functional controller method available. I have had some luck using the "Overrides" feature in Retroarch though, so it's not all bad. Besides, it wouldn't be a true emulation setup if you weren't left confused by Retroarch, would it.

Finally, as already mentioned, it would be nice to be able have a built-in record function. I notice the documentation lists scripting support which looks promising. There even is an example uses ffmpeg to show a marquee on a second screen, presumably for use with an arcade cabinet. I might need to test this at a later date. For now, the ssh method works well enough.

Conclusion

In conclusion, I found Linux to be more than ready for prime-time when it comes to couch gaming. I have been using it for little over a month now with little to no issue. I don't play games online, which for now seems to be the crotch with Linux gaming as it seems to trip anti-cheat functionality in these games. I have kept my Windows install on a separate NVME drive, which I can always plug in if this change, but so far I haven't even been tempted to go back to the more familiar OS; Batocera has just been that much of an upgrade.