docs: add Wayland troubleshooting guide for Linux users #2821
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a comprehensive troubleshooting section to the Advanced Usage documentation to help Linux users experiencing Wayland-related crashes and initialization failures.
Problem
Arduino IDE users on Linux systems running Wayland display servers (particularly Hyprland, Sway, and some configurations of KDE Plasma and GNOME) frequently encounter crashes with errors such as:
Failed to connect to Wayland displayFailed to initialize Wayland platformThese issues are caused by Electron's native Wayland rendering backend not being fully compatible with all Wayland compositors.
Solution
This documentation addition provides users with two clear workarounds to force Arduino IDE to use the X11/XWayland backend instead:
ELECTRON_OZONE_PLATFORM_HINT=x11--ozone-platform=x11Both methods are explained with code examples and instructions for making the fix permanent.
Testing
I have personally tested this workaround on Arch Linux with Hyprland compositor, where Arduino IDE 2.3.6 was previously crashing with segmentation faults. After applying the
--ozone-platform=x11flag, the IDE launches successfully using XWayland.Related Issues
Checklist
Additional Notes
This is a documentation-only change that provides immediate help to affected users while the Arduino team works on proper native Wayland support. The workaround is non-invasive and simply forces Electron to use the X11 compatibility layer that is already present on Wayland systems.