linux-surface/contrib/thermald
Nicola Fiori aedbc17ecc
Replace suggestion of using systemctl edit
Editing `ExecStart=` with `systemctl edit` did
not work for me. Running
`systemctl restart thermald.service` afterwards
was giving errors every time with reason "Unit
thermald.service has a bad unit file setting".

By running `systemctl status thermald.service`,
I was reading this error:

    redis.service has more than one ExecStart=
    setting, which is only allowed for
    Type=oneshot services. Refusing.

By looking through the Internet for answers,
I found a suggestion from a user saying that
"The `ExecStart=` line cannot be modified with
`systemctl edit`"
(https://unix.stackexchange.com/questions/409354).

What worked was replacing the thermald.service file
directly to `/etc/systemd/system/` and
`/usr/lib/systemd/system` worked, as suggested
in the README.md present in the folder containing
example configurations for Surface Pro 5 from
this repository.
2022-10-20 18:19:24 +01:00
..
surface_laptop_1 contrib/thermald: Be consistent about formatting 2021-08-25 14:02:30 +02:00
surface_laptop_4a Add Thermald Conf FIle for AMD Surface Laptop 4 (#572) 2021-09-25 14:38:24 +02:00
surface_pro_5 update readme 2021-09-03 00:27:25 +08:00
README.md Replace suggestion of using systemctl edit 2022-10-20 18:19:24 +01:00
thermal-conf.xml contrib/thermald: Be consistent about formatting 2021-08-25 14:02:30 +02:00
thermal-cpu-cdev-order.xml contrib/thermald: Be consistent about formatting 2021-08-25 14:02:30 +02:00

Example Thermald Configuration

This is a minimal thermald configuration, which sets the maximum sustained CPU temperature to about 65°C. 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.

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 (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. You can do so by overwriting thermald.service. This file is present in /lib/systemd/system/ (it may also be in /usr/lib/systemd/system/).