Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sudo apt install fzf linux-cpupower
- #Check current state
- cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
- #see avaliable states
- cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
- #change current state
- echo "performance" | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
- fzgov() {
- # Dependencies: fzf and kernel-tools
- local ScalingGov=$(
- printf '%s\0' $(</sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors) \
- | fzf --prompt "Current CPU State is '$(</sys/devices/system/cpu/cpu0/cpufreq/scaling_governor)'> " --read0
- )
- #[[ $ScalingGov ]] && sudo cpupower frequency-set -g "$ScalingGov"
- [[ $ScalingGov ]] && echo "$ScalingGov"|sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
- }
- alias performance="fzgov"
- #GUI
- sudo apt install cpupower-gui
- cpupower-gui
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement