Advertisement
Querzion

etc-libvirt-hooks-qemu-d-winx-prepare-begin-30-set-governor.sh

Apr 5th, 2023 (edited)
565
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.44 KB | Source Code | 0 0
  1. #!/bin/bash
  2.  
  3. ## Load VM variables
  4. source "/etc/libvirt/hooks/qemu.d/Windows-11/vm-vars.conf"
  5.  
  6. ## Set CPU governor to mode indicated by variable
  7. CPU_COUNT=0
  8. for file in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
  9. do
  10.     echo $VM_ON_GOVERNOR > $file;
  11.     echo "CPU $CPU_COUNT governor: $VM_ON_GOVERNOR";
  12.     let CPU_COUNT+=1
  13. done
  14.  
  15. ## Set system power profile to performance
  16. powerprofilesctl set $VM_ON_PWRPROFILE
  17.  
  18. sleep 1
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement