You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: add Wayland troubleshooting guide for Linux users (#2821)
Add comprehensive troubleshooting section for Wayland display server issues on Linux. This addresses common crashes and initialization failures experienced by users on Wayland compositors (Hyprland, Sway, KDE Plasma, GNOME).
The guide provides two workarounds to force X11/XWayland backend:
- Environment variable method (ELECTRON_OZONE_PLATFORM_HINT)
- Command line flag method (--ozone-platform=x11)
References:
- Fixes#2759
- Related to #2107
Copy file name to clipboardExpand all lines: docs/advanced-usage.md
+50Lines changed: 50 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,3 +66,53 @@ If you later decide you would like to remove a 3rd party theme you installed, it
66
66
1. If Arduino IDE is running, select **File > Quit** from the Arduino IDE menus to exit all windows.
67
67
1. Delete the theme's `.vsix` file from [the location you installed it to](#installation). <br />
68
68
⚠ Please be careful when deleting things from your computer. When in doubt, back up!
69
+
70
+
## Troubleshooting
71
+
72
+
### Linux: Wayland Display Server Issues
73
+
74
+
Arduino IDE is built on [Electron](https://www.electronjs.org/), which attempts to use native Wayland rendering on Linux systems with Wayland display servers. However, some Wayland compositors (particularly Hyprland, Sway, and some configurations of KDE Plasma and GNOME) may experience crashes or initialization failures with errors such as:
75
+
76
+
```
77
+
Failed to connect to Wayland display
78
+
Failed to initialize Wayland platform
79
+
The platform failed to initialize. Exiting.
80
+
```
81
+
82
+
Or segmentation faults immediately after launching.
83
+
84
+
#### Workaround: Force X11/XWayland Backend
85
+
86
+
If you encounter Wayland-related crashes, you can force Arduino IDE to use the X11/XWayland backend instead of native Wayland rendering:
87
+
88
+
**Method 1: Environment Variable (Recommended)**
89
+
90
+
Set the `ELECTRON_OZONE_PLATFORM_HINT` environment variable before launching Arduino IDE:
91
+
92
+
```bash
93
+
export ELECTRON_OZONE_PLATFORM_HINT=x11
94
+
arduino-ide
95
+
```
96
+
97
+
To make this permanent, add the export line to your shell configuration file (`~/.bashrc`, `~/.zshrc`, or equivalent).
98
+
99
+
**Method 2: Command Line Flag**
100
+
101
+
Launch Arduino IDE with the `--ozone-platform=x11` flag:
102
+
103
+
```bash
104
+
arduino-ide --ozone-platform=x11
105
+
```
106
+
107
+
You can create a wrapper script or shell alias for convenience:
108
+
109
+
```bash
110
+
# Add to ~/.bashrc or ~/.zshrc
111
+
alias arduino-ide='arduino-ide --ozone-platform=x11'
112
+
```
113
+
114
+
#### Related Issues
115
+
116
+
For more information and updates on native Wayland support, see:
117
+
-[Issue #2759: Segmentation fault when launching Arduino IDE](https://github.com/arduino/arduino-ide/issues/2759)
118
+
-[Issue #2107: IDE crashes with segmentation fault when run under native Wayland](https://github.com/arduino/arduino-ide/issues/2107)
0 commit comments