boot time startup on Ubuntu 24.04 with Wayland, fails
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 43.3k
- Forks
- 2.7k
- PR merge metrics
- No merged PRs in 30d
Description
What's going wrong?
when our app MagicMirror (uses Electron browser) starts at boot time, the electron runtime is confused,
looking for X11, but can't find display, etc..
but if we start from command line, it works.
How could we reproduce this issue?
install Ubuntu 24.04 desktop
install the MM app using my script
bash -c "$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/raspberry.sh)"
say yes to use pm2
(you can run the fixuppm2 script if you forget, or want to add it later )
bash -c "$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/fixuppm2.sh)"
sudo reboot,
app should start (works ok on raspi OS 64 bit, on pi4 or 5 with wayland), but fails with error below (tested on AMD and ARM (macos))
forcing wayland doesn't help
setting wayland_display doesn't help..
see https://discourse.ubuntu.com/t/environment-variables-for-wayland-hackers/12750
the app never recovers altho wayland came up ok.
Supporting information
app reports
[2507:0513/142451.624701:ERROR:ozone_platform_x11.cc(244)] Missing X server or $DISPLAY
[2507:0513/142451.625045:ERROR:env.cc(257)] The platform failed to initialize. Exiting.
Authorization required, but no authorization protocol specified
open terminal window
pm2 stop all
then pm2 start 0
and app comes up ok.
Run the following commands
$ pm2 report
[somefile.txt](https://github.com/Unitech/pm2/files/15299199/somefile.txt)
the pm2 error log
pm2error.log
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the attached pm2 report and pm2error.log, then compare the boot-time launch with pm2 stop all followed by pm2 start 0. Inspect PM2 startup environment handling for Ubuntu 24.04 and Wayland, using the referenced raspberry.sh and fixuppm2.sh scripts as reproduction entry points. Done means the Electron app starts successfully at boot on the reported Ubuntu environments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- electron, javascript, node.js, ubuntu
- Domain
- desktop, devops, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100