Skip to content

Instantly share code, notes, and snippets.

@mfilipe
Created October 25, 2023 20:01
Show Gist options
  • Save mfilipe/fae0e640cd6f547fd9a9b1f7a078bb2d to your computer and use it in GitHub Desktop.
Save mfilipe/fae0e640cd6f547fd9a9b1f7a078bb2d to your computer and use it in GitHub Desktop.
Alias for VFIO
# VFIO
alias gpu-bind="sudo driverctl set-override 0000:03:00.0 amdgpu && sudo driverctl set-override 0000:03:00.1 snd_hda_intel"
alias gpu-unbind="sudo driverctl unset-override 0000:03:00.0 && sudo driverctl unset-override 0000:03:00.1"
alias cpu-bind="sudo systemctl set-property --runtime -- system.slice AllowedCPUs=0-15 &&
sudo systemctl set-property --runtime -- user.slice AllowedCPUs=0-15 &&
sudo systemctl set-property --runtime -- init.scope AllowedCPUs=0-15"
alias cpu-unbind="sudo systemctl set-property --runtime -- system.slice AllowedCPUs=0,1,2,3,8,9,10,11 &&
sudo systemctl set-property --runtime -- user.slice AllowedCPUs=0,1,2,3,8,9,10,11 &&
sudo systemctl set-property --runtime -- init.scope AllowedCPUs=0,1,2,3,8,9,10,11"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment