Read the statement by Michael Teeuw here.
Failed to Connect to Wayland Display
-
@sdetweil Unfortunately, it still doesn’t start after reboot. It does continue to work if i start it manually.
Log file
|MagicMir | [2991:0228/201716.146315:ERROR:ui/ozone/platform/wayland/ozone_platform_wayland.cc:282] Failed to initialize Wayland platform
0|MagicMir | [2991:0228/201716.146344:ERROR:ui/aura/env.cc:257] The platform failed to initialize. Exiting.
0|MagicMir | /home/twist/MagicMirror/node_modules/electron/dist/electron exited with signal SIGSEGV
0|MagicMir | [3075:0228/201721.692197:ERROR:ui/ozone/platform/wayland/host/wayland_connection.cc:202] Failed to connect to Wayland display: No such file or directory (2) -
@atwist do this
pm2 status pm2 info xxxxwhere xxxx is the name/number on the row that contains the MagicMirror app
see the line in the output (example from my Mac, )
script path │ /Users/sam/MagicMirror/installers/mm.shis it pointing to the correct sh file??
-
@atwist
I know this may be a bit late, I had the same problem on my Raspberry Pi3 after I updated to the latest MM.
I spent some time trying to get Wayland running, but wasn’t really successful. Finally, I changed my mm.sh script to:#!/bin/bash
cd ~/MagicMirrornpm run start:x11
And that got it working again using: pm2 start|restart mm
-
@hrt13 yes, the release notes indicate that the npm start defaults to Wayland now…
-
@atwist
I know this may be a bit late, I had the same problem on my Raspberry Pi3 after I updated to the latest MM.
I spent some time trying to get Wayland running, but wasn’t really successful. Finally, I changed my mm.sh script to:#!/bin/bash
cd ~/MagicMirrornpm run start:x11
And that got it working again using: pm2 start|restart mm
I got something similar, my version of mm.sh:
#!/bin/bash cd /home/pi/MagicMirror DISPLAY=:0 node --run start:x11 -
@sdetweil I modified your script from earlier to:
#!/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 npm run start:x11 fi -
-
I’m having a similar issue and I’ve been following this post but I still can’t resolve the error.
[94483:0406/164800.222694:ERROR:ui/ozone/platform/wayland/host/wayland_connection.cc:202] Failed to connect to Wayland display: No such file or directory (2) [94483:0406/164800.222815:ERROR:ui/ozone/platform/wayland/ozone_platform_wayland.cc:281] Failed to initialize Wayland platform [94483:0406/164800.222849:ERROR:ui/aura/env.cc:246] The platform failed to initialize. Exiting. /home/ferguson/MagicMirror/node_modules/electron/dist/electron exited with signal SIGSEGV [94821:0406/164812.960910:ERROR:ui/ozone/platform/wayland/host/wayland_connection.cc:202] Failed to connect to Wayland display: No such file or directory (2) [94821:0406/164812.962540:ERROR:ui/ozone/platform/wayland/ozone_platform_wayland.cc:281] Failed to initialize Wayland platform [94821:0406/164812.962598:ERROR:ui/aura/env.cc:246] The platform failed to initialize. Exiting.I’m currently using the following lines in 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 npm run start:x11 fiRunning the PM2 shows the status is online.
Any help would be greatly appreciated.
Cheers!
-
@Scruffy
Can you open a terminal window and run this command stringps -ef | grep -v grep | grep -i -e xway -e labwc
Then do
pm2 stop all cd MagicMirror npm run start:x11Does MagicMirror start now?
-
I ran the first command and this is the output:
~ $ ps -ef | grep -v grep | grep -i -e xway -e labwc ferguson 66504 1 0 15:32 ? 00:00:01 /usr/bin/Xwayland -auth /home/ferguson/.Xauthority :0 -rootless -core -terminate 10 -listenfd 28 -listenfd 29 -displayfd 88 -wm 82When I run the last commands, it’s still not launching. The MM screen flickers up for a second and then goes away. This isn’t unique to the above steps.
Logs look similar, if not the same:
[306765:0406/201018.874374:ERROR:ui/ozone/platform/wayland/host/wayland_connection.cc:202] Failed to connect to Wayland display: No such file or directory (2) [306765:0406/201018.874626:ERROR:ui/ozone/platform/wayland/ozone_platform_wayland.cc:281] Failed to initialize Wayland platform [306765:0406/201018.874711:ERROR:ui/aura/env.cc:246] The platform failed to initialize. Exiting. /home/ferguson/MagicMirror/node_modules/electron/dist/electron exited with signal SIGSEGV [307094:0406/201032.033709:ERROR:ui/ozone/platform/wayland/host/wayland_connection.cc:202] Failed to connect to Wayland display: No such file or directory (2) [307094:0406/201032.033832:ERROR:ui/ozone/platform/wayland/ozone_platform_wayland.cc:281] Failed to initialize Wayland platform [307094:0406/201032.033866:ERROR:ui/aura/env.cc:246] The platform failed to initialize. Exiting. /home/ferguson/MagicMirror/node_modules/electron/dist/electron exited with signal SIGSEGVStrange indeed.
-
@Scruffy ok, try
npm run start:wayland
-
npm run start:wayland
Unfortunately, still no go.
The whole system is feeling sluggish… I wounder if it’s an SD issue…?
I have a new SD card arriving later today. I’ll image and reinstall MM and report back.
If it’s still not working, I’ll provide the logs again.
Cannot thank you enough, @sdetweil. You’re incredibly responsive and your support is greatly appreciated.
Cheers!
-
@Scruffy use my backup/restore scripts to save and restore your MagicMirror config and modules list
https://github.com/sdetweil/MagicMirror-backup-restore
Backup, copy off backup folder, tiny sizeInstall new MagicMirror and copy back folder and restore
-
@Scruffy I actually never resolved my issue either. But, my system was very sluggish as well.
-
@atwist the latest PI OS is larger than the previous versions…
leading to more swapping. This can affect performance because of the speed of the SD card.
free -m
will tell you how much memory and swap space you are using.
-
@atwist what did you end up doing? Or are you still without MM working?
-
@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
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