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 Screen goes blank 5-20min after starting (was stable on 2.31) - Pi Zero 2W running MagicMirrorOS

    Scheduled Pinned Locked Moved Solved Troubleshooting
    15 Posts 3 Posters 520 Views 3 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.
    • S Offline
      scottwalsh
      last edited by

      MM Screen goes blank 5-20min after starting (was stable on 2.31) - Pi Zero 2W running MagicMirrorOS

      Have recently reimaged my MM, and since the rebuild, the MM screen goes blank 5-20min after starting. Is intermittent though, sometimes stays up for a while.

      Am using MagicMirrorOS, which uses Khassel’s docker implementation on a lightweight OS build. Running this on a Pi Zero 2W.

      To isolate the cause, reimaged it again, and progressively configured it until the issue started to reoccur.
      (I store my configuration files in a private git repo that have a script to pull them on starting MM - so can roll configuration back and forth).

      With the below config.js file, electron crashes - about 5-30min after docker is started. If I remove the calendar & CalendarExt3 module config block - then it stays up longer (hours) but still crashes (sometimes does still crash on first start).

      Any suggestions on where to next to troubleshoot this was would be appreciated.

      config.js

      /* Config Sample
       *
       * For more information on how you can configure this file
       * see https://docs.magicmirror.builders/configuration/introduction.html
       * and https://docs.magicmirror.builders/modules/configuration.html
       *
       * You can use environment variables using a `config.js.template` file instead of `config.js`
       * which will be converted to `config.js` while starting. For more information
       * see https://docs.magicmirror.builders/configuration/introduction.html#enviromnent-variables
       */
      let config = {
      	address: "0.0.0.0",	// Address to listen on, can be:
      							// - "localhost", "127.0.0.1", "::1" to listen on loopback interface
      							// - another specific IPv4/6 to listen on a specific interface
      							// - "0.0.0.0", "::" to listen on any interface
      							// Default, when address config is left out or empty, is "localhost"
      	port: 8080,
      	basePath: "/",	// The URL path where MagicMirror² is hosted. If you are using a Reverse proxy
      									// you must set the sub path here. basePath must end with a /
      	ipWhitelist: [],	// Set [] to allow all IP addresses
      									// or add a specific IPv4 of 192.168.1.5 :
      									// ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"],
      									// or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format :
      									// ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"],
      
      	useHttps: false,			// Support HTTPS or not, default "false" will use HTTP
      	httpsPrivateKey: "",	// HTTPS private key path, only require when useHttps is true
      	httpsCertificate: "",	// HTTPS Certificate path, only require when useHttps is true
      
      	language: "en",
      	locale: "en-US",   // this variable is provided as a consistent location
      			   // it is currently only used by 3rd party modules. no MagicMirror code uses this value
      			   // as we have no usage, we  have no constraints on what this field holds
      			   // see https://en.wikipedia.org/wiki/Locale_(computer_software) for the possibilities
      
      	logLevel: ["INFO", "LOG", "WARN", "ERROR"], // Add "DEBUG" for even more logging
      	timeFormat: 24,
      	units: "metric",
      
      	modules: [{ module: "MMM-mmpm" },
      		{
      			module: "alert",
      		},
      
      
      
      
      		{
      			module: "calendar",
      			header: "Family Calendar",
      			//position: "fullscreen_above",
      			config: {
      				broadcastPastEvents: true,
      		                maximumNumberOfDays: 28,
      		                pastDaysCount: 13,
      		                maximumEntries: 300,
      				fetchInterval: 960000,
      				calendars: [
      					{
      					url: "https://calendar.google.com/calendar/ical/[Redacted]/basic.ics",
      			                name: "Scott",
      					color: "ForestGreen",
      					},
      					{
      					url: "https://calendar.google.com/calendar/ical/[Redacted]/basic.ics",
      			                name: "Sarah",
      					color: "deeppink",
      					},
      					{
      					url: "https://calendar.google.com/calendar/ical/[Redacted]/basic.ics",
      			                name: "Skyla",
      					color: "Gold",
      					},
      					{
      					url: "https://calendar.google.com/calendar/ical/[Redacted]/basic.ics",
      			                name: "Willow",
      					color: "Gold",
      					},
      					{
      					url: "https://calendar.google.com/calendar/ical/[Redacted]/basic.ics",
      		                        name: "Family",
      					color: "Gold",
      					},
      				]
      			}
      		},
      		  
      
      
      		{
      			module: "MMM-CalendarExt3",
                  		//position: "fullscreen_above",
                          position: "top_bar",
                 		title: "Family Calendar",
                  		config: {
      		                instanceId: "familyCalendar",
      		                mode: "week",
      		                weekIndex: 0,
      		                weeksInView: 4,
      		                displayEndTime: true,
      				useSymbol: false,
      		                locale: 'en-NZ',
      				refreshInterval: 660000,
      		                eventTimeOptions: {timeStyle: 'short', hour12: false},
      		                maxEventLines: 8,
      		                firstDayOfWeek: 1,
      		                fontSize: '20px',
      		                eventHeight: '20px',
      		                calendarSet: ['Scott','Sarah','Skyla','Willow','Family'],
                  		}
              	},
      
      		  
      	
      		  
      		  
      		{
      			module: "clock",
      			position: "bottom_left"
      		},
      
      		{
      			module: "MMM-AVStock",
      			position: "bottom_center",
      			config: {
      				mode: "grid",
      				classes: "xsmall",
                  			maxTableRows: 5,
      				symbols : ["NZDUSD=X", "NZDAUD=X", "NZDEUR=X", "NZDJPY=X", "^NZ50", "^GSPC", "^AXJO", "^STOXX", "^N225", "IBM", "BRK-B", "RKLB"],
          				alias: ["USD", "AUD", "EUR", "YEN", "NZX50", "S&P 500", "ASX 200", "STXE 600", "Nikkei 225"],
      				showChart: false,
                  			showVolume: false,
      				decimals: 3,
      			}
      		},
      
      		{
      			module: "weather",
      			position: "bottom_right",
      			config: {
      				weatherProvider: "openmeteo",
      				type: "current",
      				lat: -41.323407,
      				lon: 174.7984817
      			},
      		},
      
      		{
      			module: "updatenotification",
      			//position: "bottom_bar"
      		},
      
      
      	] };
      
      /*************** DO NOT EDIT THE LINE BELOW ***************/
      if (typeof module !== "undefined") { module.exports = config; }
      

      Error log extracts

      scottwalsh@calendar:~ $ docker logs mm
      [entrypoint 08:10:08.796] [INFO]   copy default modules
      
      > magicmirror@2.32.0 start
      > node --run start:x11
      
      [2025-07-19 08:11:20.897] [LOG]   Starting MagicMirror: v2.32.0 
      [2025-07-19 08:11:22.511] [LOG]   Loading config ... 
      [2025-07-19 08:11:22.530] [LOG]   config template file not exists, no envsubst 
      
      [Snip]
      
      [2025-07-19 08:13:26.838] [INFO]  Checking git for module: MagicMirror 
      [2025-07-19 08:13:27.494] [ERROR] We expected a redirect to guce.yahoo.com, but got https://finance.yahoo.com/quote/AAPL/ 
      [2025-07-19 08:13:27.497] [ERROR] We'll try to continue anyway - you can safely ignore this if the request succeeds 
      [2025-07-19 08:13:27.508] [LOG]   Success. Cookie expires on Sun Jul 19 2026 14:13:26 GMT+1200 (New Zealand Standard Time) 
      [2025-07-19 08:13:27.547] [LOG]   fetch https://query1.finance.yahoo.com/v1/test/getcrumb 
      [2025-07-19 08:13:30.595] [LOG]   New crumb: WxlJ.T9HZVG 
      [30:0719/132347.804243:ERROR:ui/events/platform/wayland/wayland_event_watcher.cc:78] Fatal Wayland communication error: Broken pipe.
      [30:0719/132347.898470:FATAL:electron/shell/browser/electron_browser_main_parts.cc:502] Failed to shutdown.
      scottwalsh@calendar:~ $ 
      scottwalsh@calendar:~ $ docker logs labwc
      00:00:00.009 [INFO] [seatd/seat.c:48] Created VT-bound seat seat0
      00:00:00.010 [INFO] [seatd/seatd.c:194] seatd started
      failed to connect to display
      failed to connect to display
      failed to connect to display
      00:00:02.888 [INFO] [seatd/server.c:145] New client connected (pid: 1, uid: 1000, gid: 1000)
      00:00:02.889 [INFO] [seatd/seat.c:239] Added client 1 to seat0
      00:00:02.889 [INFO] [seatd/seat.c:563] Opened client 1 on seat0
      failed to connect to display
      failed to connect to display
      failed to connect to display
      HDMI-A-1 "Stargate Technology 1560FX (HDMI-A-1)"
        Make: Stargate Technology
        Model: 1560FX
        Serial: (null)
        Physical size: 330x220 mm
        Enabled: yes
        Modes:
          1920x1080 px, 60.000000 Hz (preferred, current)
          1920x1080 px, 60.000000 Hz
          1920x1080 px, 59.939999 Hz
          1680x1050 px, 59.882999 Hz
          1400x1050 px, 59.948002 Hz
          1280x1024 px, 60.020000 Hz
          1440x900 px, 59.901001 Hz
          1280x960 px, 60.000000 Hz
          1366x768 px, 59.999001 Hz
          1280x720 px, 60.000000 Hz
          1280x720 px, 60.000000 Hz
          1280x720 px, 59.939999 Hz
          1024x768 px, 60.004002 Hz
          800x600 px, 60.317001 Hz
          800x600 px, 59.863998 Hz
          800x600 px, 56.250000 Hz
          640x480 px, 60.000000 Hz
          640x480 px, 59.939999 Hz
          640x480 px, 59.971001 Hz
        Position: 0,0
        Transform: normal
        Scale: 1.000000
        Adaptive Sync: disabled
      Fri Jul 18 20:11:10 UTC 2025
      wlr-randr errors "failed to connect to display" so killing container.
      00:01:08.126 [INFO] [seatd/seat.c:158] No clients on seat0 to activate
      00:01:08.190 [INFO] [seatd/seat.c:290] Removed client 1 from seat0
      00:01:08.195 [INFO] [seatd/client.c:496] Client disconnected
      00:00:00.000 [INFO] [seatd/seatd.c:167] Removing leftover socket at /run/seatd.sock
      00:00:00.000 [INFO] [seatd/seat.c:48] Created VT-bound seat seat0
      00:00:00.000 [INFO] [seatd/seatd.c:194] seatd started
      failed to connect to display
      00:00:00.818 [INFO] [seatd/server.c:145] New client connected (pid: 1, uid: 1000, gid: 1000)
      00:00:00.819 [INFO] [seatd/seat.c:239] Added client 1 to seat0
      00:00:00.819 [INFO] [seatd/seat.c:563] Opened client 1 on seat0
      failed to connect to display
      failed to connect to display
      failed to connect to display
      HDMI-A-1 "Stargate Technology 1560FX (HDMI-A-1)"
        Make: Stargate Technology
        Model: 1560FX
        Serial: (null)
        Physical size: 330x220 mm
        Enabled: yes
        Modes:
          1920x1080 px, 60.000000 Hz (preferred, current)
          1920x1080 px, 60.000000 Hz
          1920x1080 px, 59.939999 Hz
          1680x1050 px, 59.882999 Hz
          1400x1050 px, 59.948002 Hz
          1280x1024 px, 60.020000 Hz
          1440x900 px, 59.901001 Hz
          1280x960 px, 60.000000 Hz
          1366x768 px, 59.999001 Hz
          1280x720 px, 60.000000 Hz
          1280x720 px, 60.000000 Hz
          1280x720 px, 59.939999 Hz
          1024x768 px, 60.004002 Hz
          800x600 px, 60.317001 Hz
          800x600 px, 59.863998 Hz
          800x600 px, 56.250000 Hz
          640x480 px, 60.000000 Hz
          640x480 px, 59.939999 Hz
          640x480 px, 59.971001 Hz
        Position: 0,0
        Transform: normal
        Scale: 1.000000
        Adaptive Sync: disabled
      Sat Jul 19 01:23:47 UTC 2025
      wlr-randr errors "failed to connect to display" so killing container.
      05:12:15.325 [INFO] [seatd/seat.c:158] No clients on seat0 to activate
      05:12:15.379 [INFO] [seatd/seat.c:290] Removed client 1 from seat0
      05:12:15.380 [INFO] [seatd/client.c:496] Client disconnected
      00:00:00.000 [INFO] [seatd/seatd.c:167] Removing leftover socket at /run/seatd.sock
      00:00:00.000 [INFO] [seatd/seat.c:48] Created VT-bound seat seat0
      00:00:00.000 [INFO] [seatd/seatd.c:194] seatd started
      failed to connect to display
      00:00:00.881 [INFO] [seatd/server.c:145] New client connected (pid: 1, uid: 1000, gid: 1000)
      00:00:00.881 [INFO] [seatd/seat.c:239] Added client 1 to seat0
      00:00:00.882 [INFO] [seatd/seat.c:563] Opened client 1 on seat0
      failed to connect to display
      failed to connect to display
      HDMI-A-1 "Stargate Technology 1560FX (HDMI-A-1)"
        Make: Stargate Technology
        Model: 1560FX
        Serial: (null)
        Physical size: 330x220 mm
        Enabled: yes
        Modes:
          1920x1080 px, 60.000000 Hz (preferred, current)
          1920x1080 px, 60.000000 Hz
          1920x1080 px, 59.939999 Hz
          1680x1050 px, 59.882999 Hz
          1400x1050 px, 59.948002 Hz
          1280x1024 px, 60.020000 Hz
          1440x900 px, 59.901001 Hz
          1280x960 px, 60.000000 Hz
          1366x768 px, 59.999001 Hz
          1280x720 px, 60.000000 Hz
          1280x720 px, 60.000000 Hz
          1280x720 px, 59.939999 Hz
          1024x768 px, 60.004002 Hz
          800x600 px, 60.317001 Hz
          800x600 px, 59.863998 Hz
          800x600 px, 56.250000 Hz
          640x480 px, 60.000000 Hz
          640x480 px, 59.939999 Hz
          640x480 px, 59.971001 Hz
        Position: 0,0
        Transform: normal
        Scale: 1.000000
        Adaptive Sync: disabled
      scottwalsh@calendar:~ $ 
      scottwalsh@calendar:~ $ 
      
      
      1 Reply Last reply Reply Quote 0
      • S Offline
        scottwalsh
        last edited by

        Moving to 64bit looks like might have helped. Up for 18 hours since rebuilding so far with my full calendar configuration.

        Observation - took about 30 min to boot through displaying the calendar. Load average getting up to 20.0+ during boot, assume swapping a lot via the slow SD card interface. So although looks more stable, much slower performance.

        1 Reply Last reply Reply Quote 1
        • S Offline
          scottwalsh
          last edited by

          Did note the following error from the labwc container about four hours after starting it in the above example errors, so suspecting is part of it.

          So I guess how can I troubleshoot/avoid this event.
          And/or have the mm container reconnect after this occurs.

          wlr-randr errors "failed to connect to display" so killing container.
          
          karsten13K 1 Reply Last reply Reply Quote 0
          • karsten13K Online
            karsten13 @scottwalsh
            last edited by

            @scottwalsh

            I gave up with Pi Zero 2W. The memory is to low.

            I suspect this is your problem when removing modules results in running longer before crashing.

            You maybe got a newer base OS when reimaging and the mm dependencies grows with every release (e.g. node, electron).

            You did not write which OS you are using, 32-bit or 64-bit. The 32-bit is more resource-saving.

            S 1 Reply Last reply Reply Quote 0
            • S Offline
              scottwalsh @karsten13
              last edited by

              @karsten13 said in MM Screen goes blank 5-20min after starting (was stable on 2.31) - Pi Zero 2W running MagicMirrorOS:

              You did not write which OS you are using, 32-bit or 64-bit. The 32-bit is more resource-saving

              Hadn’t checked, until now. Have been using the 32-bit version.
              Will reimage with the 64-bit version and see if it is more stable.

              karsten13K S 2 Replies Last reply Reply Quote 0
              • karsten13K Online
                karsten13 @scottwalsh
                last edited by

                @scottwalsh

                Will reimage with the 64-bit version and see if it is more stable.

                I think not … but you can try it.

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

                  @scottwalsh the 64bit version takes about 500m more memory than the 32 bit version…

                  you need to increase the swap space on the 2w, as it only has 512m ram.
                  but you WILL page/swap a LOT, so the sd card speed is critical.

                  before bootable USB support came along,

                  I built and SD card image
                  then copied that to a high speed USB stick, and modified the /etc/fstab to map the mounted space to the USB after boot from the SD card. (this required changing the UUID of the USB stick partition)

                  this moved all the runtime I/O access to the USB stick…

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

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

                    @sdetweil said in MM Screen goes blank 5-20min after starting (was stable on 2.31) - Pi Zero 2W running MagicMirrorOS:

                    Away
                    sdetweil
                    3 minutes ago

                    @scottwalsh the 64bit version takes about 500m more memory than the 32 bit version…

                    Thanks for the tip, what’d you recommend as a min swap size? Will just try it off the SD card to start (as don’t have a USD at hand).

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

                      @scottwalsh on the low ram machines I set it to 1024m
                      in the installer script…

                      free -m

                      will give you defined and used for physical and swap

                      from my 8 gig pi 4

                       free -m
                                     total        used        free      shared  buff/cache   available
                      Mem:            7810        1418        2106          19        4426        6391
                      Swap:           2047           8        2039
                      

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      karsten13K 1 Reply Last reply Reply Quote 0
                      • karsten13K Online
                        karsten13 @sdetweil
                        last edited by

                        @sdetweil

                        is already set to 1024

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

                          @karsten13 he should examine use and adjust as required…

                          Sam

                          How to add modules

                          learning how to use browser developers window for css changes

                          1 Reply Last reply Reply Quote 0
                          • 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