MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. scottwalsh
    3. Posts
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    S
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 3
    • Posts 10
    • Groups 0

    Posts

    Recent Best Controversial
    • Issue with latest build of Karsten’s docker labwc container?

      Apologies if the title is an incorrect conclusion.

      As using MagicMirrorOs that uses Karsten’s docker build.

      Noticed my screen at a tty login prompt instead of displaying my configuration that has been running a couple of weeks.

      After investigating a little, I can see the labwc container keeps restarting with the below error messages in the logs.

      It looks like it did pull of the latest version of the container ~3 hours ago, and I see that is when a new version of the content was published.

      • Is there an issue with th*e latest version of the labwc container?
      • Or any suggestions on troubleshooting?
      scottwalsh@calendar:/opt/mm/run $ docker images
      REPOSITORY              TAG       IMAGE ID       CREATED         SIZE
      karsten13/labwc         latest    8e88d2ea284a   3 hours ago     475MB
      karsten13/magicmirror   fat       4e817d6adb5a   2 days ago      1.59GB
      karsten13/magicmirror   latest    1d9d652de531   2 days ago      1.01GB
      karsten13/mmpm          latest    44cfa75bf098   5 days ago      841MB
      containrrr/watchtower   latest    a157fa84f431   15 months ago   14MB
      scottwalsh@calendar:/opt/mm/run $ docker logs labwc
      sudo: seatd: command not found
      00:00:00.523 [ERROR] [libseat] [libseat/backend/logind.c:621] Could not get primary session for user: No data available
      00:00:00.601 [ERROR] [libseat] [common/terminal.c:162] Could not open target tty: Permission denied
      00:00:00.602 [ERROR] [libseat] [seatd/seat.c:70] Could not open tty0 to update VT: Permission denied
      00:00:00.602 [ERROR] [libseat] [common/terminal.c:162] Could not open target tty: Permission denied
      00:00:00.602 [ERROR] [libseat] [seatd/seat.c:80] Could not open terminal for VT 0: Permission denied
      00:00:00.602 [ERROR] [libseat] [seatd/seat.c:544] Could not open VT for client
      00:00:00.602 [ERROR] [libseat] [common/terminal.c:162] Could not open target tty: Permission denied
      00:00:00.602 [ERROR] [libseat] [seatd/seat.c:94] Could not open terminal to clean up VT 0: Permission denied
      00:00:10.606 [ERROR] [backend/backend.c:105] Timeout waiting session to become active
      00:00:10.606 [ERROR] [backend/backend.c:407] Failed to start a DRM session
      00:00:10.652 [ERROR] [../src/server.c:463] unable to create backend
      
      Some friendly trouble-shooting help
      ===================================
      
      If a seat could not be created, this may be caused by lack of permission to the
      seat, input and video groups. If you are using a systemd setup, try installing
      polkit (sometimes called policykit-1). For other setups, search your OS/Distro's
      documentation on how to use seatd, elogind or similar. This is likely to involve
      manually adding users to groups.
      
      If the above does not work, try running with `WLR_RENDERER=pixman labwc` in
      order to use the software rendering fallback
      00:00:11.825 [ERROR] [libseat] [common/terminal.c:162] Could not open target tty: Permission denied
      00:00:11.825 [ERROR] [libseat] [seatd/seat.c:94] Could not open terminal to clean up VT 0: Permission denied
      sudo: seatd: command not found
      00:00:00.038 [ERROR] [libseat] [libseat/backend/logind.c:621] Could not get primary session for user: No data available
      00:00:00.044 [ERROR] [libseat] [common/terminal.c:162] Could not open target tty: Permission denied
      00:00:00.044 [ERROR] [libseat] [seatd/seat.c:70] Could not open tty0 to update VT: Permission denied
      00:00:00.044 [ERROR] [libseat] [common/terminal.c:162] Could not open target tty: Permission denied
      00:00:00.044 [ERROR] [libseat] [seatd/seat.c:80] Could not open terminal for VT 0: Permission denied
      00:00:00.044 [ERROR] [libseat] [seatd/seat.c:544] Could not open VT for client
      00:00:00.045 [ERROR] [libseat] [common/terminal.c:162] Could not open target tty: Permission denied
      00:00:00.045 [ERROR] [libseat] [seatd/seat.c:94] Could not open terminal to clean up VT 0: Permission denied
      00:00:10.054 [ERROR] [backend/backend.c:105] Timeout waiting session to become active
      00:00:10.054 [ERROR] [backend/backend.c:407] Failed to start a DRM session
      00:00:10.061 [ERROR] [../src/server.c:463] unable to create backend
      
      posted in Troubleshooting
      S
      scottwalsh
    • Family Calendar (non Mirror currently)

      Family calendar, went for a custom framed screen as opposed to a mirror surface, may at a mirror surface later.

      IMG_0811 (1).jpeg

      Hardware
      Hardware is a Pi Zero 2W with a cheap portable monitor (Firebat).

      MM Configuration
      Modules is a simple set up of a CalendarExt3 with the default weather and time pulling five ics calendars from google (a calendar for each person plus a shared one).

      OS
      Used the MagicMirrorOS for the build, had some intermittent issues as noted in a troubleshooting thread that @KARSTEN13 and @SDETWEIL gave some good pointers on so could put in a workaround.

      Server Side
      On the google side, have written two Google Scripts to transform the calendar entries a little.

      Script 1
      Events are prefixed by “[CalendarName]” so clear which calendar the event belongs to without colour coding.

      Script 2
      Also a script that takes a calendar and copies the events to another, optionally padding the times for travel times (hardcoded) and rewriting the the title so that the original time is included. This allows me to consolidate several calendars into one.
      End result is (for example) my calendar for display (SW), has copied into two ics feeds, one of any gym classes I have booked (padded with travel time) and one from Tripit unpadded. Similar with my wife’s calendar with her gym bookings.

      posted in Show your Mirror
      S
      scottwalsh
    • RE: MagicMirrorOS build intermittently not starting mm container (Version 2.30)

      As an update, based on the pointers from @KARSTEN13 and @SDETWEIL, have a workaround.

      Had three issues going on.

      1:
      I found that on a graceful reboot (shutdown -r now) that it would generally start fine, but not on an ungraceful reboot (power cycle the machine).

      Looks like when it was ungraceful reboot, the labwc container would show with uptime of (for example) five hours when ‘docker ps’, even though the machine was rebooted 20min ago after ‘docker compose up’ was executed by install.sh. Whereas the magicmirror container would have recently started.

      I assume kind of lock file confusing things?

      Workaround was to change the first ‘docker compose up’ install.sh to ‘docker compose up -d --force-recreate’

      2:
      I’d also included a pause and --force-recreate at the end of the install.sh and noted it was never executing as per @KARSTEN13’s suggestion.
      Looked like the install.sh script was hanging at docker compose pull.
      Commented that out.

      3:
      Lastly, the initial ‘docker compose up -d --force-recreate’ in install.sh would still fail often with the mm container restarting with logs as per the original post.

      With a 7 min pause and then second ‘docker compose up -d --force-recreate’ it seems to start the second time well (3min wasn’t enough, 5min was better, 7min seems to work).

      Workaround is a bit on the slow side, at some point will see if can refactor it a bit so that a pull for updates occurs.

      Extract of resulting install.sh below.

      _info "--> Pulling docker images and starting magicmirror"
      # need sudo for docker here if docker was installed with this script
      
      # use up so mm can start if there are already local images
      _info "--> Pre Start Pause for 2min"
      sleep 120
      
      _info "--> Start and recreate"
      $_sudo docker compose up -d --force-recreate
      
      #_info "--> Pull Pause for 1 min"
      #sleep 60
      # pull new images
      #_info "--> Image Pull"
      #$_sudo docker compose pull
      
      #_info "--> Restart Pause for 1 min"
      #sleep 60
      # restart (only if new images pulled)
      #_info "--> Restart stopped"
      #$_sudo docker compose up -d
      
      _info "--> Final Pause for 7 min"
      sleep 720
      
      _info "--> Final  start and recreate"
      $_sudo docker compose up -d --force-recreate
      
      if [[ "$_sudo" == "sudo" ]]; then
        _info "--> Reboot needed, starting in 120 sec. (use ctrl-c to skip)"
        sleep 120
        sudo reboot now
      fi
      
      # cleanup
      $_sudo docker image prune -f
      
      posted in Troubleshooting
      S
      scottwalsh
    • RE: MagicMirrorOS build intermittently not starting mm container (Version 2.30)

      @karsten13 said in MagicMirrorOS build intermittently not starting mm container (Version 2.30):

      the script /opt/mm/install/install.sh is executed with every reboot.

      As workaround you could add

      Is that executed on the OS boot, or by one of the containers as they start?

      I was thinking of a workaround like that to introduce a pause. Given the low machine spec, it seems to be busy for about 5min after sshd starts, so will just try a 300 sec sleep.

      posted in Troubleshooting
      S
      scottwalsh
    • RE: MagicMirrorOS build intermittently not starting mm container (Version 2.30)

      @sdetweil said in MagicMirrorOS build intermittently not starting mm container (Version 2.30):

      @scottwalsh can you show w MagicMirror running…

      scottwalsh@calendar:/opt/mm/run $ 
      scottwalsh@calendar:/opt/mm/run $ docker compose up -d --force-recreate
      [+] Running 5/5
       ✔ Container watchtower  Started                                                                                                                                                                        42.0s 
       ✔ Container labwc       Started                                                                                                                                                                        41.9s 
       ✔ Container init        Started                                                                                                                                                                        42.2s 
       ✔ Container mmpm        Started                                                                                                                                                                        42.4s 
       ✔ Container mm          Started                                                                                                                                                                         5.3s 
      scottwalsh@calendar:/opt/mm/run $ 
      scottwalsh@calendar:/opt/mm/run $ docker ps
      CONTAINER ID   IMAGE                          COMMAND                  CREATED         STATUS                   PORTS                                                                                                                                                 NAMES
      a1cb1b400de1   karsten13/mmpm:latest          "/home/node/entrypoi…"   3 minutes ago   Up 2 minutes             0.0.0.0:6789->6789/tcp, :::6789->6789/tcp, 0.0.0.0:7890-7891->7890-7891/tcp, :::7890-7891->7890-7891/tcp, 0.0.0.0:8907->8907/tcp, :::8907->8907/tcp   mmpm
      f7ec5d32f0bd   karsten13/magicmirror:latest   "/usr/bin/tini -- ./…"   3 minutes ago   Up About a minute                                                                                                                                                              mm
      74193ae14fbf   karsten13/labwc:latest         "/entrypoint.sh"         3 minutes ago   Up 2 minutes                                                                                                                                                                   labwc
      bcf30cd7bb10   containrrr/watchtower:latest   "/watchtower --inter…"   3 minutes ago   Up 2 minutes (healthy)   8080/tcp                                                                                                                                              watchtower
      scottwalsh@calendar:/opt/mm/run $ 
      scottwalsh@calendar:/opt/mm/run $ free -m
                     total        used        free      shared  buff/cache   available
      Mem:             425         236         134          36         141         189
      Swap:           1023         296         727
      scottwalsh@calendar:/opt/mm/run $
      
      posted in Troubleshooting
      S
      scottwalsh
    • RE: MagicMirrorOS build intermittently not starting mm container (Version 2.30)

      An observation, if I power cycle the pi, there is a good chance of it not starting up with the errors in the original post.

      Once leave it for five min for all the processes to start (and fail), then run docker compose up -d --force-recreate, it seems to be stable from then on and works well.

      posted in Troubleshooting
      S
      scottwalsh
    • RE: MagicMirrorOS build intermittently not starting mm container (Version 2.30)

      @sdetweil said in MagicMirrorOS build intermittently not starting mm container (Version 2.30):

      @scottwalsh how big is the swap file?

      free -m

      scottwalsh@calendar:~ $ free -m
                     total        used        free      shared  buff/cache   available
      Mem:             425         210          66           0         204         214
      Swap:           1023         203         820
      scottwalsh@calendar:~ $
      
      posted in Troubleshooting
      S
      scottwalsh
    • RE: MagicMirrorOS build intermittently not starting mm container (Version 2.30)

      @sdetweil said in MagicMirrorOS build intermittently not starting mm container (Version 2.30):

      @scottwalsh please dont double post

      Apologies, user error.

      posted in Troubleshooting
      S
      scottwalsh
    • RE: MagicMirrorOS build intermittently not starting mm container (Version 2.30)

      @sdetweil
      The host is a pi zero 2w - so is on the low spec side.

      posted in Troubleshooting
      S
      scottwalsh
    • MagicMirrorOS build intermittently not starting mm container (Version 2.30)

      Hi,

      I’ve recently built a mm using MagicMirrorOS (which uses the docker install) to use as a family calendar on the wall. Have in configured for the information I want

      However, I am finding if power cycle it, sometimes the calendar does not load up and just have a blank screen.

      If execute:

      scottwalsh@calendar:/opt/mm/run $ docker compose up -d --force-recreate
      

      Then, it loads.

      Have some Linux background from many years ago, but docker is new to me - so not sure where to look to work out how to resolve.

      From looking at the logs (some extracts below), looks like the mm container isn’t connecting to Xserver.

      Any suggestions where to look for useful logs to work out the issue?

      Thanks, Scott

      scottwalsh@calendar:/opt/mm/run $ docker ps
      CONTAINER ID   IMAGE                          COMMAND                  CREATED       STATUS                 PORTS                                                                                                                                                 NAMES
      00d6a9d4ab86   karsten13/mmpm:latest          "/home/node/entrypoi…"   3 hours ago   Up 2 hours             0.0.0.0:6789->6789/tcp, :::6789->6789/tcp, 0.0.0.0:7890-7891->7890-7891/tcp, :::7890-7891->7890-7891/tcp, 0.0.0.0:8907->8907/tcp, :::8907->8907/tcp   mmpm
      62d9fe5220c6   karsten13/labwc:latest         "/entrypoint.sh"         3 hours ago   Up 2 hours                                                                                                                                                                   labwc
      f43c6ecab44b   karsten13/magicmirror:latest   "/usr/bin/tini -- ./…"   2 days ago    Up 23 seconds                                                                                                                                                                mm
      9643b13d7183   containrrr/watchtower:latest   "/watchtower --inter…"   2 days ago    Up 2 hours (healthy)   8080/tcp                                                                                                                                              watchtower
      scottwalsh@calendar:/opt/mm/run $ 
      
      
      scottwalsh@calendar:/opt/mm/run $ docker logs mm
      [entrypoint 06:55:28.611] [INFO]   ***WARNING*** could write to /etc/localtime
      [entrypoint 06:55:28.626] [INFO]   copy default modules
      [entrypoint 06:55:28.824] [INFO]   copy css files
      
      > magicmirror@2.30.0 start
      > npm run start:x11
      
      
      > magicmirror@2.30.0 start:x11
      > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
      
      [2025-02-14 06:55:44.929] [LOG]   Starting MagicMirror: v2.30.0 
      [2025-02-14 06:55:45.661] [LOG]   Loading config ... 
      [2025-02-14 06:55:45.672] [LOG]   config template file not exists, no envsubst 
      [2025-02-14 06:55:47.716] [INFO]  Checking config file /opt/magic_mirror/config/config.js ... 
      [2025-02-14 06:55:47.925] [INFO]  Your configuration file doesn't contain syntax errors :) 
      [2025-02-14 06:55:47.928] [INFO]  Checking modules structure configuration ... 
      [2025-02-14 06:55:48.246] [INFO]  Your modules structure configuration doesn't contain errors :) 
      [2025-02-14 06:55:48.253] [LOG]   Loading module helpers ... 
      [2025-02-14 06:55:48.271] [LOG]   Initializing new module helper ... 
      [2025-02-14 06:55:48.274] [LOG]   Module helper loaded: MMM-mmpm 
      [2025-02-14 06:55:48.276] [LOG]   No helper found for module: alert. 
      [2025-02-14 06:55:48.293] [LOG]   Initializing new module helper ... 
      [2025-02-14 06:55:48.294] [LOG]   Module helper loaded: updatenotification 
      [2025-02-14 06:55:49.209] [LOG]   Initializing new module helper ... 
      [2025-02-14 06:55:49.210] [LOG]   Module helper loaded: calendar 
      [2025-02-14 06:55:49.230] [LOG]   No helper found for module: MMM-CalendarExt3. 
      [2025-02-14 06:55:49.232] [LOG]   No helper found for module: clock. 
      [2025-02-14 06:55:49.234] [LOG]   No helper found for module: weather. 
      [2025-02-14 06:55:49.235] [LOG]   All module helpers loaded. 
      [2025-02-14 06:55:49.262] [LOG]   Starting server on port 8080 ...  
      [2025-02-14 06:55:49.271] [WARN]  You're using a full whitelist configuration to allow for all IPs 
      [2025-02-14 06:55:50.319] [LOG]   Server started ... 
      [2025-02-14 06:55:50.322] [LOG]   Connecting socket for: MMM-mmpm 
      [2025-02-14 06:55:50.325] [LOG]   Starting module helper: MMM-mmpm 
      [2025-02-14 06:55:50.326] [LOG]   Connecting socket for: updatenotification 
      [2025-02-14 06:55:50.328] [LOG]   Starting module helper: updatenotification 
      [2025-02-14 06:55:50.329] [LOG]   Connecting socket for: calendar 
      [2025-02-14 06:55:50.331] [LOG]   Starting node helper for: calendar 
      [2025-02-14 06:55:50.333] [LOG]   Sockets connected & modules started ... 
      [58:0214/065550.892616:ERROR:ozone_platform_x11.cc(245)] Missing X server or $DISPLAY
      [58:0214/065550.893706:ERROR:env.cc(258)] The platform failed to initialize.  Exiting.
      /opt/magic_mirror/node_modules/electron/dist/electron exited with signal SIGSEGV
      [entrypoint 06:56:00.774] [INFO]   ***WARNING*** could write to /etc/localtime
      [entrypoint 06:56:00.791] [INFO]   copy default modules
      [entrypoint 06:56:00.981] [INFO]   copy css files
      
      > magicmirror@2.30.0 start
      > npm run start:x11
      
      
      > magicmirror@2.30.0 start:x11
      > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
      
      [2025-02-14 06:56:16.871] [LOG]   Starting MagicMirror: v2.30.0 
      [2025-02-14 06:56:18.897] [LOG]   Loading config ... 
      [2025-02-14 06:56:18.918] [LOG]   config template file not exists, no envsubst 
      [2025-02-14 06:56:20.944] [INFO]  Checking config file /opt/magic_mirror/config/config.js ... 
      [2025-02-14 06:56:21.141] [INFO]  Your configuration file doesn't contain syntax errors :) 
      [2025-02-14 06:56:21.143] [INFO]  Checking modules structure configuration ... 
      [2025-02-14 06:56:21.433] [INFO]  Your modules structure configuration doesn't contain errors :) 
      [2025-02-14 06:56:21.441] [LOG]   Loading module helpers ... 
      [2025-02-14 06:56:21.459] [LOG]   Initializing new module helper ... 
      [2025-02-14 06:56:21.461] [LOG]   Module helper loaded: MMM-mmpm 
      [2025-02-14 06:56:21.463] [LOG]   No helper found for module: alert. 
      [2025-02-14 06:56:21.478] [LOG]   Initializing new module helper ... 
      [2025-02-14 06:56:21.479] [LOG]   Module helper loaded: updatenotification 
      [2025-02-14 06:56:21.959] [LOG]   Initializing new module helper ... 
      [2025-02-14 06:56:21.960] [LOG]   Module helper loaded: calendar 
      [2025-02-14 06:56:21.971] [LOG]   No helper found for module: MMM-CalendarExt3. 
      [2025-02-14 06:56:21.973] [LOG]   No helper found for module: clock. 
      [2025-02-14 06:56:21.974] [LOG]   No helper found for module: weather. 
      [2025-02-14 06:56:21.975] [LOG]   All module helpers loaded. 
      [2025-02-14 06:56:21.996] [LOG]   Starting server on port 8080 ...  
      [2025-02-14 06:56:22.003] [WARN]  You're using a full whitelist configuration to allow for all IPs 
      [2025-02-14 06:56:23.024] [LOG]   Server started ... 
      [2025-02-14 06:56:23.026] [LOG]   Connecting socket for: MMM-mmpm 
      
      
      scottwalsh@calendar:/opt/mm/run $ docker logs labwc
      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
      00:00:03.286 [INFO] [seatd/server.c:145] New client connected (pid: 13, uid: 1000, gid: 1000)
      00:00:03.286 [INFO] [seatd/seat.c:239] Added client 1 to seat0
      00:00:03.286 [INFO] [seatd/seat.c:563] Opened client 1 on seat0
      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
      00:00:02.811 [INFO] [seatd/server.c:145] New client connected (pid: 13, uid: 1000, gid: 1000)
      00:00:02.812 [INFO] [seatd/seat.c:239] Added client 1 to seat0
      00:00:02.812 [INFO] [seatd/seat.c:563] Opened client 1 on seat0
      scottwalsh@calendar:/opt/mm/run $
      
      posted in Troubleshooting
      S
      scottwalsh
    • 1 / 1