Setting Up Garuda Linux

[ ]

Instructions for setting up Garuda Linux for Windows games and emulation. Garuda’s performance when it comes to Vulkan games is significantly better than Ubuntu. The ‘Dragonized Gaming Edition’ comes with a huge number of tools and other packages but there’s a bit of work involved to get some things set up properly.

Much of this guide is focused on setting up, as far as possible, a controller/TV setup.

Initial Installation

Start with the ‘KDE Dragonized Gaming Edition’ here. Other versions are available, with fewer packages, but this is the most complete version. Follow the installation procedure on the download page.

Install Zsh

This is clearly optional. Garuda comes with Fish which has a lot to commend it but if you’re used to typical Zsh/Bash shortcuts like !! for the last command or $_ for the last argument to the last command, it’s a bit like being lost in a foreign country.

pacman -Sy zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

Replace the line in .zshrc beginning ZSH_THEME with:

ZSH_THEME="powerlevel10k/powerlevel10k"

Run exec $SHELL to enter the powerlevel10k first-run menu.

Remote Desktop

Useful for carrying out a lot of the setup tasks, some of which require the use of GUI applications.

Sources of information

I could not get any of these sets of instructions to work. While I could make a connection with TigerVNC and Xrdp I could only get either a spinning Garuda logo or blank X session respectively. This is relatively common and I’m pretty sure down to problems with the configuration used to fire up a new desktop on each connection. The problems are probably solvable but several hours’ worth of attempts got me nowhere.

x11vnc

This works a bit differently. It connects to the existing X session which for my use case is actually more useful as you get exactly what you’d see if viewing on the TV.

I got it working with with small adaptations to the instructions here. This method requires you to already be logged in with ssh.

Install with:

pacman -S x11vnc

Each time you want to connect via VNC, run x11vnc with:

sudo x11vnc -display :0 -auth $(sudo find /run/sddm/ -type f)

EmulationStation DE

UPDATE: I’ve previously found compiling ES-DE from source to be the most reliable way of installing without running into annoying dependency conflicts with other things. However, this was mostly on Ubuntu and I’ve since found the Appimage works perfectly well on Garuda. I’d try that first. Amongst other benefits it makes it easy to run parallel versions for testing.

Garuda comes with EmulationStation but I wanted to use the DE edition to enable use of the same romsets and config as my Steam Deck, where I have EmulationStation DE installed via EmuDeck. There’s an AUR package available but given AUR involves local compilation, it’s as easy to compile EmulationStation DE using the instructions here.

First, uninstall EmulationStation:

sudo pacman -R emulationstation

Install dependencies:

sudo pacman -S gcc clang make cmake pkgconf sdl2 ffmpeg freeimage freetype2 libgit2 pugixml poppler

Clone the EmulationStation DE repo and checkout the branch corresponding to the version you want to install. At the time of writing the latest version was 2.2.

It’s probably worth creating a sources directory somewhere to keep the source code for applications to be compiled, whether normally or using the AUR repos.

Change the 8 in -j8 to the desired number of compilation threads. For most processors, set this to double the number of cores. For inexpensive processors like Celerons, set it to the number of cores.

git clone https://gitlab.com/es-de/emulationstation-de.git
cd emulationstation-de
git checkout stable-2.2
cmake .
make -j8
sudo make install

Getting started with EmulationStation DE

There’s plenty of documentation online but here are the basics:

Updating EmulationStaion DE

Within the source directory:

git checkout master
git pull

The adapt the git checkout command above to checkout the branch for the version you want to install and run the last three commands from the installation instructions.

Sometimes updates to EmulationStation DE will introduce new systems. The directories for newly-supported will not be automatically created by the updated version. To integrate them with your ROMs directory, create new, blank copy of the initial ROMs directory with:

mkdir ~/es_temp
emulationstation --home ~/es_temp --create-system-dirs

You can now copy the desired directories from ~/es_temp/ROMs into your actual ROMs directory.

RetroArch

RetroArch is a complicated subject in its own right. It’s developers describe it as a ‘frontend’ for emulators and it can be used this way but it’s much more common to use EmulationStation for this. RetroArch is the reference implementation for libretro, an API which enables multiple emulators (‘cores’) to share the same framework for common functionality such as handling controller inputs, video and audio.

Garuda Dragonized Gaming Edition comes with RetroArch installed. However, it inherits the Arch approach whereby individual cores are downloaded as system packages. It’s much easier to manage core downloading and updating from within RetroArch itself but this requires a bit of configuration.

sudo pacman -Rs  $(pacman -Qsq libretro) retroarch-autoconfig-udev-git
sudo pacman -Sy retroarch retroarch-assets-ozone retroarch-assets-glui retroarch-assets-xmb libretro-core-info

As of early 2024 the three assets packages had recently been renamed from libretro-assets-glui libretro-assets-xmb libretro-core-info. You’ll still see these older names referred to elsewhere.

Open the RetroArch config file at ~/.config/retroarch/retroarch.cfg and change:

menu_show_core_updater = "false"

to:

menu_show_core_updater = "true"

It may be necessary to change the ownership/permissions for the directory Retroarch attempts to download cores to, otherwise a message saying core installation failed will appear when attempting to download cores. By default this is /usr/lib/libretro. In some cases it may be necessary to create it.

Restart RetroArch.

Configuring RetroArch

This is a big subject and brilliant as RetroArch is, it’s not always easy to work with. These are just a few important tips:

Downloading Cores

With the menu for downloading/updating cores enabled, download the cores for any systems you have set up in EmulationStation DE. Note that EmulationStation DE can be set to use different emulators where more than one is available for each system. They don’t take up a lot of space so it’s worth downloading more rather than fewer.

Windows Games

This section refers to wine-ge and proton-ge. For an explanation of the difference see this post.

Lutris

Garuda comes with Lutris, a sophisticated front-end which can be used to launch games from the major store-fronts as well as games installed individually. There is a custom/experimental version of WINE, wine-ge which can be used in place of the default version of WINE and which offers various improvements and fixes. It is based on Proton, the fork of WINE used by Steam.

Steam

Use ‘Steam Runtime’ rather than ‘Steam Native’ unless there’s a good reason not to. The Runtime version containerises the various dependencies and is more resilient to changes to the underlying OS.

Steam works very, very well out of the box for Windows games installed via Steam. Valve provide their own experimental build of Proton (WINE) which can be selected globally or on a game-by-game basis. There is also a counterpart to wine-ge, proton-ge which can be used in place of the Valve-supplied builds.

Where Steam falls down a bit is with some older Windows games installed outside of Steam which are then added to the UI. Steam can lose track of which Window the game actually runs in which is not a problem if you have a keyboard (just Alt-Tab) but frustrating when using a controller, especially as keyboard/mouse mappings aren’t passed to the right application. In these cases it’s better to launch games with Lutris and use AntiMicroX.