Skip to content

Instantly share code, notes, and snippets.

@kepstin
Last active March 7, 2019 22:12
Show Gist options
  • Save kepstin/32a0cc9ba734f96098bd62c6eee6b4f1 to your computer and use it in GitHub Desktop.
Save kepstin/32a0cc9ba734f96098bd62c6eee6b4f1 to your computer and use it in GitHub Desktop.
<?xml version="1.0"?>
<ThermalConfiguration>
<Platform>
<Name>Thinkpad T440p</Name>
<UUID>*</UUID>
<ProductName>*</ProductName>
<Preference>QUIET</Preference><!-- if set to PERFORMANCE, the rapl throttling won't be used -->
<CoolingDevices>
<CoolingDevice>
<Type>rapl_controller</Type>
<MinState>37000000</MinState><!-- Set this to your processor's specified TDP -->
<MaxState>9250000</MaxState><!-- The minimum power. Use 25% of TDP -->
<IncDecStep>1850000</IncDecStep><!-- I don't know if this is used with PID? Set to 5% of TDP -->
<ReadBack>1</ReadBack>
<DebouncePeriod>0</DebouncePeriod>
<PidControl>
<!-- These values may have to be adjusted (reduced) for low TDP processors -->
<!-- Tweaking PID controllers is fun!™ -->
<kp>-500</kp><!-- Proportional: adjust power by #mW per degree over target -->
<ki>-250</ki><!-- Integral: adjust power by #mW per accumulated error of degrees over target -->
<kd>0</kd><!-- Differential: adjust power by #mW per degree change since last update (500ms) -->
</PidControl>
</CoolingDevice>
</CoolingDevices>
<ThermalZones>
<ThermalZone>
<Type>cpu_manual</Type>
<TripPoints>
<TripPoint>
<SensorType>x86_pkg_temp</SensorType>
<Temperature>70000</Temperature><!-- Somewhere below your target temperature -->
<!-- The reason for this is to switch to polling mode so PID operates -->
<Hyst>0</Hyst>
<type>passive</type>
<ControlType>PARALLEL</ControlType>
</TripPoint>
<TripPoint>
<SensorType>x86_pkg_temp</SensorType>
<Temperature>79000</Temperature><!-- Set this to your target temperature -->
<Hyst>0</Hyst>
<type>passive</type>
<ControlType>PARALLEL</ControlType>
<CoolingDevice>
<index>1</index>
<type>rapl_controller</type>
<influence>100</influence>
<SamplingPeriod>0</SamplingPeriod>
</CoolingDevice>
</TripPoint>
</TripPoints>
</ThermalZone>
</ThermalZones>
</Platform>
</ThermalConfiguration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment