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.

    MM on Pi Zero fails after being off for a few days

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    27 Posts 2 Posters 8.7k Views 2 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.
    • K Offline
      kellogg76 @sdetweil
      last edited by

      @sdetweil

      #!/bin/bash
      cd ~/MagicMirror
      node serveronly &
      sleep 30
      xinit /home/pi/chromium_start.sh
      
      S 1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @kellogg76
        last edited by

        @kellogg76 said in MM on Pi Zero fails after being off for a few days:

        xinit /home/pi/chromium_start.sh

        and that one?

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        K 1 Reply Last reply Reply Quote 0
        • K Offline
          kellogg76 @sdetweil
          last edited by

          @sdetweil

          #!/bin/sh
          unclutter &
          xset -dpms # disable DPMS (Energy Star) features.
          xset s off # disable screen saver
          xset s noblank # don’t blank the video device
          matchbox-window-manager &
          chromium-browser -–incognito --start-fullscreen -–kiosk http://localhost:8080/
          
          S 1 Reply Last reply Reply Quote 0
          • S Offline
            sdetweil @kellogg76
            last edited by

            @kellogg76 weird…

            and if you do pm2 start 0 it works ok?

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            K 1 Reply Last reply Reply Quote 0
            • K Offline
              kellogg76 @sdetweil
              last edited by

              @sdetweil it works in as much as I can see the magic mirror on another computer when I point to the correct IP, but the pi itself does not display anything at all, it sits at a terminal prompt or if I reboot and let it try to start on its own it’ll switch from prompt to black screen with mouse pointer as if it’s trying to start, then it loops back to a prompt and cycles between the two states.

              1 Reply Last reply Reply Quote 0
              • S Offline
                sdetweil
                last edited by

                weird… seems like chrome is having trouble.

                if you type

                chromium-browser  --app=https://cnn.com
                

                does it come up?

                in 2.10, i created a similar script for
                pi0w(armv6l) as electron doesn’t exist anymore

                try this script

                curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/run-start.sh >~/MagicMirror/run-start.sh
                chmod +x ~/MagicMirror/run-start.sh
                

                then

                cd ~/MagicMirror
                ./run-start.sh
                

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                K 1 Reply Last reply Reply Quote 0
                • K Offline
                  kellogg76 @sdetweil
                  last edited by kellogg76

                  @sdetweil said in MM on Pi Zero fails after being off for a few days:

                  ./run-start.sh

                  When I run

                  chromium-browser  --app=https://cnn.com
                  

                  I get command not found, so I tried

                  chromium  --app=https://cnn.com
                  

                  and I get Illegal Instruction.

                  i tried your script, and I get the text on screen about no helper found etc, then it gets stuck when trying to fetch the calendar data. I can access it from another computer but the pi is still blank on screen

                  Edit: It does seem to go through the calendar step but just very slowly, still progressing to each successive calendar now. I’ll leave it running and see if it eventually successfully starts.

                  S 1 Reply Last reply Reply Quote 0
                  • S Offline
                    sdetweil @kellogg76
                    last edited by sdetweil

                    @kellogg76 no… its stuck with the chromium-browser not loading…

                    I think u need to reinstall the chromium browser…

                    this means there was an update , or there is an sd card problem…

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    K 1 Reply Last reply Reply Quote 0
                    • K Offline
                      kellogg76 @sdetweil
                      last edited by

                      @sdetweil looks like the quickest fix is to re-install again. It’s a pain as I probably have to do this about once or twice a year. It can be working great then either the power will unexpectedly go out or I’ll shut it down for some reason and then it takes a full wipe and re-install to get it working again.

                      S 2 Replies Last reply Reply Quote 0
                      • S Offline
                        sdetweil @kellogg76
                        last edited by

                        @kellogg76 use my install script

                        see here
                        https://github.com/sdetweil/MagicMirror_scripts

                        rename existing MM folder out of the way
                        run the install script… it does everything…

                        (well, not install chromium browser)
                        sudo apt-get install chromium-browser

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        K 1 Reply Last reply Reply Quote 0
                        • S Offline
                          sdetweil @kellogg76
                          last edited by sdetweil

                          @kellogg76 i have a system that is like that… power messes up everything…

                          I have moved to boot from sd card, RUN from ssd…

                          https://jamesachambers.com/raspberry-pi-4-usb-boot-config-guide-for-ssd-flash-drives/
                          see starting here
                          USB Boot Instructions

                          Sam

                          How to add modules

                          learning how to use browser developers window for css changes

                          1 Reply Last reply Reply Quote 0
                          • K Offline
                            kellogg76 @sdetweil
                            last edited by

                            @sdetweil I renamed the old MM directory and ran your script

                            bash -c "$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/raspberry.sh)"
                            

                            Everything went successfully, I can see the display from other computers but the pi just sits at a terminal prompt, is there something I need to do to start things off?

                            $ pm2 list
                            ┌────┬─────────────────────────┬─────────┬─────────┬──────────┬────────┬──────┬──────────┬──────────┬──────────┬──────────┬──────────┐
                            │ id │ name                    │ version │ mode    │ pid      │ uptime │ ↺    │ status   │ cpu      │ mem      │ user     │ watching │
                            ├────┼─────────────────────────┼─────────┼─────────┼──────────┼────────┼──────┼──────────┼──────────┼──────────┼──────────┼──────────┤
                            │ 1  │ MagicMirror             │ 2.10.1  │ fork    │ 568      │ 2m     │ 1    │ online   │ 0%       │ 2.5mb    │ pi       │ enabled  │
                            └────┴─────────────────────────┴─────────┴─────────┴──────────┴────────┴──────┴──────────┴──────────┴──────────┴──────────┴──────────┘
                            
                            S 1 Reply Last reply Reply Quote 0
                            • S Offline
                              sdetweil @kellogg76
                              last edited by

                              @kellogg76 did u install chromium-browser
                              the run-start.sh script depends on it

                              Sam

                              How to add modules

                              learning how to use browser developers window for css changes

                              K 1 Reply Last reply Reply Quote 0
                              • K Offline
                                kellogg76 @sdetweil
                                last edited by

                                @sdetweil Yes, and then rebooted for good measure. Could it be anything to do with me running Raspbian Lite and not Desktop?

                                S 1 Reply Last reply Reply Quote 0
                                • S Offline
                                  sdetweil @kellogg76
                                  last edited by

                                  @kellogg76 you MUST run desktop for chromium to work…

                                  from the shell, do

                                  pgrep Xorg

                                  it should return a number

                                  Sam

                                  How to add modules

                                  learning how to use browser developers window for css changes

                                  K 1 Reply Last reply Reply Quote 0
                                  • K Offline
                                    kellogg76 @sdetweil
                                    last edited by

                                    @sdetweil It seemed to work well without it in the past, has something changed?
                                    I always found the Desktop version really laggy on the Zero so try to avoid it when not necessary.

                                    S 1 Reply Last reply Reply Quote 0
                                    • S Offline
                                      sdetweil @kellogg76
                                      last edited by sdetweil

                                      @kellogg76 no idea… never tried lite
                                      you can certainly run serveronly… as u did and the run-start.sh executes…

                                      if you try to run chromium-browser
                                      what happens? on my pi0w desktop it comes up as expected

                                      Sam

                                      How to add modules

                                      learning how to use browser developers window for css changes

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