Read the statement by Michael Teeuw here.
Failed to Connect to Wayland Display
-
@sdetweil I ran the command and this is my output.
total used free shared buff/cache available Mem: 3992 2153 210 550 2126 1839 Swap: 511 30 481Is the output in MB? Doesn’t seem like it’s to the point where everything is so slow to respond.
-
@Scruffy pi4, 4 gig?
-
@sdetweil Pi 5 4GB
-
@sdetweil UPDADE:
I have MagicMirror back up and running using a new SD card. I’m guessing the old one died for whatever reason since the whole system was becoming extremely sluggish to the point it would take 10 seconds between input commands triggering.
Glad to be back up and running!
Thank you again for all your help troubleshooting and support us!
Cheers!
-
@Scruffy awesome!!! Thanks for the feedback!
How did you migrate your config ?
Just interested in how people do things -
@sdetweil I’m still very new to Linux/Pi so I was concerned I may have corrupted my original config file(s) with all the changes/modifications I was performing when trying to get the original system back up and running.
I copied over the old config.js which has all my module settings.
I installed MM from scratch along with all the modules. I then brought up both config.js files in Geany and copied and pasted over my configurations.
Not the cleanest of methods but it worked lol.
-
@Scruffy thanks.
-
@Scruffy I strongly recommend using some backup/restore mechanism,
please see my backup/restore scripts for one approach.they also support versioning, so you can tell one set of changes from another and can go back or forward…
and move between systems. too…https://github.com/sdetweil/MagicMirror-backup-restore.git
and I also support the install/upgrade scripts, mentioned in the MM doc, Alternative install section
-
@sdetweil, I am running into a similar occurrence but from your initial post I don’t have pm2 installed (as you can see below). Any advice would be appreciated. I have completely reimaged my Pi and retried the steps.
I followed all of the standard manual install steps, have git and node and npm.
This is what I am getting when attempting to run ‘node --run start’
Starting server on port 8080 …
[1877:0409/161415.143762:ERROR:ui/ozone/platform/wayland/host/wayland_connection.cc:202] Failed to connect to Wayland display: No such file or directory (2)
[1877:0409/161415.143988:ERROR:ui/ozone/platform/wayland/ozone_platform_wayland.cc:281] Failed to initialize Wayland platform
[1877:0409/161415.144045:ERROR:ui/aura/env.cc:246] The platform failed to initialize. Exiting.
/home/onthewall/MagicMirror/node_modules/electron/dist/electron exited with signal SIGSEGVSystem Information
- SYSTEM: manufacturer: Raspberry Pi Foundation; model: Raspberry Pi 4 Model B Rev 1.2; virtual: false; MM: v2.35.0
- OS: platform: linux; distro: Debian GNU/Linux; release: 13; arch: arm64; kernel: 6.12.75+rpt-rpi-v8
- VERSIONS: electron: 41.1.0; used node: 24.14.1; installed node: 24.14.1; npm: 11.11.0; pm2:
- ENV: XDG_SESSION_TYPE: undefined; MM_CONFIG_FILE: undefined
WAYLAND_DISPLAY: wayland-1; DISPLAY: undefined; ELECTRON_ENABLE_GPU: undefined - RAM: total: 3796.68 MB; free: 3304.59 MB; used: 492.10 MB
- OTHERS: uptime: 1 minutes; timeZone: America/Los_Angeles
-
@magicmikael as we said in the readme notes on the release
We changed
npm start/node —run startTo launch for Wayland compositor
If you are still on x11
You need to usenpm run start:x11
Or
node —run start:x11 -
@sdetweil, I ran a fresh install of the OS (64-bit). I would have assumed it would be all set for Wayland. Confirmed under raspi-config its “Wayland” but strangely
echo $XDG_SESSION_TYPEreturns nothing.
I am thinking of going the pm2 route and trying to launch using your aforementioned script but I can’t imagine it would yield another result.
-
@magicmikael if you do env
Do you see wayland_display in the list?
The script sets WAYLAND_DISPLAY if not already set
Here is the script , make sure to make it executable
chmod +x mm.sh#!/bin/bash cd ~/MagicMirror if [ $(ps -ef | grep -v grep | grep -i -e xway -e labwc | wc -l) -ne 0 ]; then # if WAYLAND_DISPLAYis set, use it, else set to -0 export WAYLAND_DISPLAY=${WAYLAND_DISPLAY:=wayland-0} npm run start:wayland else DISPLAY=:0 npm run start:x11 fi
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