This commit is contained in:
Yatao Li 2021-08-26 01:44:06 +08:00
commit 5a5faddde4
15 changed files with 295 additions and 311 deletions

View file

@ -5,9 +5,12 @@ Modify the `<Temperature>65000</Temperature>` value to adapt that to your liking
Tested on a Surface Book 2, other devices may need adapting, see e.g. the [thermald man page](http://manpages.ubuntu.com/manpages/trusty/man5/thermal-conf.xml.5.html).
More complex and device specific examples can be found in subdirectories
If any subdirectory does not have both files or any dedicated instructions, use the missing files provided here and/or follow these instructions.
## Installation
Both XML files need to be placed in the `/etc/thermald/` directory.
Both XML files (`thermal-conf.xml` and `thermal-cpu-cdev-order-xml`) need to be placed in the `/etc/thermald/` directory.
Newer thermald versions attempt to automatically load the configuration from ACPI.
If you want to use a manual configuration with such a version, you may need to remove the `--adaptive` option from the systemd service `ExecStart` line.

View file

@ -1,85 +0,0 @@
<?xml version="1.0"?>
<!-- BEGIN -->
<ThermalConfiguration>
<Platform>
<Name> Auto generated </Name>
<ProductName>Surface Pro</ProductName>
<Preference>QUIET</Preference>
<PPCC>
<PowerLimitIndex>0</PowerLimitIndex>
<PowerLimitMinimum>3000</PowerLimitMinimum>
<PowerLimitMaximum>25000</PowerLimitMaximum>
<TimeWindowMinimum>28000</TimeWindowMinimum>
<TimeWindowMaximum>32000</TimeWindowMaximum>
<StepSize>500</StepSize>
</PPCC>
<ThermalZones>
<ThermalZone>
<Type>auto_zone_0</Type>
<TripPoints>
<TripPoint>
<SensorType>pch_skylake</SensorType>
<Temperature>46000</Temperature>
<Type>Passive</Type>
<CoolingDevice>
<Type>B0D4</Type>
<SamplingPeriod>20</SamplingPeriod>
<TargetState>15000000</TargetState>
</CoolingDevice>
</TripPoint>
<TripPoint>
<SensorType>pch_skylake</SensorType>
<Temperature>49000</Temperature>
<Type>Passive</Type>
<CoolingDevice>
<Type>B0D4</Type>
<SamplingPeriod>20</SamplingPeriod>
<TargetState>13000000</TargetState>
</CoolingDevice>
</TripPoint>
<TripPoint>
<SensorType>pch_skylake</SensorType>
<Temperature>52000</Temperature>
<Type>Passive</Type>
<CoolingDevice>
<Type>B0D4</Type>
<SamplingPeriod>20</SamplingPeriod>
<TargetState>11000000</TargetState>
</CoolingDevice>
</TripPoint>
<TripPoint>
<SensorType>pch_skylake</SensorType>
<Temperature>56000</Temperature>
<Type>Passive</Type>
<CoolingDevice>
<Type>B0D4</Type>
<SamplingPeriod>20</SamplingPeriod>
<TargetState>9000000</TargetState>
</CoolingDevice>
</TripPoint>
<TripPoint>
<SensorType>pch_skylake</SensorType>
<Temperature>59000</Temperature>
<Type>Passive</Type>
<CoolingDevice>
<Type>B0D4</Type>
<SamplingPeriod>15</SamplingPeriod>
<TargetState>7000000</TargetState>
</CoolingDevice>
</TripPoint>
<TripPoint>
<SensorType>pch_skylake</SensorType>
<Temperature>62000</Temperature>
<Type>Passive</Type>
<CoolingDevice>
<Type>B0D4</Type>
<SamplingPeriod>10</SamplingPeriod>
<TargetState>6000000</TargetState>
</CoolingDevice>
</TripPoint>
</TripPoints>
</ThermalZone>
</ThermalZones>
</Platform>
</ThermalConfiguration>
<!-- END -->

View file

@ -1,95 +0,0 @@
<?xml version="1.0"?>
<!-- BEGIN -->
<ThermalConfiguration>
<Platform>
<Name> Auto generated </Name>
<ProductName>Surface Pro</ProductName>
<Preference>QUIET</Preference>
<PPCC>
<PowerLimitIndex>0</PowerLimitIndex>
<PowerLimitMinimum>3000</PowerLimitMinimum>
<PowerLimitMaximum>15000</PowerLimitMaximum>
<TimeWindowMinimum>28000</TimeWindowMinimum>
<TimeWindowMaximum>32000</TimeWindowMaximum>
<StepSize>500</StepSize>
</PPCC>
<ThermalZones>
<ThermalZone>
<Type>auto_zone_0</Type>
<TripPoints>
<TripPoint>
<SensorType>pch_skylake</SensorType>
<Temperature>39000</Temperature>
<Type>Passive</Type>
<CoolingDevice>
<Type>B0D4</Type>
<SamplingPeriod>10</SamplingPeriod>
<TargetState>15000000</TargetState>
</CoolingDevice>
</TripPoint>
<TripPoint>
<SensorType>pch_skylake</SensorType>
<Temperature>43000</Temperature>
<Type>Passive</Type>
<CoolingDevice>
<Type>B0D4</Type>
<SamplingPeriod>10</SamplingPeriod>
<TargetState>10000000</TargetState>
</CoolingDevice>
</TripPoint>
<TripPoint>
<SensorType>pch_skylake</SensorType>
<Temperature>47000</Temperature>
<Type>Passive</Type>
<CoolingDevice>
<Type>B0D4</Type>
<SamplingPeriod>10</SamplingPeriod>
<TargetState>8000000</TargetState>
</CoolingDevice>
</TripPoint>
<TripPoint>
<SensorType>pch_skylake</SensorType>
<Temperature>49000</Temperature>
<Type>Passive</Type>
<CoolingDevice>
<Type>B0D4</Type>
<SamplingPeriod>10</SamplingPeriod>
<TargetState>6000000</TargetState>
</CoolingDevice>
</TripPoint>
<TripPoint>
<SensorType>pch_skylake</SensorType>
<Temperature>51000</Temperature>
<Type>Passive</Type>
<CoolingDevice>
<Type>B0D4</Type>
<SamplingPeriod>5</SamplingPeriod>
<TargetState>5000000</TargetState>
</CoolingDevice>
</TripPoint>
<TripPoint>
<SensorType>pch_skylake</SensorType>
<Temperature>53000</Temperature>
<Type>Passive</Type>
<CoolingDevice>
<Type>B0D4</Type>
<SamplingPeriod>5</SamplingPeriod>
<TargetState>4000000</TargetState>
</CoolingDevice>
</TripPoint>
<TripPoint>
<SensorType>pch_skylake</SensorType>
<Temperature>54000</Temperature>
<Type>Passive</Type>
<CoolingDevice>
<Type>B0D4</Type>
<SamplingPeriod>5</SamplingPeriod>
<TargetState>3000000</TargetState>
</CoolingDevice>
</TripPoint>
</TripPoints>
</ThermalZone>
</ThermalZones>
</Platform>
</ThermalConfiguration>
<!-- END -->

View file

@ -1,75 +0,0 @@
<?xml version="1.0"?>
<!-- BEGIN -->
<ThermalConfiguration>
<Platform>
<Name> Auto generated </Name>
<ProductName>Surface Pro</ProductName>
<Preference>QUIET</Preference>
<PPCC>
<PowerLimitIndex>0</PowerLimitIndex>
<PowerLimitMinimum>3000</PowerLimitMinimum>
<PowerLimitMaximum>15000</PowerLimitMaximum>
<TimeWindowMinimum>28000</TimeWindowMinimum>
<TimeWindowMaximum>32000</TimeWindowMaximum>
<StepSize>500</StepSize>
</PPCC>
<ThermalZones>
<ThermalZone>
<Type>auto_zone_0</Type>
<TripPoints>
<TripPoint>
<SensorType>pch_skylake</SensorType>
<Temperature>54000</Temperature>
<Type>Passive</Type>
<CoolingDevice>
<Type>B0D4</Type>
<SamplingPeriod>10</SamplingPeriod>
<TargetState>15000000</TargetState>
</CoolingDevice>
</TripPoint>
<TripPoint>
<SensorType>pch_skylake</SensorType>
<Temperature>58000</Temperature>
<Type>Passive</Type>
<CoolingDevice>
<Type>B0D4</Type>
<SamplingPeriod>10</SamplingPeriod>
<TargetState>13000000</TargetState>
</CoolingDevice>
</TripPoint>
<TripPoint>
<SensorType>pch_skylake</SensorType>
<Temperature>60000</Temperature>
<Type>Passive</Type>
<CoolingDevice>
<Type>B0D4</Type>
<SamplingPeriod>5</SamplingPeriod>
<TargetState>9000000</TargetState>
</CoolingDevice>
</TripPoint>
<TripPoint>
<SensorType>pch_skylake</SensorType>
<Temperature>62000</Temperature>
<Type>Passive</Type>
<CoolingDevice>
<Type>B0D4</Type>
<SamplingPeriod>5</SamplingPeriod>
<TargetState>7000000</TargetState>
</CoolingDevice>
</TripPoint>
<TripPoint>
<SensorType>pch_skylake</SensorType>
<Temperature>63000</Temperature>
<Type>Passive</Type>
<CoolingDevice>
<Type>B0D4</Type>
<SamplingPeriod>5</SamplingPeriod>
<TargetState>6000000</TargetState>
</CoolingDevice>
</TripPoint>
</TripPoints>
</ThermalZone>
</ThermalZones>
</Platform>
</ThermalConfiguration>
<!-- END -->

View file

@ -1,18 +0,0 @@
<!--
Specifies the order of compensation to cool CPU only.
There is a default already implemented in the code, but
this file can be used to change order
The Following cooling device can present
-->
<CoolingDeviceOrder>
<!-- Specify Cooling device order -->
<CoolingDevice>rapl_controller</CoolingDevice>
<CoolingDevice>intel_pstate</CoolingDevice>
<CoolingDevice>intel_powerclamp</CoolingDevice>
<CoolingDevice>cpufreq</CoolingDevice>
<CoolingDevice>Processor</CoolingDevice>
</CoolingDeviceOrder>

View file

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<ThermalConfiguration>
<Platform>
<Name>Override</Name>
<ProductName>*</ProductName>
<Preference>QUIET</Preference>
<Name>Override</Name>
<ProductName>*</ProductName>
<Preference>QUIET</Preference>
<ThermalZones>
<ThermalZone>
<Type>test</Type>

View file

@ -23,8 +23,6 @@
# E: POWER_SUPPLY_ONLINE=0
# E: SUBSYSTEM=power_supply
# Plugged
SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}=="1", RUN+="/usr/bin/logger -t surface power supply online"
SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}=="1", RUN+="/usr/bin/surface profile set performance"

View file

@ -0,0 +1,83 @@
<?xml version="1.0" encoding="UTF-8"?>
<ThermalConfiguration>
<Platform>
<Name> Auto generated </Name>
<ProductName>Surface Pro</ProductName>
<Preference>QUIET</Preference>
<PPCC>
<PowerLimitIndex>0</PowerLimitIndex>
<PowerLimitMinimum>3000</PowerLimitMinimum>
<PowerLimitMaximum>25000</PowerLimitMaximum>
<TimeWindowMinimum>28000</TimeWindowMinimum>
<TimeWindowMaximum>32000</TimeWindowMaximum>
<StepSize>500</StepSize>
</PPCC>
<ThermalZones>
<ThermalZone>
<Type>auto_zone_0</Type>
<TripPoints>
<TripPoint>
<SensorType>pch_skylake</SensorType>
<Temperature>46000</Temperature>
<Type>Passive</Type>
<CoolingDevice>
<Type>B0D4</Type>
<SamplingPeriod>20</SamplingPeriod>
<TargetState>15000000</TargetState>
</CoolingDevice>
</TripPoint>
<TripPoint>
<SensorType>pch_skylake</SensorType>
<Temperature>49000</Temperature>
<Type>Passive</Type>
<CoolingDevice>
<Type>B0D4</Type>
<SamplingPeriod>20</SamplingPeriod>
<TargetState>13000000</TargetState>
</CoolingDevice>
</TripPoint>
<TripPoint>
<SensorType>pch_skylake</SensorType>
<Temperature>52000</Temperature>
<Type>Passive</Type>
<CoolingDevice>
<Type>B0D4</Type>
<SamplingPeriod>20</SamplingPeriod>
<TargetState>11000000</TargetState>
</CoolingDevice>
</TripPoint>
<TripPoint>
<SensorType>pch_skylake</SensorType>
<Temperature>56000</Temperature>
<Type>Passive</Type>
<CoolingDevice>
<Type>B0D4</Type>
<SamplingPeriod>20</SamplingPeriod>
<TargetState>9000000</TargetState>
</CoolingDevice>
</TripPoint>
<TripPoint>
<SensorType>pch_skylake</SensorType>
<Temperature>59000</Temperature>
<Type>Passive</Type>
<CoolingDevice>
<Type>B0D4</Type>
<SamplingPeriod>15</SamplingPeriod>
<TargetState>7000000</TargetState>
</CoolingDevice>
</TripPoint>
<TripPoint>
<SensorType>pch_skylake</SensorType>
<Temperature>62000</Temperature>
<Type>Passive</Type>
<CoolingDevice>
<Type>B0D4</Type>
<SamplingPeriod>10</SamplingPeriod>
<TargetState>6000000</TargetState>
</CoolingDevice>
</TripPoint>
</TripPoints>
</ThermalZone>
</ThermalZones>
</Platform>
</ThermalConfiguration>

