The Raspberry Pi is a testament to how advances in chip manufacturing, SOC technology, and economies of scale rapidly increase the amount of computing power you can get on a budget. The device has rapidly evolved from a single core 700 MHz ARMv6 in 2012 to a quad-core 1.5 GHz ARMv8 in 2019 while maintaining a comparable price for the base model. With the addition of RAM SKUs that go all the way to 8GB, the use cases for these miraculous devices keep expanding.
Which takes me to video games. Since the start, the Raspberry Pi community has had an active emulation scene for retro game consoles (see how to install RetroPie on a Raspberry Pi) thanks to a variety of open-source projects. There are entire operating systems compatible with the Raspberry Pi that facilitate and streamline the process to the point that it can rival any official miniature retro console.
One area that has yet to see similar progress was PC Game emulation. Since the Raspberry Pi uses an Arm chip, similar to the one found in your phone, it cannot natively run most PC Games, which are usually designed specifically for the more-powerful x86 architecture that AMD and Intel use.
Except for the very very few open-source games that can be recompiled for an Arm architecture, most PC/Steam games require emulation to run on a Raspberry Pi. This is tricky when you consider how much weaker any Raspberry Pi is compared to a PC and yet tremendous progress has been made in this field in recent times.
Box86: Allowing Steam to Run on Raspberry Pi
Box86 is an open-source emulation layer that lets x86 Linux programs (games) run on non-x86 Linux, like Raspberry Pi OS. It uses native versions of some of the system libraries to cut overhead and provide impressive performance.
Box86 is still under heavy development and in early stages (version 0.1.0 according to the February changelog) so there is still a ways to go before it is a full stable solution, but the results are already nothing short of impressive. Steam can be installed and plenty of games with native Linux ports can be successfully played.
However, since this is still in early stages the process is not exactly stable. One out of every three times I tried it, Steam crashed with no reason or warning (especially when allocating space to install). Sometimes Steam refused to open until I rebooted or reinstalled the whole thing. Most games will not launch.
And yet, when it works, Box86 provides an exciting window into what Raspberry Pi gaming can be in the future.
Overclocking Raspberry Pi to Run Steam
Box86 is compatible with Raspberry Pi 2, 3 and 4 but the computational intensity of emulating Steam games makes the Raspberry Pi 4 the only realistic choice. Even then, you’ll want to try overclocking the Raspberry Pi 4 to achieve usable results.
Firmware updates have improved thermal performance of the Raspberry Pi 4 since release but it can still run quite hot on stock clocks, leaving little room for overclocking. There have been reports of successful overclocking by just placing the Pi vertically to maximize airflow, but I deeply recommend you get one of the many aftermarket cooling solutions such as the Pimoroni Fan Shim that have been popping up since the release of original Pi Model. They tend to be easy to set up and they cool the SoC well enough that you can overclock until you hit limits that have to do more with voltage than temperatures.
Overclocking a Pi 4 is as easy as adding some lines to the /boot/config.txt file, which you can do from any text editor running as super user such as Nano with this command in the terminal:
sudo nano /boot/config.txt
Towards the end of the file, there is a commented line for "arm_freq". You can uncomment it to control the CPU clock and add some lines for the GPU and voltage:
over_voltage=6 arm_freq=2000 gpu_freq=750
The values for arm_freq and gpu_freq are in megahertz. So far both Pi 4 boards I own can reach these values with no problem. In the case of the 8GB board, I could push the CPU a bit further without problems:
over_voltage=6 arm_freq=2147 gpu_freq=750
If you see some warnings or your Raspberry Pi 4 refuses to boot, this is a sure-fire sign that you need to use lower values, and you might need to modify config.txt from another computer to get it to boot again.
Compiling Box86 for Raspberry Pi
Since Box86 is still in such early stages, there is no release of it that you can easily install from a repository with a single command. We are going to need to compile the latest version manually. This is easy if you follow these steps in a terminal:
First, download some tools needed to clone the project and compile it.
sudo apt update && sudo apt install git build-essential cmake -y
Next, make sure you are in the home directory and clone the Box86 code:
cd git clone https://github.com/ptitSeb/box86
This will create a box86 folder. After that, we just need to switch into it and run the build commands as specified in the Box86 documentation.
cd box86 mkdir build; cd build; cmake .. -DRPI4=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo; make
This will take several minutes as the Raspberry Pi will now manually compile an executable. After it is done (and assuming there were no errors), all that is left is to install the compiled executable.
sudo make install
Now we have Box86; time to get some games.
Installing Steam on Raspberry Pi
The first step is getting the Steam package. If you go to the Steam download site from a browser running on the Raspberry Pi, you should get a link to the Debian .deb file installable for Steam. If you try to simply double click and install, this will fail, since it was designed for an x86 PC and not an Arm device like the Pi. We can manually install it from the terminal with a couple of commands.
First, navigate to where the package was downloaded. This is usually the downloads folder.
Then extract the contents of the package with the ar command:
ar x steam*.deb
This should leave a tar.xz file. If we extract this to the root it should copy all the files to their correct locations.
sudo tar xvf data.tar.xz -C /
A "Steam" option should now be added to the "Games" section of Raspian start menu. Reboot the Pi and, once booted, click on this new link to Steam. A Steam icon should now also be on your desktop.
As I hinted to before, this process is still a bit finicky. Sometimes when you click the Steam icon, nothing happens. Sometimes it takes a while to start up. In the best of cases, it should show an error similar to the one in the image due to the fact that there are some x86 libraries that are just not present on the Pi.
If you dismiss the error, Steam should start nonetheless. The first time this is run, it might take a while longer as Steam has to download and install updates. Once done, you should be presented with the familiar Steam login prompt.
Once logged in, you will notice that Steam cannot display games or the store. At the time of this writing, Steam only works through Box86 in small mode, which you can switch to in the view menu.
Once you are in small mode, you can navigate through your game list and install games. At the moment Box86 is only compatible with games that have a native Linux port.
You might have to be a bit patient with Steam while these are downloaded. During all of my tests, Steam would often crash when trying to allocate space for these games and would just resume the downloads once started again. Sometimes the crash would cause Steam to refuse to open again, requiring a quick reboot.
The good news is that there is controller support. I plugged in my Xbox 360 wired controller and it was recognized instantly.
Which Steam Games Run on Raspberry Pi?
What games can you expect to run with Box86 today? Indie 2D games are the safest bet like WorldOfGoo, Airline Tycoon Deluxe or FTL.
For this test, I downloaded the indie megahit platformer Shovel Knight, Papers Please and cyberpunk bartender simulator VA-11 Hall-A, all indie games with existing Linux ports.
For all examples, I had to cut the resolution to 720p to get acceptable performance, but once going all games worked.
Papers Please and VA-11 Hall-A are designed for a mouse, but the wired Xbox 360 controller worked perfectly for Shovel Knight with no extra software needed.
The Future of Steam on Raspberry Pi
Box86 has already shown progress emulating 3D games. Current support for Unity, one of the most popular game engines out there, is a bit hit or miss but improving every day. Even more exciting: support for Wine is planned for the future. The combination of better Unity support with any form of Wine support could potentially open the doors to thousands of PC games for the Pi.
For the longest time gaming on the Raspberry Pi was limited to retro console emulators, open-source games and experimental platforms like pico 8.
Box86 potentially changes all of that. For such an early project, the fact that it can already allow for Steam to be installed and for many commercial indie games to run well on a Raspberry Pi 4 is nothing short of remarkable and hints at a future where the Pi could also serve as the basis for many indie gaming projects.
At the moment Box86 and Steam require a little bit of work to get installed but, once set up, they can successfully run a number of popular indie titles with controller support. If you want to taste the future of Raspberry Pi gaming, this is your best bet.