RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    What is supposed to start emulationstation?

    Scheduled Pinned Locked Moved Help and Support
    startup
    3 Posts 2 Posters 829 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      larsks
      last edited by

      I'm running RetroPie on a Pi Zero W. After an upgrade (apt-get update; apt-get -y upgrade) and a reboot, it was no longer booting into emulationstation, although everything ran correctly when starting it manually.

      I looked around a bit...

      • There is no systemd unit for starting emulationstation
      • There is nothing in rc.local that would start it
      • There is nothing else in /etc that references emulationstation
        outside of the /etc/emulationstation config directory.

      ...and there was nothing obvious in the logs indicating why it wasn't starting. I dropped the following systemd unit into /etc/systemd/system/retropie.service, which seems to work, although there is some sort of race condition at startup that means it has to restart once (hence the Restart=always):

      [Unit]
      Description=Start RetroPie UI
      After=network-online.target
      
      [Service]
      User=pi
      WorkingDirectory=/home/pi
      ExecStart=/usr/bin/emulationstation
      StandardInput=tty-force
      Restart=always
      
      [Install]
      WantedBy=multi-user.target
      

      This seems to be working fine, but I'm curious what was starting
      things up in the first place.

      mituM 1 Reply Last reply Reply Quote 0
      • mituM
        mitu Global Moderator @larsks
        last edited by

        @larsks said in What is supposed to start emulationstation?:

        This seems to be working fine, but I'm curious what was starting
        things up in the first place.

        It's the raspi-config option to Boot to CLI and autologin user that configures the auto-login of the user pi and the /etc/profile.d/10-retropie.sh script that starts Emulationstation.
        You've stumbled upon an update to systemd that breaks the autologin set-up by raspi-config - reported in the forums in July (see here).
        The solution is to either user raspi-config and re-enable the auto-login or use configure Emulationstation again to start automatically through the autostart module (see https://retropie.org.uk/docs/FAQ/#how-do-i-boot-to-the-desktop-or-kodi). You can remove your systemd unit and go back the the default behavior.

        L 1 Reply Last reply Reply Quote 2
        • L
          larsks @mitu
          last edited by

          @mitu Thanks, that fixed it!

          Also, for anyone else who ends up here, it's important that you run raspi-config as sudo raspi-config from the pi user. If you're already root and you run it it won't know which user to configure for autologin.

          1 Reply Last reply Reply Quote 2
          • First post
            Last post

          Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

          Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.