View file

@ -0,0 +1,93 @@
<?xml version="1.0" encoding="UTF-8"?>
<ThermalConfiguration>
<Platform>
<Name> Auto generated </Name>
<ProductName>Surface Pro</ProductName>
<Preference>QUIET</Preference>
<PPCC>
<PowerLimitIndex>0</PowerLimitIndex>
<PowerLimitMinimum>3000</PowerLimitMinimum>
<PowerLimitMaximum>15000</PowerLimitMaximum>
<TimeWindowMinimum>28000</TimeWindowMinimum>
<TimeWindowMaximum>32000</TimeWindowMaximum>
<StepSize>500</StepSize>
</PPCC>
<ThermalZones>
<ThermalZone>
<Type>auto_zone_0</Type>
<TripPoints>
<TripPoint>
<SensorType>pch_skylake</SensorType>
<Temperature>39000</Temperature>
<Type>Passive</Type>
<CoolingDevice>
<Type>B0D4</Type>
<SamplingPeriod>10</SamplingPeriod>
<TargetState>15000000</TargetState>
</CoolingDevice>
</TripPoint>
<TripPoint>
<SensorType>pch_skylake</SensorType>
<Temperature>43000</Temperature>
<Type>Passive</Type>
<CoolingDevice>
<Type>B0D4</Type>
<SamplingPeriod>10</SamplingPeriod>
<TargetState>10000000</TargetState>
</CoolingDevice>
</TripPoint>
<TripPoint>
<SensorType>pch_skylake</SensorType>
<Temperature>47000</Temperature>
<Type>Passive</Type>
<CoolingDevice>
<Type>B0D4</Type>
<SamplingPeriod>10</SamplingPeriod>
<TargetState>8000000</TargetState>
</CoolingDevice>
</TripPoint>
<TripPoint>
<SensorType>pch_skylake</SensorType>
<Temperature>49000</Temperature>
<Type>Passive</Type>
<CoolingDevice>
<Type>B0D4</Type>
<SamplingPeriod>10</SamplingPeriod>
<TargetState>6000000</TargetState>
</CoolingDevice>
</TripPoint>
<TripPoint>
<SensorType>pch_skylake</SensorType>
<Temperature>51000</Temperature>
<Type>Passive</Type>
<CoolingDevice>
<Type>B0D4</Type>
<SamplingPeriod>5</SamplingPeriod>
<TargetState>5000000</TargetState>
</CoolingDevice>
</TripPoint>
<TripPoint>
<SensorType>pch_skylake</SensorType>
<Temperature>53000</Temperature>
<Type>Passive</Type>
<CoolingDevice>
<Type>B0D4</Type>
<SamplingPeriod>5</SamplingPeriod>
<TargetState>4000000</TargetState>
</CoolingDevice>
</TripPoint>
<TripPoint>
<SensorType>pch_skylake</SensorType>
<Temperature>54000</Temperature>
<Type>Passive</Type>
<CoolingDevice>
<Type>B0D4</Type>
<SamplingPeriod>5</SamplingPeriod>
<TargetState>3000000</TargetState>
</CoolingDevice>
</TripPoint>
</TripPoints>
</ThermalZone>
</ThermalZones>
</Platform>
</ThermalConfiguration>

View file

@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8"?>
<ThermalConfiguration>
<Platform>
<Name> Auto generated </Name>
<ProductName>Surface Pro</ProductName>
<Preference>QUIET</Preference>
<PPCC>
<PowerLimitIndex>0</PowerLimitIndex>
<PowerLimitMinimum>3000</PowerLimitMinimum>
<PowerLimitMaximum>15000</PowerLimitMaximum>
<TimeWindowMinimum>28000</TimeWindowMinimum>
<TimeWindowMaximum>32000</TimeWindowMaximum>
<StepSize>500</StepSize>
</PPCC>
<ThermalZones>
<ThermalZone>
<Type>auto_zone_0</Type>
<TripPoints>
<TripPoint>
<SensorType>pch_skylake</SensorType>
<Temperature>54000</Temperature>
<Type>Passive</Type>
<CoolingDevice>
<Type>B0D4</Type>
<SamplingPeriod>10</SamplingPeriod>
<TargetState>15000000</TargetState>
</CoolingDevice>
</TripPoint>
<TripPoint>
<SensorType>pch_skylake</SensorType>
<Temperature>58000</Temperature>
<Type>Passive</Type>
<CoolingDevice>
<Type>B0D4</Type>
<SamplingPeriod>10</SamplingPeriod>
<TargetState>13000000</TargetState>
</CoolingDevice>
</TripPoint>
<TripPoint>
<SensorType>pch_skylake</SensorType>
<Temperature>60000</Temperature>
<Type>Passive</Type>
<CoolingDevice>
<Type>B0D4</Type>
<SamplingPeriod>5</SamplingPeriod>
<TargetState>9000000</TargetState>
</CoolingDevice>
</TripPoint>
<TripPoint>
<SensorType>pch_skylake</SensorType>
<Temperature>62000</Temperature>
<Type>Passive</Type>
<CoolingDevice>
<Type>B0D4</Type>
<SamplingPeriod>5</SamplingPeriod>
<TargetState>7000000</TargetState>
</CoolingDevice>
</TripPoint>
<TripPoint>
<SensorType>pch_skylake</SensorType>
<Temperature>63000</Temperature>
<Type>Passive</Type>
<CoolingDevice>
<Type>B0D4</Type>
<SamplingPeriod>5</SamplingPeriod>
<TargetState>6000000</TargetState>
</CoolingDevice>
</TripPoint>
</TripPoints>
</ThermalZone>
</ThermalZones>
</Platform>
</ThermalConfiguration>

