Skip to content

Instantly share code, notes, and snippets.

@davinash97
Created March 30, 2025 09:00
Show Gist options
  • Select an option

  • Save davinash97/269ab2b8e1f445b27b9cd900716fdd35 to your computer and use it in GitHub Desktop.

Select an option

Save davinash97/269ab2b8e1f445b27b9cd900716fdd35 to your computer and use it in GitHub Desktop.
This is my personal preference for envycontrol GPU switch, feel free to make this as your own or other improvisations are always welcome
# Nautilus as default file/explorer
xdg-mime default org.gnome.Nautilus.desktop inode/directory
# Envycontrols for hybrid GPU setup
alias iGPU="sudo envycontrol -s integrated"
alias dGPU="sudo envycontrol -s nvidia --force-comp --coolbits 24"
alias hGPU="sudo envycontrol -s hybrid --rtd3"
function changeGPU() {
case $1 in
"-d")
dGPU;
;;
"-h")
hGPU;
;;
"-i")
iGPU;
;;
*)
echo -e "\nWhoops! Wrong argument passed\n";
;;
esac
}
alias gpu="changeGPU";
# Vulkan setup for Hybrid GPU
VK_DRIVER_FILES=/usr/share/vulkan/icd.d/nvidia_icd.json:/usr/share/vulkan/icd.d/radeon_icd.x86_64.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment