• 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.

MagicMirror screen goes black

Scheduled Pinned Locked Moved Unsolved Troubleshooting
27 Posts 8 Posters 8.0k Views 7 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.
  • H Offline
    Hallonpaj @bhepler
    last edited by Feb 18, 2019, 10:01 PM

    @bhepler Alright! Thanks for answering :)

    1 Reply Last reply Reply Quote 0
    • S Away
      sdetweil @bhepler
      last edited by Feb 19, 2019, 10:52 AM

      @bhepler said in MagicMirror screen goes black:

      It looks like there’s a temporary problem with Spotify. Since the problem is on their end, it most likely will be resolved soon.

      but the module could be changed to handle that error and not crash

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • D Offline
        DavyC
        last edited by Feb 20, 2019, 8:01 AM

        Will try to do that soon. I do not have a lot of time to test, so there will be some delay :-)

        C 1 Reply Last reply Feb 26, 2019, 6:34 PM Reply Quote 0
        • C Offline
          Cr4z33 @DavyC
          last edited by Feb 26, 2019, 6:34 PM

          @davyc yes please fix it as I am getting the same issue (actually since today only although I got it running perfectly for weeks… :thinking_face: )

          1 Reply Last reply Reply Quote 0
          • S Offline
            stuartiannaylor
            last edited by stuartiannaylor Feb 26, 2019, 7:41 PM Feb 26, 2019, 7:35 PM

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

            Isn’t this supposed to cover such occasions as that and restart the server.
            I only have a Pi-Zero so far so have never tested the effect with the normal Electron setup just Chromium standalone kiosk style.
            So I don’t actually no if or what the mechanism to restart the browser (Electron) is.
            If it doesn’t refresh via MMM-WatchDog you can always use xdotools to send keys to an Xwindow and all you need to do is a ‘ctrl+F5’ which is a refresh and drops the cache so all is effectively loaded as new.

            sudo apt-get install xdotool 
            

            Then with ~/MagicMirror/run-start.sh add a line and nano xdotool.sh and chmod a+x xdotool.sh

            if [ -z "$DISPLAY" ]; then #If not set DISPLAY is SSH remote or tty
            	export DISPLAY=:0 # Set by default display
            fi
            sh xdotool.sh &
            electron js/electron.js $1
            

            With xdotool.sh being something like this

            export DISPLAY=:0
            export XAUTHORITY=~/.Xauthority
            sleep 10
            xdotool search --onlyvisible --class "chromium" key ctrl+F5  -v 2>&1 | logger &
            

            Dunno what the Electron class is but really its just Chromium in a wrapper so expecting that actually that will work.
            If not you will just have to do a bit of testing to find the class or PID of electron http://manpages.ubuntu.com/manpages/trusty/man1/xdotool.1.html

            1 Reply Last reply Reply Quote 0
            • S Offline
              stuartiannaylor
              last edited by Feb 26, 2019, 10:49 PM

              Replied again cursed by that akismi bot troll thing.

              PS still setting it up but just monitor your logs.

              Create a shell script with something like

               tail -fn0 logfile | \
              while read line ; do
                      echo "$line" | grep "pattern"
                      if [ $? = 0 ]
                      then
                              ... do something ...
                      fi
              done
              

              Maybe with a --retry to the tail command, or use -F instead of -f

              Tack it onto your electron log and do the above xdotool.

              1 Reply Last reply Reply Quote 0
              • S Offline
                stuartiannaylor
                last edited by stuartiannaylor Feb 27, 2019, 7:12 PM Feb 27, 2019, 7:09 PM

                I gave you some bum steers on export XAUTHORITY=~/.Xauthority but prob was when I was using lightdm but for it to work omit that line.

                I have 2 monitors running well 1 really as the Chromium one isn’t really doing anything as all is working fine.

                xdotool.sh ended up just being

                if [ -z "$DISPLAY" ]; then #If not set DISPLAY is SSH remote or tty
                	export DISPLAY=:0 # Set by default display
                fi
                xdotool search --onlyvisible --class "chromium" key ctrl+F5  -v 2>&1 | logger &
                

                chrome-log.sh is just

                #Grep is a bit confusing as \| ie OR not AND so you get the following of Or + inline there is the other string
                #grep -q '8080\|ERROR' would return true if either exist (OR)
                ( tail -f -n0 ~/.config/chromium/chrome_debug.log & ) | grep -q '8080.*ERROR\|ERROR.*8080'
                sh xdotool.sh
                

                Main one for me is the PM2 one that waits for MagicMirror to say all is finished and point your browser

                ( tail -f -n0 ~/.pm2/logs/MagicMirror-out.log & ) | grep -q 'Ready to go! Please point your browser to:'
                sh xdotool.sh
                

                Better explanation can be found on https://github.com/StuartIanNaylor/MagicMirror-Install-Guide-Raspberry-0-to-3/tree/master/Magic Monitor

                1 Reply Last reply Reply Quote 0
                • M Offline
                  motdog
                  last edited by Feb 28, 2019, 2:08 AM

                  i have a black screen too. Just got dark sky working. was finally happy and while rebooting after installing another module it goes to black. I thought it was my pi (3b) so I tried my other pi 3b+ and just black. I noticed earlier what looked like a draining battery icon but have no clue what that could mean. I do have a cursor on my black screen. alt tab shows Electon but I cant do anything from there. Help

                  S 1 Reply Last reply Feb 28, 2019, 2:47 AM Reply Quote 0
                  • S Away
                    sdetweil @motdog
                    last edited by Feb 28, 2019, 2:47 AM

                    @motdog run

                    npm start dev
                    

                    Select the console tab, and scroll back to find any errors, red text.

                    Usually black screen is syntax error in module.js

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    M 1 Reply Last reply Feb 28, 2019, 3:38 AM Reply Quote 0
                    • M Offline
                      motdog @sdetweil
                      last edited by motdog Feb 28, 2019, 3:39 AM Feb 28, 2019, 3:38 AM

                      @sdetweil I can’t get to terminal. All I have is black screen with pointer on it. I’m sure it was when I copied a config

                      S 1 Reply Last reply Feb 28, 2019, 3:39 AM Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 1 / 3
                      1 / 3
                      • First post
                        9/27
                        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