View file

@ -0,0 +1,8 @@
<CoolingDeviceOrder>
<!-- Specify Cooling device order -->
<CoolingDevice>rapl_controller</CoolingDevice>
<CoolingDevice>intel_pstate</CoolingDevice>
<CoolingDevice>intel_powerclamp</CoolingDevice>
<CoolingDevice>cpufreq</CoolingDevice>
<CoolingDevice>Processor</CoolingDevice>
</CoolingDeviceOrder>

View file

@ -11,4 +11,3 @@ ExecStart=/usr/sbin/thermald --systemd --dbus-enable
[Install]
WantedBy=multi-user.target
Alias=dbus-org.freedesktop.thermald.service

View file

@ -1,27 +1,27 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8"?>
<ThermalConfiguration>
<Platform>
<Name>Intel Powered Laptop</Name>
<ProductName>*</ProductName>
<Preference>QUIET</Preference>
<ThermalZones>
<ThermalZone>
<Type>cpu</Type>
<TripPoints>
<TripPoint>
<SensorType>x86_pkg_temp</SensorType>
<Temperature>65000</Temperature>
<type>passive</type>
<ControlType>SEQUENTIAL</ControlType>
<CoolingDevice>
<index>1</index>
<type>rapl_controller</type>
<influence>100</influence>
<SamplingPeriod>5</SamplingPeriod>
</CoolingDevice>
</TripPoint>
</TripPoints>
</ThermalZone>
</ThermalZones>
</Platform>
<Platform>
<Name>Intel Powered Laptop</Name>
<ProductName>*</ProductName>
<Preference>QUIET</Preference>
<ThermalZones>
<ThermalZone>
<Type>cpu</Type>
<TripPoints>
<TripPoint>
<SensorType>x86_pkg_temp</SensorType>
<Temperature>65000</Temperature>
<type>passive</type>
<ControlType>SEQUENTIAL</ControlType>
<CoolingDevice>
<index>1</index>
<type>rapl_controller</type>
<influence>100</influence>
<SamplingPeriod>5</SamplingPeriod>
</CoolingDevice>
</TripPoint>
</TripPoints>
</ThermalZone>
</ThermalZones>
</Platform>
</ThermalConfiguration>

View file

@ -1,8 +1,8 @@
<CoolingDeviceOrder>
<!-- Specify Cooling device order -->
<CoolingDevice>rapl_controller</CoolingDevice>
<CoolingDevice>intel_pstate</CoolingDevice>
<CoolingDevice>intel_powerclamp</CoolingDevice>
<CoolingDevice>cpufreq</CoolingDevice>
<CoolingDevice>Processor</CoolingDevice>
<!-- Specify Cooling device order -->
<CoolingDevice>rapl_controller</CoolingDevice>
<CoolingDevice>intel_pstate</CoolingDevice>
<CoolingDevice>intel_powerclamp</CoolingDevice>
<CoolingDevice>cpufreq</CoolingDevice>
<CoolingDevice>Processor</CoolingDevice>
</CoolingDeviceOrder>