Read the statement by Michael Teeuw here.
MagicMirror's Electron not starting up on a fresh Raspberry Pi 4B install
-
Hello everyone,
I am struggling for a few days now to start up the MagicMirror GUI on my Raspberry Pi 4B. The Electron module is throwing an error that I can’t solve in any way:
magicmirror@mm-pi:~ $ cd MagicMirror/ magicmirror@mm-pi:~/MagicMirror $ npm start > magicmirror@2.28.0 start > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js [2024-08-07 19:35:04.025] [LOG] Starting MagicMirror: v2.28.0 [2024-08-07 19:35:04.053] [LOG] Loading config ... [2024-08-07 19:35:04.056] [LOG] config template file not exists, no envsubst [2024-08-07 19:35:04.060] [LOG] Loading module helpers ... [2024-08-07 19:35:04.061] [LOG] No helper found for module: alert. [2024-08-07 19:35:04.071] [LOG] Initializing new module helper ... [2024-08-07 19:35:04.072] [LOG] Module helper loaded: updatenotification [2024-08-07 19:35:04.073] [LOG] No helper found for module: clock. [2024-08-07 19:35:04.196] [LOG] Initializing new module helper ... [2024-08-07 19:35:04.197] [LOG] Module helper loaded: calendar [2024-08-07 19:35:04.198] [LOG] No helper found for module: compliments. [2024-08-07 19:35:04.199] [LOG] No helper found for module: weather. [2024-08-07 19:35:04.199] [LOG] No helper found for module: weather. [2024-08-07 19:35:04.312] [LOG] Initializing new module helper ... [2024-08-07 19:35:04.313] [LOG] Module helper loaded: newsfeed [2024-08-07 19:35:04.313] [LOG] All module helpers loaded. [2024-08-07 19:35:04.323] [LOG] Starting server on port 8080 ... [2024-08-07 19:35:05.162] [LOG] Server started ... [2024-08-07 19:35:05.169] [LOG] Connecting socket for: updatenotification [2024-08-07 19:35:05.171] [LOG] Starting module helper: updatenotification [2024-08-07 19:35:05.172] [LOG] Connecting socket for: calendar [2024-08-07 19:35:05.173] [LOG] Starting node helper for: calendar [2024-08-07 19:35:05.177] [LOG] Connecting socket for: newsfeed [2024-08-07 19:35:05.178] [LOG] Starting node helper for: newsfeed [2024-08-07 19:35:05.185] [LOG] Sockets connected & modules started ... [2024-08-07 19:35:05.991] [LOG] Launching application. [2584:0807/193506.609801:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) [2584:0807/193506.610805:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) [2584:0807/193506.611736:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) [2584:0807/193506.612283:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) [2584:0807/193506.614158:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) [2584:0807/193506.618491:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) [2584:0807/193506.619375:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) [2584:0807/193506.619876:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) [2584:0807/193506.620528:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) [2584:0807/193506.621077:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) [2584:0807/193506.621925:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) [2584:0807/193506.622438:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) [2584:0807/193506.623212:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) [2584:0807/193506.628878:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) [2584:0807/193506.633337:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) [2584:0807/193506.636628:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) [2584:0807/193506.637327:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) [2584:0807/193506.637741:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) [2584:0807/193506.638355:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) [2584:0807/193506.638787:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) [2584:0807/193506.639314:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) [2584:0807/193506.644240:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) [2584:0807/193506.649055:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) [2584:0807/193506.649354:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) [2584:0807/193506.649929:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) [2584:0807/193506.650343:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) [2584:0807/193506.651018:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) [2584:0807/193506.653100:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) [2024-08-07 19:35:06.950] [INFO] System information: ### SYSTEM: manufacturer: ; model: ; raspberry: undefined; virtual: false ### OS: platform: linux; distro: Debian GNU/Linux; release: 12; arch: arm64; kernel: 6.6.44-v8+ ### VERSIONS: electron: 31.3.1; used node: 20.15.1; installed node: 22.6.0; npm: 10.8.2; pm2: 5.4.1 ### OTHER: timeZone: Europe/Stockholm; ELECTRON_ENABLE_GPU: undefined
I tried so many things, like using different drivers (
vc4-kms-v3d
,vc4-fkms-v3d
),
reinstalling Electron within the MagicMirror directory with npm, addingdisable-gpu
as ElectronSwitch, setting envvars like ELECTRON_DISABLE_GPU=1, ELECTRON_ENABLE_GPU=0 but none of them had any effect.The GUI opens on the
8080
port, only the Raspberry’s display is all black right now.Additional information of my setup:
magicmirror@mm-pi:~ $ uname -a Linux mm-pi 6.6.44-v8+ #1789 SMP PREEMPT Mon Aug 5 15:22:52 BST 2024 aarch64 GNU/Linux magicmirror@mm-pi:~ $ cat /etc/os-release PRETTY_NAME="Debian GNU/Linux 12 (bookworm)" NAME="Debian GNU/Linux" VERSION_ID="12" VERSION="12 (bookworm)" VERSION_CODENAME=bookworm ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/" magicmirror@mm-pi:~ $ npm -v 10.8.2 magicmirror@mm-pi:~ $ node -v v22.6.0
What am I missing?
-
@adamambarus are you starting from scratch?
If so, reflash and boot no update
Then run my install scriptI have seen some problems with startup with node 22. We are only testing on node 20 now.
All the extra stuff you did is output now as part of startup . Right there in your output
Also bookworm runs a different display manager on pi4/5, that could be a problem. I haven’t seen that
-
@sdetweil
Sorry, not sure what you mean. On any fresh install, if I install nodejs with apt, I get v22. Shall I install node v20 instead? -
Can you tell me the best way of install node/npm from scratch? Right now, on any fresh install, if I install nodejs with apt, I get version 22.
-
@adamambarus please use my script, or use nvm or n to install a different version
We need 20.9.0 -
@sdetweil Wow… sorry for my confusion, it’s the first time I see this repo. Looks great, with a really good documentation!! Let me try and come back to you!!
-
@sdetweil Unfortunately it looks like the
raspberry.sh
script couldn’t solve the problemmagicmirror@mm-pi:~/MagicMirror $ DISPLAY=:0 npm start > magicmirror@2.28.0 start > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js [2024-08-08 17:17:39.543] [LOG] Starting MagicMirror: v2.28.0 [2024-08-08 17:17:39.569] [LOG] Loading config ... [2024-08-08 17:17:39.572] [LOG] config template file not exists, no envsubst [2024-08-08 17:17:39.575] [LOG] Loading module helpers ... [2024-08-08 17:17:39.577] [LOG] No helper found for module: alert. [2024-08-08 17:17:39.585] [LOG] Initializing new module helper ... [2024-08-08 17:17:39.586] [LOG] Module helper loaded: updatenotification [2024-08-08 17:17:39.587] [LOG] No helper found for module: clock. [2024-08-08 17:17:39.713] [LOG] Initializing new module helper ... [2024-08-08 17:17:39.714] [LOG] Module helper loaded: calendar [2024-08-08 17:17:39.714] [LOG] No helper found for module: compliments. [2024-08-08 17:17:39.715] [LOG] No helper found for module: weather. [2024-08-08 17:17:39.716] [LOG] No helper found for module: weather. [2024-08-08 17:17:39.809] [LOG] Initializing new module helper ... [2024-08-08 17:17:39.810] [LOG] Module helper loaded: newsfeed [2024-08-08 17:17:39.810] [LOG] All module helpers loaded. [2024-08-08 17:17:39.820] [LOG] Starting server on port 8080 ... [2024-08-08 17:17:41.045] [LOG] Server started ... [2024-08-08 17:17:41.048] [LOG] Connecting socket for: updatenotification [2024-08-08 17:17:41.050] [LOG] Starting module helper: updatenotification [2024-08-08 17:17:41.052] [LOG] Connecting socket for: calendar [2024-08-08 17:17:41.054] [LOG] Starting node helper for: calendar [2024-08-08 17:17:41.055] [LOG] Connecting socket for: newsfeed [2024-08-08 17:17:41.056] [LOG] Starting node helper for: newsfeed [2024-08-08 17:17:41.060] [LOG] Sockets connected & modules started ... [2024-08-08 17:17:41.504] [LOG] Launching application. [32835:0808/171741.915212:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.DBus.StartServiceByName: object_path= /org/freedesktop/DBus: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken. [32969:0808/171742.431782:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) [32969:0808/171742.432152:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) [32969:0808/171742.432429:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) [32969:0808/171742.432560:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) [32969:0808/171742.432735:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) [32969:0808/171742.432844:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) [32969:0808/171742.433025:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) [32969:0808/171742.433217:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) [32969:0808/171742.435099:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) [32969:0808/171742.435268:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) [32969:0808/171742.435444:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) [32969:0808/171742.435554:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) [32969:0808/171742.435707:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) [32969:0808/171742.435810:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) [32969:0808/171742.436901:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) [32969:0808/171742.437029:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) [32969:0808/171742.440788:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) [32969:0808/171742.441832:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) [32969:0808/171742.442262:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) [32969:0808/171742.442481:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) [32969:0808/171742.442762:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) [32969:0808/171742.442958:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) [32969:0808/171742.443252:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) [32969:0808/171742.444056:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) [32969:0808/171742.444452:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) [32969:0808/171742.444721:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) [32969:0808/171742.444949:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) [32969:0808/171742.445194:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) [2024-08-08 17:17:43.230] [INFO] System information: ### SYSTEM: manufacturer: ; model: ; raspberry: undefined; virtual: false ### OS: platform: linux; distro: Debian GNU/Linux; release: 12; arch: arm64; kernel: 6.6.44-v8+ ### VERSIONS: electron: 31.3.1; used node: 20.15.1; installed node: 20.16.0; npm: 10.8.1; pm2: ### OTHER: timeZone: Europe/Stockholm; ELECTRON_ENABLE_GPU: undefined [2024-08-08 17:17:44.291] [LOG] Create new calendarfetcher for url: https://ics.calendarlabs.com/76/mm3137/US_Holidays.ics - Interval: 604800000 [2024-08-08 17:17:44.421] [LOG] Create new newsfetcher for url: https://rss.nytimes.com/services/xml/rss/nyt/HomePage.xml - Interval: 300000 [2024-08-08 17:17:44.426] [INFO] updatenotification: Updater Class Loaded! [2024-08-08 17:17:44.428] [INFO] updatenotification: Checking PM2 using... ^C/home/magicmirror/MagicMirror/node_modules/electron/dist/electron exited with signal SIGINT magicmirror@mm-pi:~/MagicMirror $ node -v v20.16.0 magicmirror@mm-pi:~/MagicMirror $ npm -v 10.8.1
I see however that has its own ways install node and npm. Do you have any guess what configuration I could change on my OS?
-
@adamambarus I don’t see a problem there
The gbm_wrapper is a noise error
-
@adamambarus you could use raspi-config to set the window manager back to x11, although I haven’t seen any failures on Wayland
-
@sdetweil Nothing seems to work… What about GPU memory? Some advise to increase it, however, others say that it’s not relevant from Raspi 4 (that is why it’s taken out from raspi-config)