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.

    Mirror turning black after a while

    Scheduled Pinned Locked Moved Troubleshooting
    45 Posts 16 Posters 38.5k Views 15 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.
    • cruunnerrC Offline
      cruunnerr
      last edited by

      @retroflex

      the wifi on the RPi 3 is not the best. So i installed an automatically wifi_rebooter here. U could try that as well: http://alexba.in/blog/2015/01/14/automatically-reconnecting-wifi-on-a-raspberrypi/

      in my case my Pi pings my router address every 3 minutes and when it cannot reach it, it reboots it’s wifi itself.

      For your other problem u could try “nmon”.

      sudo apt-get install nmon

      start it by simply typing nmon

      when it starts u can type letters to choose what u want it to show. with “t, l, m, c” it will show u “top processes”, “long therm CPU usage”, “memory usage” and “actual CPU usage”

      Mykle1M 1 Reply Last reply Reply Quote 1
      • Mykle1M Offline
        Mykle1 Project Sponsor Module Developer @cruunnerr
        last edited by

        @cruunnerr

        I agree. nmon is a very useful tool for diagnosing Pi cpu and memory issues.

        https://forum.magicmirror.builders/topic/4684/electron-cpu-usage/11

        Create a working config
        How to add modules

        R 1 Reply Last reply Reply Quote 0
        • R Offline
          retroflex Project Sponsor Module Developer @Mykle1
          last edited by

          @Mykle1 @cruunnerr Thanks. Nmon is a great tip. I can clearly see that I have a CPU issue beside the memory leak. CPU for electron process is at 100% all the time. Currently at 30% mem, but I guess this will increase over time. Will check later.

          PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
          1146 pi        20   0  700648 300408  47112 R 100.0 31.6 215:22.52 electron
          

          I’ve read the CPU usage thread and can conclude that I use electron v1.4.15 and MM v2.2.0. Mykle1, the thread said to use an older MM version, but I guess the new one should work ok too? Since electron was forced to the older version in the new release?

          Now all I have to do is check each module I run and check CPU and mem for each :)

          1 Reply Last reply Reply Quote 0
          • R Offline
            retroflex Project Sponsor Module Developer
            last edited by

            My problem was MMM-ResRobot. I deactivated it and kept all other modules and now CPU is at 2% and memory stable over time at around 10%. Not sure if the MM/electron/ResRobot update caused the problem, but it worked ok before. Strange…

            Mykle1M F 2 Replies Last reply Reply Quote 1
            • Mykle1M Offline
              Mykle1 Project Sponsor Module Developer @retroflex
              last edited by

              @retroflex said in Mirror turning black after a while:

              and now CPU is at 2% and memory stable over time at around 10%

              That’s great news, mate! I did that testing months ago to determine what was causing the CPU spikes. It was rather rewarding to have discovered the cause. They gave me an award. :-)

              Peace!

              Create a working config
              How to add modules

              1 Reply Last reply Reply Quote 0
              • schlachtkreuzer6S Offline
                schlachtkreuzer6
                last edited by

                I got the same problem with an TV, around 6 to 9h it went black and I had to restart MM

                1 Reply Last reply Reply Quote 0
                • C Offline
                  cyberdie
                  last edited by

                  Same problem here.
                  After some hours the creen goes black.
                  Pi Zero and “node serveronly”

                  R 1 Reply Last reply Reply Quote 0
                  • R Offline
                    retroflex Project Sponsor Module Developer @cyberdie
                    last edited by

                    @cyberdie @schlachtkreuzer6 It seems to be related to a certain module. Most likely it is a memory leak you have too. Try to find out by disabling modules until it works.

                    It would be good to find the root cause to this though as many have problems. But that is a bit out of my expertise.

                    schlachtkreuzer6S 1 Reply Last reply Reply Quote 0
                    • B Offline
                      Binog
                      last edited by

                      me too,… still while after while,… guess have that problem since version 2.0.0 but not sure,. cause update everything regularly,…

                      1 Reply Last reply Reply Quote 0
                      • schlachtkreuzer6S Offline
                        schlachtkreuzer6 @retroflex
                        last edited by

                        @retroflex probably we need some code to clear the ram periodically. I think my problem module is the MMM-Globe. But I will have to test it. (about 10 modules… So one module per day… Uff that’s a looooong way.

                        1 Reply Last reply Reply Quote 0
                        • cruunnerrC Offline
                          cruunnerr
                          last edited by

                          make two or three per day ;)

                          than it goes faster

                          schlachtkreuzer6S 1 Reply Last reply Reply Quote 0
                          • R Offline
                            retroflex Project Sponsor Module Developer
                            last edited by

                            Maybe this can be the cause?

                            https://github.com/electron/electron/issues/11739

                            1 Reply Last reply Reply Quote 0
                            • schlachtkreuzer6S Offline
                              schlachtkreuzer6 @cruunnerr
                              last edited by

                              @cruunnerr
                              I’m working 🙄 didn’t test anything yet 😅

                              1 Reply Last reply Reply Quote 0
                              • F Offline
                                FredJ @retroflex
                                last edited by

                                @retroflex I also got the same issue. MMM-resrobot or something it depends on looks to be causing this. Has anyone found a workaround? Resrobot is one of the main reasons I have the mirror so not really happy about disableing it.

                                1 Reply Last reply Reply Quote 0
                                • R Offline
                                  retroflex Project Sponsor Module Developer
                                  last edited by

                                  @Alvinger Do you know what could be the problem with ResRobot here?

                                  AlvingerA 1 Reply Last reply Reply Quote 0
                                  • AlvingerA Offline
                                    Alvinger @retroflex
                                    last edited by Alvinger

                                    @retroflex I can’t think of anythong off hand.

                                    I am running an older version of MM myself so haven’t researched the electron issues.
                                    Can anyone confirm that the issue started with the new MM version?

                                    As I am running my magic mirror on an original Pi 1 with 256MB RAM with no issues whatsoever I am a bit surprised that the module should cause this.

                                    Edit: MMM-ResRobot has but one dependency and that is the unirest module.

                                    Which version of ResRobot are you running? I did a rewrite to reduce the number of updates w while ago.

                                    1 Reply Last reply Reply Quote 0
                                    • C Offline
                                      cyberdie
                                      last edited by cyberdie

                                      @alvinger In my case, the problem started after last MM update.

                                      R AlvingerA 2 Replies Last reply Reply Quote 0
                                      • R Offline
                                        retroflex Project Sponsor Module Developer @cyberdie
                                        last edited by

                                        @cyberdie said in Mirror turning black after a while:

                                        @alvinger In my case, the problem started after last MM update.

                                        Same here. Running the latest ResRobot.

                                        But I think others have reported the same problem but with a different module.

                                        1 Reply Last reply Reply Quote 0
                                        • AlvingerA Offline
                                          Alvinger @cyberdie
                                          last edited by Alvinger

                                          @binog @FredJ @cyberdie @schlachtkreuzer6

                                          Looking through the unirest dependencies it looks like it relies on express which may or may not make it sus eptible to the issues with electron.

                                          To resolve this I replaced unirest with node-fetch and pushed the new version of MMM-ResRobot to github.

                                          To upgrade cd to your MagicMirror directory and run the following commands:

                                          git pull
                                          npm remove unirest
                                          npm install
                                          

                                          Please post results in this thread!
                                          Hope this resolves the issue.

                                          R 1 Reply Last reply Reply Quote 0
                                          • R Offline
                                            retroflex Project Sponsor Module Developer @Alvinger
                                            last edited by

                                            @Alvinger Thanks for the quick fix! :)

                                            My first test…

                                            1. “top” without ResRobot shows about 1% CPU when idle.
                                            2. Added ResRobot (old version): “top” shows 100% CPU all the time.
                                            3. Updated ResRobot, removed unirest, npm install: “top” now shows 1% CPU when idle. Yay!

                                            Looks good so far. Too early to tell anything about memory leaks, but I will keep my mirror running and check tonight. Currently electron shows 18% mem used (for the 2 electron processes).

                                            1 Reply Last reply Reply Quote 0

                                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                            With your input, this post could be even better 💗

                                            Register Login
                                            • 1
                                            • 2
                                            • 3
                                            • 2 / 3
                                            • First post
                                              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