Advertisement
Querzion

etc-libvirt-hooks-qemu-d-winx-release-end-30-restore-governor.sh

Apr 5th, 2023
714
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. ## Reset 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_OFF_GOVERNOR > $file;
  11.     echo "CPU $CPU_COUNT governor: $VM_OFF_GOVERNOR";
  12.     let CPU_COUNT+=1
  13. done
  14.  
  15. ## Set system power profile back to powersave
  16. powerprofilesctl set $VM_OFF_PWRPROFILE
  17.  
  18. sleep 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement