Skip to content

Instantly share code, notes, and snippets.

@eSlider
Last active June 23, 2020 08:01
Show Gist options
  • Save eSlider/f4d4f56aaafe08037c9eeac396d0ea78 to your computer and use it in GitHub Desktop.
Save eSlider/f4d4f56aaafe08037c9eeac396d0ea78 to your computer and use it in GitHub Desktop.
Fix broken DC cable connection and CPU throttling for HP Spectre x360
#!/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