Newbe help please
It looks like my MagicMirror is running (see below) but the MagiciMirror screen doesn’t start.
pi@raspberrypi:~/MagicMirror $ pm2 restart MagicMirror Use --update-env to update environment variables [PM2] Applying action restartProcessId on app [MagicMirror](ids: 0) [PM2] [MagicMirror](0) ✓ ┌─────────────┬──────┬────────┬─────┬─────┬───────────┐ │ Name │ mode │ status │ ↺ │ cpu │ memory │ ├─────────────┼──────┼────────┼─────┼─────┼───────────┤ │ MagicMirror │ fork │ online │ 159 │ 66% │ 11.2 MB │ └─────────────┴──────┴────────┴─────┴─────┴───────────┘ Use `pm2 show ` to get more details about an app
Everything was working fine from the original install (I even added a module w/o issues) till I followed the instructions to Disabling the screensaver and Disable WiFi Power Save.
Since I have a RPi 3 (Raspbian Stretch) I used the following instruction:
For RPi 3 (Raspbian Stretch)
We no longer have any default entries in /etc/network/interfaces, instead we make a plugin to the (service) startup script. Copy paste the following into you terminal:
cat << EOF | sudo tee /etc/network/if-up.d/off-power-manager > #!/bin/sh > # off-power-manager - Disable the internal power manager of the (built-in) wlan0 device > # Added by MagicMirrorSetup > iw dev wlan0 set power_save off > EOF #!/bin/sh # off-power-manager - Disable the internal power manager of the (built-in) wlan0 device # Added by MagicMirrorSetup iw dev wlan0 set power_save off
Then set the permissions and reload the network daemon.
sudo chmod 755 /etc/network/if-up.d/off-power-manager sudo /etc/init.d/networking restart
You don’t need to reboot for this to take effect, but do it anyway to make sure it works. After reboot and your wifi is back up, test with:
iw dev wlan0 get power_save
After this the MagicMirror stopped starting up when
pm2 star MagicMirror
Any help you could offer to troubleshoot this is much much appreciated.
Is there a screen connected to the pi? What is it showing?
Are you working directly on the pi, are you connecting via VNC or are you sshing to the pi?
If you run
pm2 stop MagicMirrorand then try
npm startinside MagicMirror folder (if directly on the pi) or
DISPLAY=:0 nohup npm start &(if connected via ssh), do you see the MagicMirror?
@yawns Thanks for the prompt replay. Yes HDMI screen is connected and shows Pi OS desktop.
I am connected via VNC but I can also work directly on the Pi. Not really sure how to use SSH yet.
DISPLAY=:0 nohup npm start &
inside the MM folder from VNC and MagicMirror screen started!!
I also run
from Pi and works.
MagicMirror doesn’t start on reboot though. Reboot goes strait to desktop.
I guess my confusion is that before I just exec
pm2 start MagicMirror"
and the MagicMirro screen start while now I will need to run
Can you please explain why this happens and how I can have MagicMirror starts at boot again?
Thanks so much for your help.
alias mm2='cd $HOME/MagicMirror/installers/; pm2 flush; pm2 start mm.sh && cd $OLDPWD'
$ cat ~/MagicMirror/installers/mm.sh cd ~/MagicMirror DISPLAY=:0 npm start
@E3V3A Thank you very much!!