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
4.8 KiB
Advanced usage
Advanced settings
The Arduino IDE's primary settings are accessible via the File > Preferences menu item. These provide all the configuration capability required by the average user to develop sketches.
Arduino IDE has some additional settings which may be of interest to advanced users who want to do things such as fine tune the behavior of the application or increase log output while investigating a problem.
These advanced settings can be accessed by the following procedure:
- Press the Ctrl+Shift+P keyboard shortcut (Command+Shift+P for macOS users) to open the "Command Palette".
- Select the "Preferences: Open Settings (UI)" command from the menu.
This will open a "Preferences" view in the IDE. Once you are finished adjusting settings, it can be closed by clicking the X icon on the "Preferences" tab.
3rd party themes
Arduino IDE is built on the Eclipse Theia IDE framework, which allows it to use VS Code themes.
❗ Arduino does not maintain or provide support for individual 3rd party themes. If you experience problems with a theme, report it to the theme's maintainer.
Obtaining themes
A large selection of free VS Code themes are available from the Visual Studio Marketplace website:
- Find a theme you want to install:
https://marketplace.visualstudio.com/search?target=VSCode&category=Themes - Click on the theme to open its extension page.
- Click the "Download Extension" link on the right side of the extension page.
- Wait for the download to finish.
Installation
- If Arduino IDE is running, select File > Quit from the Arduino IDE menus to exit all windows.
- Create a folder named
pluginsunder Arduino IDE's configuration folder:- Windows:
(where
C:\Users\<username>\.arduinoIDE\<username>is your Windows username) - Linux:
❗ The
~/.arduinoIDE/.arduinoIDEfolder is hidden by default in the file manager and terminal. - macOS:
❗ The
~/.arduinoIDE/.arduinoIDEfolder is hidden by default. You can make it visible by pressing the Command+Shift+. keyboard shortcut.
- Windows:
- Copy the downloaded theme file to the
pluginsfolder you created. - Start Arduino IDE.
- Select File > Preferences from the Arduino IDE menus.
The "Preferences" dialog will open. - Select the name of the new theme from the "Theme" menu in the "Preferences" dialog.
- Click the "OK" button.
Uninstall
If you later decide you would like to remove a 3rd party theme you installed, it can be done by following these instructions:
- If Arduino IDE is running, select File > Quit from the Arduino IDE menus to exit all windows.
- Delete the theme's
.vsixfile from the location you installed it to.
⚠ Please be careful when deleting things from your computer. When in doubt, back up!
Troubleshooting
Linux: Wayland Display Server Issues
Arduino IDE is built on Electron, 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:
Failed to connect to Wayland display
Failed to initialize Wayland platform
The platform failed to initialize. Exiting.
Or segmentation faults immediately after launching.
Workaround: Force X11/XWayland Backend
If you encounter Wayland-related crashes, you can force Arduino IDE to use the X11/XWayland backend instead of native Wayland rendering:
Method 1: Environment Variable (Recommended)
Set the ELECTRON_OZONE_PLATFORM_HINT environment variable before launching Arduino IDE:
export ELECTRON_OZONE_PLATFORM_HINT=x11
arduino-ide
To make this permanent, add the export line to your shell configuration file (~/.bashrc, ~/.zshrc, or equivalent).
Method 2: Command Line Flag
Launch Arduino IDE with the --ozone-platform=x11 flag:
arduino-ide --ozone-platform=x11
You can create a wrapper script or shell alias for convenience:
# Add to ~/.bashrc or ~/.zshrc
alias arduino-ide='arduino-ide --ozone-platform=x11'
Related Issues
For more information and updates on native Wayland support, see: