From e932e9b972e6a1beb078b48d891418eca817c39a Mon Sep 17 00:00:00 2001 From: developomp Date: Sun, 26 Jun 2022 00:07:20 +0900 Subject: [PATCH] remove intel undervolt script due to vulnerability --- src/setup/system/intel_undervolt.py | 46 ----------------------------- 1 file changed, 46 deletions(-) delete mode 100644 src/setup/system/intel_undervolt.py diff --git a/src/setup/system/intel_undervolt.py b/src/setup/system/intel_undervolt.py deleted file mode 100644 index 0db8823..0000000 --- a/src/setup/system/intel_undervolt.py +++ /dev/null @@ -1,46 +0,0 @@ -from src.util import paru_install -from os import system - -name = "Intel CPU undervolting" - - -def setup(): - """ - Adds -100mV undervolting to CPU and CPU cache - https://wiki.archlinux.org/index.php/Undervolting_CPU - """ - - paru_install("intel-undervolt") - - # - # configuration - # - - config_file_path = "/etc/intel-undervolt.conf" - - # create backup - system(f"sudo install --backup {config_file_path} {config_file_path}.bak") - - # Explanation: - # for lines that are not comments (lines that do not start with "#") - # search for: "undervolt '' " - # and replaces with: "undervolt '' -100 " - # - # WARNING: - # This method does not preserve the space between the value and the comment. - # So this: - # value # space between comment and value: 2 - # becomes this: - # value # space between comment and value: 1 - system( - f"sudo sed -i -e \"/^[^#]/s/\(undervolt [0-9]* 'CPU'\) .*\(#.*\)/\1 -100 \2/\" {config_file_path}" - ) - system( - f"sudo sed -i -e \"/^[^#]/s/\(undervolt [0-9]* 'CPU Cache'\) .*\(#.*\)/\1 -100 \2/\" {config_file_path}" - ) - - # apply config changes - system("sudo intel-undervolt apply") - - # enable undervolting - system("sudo systemctl enable intel-undervolt")