• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Electron

Scheduled Pinned Locked Moved Solved Troubleshooting
13 Posts 4 Posters 2.7k Views 4 Watching
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.
  • P Offline
    plainbroke
    last edited by Aug 29, 2022, 1:24 AM

    How many instances of electron are supposed to be running in the background of MM?
    I did a ctrl+m and checked the task manager and there are 9 running on my MM and I am curious if that could be what is causing my black screen s. I can VNC into it, use ctrl-m and killing all the electron instances it restarts MM and it works like it should.

    Slow learner. But trying anyways.

    S B K 3 Replies Last reply Aug 29, 2022, 2:40 AM Reply Quote 0
    • P Offline
      plainbroke @kayakbabe
      last edited by Aug 30, 2022, 2:31 AM

      @kayakbabe
      I know that, and that is why I was using it that way.
      There is a method to my madness.
      I figured if I left it running (minimized) I could find what was causing my black screen with the mouse pointer on it. I guess it just opened up everyones pm2 usage information… I am still looking what is causing this to happen randomly. As in it may not happen for days and then it may happen a couple times a day.
      I guess I need to find a way to monitor when it freezes and have it auto restart mm.

      Slow learner. But trying anyways.

      K 1 Reply Last reply Aug 30, 2022, 2:42 AM Reply Quote 0
      • S Offline
        sdetweil @plainbroke
        last edited by sdetweil Aug 29, 2022, 2:41 AM Aug 29, 2022, 2:40 AM

        @plainbroke why are u doing ctrl-m?

        pm2 restarts mm…

        just refresh the page, f5 or ctrl-c to reload the mm page

        I don’t know how electron/chromium tasks are used.

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        P 1 Reply Last reply Aug 30, 2022, 2:23 AM Reply Quote 0
        • B Offline
          BKeyport Module Developer @plainbroke
          last edited by Aug 29, 2022, 3:09 AM

          @plainbroke On my setup, it appears to spawn 4 copies, sometimes 5. I suspect that’s different tasks.

          however, black screens aren’t likely a symptom of too many electron copies. Use sam’s scripts to re-check that screen savers and such are all disabled.

          The "E" in "Javascript" stands for "Easy"

          1 Reply Last reply Reply Quote 0
          • K Offline
            kayakbabe @plainbroke
            last edited by kayakbabe Aug 30, 2022, 1:37 AM Aug 30, 2022, 1:32 AM

            @plainbroke
            I use Ctrl+m too so I can minimize the electron browser in order to get to terminal and restart mm.

            Are you using pm2? If so, use this command in the terminal to see how many actual instances of MagicMirror are running.

            pm2 ls
            

            NOTE: You could see more things in the taskmanager in certain situations where another processing thread is required. That doesn’t mean that Electron or MagicMirror has extra “copies” running on your machine. (My machine always shows at least 8 electron threads running, but I only have one MagicMirror instance running. The more modules have in my mirror, the more electron threads show in taskmanager).

            Using pm2 ls, if you see more than one instance you can kill the extras by using the id number of the extra instances. Also, if you see more than one instance, you may just need to redo the pm2 setup.

            If F5 or Ctrl+r don’t work (sometimes they don’t seem to fully restart mm if I’ve added a node package to a module I’m working on) then I use the following command from the terminal.

            pm2 restart mm
            

            to fully reinitialize and restart mm if I need to in when I’m developing/editing a module.

            S 2 Replies Last reply Aug 30, 2022, 2:05 AM Reply Quote 0
            • S Offline
              sdetweil @kayakbabe
              last edited by Aug 30, 2022, 2:05 AM

              @kayakbabe when developing a module, dont use pm2

              just
              npm start
              in the MagicMirror folder
              ctrl-c top stop.

              pm2 is for production

              use ssh from your PC, maybe winscp or bitvise ssh client that gives you ssh terminal and file manager over the pi files. then u can edit w notepad++ or vs ode or whatever u like

              if u need the dev window you can do it on your PC… never have to touch the pi itself.

              if u change the modulename.js, or css, or config.js settings, just reload the page, no restart required

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              K 1 Reply Last reply Aug 30, 2022, 2:34 AM Reply Quote 1
              • S Offline
                sdetweil @kayakbabe
                last edited by sdetweil Aug 30, 2022, 2:06 AM Aug 30, 2022, 2:06 AM

                @kayakbabe also if you used my script to install, its
                pm2 restart/start/stop MagicMirror

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                1 Reply Last reply Reply Quote 0
                • P Offline
                  plainbroke @sdetweil
                  last edited by Aug 30, 2022, 2:23 AM

                  @sdetweil
                  I was using ctrl - m to stop MM to see what was giving my black screen with a mouse pointer and the only thing I could find that seemed strange was a bunch of electron instances running.
                  I was just wondering if that could be the cause of the black screen with the mouse pointer… I use pm2 for most every thing that has been explained on here in the past year or so. I use pm2 to restart mm when needed and it is setup to restart mm anytime I make changes to config.js and exit and save.

                  Slow learner. But trying anyways.

                  K 1 Reply Last reply Aug 30, 2022, 2:26 AM Reply Quote 0
                  • K Offline
                    kayakbabe @plainbroke
                    last edited by Aug 30, 2022, 2:26 AM

                    @plainbroke ctrl+m does not stop MagicMirror. It minimizes it so it isn’t showing full screen.

                    m = minimize

                    P 1 Reply Last reply Aug 30, 2022, 2:31 AM Reply Quote 0
                    • P Offline
                      plainbroke @kayakbabe
                      last edited by Aug 30, 2022, 2:31 AM

                      @kayakbabe
                      I know that, and that is why I was using it that way.
                      There is a method to my madness.
                      I figured if I left it running (minimized) I could find what was causing my black screen with the mouse pointer on it. I guess it just opened up everyones pm2 usage information… I am still looking what is causing this to happen randomly. As in it may not happen for days and then it may happen a couple times a day.
                      I guess I need to find a way to monitor when it freezes and have it auto restart mm.

                      Slow learner. But trying anyways.

                      K 1 Reply Last reply Aug 30, 2022, 2:42 AM Reply Quote 0
                      • K Offline
                        kayakbabe @sdetweil
                        last edited by kayakbabe Aug 30, 2022, 2:38 AM Aug 30, 2022, 2:34 AM

                        @sdetweil If I didn’t need a breadboard for testing the button circuits I’m adding, it could be done the way you say. I’m not working on the appearance of my mirror, If I were then I’d do as you suggest. I’m working on adding hardware buttons and a new module to make them function the way I want.

                        I find it easier to just remove the pi, take it to my desktop where I have a very wide monitor. And where I can play with wiring, breadboard, resisitors, buttons etc. I added the following to my config

                        electronOptions: {
                        		fullscreen: false,
                        		width: 950,
                        		height: 950
                        	},
                        

                        so I can have mm running on one quarter of my screen, I have plenty of room for geany on the other and a terminal window, etc. then can just f5 or ctrl+r when I want to test.

                        S 1 Reply Last reply Aug 30, 2022, 2:59 AM Reply Quote 0
                        • 1
                        • 2
                        • 1 / 2
                        1 / 2
                        • First post
                          7/13
                          Last post
                        Enjoying MagicMirror? Please consider a donation!
                        MagicMirror created by Michael Teeuw.
                        Forum managed by Sam, technical setup by Karsten.
                        This forum is using NodeBB as its core | Contributors
                        Contact | Privacy Policy