Created
July 29, 2021 13:53
-
-
Save sunsided/a89d2aa658e14696bc73b4671991d5aa to your computer and use it in GitHub Desktop.
GPU selection
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -eo pipefail | |
# Options: nvidia, intel, query | |
GPU=${1:-query} | |
echo "Current renderer:" | |
glxinfo | grep -E "OpenGL renderer\ string" | |
echo "" | |
echo "Selecting '$GPU' GPU." | |
sudo prime-select $GPU |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment