From 2080b30aec00866706d137bd58114ff3a5cd79c9 Mon Sep 17 00:00:00 2001 From: thelamer Date: Fri, 4 Jul 2025 11:08:21 -0400 Subject: [PATCH] disable GPU in RPM distros on cpu only --- root/usr/local/bin/wrapped-chromium | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/root/usr/local/bin/wrapped-chromium b/root/usr/local/bin/wrapped-chromium index 9403ccde..9e594a9a 100755 --- a/root/usr/local/bin/wrapped-chromium +++ b/root/usr/local/bin/wrapped-chromium @@ -7,9 +7,16 @@ if ! pgrep chromium > /dev/null;then rm -f $HOME/.config/chromium/Singleton* fi +# Disable GPU without Nvidia +if which nvidia-smi; then + DISABLE_GPU="" +else + DISABLE_GPU="--disable-gpu" +fi + # Run normally on privved containers or modified un non priv if grep -q 'Seccomp:.0' /proc/1/status; then - ${BIN} --password-store=basic "$@" + ${BIN} --password-store=basic ${DISABLE_GPU} "$@" else - ${BIN} --password-store=basic --no-sandbox --test-type "$@" + ${BIN} --password-store=basic ${DISABLE_GPU} --no-sandbox --test-type "$@" fi