Last active
June 23, 2020 08:01
-
-
Save eSlider/f4d4f56aaafe08037c9eeac396d0ea78 to your computer and use it in GitHub Desktop.
Fix broken DC cable connection and CPU throttling for HP Spectre x360
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/sh | |
# Determinate CPU capabilities | |
MAX_CPU=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq) | |
MIN_CPU=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq) | |
# Install MSR tools and Linux tools to get hack BIOS | |
# apt install -y msr-tools linux-tools-common linux-tools-$(uname -r) | |
# Disable "BD PROCHOT" | |
wrmsr -a 0x1FC 262238; | |
# set and apply frequencies | |
cpupower frequency-set \ | |
-d $(expr $MAX_CPU / 2) \ | |
-u $MAX_CPU \ | |
-r \ | |
-g performance; | |
# Show current CPU setup | |
#!/bin/sh | |
# Determinate CPU capabilities | |
MAX_CPU=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq) | |
MIN_CPU=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq) | |
# Install MSR tools and Linux tools to get hack BIOS | |
# apt install -y msr-tools linux-tools-common linux-tools-$(uname -r) | |
# Disable "BD PROCHOT" | |
wrmsr -a 0x1FC 262238; | |
# set and apply frequencies | |
cpupower frequency-set \ | |
-d $(expr $MAX_CPU / 2) \ | |
-u $MAX_CPU \ | |
-r \ | |
-g performance; | |
# Show current CPU cores speed | |
grep "cpu MHz" /proc/cpuinfo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment