Created
July 18, 2013 11:50
-
-
Save Pyppe/6028707 to your computer and use it in GitHub Desktop.
My Lenovo Carbon X1 does not up-scale CPUs correctly with Ubuntu 13.04 using the ondemand governing. Lowering the up-threshold seems to do the trick.
This file contains 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 | |
# default with 13.04 is 95 | |
SCALING_FILE=/sys/devices/system/cpu/cpufreq/ondemand/up_threshold | |
if [ ! -f "$SCALING_FILE" ]; then | |
echo "$SCALING_FILE not found" | |
exit 1 | |
fi | |
if [ $# -ne 1 ]; then | |
echo "Usage: $0 <throttling percentage>" | |
echo "E.g. $0 70" | |
exit 1 | |
fi | |
limit=$1 | |
if [[ $limit -lt 100 && $limit -gt 30 ]]; then | |
sudo bash -c "echo $limit > $SCALING_FILE" | |
else | |
echo "Invalid value" | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment