Setting Up Garuda Linux
01 Nov 2023 [linux
wine
proton
garuda
emulation
]
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
-
The only Garuda specific source of information I could find was this forum thread, which refers to the Arch documentation.
-
Arch wiki, TigerVNC: https://wiki.archlinux.org/title/TigerVNC
-
Arch wiki, Xrdp: https://wiki.archlinux.org/title/xrdp
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:
- You need RetroArch, which includes most of the emulators used by EmulationStation. This needs a bit of work to get set up ‘properly’ in Garuda. See below.
- When EmulationStation DE is first run it will create a
ROMs
directory and a config (.emulationstation
) directory in your home directory. You can change these locations but it as easy to move them and symlink to them later if needed. - Roms go in the respective system directories in
ROMs
. -
Things need moving around a little if using rom collections from the non-DE version of EmulationStation, e.g. those prepared with the excellent Skyscraper tool. Whereas EmulationStation uses
gamelist.xml
files to locate media files, EmulationStationDE requires media files to have the same name as the roms they relate to and be located as follows, using MAME as an example:~/.emulationstation/downloaded_media/mame ├─covers ├─marquees ├─screenshots └─wheels
-
gamelist.xml
files are still used for metadata. These should be stored as follows:~/.emulationstation/gamelists/mame/gamelist.xml
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:
- Not all third-party controllers are recognised automatically, including some made by Xbox/PlayStation authorised brands such as Razer. If you can’t use your controller to navigate the RetroArch menu, you’ll need to manually assign the buttons under Settings (use the keyboard).
- Take a look at the hot-key settings, for interacting with RetroArch while a game is running. What works for you will depend on what controller you’re using (how many buttons) and to some extent what systems. At a minimum, you want to be able to bring up the RetroArch menu in-game but you probably also want to have a hot-key combo for save states.
- There are several themes (we installed assets such as icons for them in the previous step). These affect how menus and submenus are navigated, as well as the overall look. It’s worth trying different themes out to see what you find easiest to work with.
- Settings for e.g. video output can be set globally, for individual cores or individual games. Global settings changes made while a core is loaded will not stick. E.g. if you want to enable integer scaling for all cores (you should, unless you’re using a very small screen) then either open RetroArch from the desktop and change this in the video settings or open a game from EmulationStation, bring up the RetroArch menu, close the running core (not just the game) and make the change.
- Arcade emulation and management of romsets is another big, complex subject and anyone some reading is pretty much essential. For now: the version of any arcade emulator (e.g. MAME) you have really matters. If you have a working set of roms, upgrading is often not a good idea. Consider pinning the version(s) of these emulators in the RetroArch settings.
- Ensure that RetroArch is set to save configuration changes on exit.
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.