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