Skip to content

Instantly share code, notes, and snippets.

View Hermanio's full-sized avatar

Herman Õunapuu Hermanio

View GitHub Profile
@Hermanio
Hermanio / lenovo_fix.conf
Created November 14, 2018 10:04
Undervolt results
[GENERAL]
# Enable or disable the script execution
Enabled: True
# SYSFS path for checking if the system is running on AC power
Sysfs_Power_Path: /sys/class/power_supply/AC*/online
## Settings to apply while connected to Battery power
[BATTERY]
# Update the registers every this many seconds
Update_Rate_s: 30
@Hermanio
Hermanio / run-tests.py
Created April 17, 2018 08:08
testscript
import argparse
import csv
import logging
import math
import os
import subprocess
import sys
import time
import dbus
@Hermanio
Hermanio / thermal-daemon.py
Last active January 20, 2018 17:45
Revised Python 3 script for controlling Intel CPU clock speed using P-State driver + Thinkpad basic fan control
import time
RUN_CYCLE_LENGTH_IN_SECONDS = 1.0
FAN_CONTROL_ENABLED = True
SAFE_TEMPERATURE = 75
TARGET_TEMPERATURE = 90
CRITICAL_TEMPERATURE = 95
@Hermanio
Hermanio / .thermal-daemon.sh
Last active July 6, 2021 03:24
Quick and dirty early throttling script using bash and intel p-state driver toggling. USE AT YOUR OWN RISK.
#!/bin/bash
targettemp=90
clockpct=70
while true
do
currenttemp=$(sensors -u | awk '/temp1_input/ {print $2; exit}' )
compare=$(echo $currenttemp'>'$targettemp | bc -l)
turbo=`cat /sys/devices/system/cpu/intel_pstate/no_turbo`
if [ "$turbo" -eq 0 ]
@Hermanio
Hermanio / thermal-conf.xml
Last active April 23, 2023 14:59
A working thermald configuration file for Thinkpad T430 with a trip point of 90C.
<?xml version="1.0"?>
<ThermalConfiguration>
<Platform>
<Name>T430</Name>
<ProductName>*</ProductName>
<Preference>QUIET</Preference>
<ThermalSensors>
<ThermalSensor>
<Type>pkg-temp-0</Type>
<Path>/sys/class/thermal/thermal_zone0/temp</Path>