Jump to content

RetroArch

From ArchWiki


RetroArch is the reference implementation of the libretro API. It is a modular front-end for video game system emulators, game engines, video games, media players and other applications that offers several uncommon technical features such as multi-pass shader support, real-time rewinding and video recording (using FFmpeg), it also features a gamepad-driven UI on top of a full-featured command-line interface.

Installation

Install the retroarch package.

Tip
  • Install retroarch-assets-xmb to get the fonts and icons for the RetroArch GUI. You may also want to install retroarch-assets-ozone for a more desktop-friendly GUI.
  • Install retroarch-standalone-serviceAUR to get system user, system service and RetroArch configuration for standalone game-box. Then start and/or enable retroarch-standalone.service.
  • Install retroarch-steam-launcherAUR to map the retroarch in your PATH to the Steam installation of retroarch. This can be useful for using Steam features, such as cloud saves, with applications like emulationstation-deAUR which use retroarch from the PATH.

Usage

RetroArch relies on separate libraries, called "cores", for most of its functionality. You can install the most popular cores by installing the libretro group. Additional cores can be found on the AUR. Alternatively you can download the cores on a per-user basis within RetroArch itself (via the libretro Buildbot).

Note By default RetroArch is configured to load the cores installed by pacman. Edit your #Configuration if you want to use the per-user Online Updater instead.

To boot directly into a game you can use the command

$ retroarch -L /path/to/some_core_libretro.so /path/to/rom

Configuration

When you first run RetroArch it will create the user configuration file ~/.config/retroarch/retroarch.cfg.

If you prefer to install cores with the built-in Online Updater instead of pacman, you need to enable it and update the path in your configuration file.

~/.config/retroarch/retroarch.cfg
libretro_directory = "~/.config/retroarch/cores"
menu_show_core_updater = "true"
Note Install libretro-core-info to ensure the core downloader works correctly. Without this package it will not fetch the core list to choose from.

Alternatively, you can edit your config file to use the core info from the Online Updater.

~/.config/retroarch/retroarch.cfg
libretro_info_path = "~/.config/retroarch/cores/info"
Note RetroArch does not support multiple search paths for these components. For example, if you install cores with pacman and download cores using RetroArch's GUI, you cannot configure RetroArch to show all of them at once since they are installed in different directories. It is recommended to choose one method of installing cores and not mix both.

If you want to override your configuration (for example when running certain cores) you can use the --appendconfig /path/to/config command line option.

Tips and tricks

Filters and shaders

RetroArch can load CG shaders, which are considered old and deprecated, as well as GLSL and Slang shaders.[1] The shaders can be obtained and updated directly inside RetroArch using the Online Updater.

Note retroarch-gitAUR requires nvidia-cg-toolkit in order to use the CG shaders.

Reset settings to their default value

To reset a setting or keybind to its default value through the GUI, highlight it and press Start. To remove a button from a keybind, highlight the keybind and press Y.

Troubleshooting

No cores found

This article or section is being considered for removal.

Reason: This was only an issue because this wiki page was providing out of date information. This issue can't happen if you follow the updated wiki instructions. (Discuss in Talk:RetroArch)

By default RetroArch searches for cores in ~/.config/retroarch/cores, which is where the Online Updater installs them. Cores installed with pacman are placed in /usr/lib/libretro and thus will not appear in RetroArch's GUI. You should choose one method of installing cores (pacman or the Online Updater) and change your configuration to match.

If you still face a "No Cores Available" message, you likely need to install the core info files. To solve this:

  1. Navigate to Settings > Directory, and ensure all configured paths are writable without requiring superuser permissions.
  2. Go to Settings > User Interface > Menu Item Visibility, and make sure that Show 'Core Downloader' is enabled.
  3. Finally, access Main Menu > Online Updater and proceed to update the core info files. It is also recommended to update all other available components.

Upon restarting RetroArch, you should be able to run ROMs using any of the installed cores.

Input devices do not operate

The factual accuracy of this article or section is disputed.

Reason: We might want to update this section to point to Udev#Allowing regular users to use devices? (Discuss in Talk:RetroArch)

You may encounter problems if running on a CLI or a display server other than Xorg or if you use the udev input driver, because /dev/input nodes are limited to root-only access. Try adding your user to the input user group then logging in again.

Alternatively, manually add a rule in /etc/udev/rules.d/99-evdev.rules, with KERNEL=="event*", NAME="input/%k", MODE="666" as its contents and reload udev rules.

If rebooting the system or re-plugging the devices are not options, permissions may be forced using:

# chmod 666 /dev/input/event*

Poor video performance

If poor video performance is met, RetroArch may be run on a separate thread by setting video_threaded = true in ~/.config/retroarch/retroarch.cfg.

This is, however, a solution that should be not be used if tweaking RetroArch's video resolution/refresh rate fixes the problem, as it makes perfect V-Sync impossible, and slightly increases latency.

Audio issues with ALSA

When using ALSA the audio_out_rate must match the system's default output rate, usually 48000.

Start game from playlist but reports 'No Items'

This article or section is being considered for removal.

Reason: This seems to not be relevant anymore. I'm only finding very few people mentioning this error and all of them are from 7-8 year ago. I'm also not finding this error inside the RetroArch source code. (Discuss in Talk:RetroArch)

If RetroArch reports libretro core requires contents, but nothing provided, try to load game by manually choosing the path of the ROM from Main Menu > Load Content. It seems unreliable to start game from playlist.

BIOS files are missing or not accepted

RetroArch's cores are looking for BIOS files at the location set with the system_directory option in retroarch.cfg.

The GUI menu Settings > Directory > System/BIOS shows the directory as well.

Some of the cores require the files directly in this directory. Other cores need a subdirectory within this directory with a specific name for their specific BIOS files. Some cores even look for their files in the same directory as the ROM file they try to run.

Every installed core provides information on needed files, their MD5 sums and the directory they need to be placed in. You can find this information in the GUI menu under Settings > Core > Manage Core. Choose a core here to get information on the needed BIOS files for this specific core. RetroArch describes them as "firmware" files on the core info pages.

Further in depth info on BIOS files for many of the supported cores can be found in the official documentation. [2]

See also