From bdc765f93178f36cc3b6c88a5f090068623b069c Mon Sep 17 00:00:00 2001 From: thelamer Date: Fri, 4 Jul 2025 11:14:57 -0400 Subject: [PATCH] disable GPU in RPM distros on cpu only --- root/usr/local/bin/wrapped-chromium | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/root/usr/local/bin/wrapped-chromium b/root/usr/local/bin/wrapped-chromium index 8f9bb43c..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 -# Run normally on privved containers or modified un non priv -if grep -q 'Seccomp:.0' /proc/1/status; then - ${BIN} --password-store=basic "$@" +# Disable GPU without Nvidia +if which nvidia-smi; then + DISABLE_GPU="" else - ${BIN} --password-store=basic --no-sandbox --test-type "$@" + 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 ${DISABLE_GPU} "$@" +else + ${BIN} --password-store=basic ${DISABLE_GPU} --no-sandbox --test-type "$@" fi