Last active
November 8, 2024 02:12
-
-
Save JuniYadi/32688a363bb03f821e254cccfbe03239 to your computer and use it in GitHub Desktop.
Set Default CPU Frequency to Max CPU Speed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Install CPU Power" | |
apt install linux-cpupower -y | |
echo "Get Detail CPU" | |
cpupower frequency-info | |
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor | |
echo "Setup Systemd" | |
tee /etc/systemd/system/cpupower-performance.service > /dev/null << EOF | |
[Unit] | |
Description=Set CPU governor to performance | |
After=multi-user.target | |
[Service] | |
Type=oneshot | |
ExecStart=/usr/bin/cpupower frequency-set -g performance | |
RemainAfterExit=yes | |
[Install] | |
WantedBy=multi-user.target | |
EOF | |
systemctl daemon-reload | |
systemctl enable cpupower-performance | |
systemctl start cpupower-performance | |
echo "Done" | |
echo "Get Detail CPU" | |
cpupower frequency-info | |
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sample Output