Package Details: retroarch-standalone-service 2-14

Git Clone URL: (read-only, click to copy)
Package Base: retroarch-standalone-service
Description: Systemd service and user to run Retroarch in stand-alone mode
Upstream URL: None
Keywords: libretro retroarch standalone
Licenses: MIT
Submitter: JulianXhokaxhiu
Maintainer: JulianXhokaxhiu
Last Packager: JulianXhokaxhiu
Votes: 3
Popularity: 0.000000
First Submitted: 2016-06-22 13:01 (UTC)
Last Updated: 2020-08-27 20:12 (UTC)

Latest Comments

berturion commented on 2022-01-10 14:22 (UTC)

Thank you @JulianXhokaxhiu. I tried it and it kind of works. I have a script that switches from Kodi-x11 to retroarch-standalone. Kodi is launched on startup. I set resolution to 1920x1080 60Hz. So Kodi is OK. When I switch to retroarch and kodi is terminated, I can see the linux tty and my TV switches to 30Hz. Then, retroarch is launching and display keeps refresh rate to 30Hz until I launch a game. When the game is launched, refresh rate comes back to 60Hz. After quitting the game, displays stays at 60Hz. The ideal would be that my TV keeps the same refresh rate on every situations... Though, I think it is an acceptable situation for now. Thank you.

JulianXhokaxhiu commented on 2022-01-10 13:21 (UTC) (edited on 2022-01-10 13:21 (UTC) by JulianXhokaxhiu)

@berturion: You can try customizing it in Retroarch itself, see

berturion commented on 2022-01-10 13:16 (UTC) (edited on 2022-01-10 13:16 (UTC) by berturion)

Hello, how can specify screen resolution for Retroarch please? I have a PC connected to a 4K LG TV but the default 4K resolution is limited to 30 FPS of refresh rate. I need to force downgrade the resolution to Full HD (1920x1080) in order to reach 60 FPS of refresh rate. I tried xrandr but the command says Can't open display. Do I have to change something in .xinitrc or the retroarch-standalone.service execution command? Thank you.

dantob commented on 2020-08-26 03:43 (UTC)

retroarch has its own logging priority options available in settings (for both cores and retroarch itself), is -v 2>&1 >&/home/retroarch/debug.log actually necessary?

JulianXhokaxhiu commented on 2020-08-25 10:51 (UTC)

@njordan: Wouldy you be so kind to make a PR over here?

So I could then pull your commit once merged and push it over here, with all the credits deserved :)

Thank you!

njordan commented on 2020-08-25 07:33 (UTC)

I have a patch that includes support for aarch64.

The change to retroarch-standalone.cfg may not be needed. The second change to the xinitrc file causes it to shutdown if retroarch exits successfully (you chose quit from the menu). On a crash it would just login again and restart retroarch.

telewook commented on 2020-08-19 16:12 (UTC)

This package ultimately led to a non-working KDE after LightDM login. Originally the service attempted to start but would hang in "pre-start" and never successfully start. This also happened after stopping the service and attempting to start it again. I made an edit to /usr/lib/sysusers.d/retroarch-standalone.conf (hyphen to group id) and rebooted.

After the reboot, I could login via lightdm but then received the error:

Could not sync environment to dbus

The DE doesn't start after this. Worse, accessing another tty via Ctrl+Alt+F4 (or any number of function keys) didn't work. I've never seen Arch screwed up enough to disallow access to another tty.

Booting the kernel via grub2 into single user mode and systemctl doesn't show the retroarch-standalone-service unit, at all. After trying a few things, removing the service package finally allowed me to reboot and login as usual:

yay -R retroarch-standalone-service

I'd be willing to do more testing but probably not for a few days as I need the machine functioning.

JulianXhokaxhiu commented on 2020-08-15 12:41 (UTC)

@dantob Thank you! I've double checked the sysusers.d documentation and indeed the syntax has changed, so I did integrate your suggestion in the new version of this package. I hope it will be fine now.

@all Thank you for using this :) I appreciate all the feedbacks in here, and I'm glad you find this useful. This was created to fullfil my own needs for a RetroBox I had built and I wanted to use only for this purpose, on top of ArchLinux ARM but also ArchLinux. Although as I do not use this anymore actively, let me know if you encounter any issue or if you have ideas on getting this better.


dantob commented on 2020-08-15 08:53 (UTC)

fix for retroarch-standalone.sysuser should be this

u retroarch - "Retroarch user" /home/retroarch /sbin/nologin

analca3 commented on 2020-08-11 22:10 (UTC)

Hi, I had the same problem as @honzor, same solution applied. The home folder was not set (checked with cat /etc/passwd) so I solved it using sudo usermod -d /home/retroarch retroarch and everything is working now :). Thanks for the good work!

berturion commented on 2020-05-27 16:55 (UTC)

Thanks @JulianXhokaxhiu. No issue. I just want to make retroarch writing files as another group nas and having the group writable permission on them. If I put :


The files are correctly written with the nas group but permissions are incorrect, they have -rw-r----- instead of -rw-rw----. And I don't understand which part of the setup changes that.

JulianXhokaxhiu commented on 2020-05-27 14:02 (UTC)

@berturion The Umask logic is governed by Retroarch itself. The unit just starts RA with the user retroarch and group retroarch. All the rest if left to RA itself. Have you got any issue in particular that you need to mangle with the UMask?

berturion commented on 2020-05-26 20:06 (UTC)

Hello, can someone help me to find a way to change umask of files created by retroarch service please ? I tried a systemd unit override with :


But it doesn't work. Anyway to set umask in the .xinitrc file? Other solutions?


honzor commented on 2020-03-20 16:54 (UTC)

Ok looks like i fixed it, the problem is as follows: at least in my case, the user retroarch was created but its home folder wasnt set, so .xinitrc in /home/retroarch was ignored. I had to manually set the home folder and copy the .xinitrc file again. Further, libxinerama and libxrandr were not installed (should they be added to the dependencies of retroarch?) so retroarch failed to run. After these fixes, it worked flawlessly (i just had tomanually set the fullscreen resolution in /home/retroarch/.config/retroarch/retroarch.cfg because it defaulted to a tiny (windowed) resolution. Keep up the good work!

honzor commented on 2020-03-20 15:45 (UTC)

I have the exact same problem as @berturion. Its a vanilla system where xorg has been installed as dependency of retroarch-standalone-service. Reinstalling and deleting as berturion's suggestion didnt help. Cant figure out what the problem is, does anybody have any other ideas?

berturion commented on 2019-12-29 06:37 (UTC)

Hello @kemra102. I didn't do much, I don't remember exactly. You have to ensure that the home directory of the user retroarch is in sync with the content of the .xinitrc file (in its home). If not, you have to move its home to the one in the .xinitrc. Correct me if I am wrong.

kemra102 commented on 2019-12-23 11:22 (UTC)

@berturian - I have exactly the same issue, what steps did you take to fix as I cannot seem to get past that error?

JulianXhokaxhiu commented on 2019-12-08 10:26 (UTC)

@berturion: glad it worked :) Enjoy!

berturion commented on 2019-12-08 05:49 (UTC)

Hello, I uninstalled everything and removed everything in /home/retroarch, /etc/retro*, etc. Re-installed it and it works now. I think it is related to the file .xinitrc that was not in the correct folder.

berturion commented on 2019-12-04 19:23 (UTC)

Thanks for your answer @JulianXhokaxhui. Though, xorg was installed as a dependency of this package. I didn't install it before. So this is the vanilla configuration. I conclude that there must be something to do over the xorg configuration in order for this package to work. Something does not work "ou-of-the-box". I really know nothing about xorg. But it is really simple to reproduce this error :

  • install arch (I tried both archlinux and anarchylinux)
  • install yay
  • install retroarch-standalone-service
  • start retroarch-standalone-service

Maybe someone could try and tell me what's wrong?

JulianXhokaxhiu commented on 2019-12-03 19:29 (UTC)

@berturion: looks like an issue in your X.Org installation unfortunately. Can't help you more. Double check your installation and check first of all why X.Org is not able to open even a log file. When you will be able to fix that, then please post the log here. Thank you.

berturion commented on 2019-12-03 18:36 (UTC)

Hello, I just installed anarchylinux (basically arch linux preconfigured) without any desktop environment in a VM with Virtualbox. I then installed yay and this package and started the service. I can only see these messages :

Fatal server error:
(EE) Cannot open log file "/var/log/Xorg.0.log"
Please consult the X.Org Foundation support
 for help.
/usr/bin/xinit: giving up
/usr/bin/xinit: unable to connect to X server: Connection refused
/usr/bin/xinit: server error

I didn't touch any config file nor any permissions. What could cause this?

JulianXhokaxhiu commented on 2019-09-25 19:12 (UTC)

Hi, thanks for the suggestion, I committed a fix. Feel free to try it now, it should work fine. Please let me know.

basica commented on 2019-09-25 12:43 (UTC)

It appears that the way the conf files under /usr/lib/sysusers.d are formatted has changed and prevents the service from working (for me at least). I fixed my issue by replacing the first line in the /usr/lib/sysusers.d/retroarch-standalone.conf file with the following:

u retroarch 975 "Retroarch user" /home/retroarch /sbin/nologin

elgabo commented on 2019-02-12 15:56 (UTC)

Thanks for your package!

Just a question, is there a solution to poweroff the computer with gamepad?

JulianXhokaxhiu commented on 2019-02-10 15:34 (UTC)

@SpaceAgeHero: Hi, you can use the systemd unit:

systemctl start retroarch-standalone

Enjoy :)

SpaceAgeHero commented on 2019-01-07 08:39 (UTC)

Hi, I would like to set this up on my machine alongside kodi-standalone. Currently I have my machine configured to automatically login user kodi after boot. Then only Kodi starts without any DE. When I leave Kodi, I fall back to lightDM logon. Now I would like to login user retroarch and have it automatically start Retroarch without any DE just like Kodi (as user-session). Is this possible with this package? How can it be done?

JulianXhokaxhiu commented on 2017-09-02 16:43 (UTC)

Script has been fully rebased on top of XOrg. You should not have any more conflicts with your tty.

Polichronucci commented on 2017-01-28 17:59 (UTC) (edited on 2017-01-28 18:01 (UTC) by Polichronucci)

I had problems running this service as is. Logs below. Following the kodi-standalone-service service file, I created the drop in file /etc/systemd/system/retroarch-standalone.service.d/override.conf with the following. ------------------------------------------------------------------------------- [Unit] After=systemd-user-sessions.service Conflicts=getty@tty7.service [Service] TTYPath=/dev/tty7 ExecStart= ExecStart=/usr/bin/xinit /usr/bin/retroarch -- :0 -nolisten tcp vt7 StandardInput=tty ------------------------------------------------------------------------------- Service works fine, and I have enabled it to start on boot without any problems.

JulianXhokaxhiu commented on 2016-11-19 18:19 (UTC)

Please provide a more detailed log, using $ journalctl -r | retroarch Thank you.

DaVinciLord commented on 2016-11-17 20:35 (UTC)

Hey, When executing systemctl start retroarch-standalone, the service can't start. Here is the status of the service:

JulianXhokaxhiu commented on 2016-06-23 10:03 (UTC) (edited on 2016-06-23 10:05 (UTC) by JulianXhokaxhiu)

Before anyone asks, yes, this is a package to make Retroarch working out-of-the-box with XMB menu, and all the relative small configurations that will make final user's life easier. By default you'll get: -> Retroarch user in your system with some permissions granted like audio, video, input, etc. -> Retroarch binary running as retroarch user ( sandboxed! ) inside the home directory /home/retroarch -> Cache folder configuration by default ( it means that if you load a ZIP file, this will be handled correctly ) -> Retroarch restarts by default if something wrong happens ( thanks systemd! ) -> Additional Retroarch configuration where some settings are applied ( like cache directory, assets directory, autoconfig directory, etc. ) With this small package, at the end you'll get a pleasure experience to just install, run and enjoy your games. Automatic support and configuration for pads too ( like Xbox 360, etc. ). If something is not working, please write a feedback here, thank you!