Navigation

    MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    PM2 MM2 Not starting on start up

    Troubleshooting
    11
    30
    15917
    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.
    • E
      eugekiller last edited by

      Ok so i got everything set up installed pm2. I am able to start pm2 and also MM “pm2 start mm.sh” load fine but when i reboot the raspberry pi 3 it doesn’t load in to MM it loads in to NOOB. Not sure what i did wrong.

      The one thing i had a problem with is when starting MM through pm2 your supposed to exit it and save settings. Problem was i didnt know how to exit so i rebooted rpi. So my question here is also how do you exit MM? 😞

      bhepler 1 Reply Last reply Reply Quote 0
      • bhepler
        bhepler Project Sponsor @eugekiller last edited by

        @eugekiller Did you save the pm2 state after you got MM started? pm2 save

        Pro tip: you can tell pm2 to save state via ssh terminal from another machine. Otherwise, I found that if you’re working directly on the mirror itself, you can hit the windows key on your keyboard. That will pop up the menu on top of the mirror display and you can then navigate to open a terminal.

        The trouble with exiting the MM process in order to save the pm2 state is that without the MM process running, it will save state… without the process running.

        1 Reply Last reply Reply Quote 0
        • E
          eugekiller last edited by

          Ok so i figured out how to exit out of MM. But its still not starting after reboot. Can anyone help me or is there anything i can try to do.

          bhepler 1 Reply Last reply Reply Quote 0
          • bhepler
            bhepler Project Sponsor @eugekiller last edited by

            @eugekiller When you say “loads into NOOB”, I presume you mean that it gives you a command line interface that looks like this: pi@RaspMirror:~ $ instead of starting your mirror?

            If that is correct, I believe you need to configure your Pi to start the graphical interface. From the command line, run the configuration program: sudo raspi-config. Navigate to the boot options and tell it to boot to the Desktop Autologin option. When you hit OK enough times, it will ask you to reboot. Do so and report back.

            1 Reply Last reply Reply Quote 0
            • E
              eugekiller last edited by

              Noobs is the PI noobs interface almost like a windows (https://www.raspberrypi.org/downloads/noobs/). From there i can select terminal and then i get the pi@raspMirror:~ $. PM2 seems to work and is linked because when i type pm2 start mm.sh it does load MM. So I assume that PM2 is linked with MM since i can load it through PM2. So for some reason PM2 is just not loading it on start up.

              Ok so i did the config option that you said and still no luck. Is there a way to uninstall PM2 so i can try to reload it again?

              bhepler 1 Reply Last reply Reply Quote 0
              • bhepler
                bhepler Project Sponsor @eugekiller last edited by

                @eugekiller Sure. sudo npm uninstall -g pm2

                When you installed PM2, did you copy & run the command it displayed for you?

                1 Reply Last reply Reply Quote 0
                • E
                  eugekiller last edited by

                  Yes it did I will try to uninstall and install it back. Thanks B.

                  1 Reply Last reply Reply Quote 0
                  • E
                    eugekiller last edited by

                    Well Just reinstalled PM2 and still nothing. Using this guide not sure if everything is correct on that. https://github.com/MichMich/MagicMirror/wiki/Auto-Starting-MagicMirror

                    Is there a way to see if PM2 is even trying to load MM on start up. Or maybe something wrong with this command:
                    cd ~/MagicMirror
                    DISPLAY=:0 npm start

                    1 Reply Last reply Reply Quote 0
                    • E
                      eugekiller last edited by

                      Ok so i also tryed to do pm2 lists and there is nothing in the list. Does that mean anything?

                      1 Reply Last reply Reply Quote 0
                      • E
                        eugekiller last edited by

                        Ok so i started doing some more digging. First i have a question PM2 does it actually load MM from a full reboot? meaning power off to RPI and a full start.

                        The reason i ask is because
                        When i open terminal in RPI and type npm start from MM directory it loads MM without any problems. Then i hit Ctrl Q it quits.
                        Then i do PM2 list and gives me 0 apps running.
                        Then I do pm2 start mm.sh again loads MM without a problem. Then i hit Ctrl Q it exits MM for about 10sec and then loads it back. During the 10sec I did pm2 list again and it said MM is running.

                        So I dont think PM2 is actually loading MM from a full reboot.

                        1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 1 / 3
                        • First post
                          Last post
                        Enjoying MagicMirror? Please consider a donation!
                        MagicMirror created by Michael Teeuw.
                        Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                        This forum is using NodeBB as its core | Contributors
                        Contact | Privacy Policy