Difference between revisions of "PinePhone Thermal Tweaks"

From PINE64
Jump to navigation Jump to search
(→‎Under Linux: More relevant kernel docs added)
m (Reverted edits by Dsimic (talk) to last revision by Fxc)
Tag: Rollback
(7 intermediate revisions by one other user not shown)
Line 1: Line 1:
This page explains how to read the thermal sensor data, and how to read and change the default settings.
This page explains how to read the thermal sensor data and how to get and overwrite the default settings.


== Under Linux ==
== Under GNU/Linux ==


The thermal management is handled by the Thermal Sysfs driver under Linux. Depending on the used OS by the user, the default settings might differ from the showcased examples. In case of higher values it can be advised to lower the settings to prevent the phone components from being damaged by excessive heat.
The thermal management is handled by the Thermal Sysfs driver under GNU/Linux. Depending on the used OS by the user, the default settings might differ from the showcased examples. In case of higher values it can be advised to lower the settings to prevent the phone components from being damaged by excessive heat.


The current CPU temperature can be displayed by typing:
The current CPU temperature can be displayed by typing:
Line 18: Line 18:
{{warning|Setting wrong values in the Thermal Sysfs driver poses a risk, the instructions are directed towards expert-level users and developers!}}
{{warning|Setting wrong values in the Thermal Sysfs driver poses a risk, the instructions are directed towards expert-level users and developers!}}


  echo 55000 > /sys/class/thermal/thermal_zone0/trip_point_0_temp
  echo 65000  > /sys/class/thermal/thermal_zone0/trip_point_0_temp
  echo 80000 > /sys/class/thermal/thermal_zone0/trip_point_1_temp
  echo 80000 > /sys/class/thermal/thermal_zone0/trip_point_1_temp
  echo 90000 > /sys/class/thermal/thermal_zone0/trip_point_2_temp
  echo 90000 > /sys/class/thermal/thermal_zone0/trip_point_2_temp


Further information can be found in these documents from the Linux kenel source:
For details see the kernel documentation, https://www.kernel.org/doc/Documentation/thermal/sysfs-api.txt.
 
* [https://www.kernel.org/doc/Documentation/thermal/sysfs-api.txt Documentation/thermal/sysfs-api.txt]
* [https://www.kernel.org/doc/Documentation/hwmon/sysfs-interface Documentation/hwmon/sysfs-interface]
* [https://www.kernel.org/doc/Documentation/devicetree/bindings/thermal/thermal.txt Documentation/devicetree/bindings/thermal/thermal.txt]

Revision as of 20:13, 26 April 2021

This page explains how to read the thermal sensor data and how to get and overwrite the default settings.

Under GNU/Linux

The thermal management is handled by the Thermal Sysfs driver under GNU/Linux. Depending on the used OS by the user, the default settings might differ from the showcased examples. In case of higher values it can be advised to lower the settings to prevent the phone components from being damaged by excessive heat.

The current CPU temperature can be displayed by typing:

cat /sys/class/thermal/thermal_zone0/temp

To retrieve the thermal zone types and trip points type:

grep . /sys/class/thermal/thermal_zone0/trip_point_*_temp
grep . /sys/class/thermal/thermal_zone0/trip_point_*_type

The values of the trip point temperatures can be lowered individually (make sure the trip points have the correct number for their corresponding trip type, don't swap the values for "critical" and "passive", danger!), example values:

Warning: Setting wrong values in the Thermal Sysfs driver poses a risk, the instructions are directed towards expert-level users and developers!
echo 65000  > /sys/class/thermal/thermal_zone0/trip_point_0_temp
echo 80000  > /sys/class/thermal/thermal_zone0/trip_point_1_temp
echo 90000 > /sys/class/thermal/thermal_zone0/trip_point_2_temp

For details see the kernel documentation, https://www.kernel.org/doc/Documentation/thermal/sysfs-api.txt.