MagicMirror² v2.5.0 is available! For more information about this release, check out this topic.

MagicMirror stays black, but loading from another browser (Windows, Android) works



  • Hey there,

    up to yesterday my mirror worked fine. I did install a few modules (to name them MMM-Remote-Control and MMM-forecast-io) and prepared to install facial recognition. For this last point I followed the instructions on github MMM-Facial-Recognition-OCV3. I did the following:

    sudo apt-get update
    sudo apt-get upgrade
    sudo rpi-update
    sudo reboot
    sudo apt-get install build-essential git cmake pkg-config
    sudo apt-get install libjpeg-dev libtiff5-dev libjasper-dev libpng12-dev
    sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
    sudo apt-get install libxvidcore-dev libx264-dev
    sudo apt-get install libgtk2.0-dev
    sudo apt-get install libatlas-base-dev gfortran
    cd ~
    git clone https://github.com/Itseez/opencv.git
    cd opencv
    git checkout 3.3.0
    cd ~
    git clone https://github.com/Itseez/opencv_contrib.git
    cd opencv_contrib
    git checkout 3.3.0
    wget https://bootstrap.pypa.io/get-pip.py
    sudo apt-get install python3-dev
    sudo python3 get-pip.py
    

    I did not yet started building OpenCV. After that I noticed my mirror turned black (didn’t checked inbetween these steps). Just to check I disabled the modules installed since last known working condition, but without success. I only checked the modules after installing from both my Windows pc and my smartphone. That worked fine at all times.
    My suspicion is that the updating in the beginning of MMM-Facial-Recognition-OCV3 did break something.
    I tried npm install electron@1.4.15 and checked the logs, but there is no entry. My node is version 6.14.2 and npm is 3.10.10
    Can anyone give me a hint on what to check for?

    Best regards,
    Anduril



  • I had to uninstall electron and install version 1.7.9 to get rid of the blank screen



  • what do you mean with uninstall? I did remove ~/MagicMirror/node_modules/electron and reinstalled via npm install in the MagicMirror folder. But still black screen.



  • @andurii npm has a remove operation

    npm remove electron
    npm install electron@1.7.9



  • ok I did use npm remove, but on installing electron@1.7.9 I got this:

    pi@Spieglein:~/MagicMirror $ npm install electron@1.7.9
    
    > electron@1.7.9 postinstall /home/pi/MagicMirror/node_modules/electron
    > node install.js
    
    events.js:160
          throw er; // Unhandled 'error' event
          ^
    
    Error: EIO: i/o error, read
        at Error (native)
    npm ERR! Linux 4.14.44-v7+
    npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "electron@1.7.9"
    npm ERR! node v6.14.2
    npm ERR! npm  v3.10.10
    npm ERR! code ELIFECYCLE
    
    npm ERR! electron@1.7.9 postinstall: `node install.js`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the electron@1.7.9 postinstall script 'node install.js'.
    npm ERR! Make sure you have the latest version of node.js and npm installed.
    npm ERR! If you do, this is most likely a problem with the electron package,
    npm ERR! not with npm itself.
    npm ERR! Tell the author that this fails on your system:
    npm ERR!     node install.js
    npm ERR! You can get information on how to open an issue for this project with:
    npm ERR!     npm bugs electron
    npm ERR! Or if that isn't available, you can get their info via:
    npm ERR!     npm owner ls electron
    npm ERR! There is likely additional logging output above.
    
    npm ERR! Please include the following file with any support request:
    npm ERR!     /home/pi/MagicMirror/npm-debug.log
    

    I tried to use only npm install and see what version it installes:

    pi@Spieglein:~/MagicMirror $ npm install
    
    > electron@1.8.7 postinstall /home/pi/MagicMirror/node_modules/electron
    > node install.js
    
    
    > magicmirror@2.3.1 install /home/pi/MagicMirror
    > cd vendor && yon install
    
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
    
    > magicmirror@2.3.1 postinstall /home/pi/MagicMirror
    > sh installers/postinstall/postinstall.sh && yon run install-fonts
    
    MagicMirror installation successful!
    
    > magicmirror@2.3.1 install-fonts /home/pi/MagicMirror
    > cd fonts && yon install
    
    magicmirror@2.3.1 /home/pi/MagicMirror
    └─┬ electron@1.8.7
      ├── @types/node@8.10.19
      └─┬ electron-download@3.3.0
        ├─┬ fs-extra@0.30.0
        │ └── klaw@1.3.1
        ├── home-path@1.0.6
        └─┬ sumchecker@1.3.1
          └── es6-promise@4.2.4
    
    

    So version 1.8.7 installes without problem but doesn’t work. Any further ideas?



  • @andurii,

    I ended up installing Chromium and displaying the Mirror locally using that. That was the only way I could get past the black screen.

    Kyle



  • ok, I found a simply way to make chromium start in full screen mode, but how do I have to disable electron from entering full screen?



  • well that didn’t worked. I still only see a black monitor. I did also reinstall MagicMirror and connected to it via VNC. Strange thing is that I can see my MM on my VNC client, but not on my monitor. I didn’t even thought this would be possible…



  • @andurii, I have no idea then. It worked perfectly for me. I’ll have to take a look at my configuration and let you know. I am currently traveling so I can’t look at the moment.


  • Module Developer

    @andurii Hmm… Sounds like your monitor has gone to standby.
    Login via SSH:

    Make a sh file named: monitor.sh

    Add the flowing to the file:

    #!/bin/bash
    
    if [ "$1" == 'on' ]; then
      tvservice -p;
      chvt 6;
      chvt 7;
    fi
    
    if [ "$1" == 'off' ]; then
      tvservice -o
    fi
    

    Then make it executable with: chmod +x monitor.sh
    Turn on them monitor it like this: ./monitor.sh on
    Turn it off like this: ./monitor.sh off

    And of course, make sure you are on the correct input to actually see the Pi… 🙂

    That should “turn on” (or off) the screen from SSH. 🙂