From 2c77970ace13e021e1685837920bc437a45f37b4 Mon Sep 17 00:00:00 2001 From: Sebastian Fleer Date: Fri, 30 Sep 2022 14:31:00 +0200 Subject: [PATCH 1/2] Native Wayland support --- arduino-ide.sh | 9 ++++++--- cc.arduino.IDE2.json | 3 ++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/arduino-ide.sh b/arduino-ide.sh index 6193758..9be3f7b 100644 --- a/arduino-ide.sh +++ b/arduino-ide.sh @@ -2,9 +2,12 @@ FLAGS='' -if [[ $XDG_SESSION_TYPE == "wayland" ]] && [ -c /dev/nvidia0 ] -then - FLAGS="$FLAGS --disable-gpu-sandbox" +if [[ $XDG_SESSION_TYPE == "wayland" ]]; then + if [ -c /dev/nvidia0 ]; then + FLAGS="$FLAGS --disable-gpu-sandbox" + elif [ -S "$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY" ]; then + FLAGS="$FLAGS --enable-features=UseOzonePlatform --ozone-platform=wayland" + fi fi # I cracked zypak's secrets diff --git a/cc.arduino.IDE2.json b/cc.arduino.IDE2.json index 22441f6..e6814b5 100644 --- a/cc.arduino.IDE2.json +++ b/cc.arduino.IDE2.json @@ -8,7 +8,8 @@ "command": "arduino-ide", "separate-locales": false, "finish-args": [ - "--socket=x11", + "--socket=wayland", + "--socket=fallback-x11", "--socket=pulseaudio", "--share=ipc", "--share=network", From 141201bb8f78e259bcde5e0ace33d99e431b0b0a Mon Sep 17 00:00:00 2001 From: Joshua Glass <28513051+joshuag1000@users.noreply.github.com> Date: Fri, 30 Sep 2022 15:18:58 +0100 Subject: [PATCH 2/2] Fix for nvidia on wayland Needs further testoing --- arduino-ide.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arduino-ide.sh b/arduino-ide.sh index 9be3f7b..a71026c 100644 --- a/arduino-ide.sh +++ b/arduino-ide.sh @@ -5,7 +5,8 @@ FLAGS='' if [[ $XDG_SESSION_TYPE == "wayland" ]]; then if [ -c /dev/nvidia0 ]; then FLAGS="$FLAGS --disable-gpu-sandbox" - elif [ -S "$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY" ]; then + fi + if [ -S "$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY" ]; then FLAGS="$FLAGS --enable-features=UseOzonePlatform --ozone-platform=wayland" fi fi