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.4k 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.
    • 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
          • R Offline
            retroflex Project Sponsor Module Developer
            last edited by retroflex

            Short lived happiness it seemed… After a few minutes CPU is now back at 100% and memory use increasing. :(

            Also tested after reboot of my Pi3 with the same results.

            This is my config:

            		{
            			module: "MMM-ResRobot",
            			position: "top_right",
            			header: "",
            			config: {
            				routes: [
            					{from: "740015970", to: "740015568"},
            				],
            				updateInterval: 2 * 60 * 1000,	// Update every second minute.
            				maximumEntries: 6,  // Number of departures to show on screen
            				truncateAfter: 5,   // A value > 0 will truncate direction name at first space after  characters. 0 = no truncation
            				apiKey: "*******"  // Your ResRobot apiKey
            			}
            		},
            
            AlvingerA 1 Reply Last reply Reply Quote 0
            • B Offline
              Binog
              last edited by

              But still, I am not using ResRobot,. and do have the same problem, from time to time,…

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

                @retroflex
                I will dig up another respberry pi and try it out. My test environment is a dietpi vm which runs on a pc so I wouldn’t expect the cpu load to be representative of the load on the pi.

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

                  I also dont think the issue is with ResRobot itself. But it is great that you are looking into it @Alvinger

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

                    no ResRobot running on my setup. Think the problem is electron itself.

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

                      I agree with others that the problem is most likely related to Electron and not module-specific but rather related to which module dependencies it has.

                      1 Reply Last reply Reply Quote 0
                      • T Offline
                        thejoaovitor
                        last edited by

                        A solution, (not perfect) is to use MMM-WatchDog, it keeps an eye on your UI and quits app in case the UI crashes, combined with the PM2 process manager, MM2 will automaticly restart after a UI failure.

                        https://github.com/MichMich/MMM-WatchDog

                        1 Reply Last reply Reply Quote 0
                        • KuhlemannK Offline
                          Kuhlemann
                          last edited by

                          The problem still seems to persist also with the newest version of MM. Maybe someone has found a real solution?
                          I will try out MMM-WatchDog meanwhile.

                          D 1 Reply Last reply Reply Quote 0
                          • D Offline
                            dazza120 @Kuhlemann
                            last edited by

                            @kuhlemann a cron job is the only way think it seems that it taxes the Pi too much after 8hours or so hence Cron Job every 8hours or so

                            B 1 Reply Last reply Reply Quote 0
                            • B Offline
                              bachoo786 @dazza120
                              last edited by

                              @dazza120 what are you doing with cron to resolve the issue mate?

                              D 1 Reply Last reply Reply Quote 0
                              • D Offline
                                dazza120 @bachoo786
                                last edited by dazza120

                                @bachoo786 hi mate I’ve got a cronjob running at 0400 and 1600 to stop it locking up I’ve just noticed the new one2.7.1 starting to eat the memory as I’ve disabled the cronjob to check out the latest down to 9% after 10hours. So it needs the restarts.

                                Terminal
                                Type. Crontab -e
                                Put times below the line below

                                m h dom mon dow command

                                0 4 * * * pm2 reload mm
                                0 16 * * * pm2 reload mm

                                Link here https://thepihut.com/blogs/raspberry-pi-tutorials/34930820-running-things-regularly-cron

                                1 Reply Last reply Reply Quote 1

                                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
                                • 1 / 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