From c2eb87d0477f3056fc66ebbdeb9c1e96c85ba717 Mon Sep 17 00:00:00 2001 From: Root <175176948+RKNF404@users.noreply.github.com> Date: Thu, 3 Apr 2025 12:07:43 -0400 Subject: [PATCH 01/19] chore: rework Ozone platform in conf --- build/trivalent.conf | 45 ++++++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/build/trivalent.conf b/build/trivalent.conf index 1d448a4e..cbc4cb34 100644 --- a/build/trivalent.conf +++ b/build/trivalent.conf @@ -4,42 +4,51 @@ ARCH="$(arch)" CHROMIUM_FLAGS="" FEATURES="" -# NATIVE_WAYLAND=[on|off] -case "$XDG_SESSION_TYPE" in - wayland) - NATIVE_WAYLAND="on" - ;; - x11) - NATIVE_WAYLAND="off" - ;; +# OZONE_PLATFORM_WAYLAND=[true|false] +OZONE_PLATFORM="${OZONE_PLATFORM:-$XDG_SESSION_TYPE}" +case "$OZONE_PLATFORM" in + wayland) + OZONE_PLATFORM_WAYLAND="true" + ;; + x11) + OZONE_PLATFORM_WAYLAND="false" + ;; + *) + OZONE_PLATFORM_WAYLAND="true" + ;; esac -# ENABLE_VULKAN=[on|off] -ENABLE_VULKAN="off" +# ENABLE_VULKAN=[true|false] +ENABLE_VULKAN="false" # Other architectures are not tested for and should not be included yet if [ "$ARCH" == "x86_64" ] ; then - if [ "$NATIVE_WAYLAND" == "off" ] ; then + + # Nvidia has issues on Wayland + if ! command -v nvidia-smi || [ -z "$DISPLAY" ]; then + CHROMIUM_FLAGS+=" --ozone-platform-hint=auto" + fi + + if [ "$OZONE_PLATFORM_WAYLAND" == "false" ]; then CHROMIUM_FLAGS+=" --enable-native-gpu-memory-buffers" CHROMIUM_FLAGS+=" --enable-gpu-memory-buffer-video-frames" CHROMIUM_FLAGS+=" --enable-zero-copy" CHROMIUM_FLAGS+=" --ignore-gpu-blocklist --disable-gpu-driver-bug-workaround" CHROMIUM_FLAGS+=" --enable-gpu-rasterization" - + # Enable Vulkan # (Vulkan is not supported on Wayland, it is also experimental on Linux) - ENABLE_VULKAN="on" + ENABLE_VULKAN="true" fi - if [ "$ENABLE_VULKAN" == "on" ] ; then + if [ "$ENABLE_VULKAN" == "true" ]; then CHROMIUM_FLAGS+=" --use-angle=vulkan --use-vulkan" FEATURES+=",Vulkan,DefaultANGLEVulkan,VulkanFromANGLE,VaapiIgnoreDriverChecks" fi +fi - # Nvidia has issues on Wayland - if ! command -v nvidia-smi || [ -z "$DISPLAY" ]; then - CHROMIUM_FLAGS+=" --ozone-platform-hint=auto" - fi +if [ "$OZONE_PLATFORM_WAYLAND" == "false" ]; then + CHROMIUM_FLAGS+=" --ozone-platform-hint=x11" fi # Disable crash reporting, no simple way to patch it in From 73bd66b81ef58c36afb660950f5235912099ff6d Mon Sep 17 00:00:00 2001 From: Root <175176948+RKNF404@users.noreply.github.com> Date: Thu, 3 Apr 2025 12:41:05 -0400 Subject: [PATCH 02/19] chore: remove unneeded x11 flag --- build/trivalent.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/trivalent.conf b/build/trivalent.conf index cbc4cb34..f25cc885 100644 --- a/build/trivalent.conf +++ b/build/trivalent.conf @@ -33,8 +33,8 @@ if [ "$ARCH" == "x86_64" ] ; then CHROMIUM_FLAGS+=" --enable-native-gpu-memory-buffers" CHROMIUM_FLAGS+=" --enable-gpu-memory-buffer-video-frames" CHROMIUM_FLAGS+=" --enable-zero-copy" - CHROMIUM_FLAGS+=" --ignore-gpu-blocklist --disable-gpu-driver-bug-workaround" - CHROMIUM_FLAGS+=" --enable-gpu-rasterization" + CHROMIUM_FLAGS+=" --ignore-gpu-blocklist + CHROMIUM_FLAGS+=" --disable-gpu-driver-bug-workaround" # Enable Vulkan # (Vulkan is not supported on Wayland, it is also experimental on Linux) From ae8c815d3e6f170d17b9fa2abe34c09a5453e87d Mon Sep 17 00:00:00 2001 From: Root <175176948+RKNF404@users.noreply.github.com> Date: Thu, 3 Apr 2025 12:41:24 -0400 Subject: [PATCH 03/19] fix --- build/trivalent.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/trivalent.conf b/build/trivalent.conf index f25cc885..50edd41e 100644 --- a/build/trivalent.conf +++ b/build/trivalent.conf @@ -33,7 +33,7 @@ if [ "$ARCH" == "x86_64" ] ; then CHROMIUM_FLAGS+=" --enable-native-gpu-memory-buffers" CHROMIUM_FLAGS+=" --enable-gpu-memory-buffer-video-frames" CHROMIUM_FLAGS+=" --enable-zero-copy" - CHROMIUM_FLAGS+=" --ignore-gpu-blocklist + CHROMIUM_FLAGS+=" --ignore-gpu-blocklist" CHROMIUM_FLAGS+=" --disable-gpu-driver-bug-workaround" # Enable Vulkan From c5bb94714b9c2a132316738b6e63afc01e52e771 Mon Sep 17 00:00:00 2001 From: Root <175176948+RKNF404@users.noreply.github.com> Date: Thu, 3 Apr 2025 12:43:08 -0400 Subject: [PATCH 04/19] chore: rename var --- build/trivalent.conf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/build/trivalent.conf b/build/trivalent.conf index 50edd41e..864809b2 100644 --- a/build/trivalent.conf +++ b/build/trivalent.conf @@ -4,17 +4,17 @@ ARCH="$(arch)" CHROMIUM_FLAGS="" FEATURES="" -# OZONE_PLATFORM_WAYLAND=[true|false] +# USE_WAYLAND=[true|false] OZONE_PLATFORM="${OZONE_PLATFORM:-$XDG_SESSION_TYPE}" case "$OZONE_PLATFORM" in wayland) - OZONE_PLATFORM_WAYLAND="true" + USE_WAYLAND="true" ;; x11) - OZONE_PLATFORM_WAYLAND="false" + USE_WAYLAND="false" ;; *) - OZONE_PLATFORM_WAYLAND="true" + USE_WAYLAND="true" ;; esac @@ -29,7 +29,7 @@ if [ "$ARCH" == "x86_64" ] ; then CHROMIUM_FLAGS+=" --ozone-platform-hint=auto" fi - if [ "$OZONE_PLATFORM_WAYLAND" == "false" ]; then + if [ "$USE_WAYLAND" == "false" ]; then CHROMIUM_FLAGS+=" --enable-native-gpu-memory-buffers" CHROMIUM_FLAGS+=" --enable-gpu-memory-buffer-video-frames" CHROMIUM_FLAGS+=" --enable-zero-copy" @@ -47,7 +47,7 @@ if [ "$ARCH" == "x86_64" ] ; then fi fi -if [ "$OZONE_PLATFORM_WAYLAND" == "false" ]; then +if [ "$USE_WAYLAND" == "false" ]; then CHROMIUM_FLAGS+=" --ozone-platform-hint=x11" fi From 1f5796ee0bad94fc9c8d6c08738e64b02a56ebf3 Mon Sep 17 00:00:00 2001 From: Root <175176948+RKNF404@users.noreply.github.com> Date: Fri, 4 Apr 2025 01:29:54 -0400 Subject: [PATCH 05/19] chore: add ozone env var to wrapper --- build/trivalent.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build/trivalent.sh b/build/trivalent.sh index c6d9d123..992554e1 100755 --- a/build/trivalent.sh +++ b/build/trivalent.sh @@ -1,5 +1,8 @@ #!/bin/bash +# Determine Ozone platform automatically or through a user supplied env variable +export OZONE_PLATFORM="${OZONE_PLATFORM:-$XDG_SESSION_TYPE}" + # Sanitize risky env variables export PATH="/usr/bin" export LD_PRELOAD="" From 3da8d1b21c8eeedc898b1e2109d0cf078a7e015d Mon Sep 17 00:00:00 2001 From: Root <175176948+RKNF404@users.noreply.github.com> Date: Fri, 4 Apr 2025 01:30:31 -0400 Subject: [PATCH 06/19] chore: remove var --- build/trivalent.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/build/trivalent.conf b/build/trivalent.conf index 864809b2..c8e3a446 100644 --- a/build/trivalent.conf +++ b/build/trivalent.conf @@ -5,7 +5,6 @@ CHROMIUM_FLAGS="" FEATURES="" # USE_WAYLAND=[true|false] -OZONE_PLATFORM="${OZONE_PLATFORM:-$XDG_SESSION_TYPE}" case "$OZONE_PLATFORM" in wayland) USE_WAYLAND="true" From 9d06686edd14d0ab79351204aa120c8c39756a8d Mon Sep 17 00:00:00 2001 From: Root <175176948+RKNF404@users.noreply.github.com> Date: Fri, 4 Apr 2025 09:34:15 -0400 Subject: [PATCH 07/19] chore: add check to make sure the session is wayland or x11 --- build/trivalent.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build/trivalent.sh b/build/trivalent.sh index 992554e1..4144545d 100755 --- a/build/trivalent.sh +++ b/build/trivalent.sh @@ -2,6 +2,9 @@ # Determine Ozone platform automatically or through a user supplied env variable export OZONE_PLATFORM="${OZONE_PLATFORM:-$XDG_SESSION_TYPE}" +if [ "$OZONE_PLATFORM" != "wayland" ] && [ "$OZONE_PLATFORM" != "x11" ]; then + OZONE_PLATFORM="$XDG_SESSION_TYPE" +fi # Sanitize risky env variables export PATH="/usr/bin" From d6f8c4a3f657c4fe470c2c61048f46be725663b9 Mon Sep 17 00:00:00 2001 From: Root <175176948+RKNF404@users.noreply.github.com> Date: Fri, 4 Apr 2025 09:40:07 -0400 Subject: [PATCH 08/19] chore: shift around variables --- build/trivalent.conf | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/build/trivalent.conf b/build/trivalent.conf index c8e3a446..a261f81f 100644 --- a/build/trivalent.conf +++ b/build/trivalent.conf @@ -4,19 +4,6 @@ ARCH="$(arch)" CHROMIUM_FLAGS="" FEATURES="" -# USE_WAYLAND=[true|false] -case "$OZONE_PLATFORM" in - wayland) - USE_WAYLAND="true" - ;; - x11) - USE_WAYLAND="false" - ;; - *) - USE_WAYLAND="true" - ;; -esac - # ENABLE_VULKAN=[true|false] ENABLE_VULKAN="false" @@ -24,11 +11,11 @@ ENABLE_VULKAN="false" if [ "$ARCH" == "x86_64" ] ; then # Nvidia has issues on Wayland - if ! command -v nvidia-smi || [ -z "$DISPLAY" ]; then - CHROMIUM_FLAGS+=" --ozone-platform-hint=auto" + if [ command -v nvidia-smi ] && [ -z "$DISPLAY" ]; then + OZONE_PLATFORM="x11" fi - if [ "$USE_WAYLAND" == "false" ]; then + if [ "$OZONE_PLATFORM" == "x11" ]; then CHROMIUM_FLAGS+=" --enable-native-gpu-memory-buffers" CHROMIUM_FLAGS+=" --enable-gpu-memory-buffer-video-frames" CHROMIUM_FLAGS+=" --enable-zero-copy" @@ -36,7 +23,7 @@ if [ "$ARCH" == "x86_64" ] ; then CHROMIUM_FLAGS+=" --disable-gpu-driver-bug-workaround" # Enable Vulkan - # (Vulkan is not supported on Wayland, it is also experimental on Linux) + # (Vulkan is not supported on Wayland, it is also experimental) ENABLE_VULKAN="true" fi @@ -46,8 +33,8 @@ if [ "$ARCH" == "x86_64" ] ; then fi fi -if [ "$USE_WAYLAND" == "false" ]; then - CHROMIUM_FLAGS+=" --ozone-platform-hint=x11" +if [ "$OZONE_PLATFORM" == "x11" ]; then + CHROMIUM_FLAGS+=" --ozone-platform-hint=$OZONE_PLATFORM" fi # Disable crash reporting, no simple way to patch it in From 5ee821736eea1a2c3d256e2752ca186827f840f1 Mon Sep 17 00:00:00 2001 From: Root <175176948+RKNF404@users.noreply.github.com> Date: Fri, 4 Apr 2025 10:13:00 -0400 Subject: [PATCH 09/19] fix --- build/trivalent.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/trivalent.conf b/build/trivalent.conf index a261f81f..837de459 100644 --- a/build/trivalent.conf +++ b/build/trivalent.conf @@ -11,7 +11,7 @@ ENABLE_VULKAN="false" if [ "$ARCH" == "x86_64" ] ; then # Nvidia has issues on Wayland - if [ command -v nvidia-smi ] && [ -z "$DISPLAY" ]; then + if command -v nvidia-smi && [ -z "$DISPLAY" ]; then OZONE_PLATFORM="x11" fi From e49b0306a4481cd3df21dd5151017051a013d433 Mon Sep 17 00:00:00 2001 From: Root <175176948+RKNF404@users.noreply.github.com> Date: Fri, 4 Apr 2025 22:16:37 -0400 Subject: [PATCH 10/19] feat: unshare IPC with bwrap when not using x11 --- build/trivalent.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build/trivalent.sh b/build/trivalent.sh index eb0c7878..40be3ae5 100755 --- a/build/trivalent.sh +++ b/build/trivalent.sh @@ -92,5 +92,8 @@ BWRAP_ARGS="--dev-bind / /" if [ -f "/etc/ld.so.preload" ]; then BWRAP_ARGS+=" --ro-bind /dev/null /etc/ld.so.preload" fi +if [ "$OZONE_PLATFORM" != "x11" ]; then + BWRAP_ARGS+=" --unshare-ipc" # prevent IPC where it isn't needed (x11 performance depends on IPC) +fi exec /usr/bin/bwrap $BWRAP_ARGS "$HERE/$CHROMIUM_NAME" $CHROMIUM_FLAGS "$@" From a861740f350645d4f3ed3206e236f6f660d73482 Mon Sep 17 00:00:00 2001 From: Root <175176948+RKNF404@users.noreply.github.com> Date: Sun, 6 Apr 2025 22:01:45 -0400 Subject: [PATCH 11/19] chore: axe OZONE_PLATFORM from wrapper moving to conf --- build/trivalent.sh | 6 ------ 1 file changed, 6 deletions(-) diff --git a/build/trivalent.sh b/build/trivalent.sh index 40be3ae5..5a5401f5 100755 --- a/build/trivalent.sh +++ b/build/trivalent.sh @@ -1,11 +1,5 @@ #!/bin/bash -# Determine Ozone platform automatically or through a user supplied env variable -export OZONE_PLATFORM="${OZONE_PLATFORM:-$XDG_SESSION_TYPE}" -if [ "$OZONE_PLATFORM" != "wayland" ] && [ "$OZONE_PLATFORM" != "x11" ]; then - OZONE_PLATFORM="$XDG_SESSION_TYPE" -fi - # Sanitize risky env variables export PATH="/usr/bin:/bin" export LD_PRELOAD="" From bd7389f6dc0ed4fb97c29bb70f64028b3d7112a1 Mon Sep 17 00:00:00 2001 From: Root <175176948+RKNF404@users.noreply.github.com> Date: Sun, 6 Apr 2025 22:02:23 -0400 Subject: [PATCH 12/19] chore: add OZONE_PLATFORM detection logic --- build/trivalent.conf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build/trivalent.conf b/build/trivalent.conf index 837de459..784b9c65 100644 --- a/build/trivalent.conf +++ b/build/trivalent.conf @@ -4,6 +4,12 @@ ARCH="$(arch)" CHROMIUM_FLAGS="" FEATURES="" +# Determine Ozone platform automatically or through a user supplied env variable +OZONE_PLATFORM="${OZONE_PLATFORM:-$XDG_SESSION_TYPE}" +if [ "$OZONE_PLATFORM" != "wayland" ] && [ "$OZONE_PLATFORM" != "x11" ]; then + OZONE_PLATFORM="$XDG_SESSION_TYPE" +fi + # ENABLE_VULKAN=[true|false] ENABLE_VULKAN="false" From c7e449dd07a746bd68c183600cab423a80ec95ee Mon Sep 17 00:00:00 2001 From: Root <175176948+RKNF404@users.noreply.github.com> Date: Mon, 7 Apr 2025 13:15:12 -0400 Subject: [PATCH 13/19] chore: add error message to OZONE_PLATFORM logic --- build/trivalent.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/build/trivalent.conf b/build/trivalent.conf index 784b9c65..a9b89c95 100644 --- a/build/trivalent.conf +++ b/build/trivalent.conf @@ -7,6 +7,7 @@ FEATURES="" # Determine Ozone platform automatically or through a user supplied env variable OZONE_PLATFORM="${OZONE_PLATFORM:-$XDG_SESSION_TYPE}" if [ "$OZONE_PLATFORM" != "wayland" ] && [ "$OZONE_PLATFORM" != "x11" ]; then + echo "ERROR: Ozone platform '$OZONE_PLATFORM' is unknown or unsupported, defaulting to '$XDG_SESSION_TYPE'" OZONE_PLATFORM="$XDG_SESSION_TYPE" fi From a3e8211c5aa0b4d645ed12750b4c7e54382efca5 Mon Sep 17 00:00:00 2001 From: Root <175176948+RKNF404@users.noreply.github.com> Date: Mon, 7 Apr 2025 13:29:39 -0400 Subject: [PATCH 14/19] fix: x11 when $DISPLAY is present --- build/trivalent.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/trivalent.conf b/build/trivalent.conf index a9b89c95..a467070d 100644 --- a/build/trivalent.conf +++ b/build/trivalent.conf @@ -18,7 +18,7 @@ ENABLE_VULKAN="false" if [ "$ARCH" == "x86_64" ] ; then # Nvidia has issues on Wayland - if command -v nvidia-smi && [ -z "$DISPLAY" ]; then + if command -v nvidia-smi && [ -n "$DISPLAY" ]; then OZONE_PLATFORM="x11" fi From 09649bc380ffdcdb9345588d756d408b02593033 Mon Sep 17 00:00:00 2001 From: Root <175176948+RKNF404@users.noreply.github.com> Date: Mon, 7 Apr 2025 13:55:46 -0400 Subject: [PATCH 15/19] chore: remove Nvidia check --- build/trivalent.conf | 6 ------ 1 file changed, 6 deletions(-) diff --git a/build/trivalent.conf b/build/trivalent.conf index a467070d..68f7b6fe 100644 --- a/build/trivalent.conf +++ b/build/trivalent.conf @@ -16,12 +16,6 @@ ENABLE_VULKAN="false" # Other architectures are not tested for and should not be included yet if [ "$ARCH" == "x86_64" ] ; then - - # Nvidia has issues on Wayland - if command -v nvidia-smi && [ -n "$DISPLAY" ]; then - OZONE_PLATFORM="x11" - fi - if [ "$OZONE_PLATFORM" == "x11" ]; then CHROMIUM_FLAGS+=" --enable-native-gpu-memory-buffers" CHROMIUM_FLAGS+=" --enable-gpu-memory-buffer-video-frames" From a472f29e53a4586369941260753b857eb25fd025 Mon Sep 17 00:00:00 2001 From: Root <175176948+RKNF404@users.noreply.github.com> Date: Mon, 7 Apr 2025 14:29:38 -0400 Subject: [PATCH 16/19] chore: update variable to boolean --- build/trivalent.conf | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/build/trivalent.conf b/build/trivalent.conf index 68f7b6fe..cf20c79e 100644 --- a/build/trivalent.conf +++ b/build/trivalent.conf @@ -4,11 +4,26 @@ ARCH="$(arch)" CHROMIUM_FLAGS="" FEATURES="" -# Determine Ozone platform automatically or through a user supplied env variable -OZONE_PLATFORM="${OZONE_PLATFORM:-$XDG_SESSION_TYPE}" -if [ "$OZONE_PLATFORM" != "wayland" ] && [ "$OZONE_PLATFORM" != "x11" ]; then - echo "ERROR: Ozone platform '$OZONE_PLATFORM' is unknown or unsupported, defaulting to '$XDG_SESSION_TYPE'" - OZONE_PLATFORM="$XDG_SESSION_TYPE" +# USE_WAYLAND=[true|false] +USE_WAYLAND="${USE_WAYLAND}" +if [ "$USE_WAYLAND" == "false" ]; then + CHROMIUM_FLAGS+=" --ozone-platform-hint=x11" +elif [ "$USE_WAYLAND" == "true" ] && [ "$XDG_SESSION_TYPE" == "wayland" ]; then + CHROMIUM_FLAGS+=" --ozone-platform-hint=$XDG_SESSION_TYPE" +else + if [ "$USE_WAYLAND" == "true" ]; then + echo "Wayland is not supported on X11 sessions" + else + echo "Value provided by USE_WAYLAND empty or invalid, defaulting to '$XDG_SESSION_TYPE'" + fi + case "$XDG_SESSION_TYPE" in + wayland) + USE_WAYLAND="true" + ;; + x11) + USE_WAYLAND="false" + ;; + esac fi # ENABLE_VULKAN=[true|false] @@ -16,7 +31,7 @@ ENABLE_VULKAN="false" # Other architectures are not tested for and should not be included yet if [ "$ARCH" == "x86_64" ] ; then - if [ "$OZONE_PLATFORM" == "x11" ]; then + if [ "$USE_WAYLAND" == "false" ]; then CHROMIUM_FLAGS+=" --enable-native-gpu-memory-buffers" CHROMIUM_FLAGS+=" --enable-gpu-memory-buffer-video-frames" CHROMIUM_FLAGS+=" --enable-zero-copy" @@ -30,14 +45,10 @@ if [ "$ARCH" == "x86_64" ] ; then if [ "$ENABLE_VULKAN" == "true" ]; then CHROMIUM_FLAGS+=" --use-angle=vulkan --use-vulkan" - FEATURES+=",Vulkan,DefaultANGLEVulkan,VulkanFromANGLE,VaapiIgnoreDriverChecks" + FEATURES+="Vulkan,DefaultANGLEVulkan,VulkanFromANGLE,VaapiIgnoreDriverChecks" fi fi -if [ "$OZONE_PLATFORM" == "x11" ]; then - CHROMIUM_FLAGS+=" --ozone-platform-hint=$OZONE_PLATFORM" -fi - # Disable crash reporting, no simple way to patch it in CHROMIUM_FLAGS+=" --disable-breakpad" From 4445616a3b562af7d3397c80bee313bc7a4198ac Mon Sep 17 00:00:00 2001 From: Root <175176948+RKNF404@users.noreply.github.com> Date: Mon, 7 Apr 2025 14:30:21 -0400 Subject: [PATCH 17/19] chore: update bool --- build/trivalent.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/trivalent.sh b/build/trivalent.sh index 5a5401f5..eaa1a6b2 100755 --- a/build/trivalent.sh +++ b/build/trivalent.sh @@ -86,7 +86,7 @@ BWRAP_ARGS="--dev-bind / /" if [ -f "/etc/ld.so.preload" ]; then BWRAP_ARGS+=" --ro-bind /dev/null /etc/ld.so.preload" fi -if [ "$OZONE_PLATFORM" != "x11" ]; then +if [ "$USE_WAYLAND" == "true" ]; then BWRAP_ARGS+=" --unshare-ipc" # prevent IPC where it isn't needed (x11 performance depends on IPC) fi From 058751ad0cfe058c068d3a64aa51c585ac8c0412 Mon Sep 17 00:00:00 2001 From: Root <175176948+RKNF404@users.noreply.github.com> Date: Mon, 7 Apr 2025 14:35:51 -0400 Subject: [PATCH 18/19] chore: use wayland directly, not the var --- build/trivalent.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/trivalent.conf b/build/trivalent.conf index cf20c79e..b9e3507a 100644 --- a/build/trivalent.conf +++ b/build/trivalent.conf @@ -9,7 +9,7 @@ USE_WAYLAND="${USE_WAYLAND}" if [ "$USE_WAYLAND" == "false" ]; then CHROMIUM_FLAGS+=" --ozone-platform-hint=x11" elif [ "$USE_WAYLAND" == "true" ] && [ "$XDG_SESSION_TYPE" == "wayland" ]; then - CHROMIUM_FLAGS+=" --ozone-platform-hint=$XDG_SESSION_TYPE" + CHROMIUM_FLAGS+=" --ozone-platform-hint=wayland" else if [ "$USE_WAYLAND" == "true" ]; then echo "Wayland is not supported on X11 sessions" From b11517b3787ab8ace359ee8f08b926c6f57498fb Mon Sep 17 00:00:00 2001 From: Root <175176948+RKNF404@users.noreply.github.com> Date: Mon, 7 Apr 2025 14:36:28 -0400 Subject: [PATCH 19/19] chore: quote USE_WAYLAND --- build/trivalent.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/trivalent.conf b/build/trivalent.conf index b9e3507a..26365cec 100644 --- a/build/trivalent.conf +++ b/build/trivalent.conf @@ -14,7 +14,7 @@ else if [ "$USE_WAYLAND" == "true" ]; then echo "Wayland is not supported on X11 sessions" else - echo "Value provided by USE_WAYLAND empty or invalid, defaulting to '$XDG_SESSION_TYPE'" + echo "Value provided by 'USE_WAYLAND' empty or invalid, defaulting to '$XDG_SESSION_TYPE'" fi case "$XDG_SESSION_TYPE" in wayland)