Thermald ubuntu что это

Обновлено: 07.07.2024

CPU frequency scaling enables the operating system to scale the CPU frequency up or down in order to save power. CPU frequencies can be scaled automatically depending on the system load, in response to ACPI events, or manually by userspace programs.

CPU frequency scaling is implemented in the Linux kernel, the infrastructure is called cpufreq. Since kernel 3.4 the necessary modules are loaded automatically. For older kernels or CPUs, the recommended ondemand governor is enabled by default, whereas for newer kernels or CPUs, the schedutil governor is enabled by default. However, userspace tools like cpupower, acpid, Laptop Mode Tools, or GUI tools provided for your desktop environment, may still be used for advanced configuration.

Contents

Userspace tools

thermald

thermald is a Linux daemon used to prevent the overheating of Intel CPUs. This daemon monitors temperature and applies compensation using available cooling methods.

By default, it monitors CPU temperature using available CPU digital temperature sensors and maintains CPU temperature under control, before HW takes aggressive correction action. If there is a skin temperature sensor in thermal sysfs, then it tries to keep skin temperature under 45C.

The associated systemd unit is thermald.service , which should be started and enabled.

i7z is an i7 (and now i3, i5, i7, i9) CPU reporting tool for Linux. It can be launched from a Terminal with the command i7z or as GUI with i7z-gui .

cpupower

cpupower is a set of userspace utilities designed to assist with CPU frequency scaling. The package is not required to use scaling, but is highly recommended because it provides useful command-line utilities and a systemd service to change the governor at boot.

The configuration file for cpupower is located in /etc/default/cpupower . This configuration file is read by a bash script in /usr/lib/systemd/scripts/cpupower which is activated by systemd with cpupower.service . You may want to enable cpupower.service to start at boot.

cpupower-gui

cpupower-gui AUR is a graphical utility designed to assist with CPU frequency scaling. The GUI is based on GTK and is meant to provide the same options as cpupower. cpupower-gui can change the maximum/minimum CPU frequency and governor for each core. The application handles privilege granting through polkit and allows any logged-in user in the wheel user group to change the frequency and governor.

turbostat

turbostat can display the frequency, power consumption, idle status and other statistics of the modern Intel and AMD CPUs.

CPU frequency driver

  • The native CPU module is loaded automatically.
  • The intel_pstate CPU power scaling driver is used automatically for modern Intel CPUs instead of the other drivers below. This driver takes priority over other drivers and is built-in as opposed to being a module. This driver is currently automatically used for Sandy Bridge and newer CPUs. The intel_pstate may ignore the BIOS P-State settings. intel_pstate may run in "passive mode" via the intel_cpufreq driver for older CPUs. If you encounter a problem while using this driver, add intel_pstate=disable to your kernel line in order to revert to using the acpi-cpufreq driver.
  • Even P State behavior mentioned above can be influenced with /sys/devices/system/cpu/intel_pstate , e.g. Intel Turbo Boost can be deactivated with echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo as the root user for keeping CPU-Temperatures low.
  • Additional control for modern Intel CPUs is available with the Linux Thermal Daemon (available as thermald ), which proactively controls thermal using P-states, T-states, and the Intel power clamp driver. thermald can also be used for older Intel CPUs. If the latest drivers are not available, then the daemon will revert to x86 model specific registers and the Linux ‘cpufreq subsystem’ to control system cooling.

cpupower requires modules to know the limits of the native CPU:

Module Description
intel_pstate This driver implements a scaling driver with an internal governor for Intel Core (Sandy Bridge and newer) processors.
intel_cpufreq Starting with kernel 5.7, the intel_pstate scaling driver selects "passive mode" aka intel_cpufreq for CPUs that do not support hardware-managed P-states (HWP), i.e. Intel Core i 5th generation or older.
acpi-cpufreq CPUFreq driver which utilizes the ACPI Processor Performance States. This driver also supports the Intel Enhanced SpeedStep (previously supported by the deprecated speedstep-centrino module).
speedstep-lib CPUFreq driver for Intel SpeedStep-enabled processors (mostly Atoms and older Pentiums)
powernow-k8 CPUFreq driver for K8/K10 Athlon 64/Opteron/Phenom processors. Since Linux 3.7 'acpi-cpufreq' will automatically be used for more modern AMD CPUs.
pcc-cpufreq This driver supports Processor Clocking Control interface by Hewlett-Packard and Microsoft Corporation which is useful on some ProLiant servers.
p4-clockmod CPUFreq driver for Intel Pentium 4/Xeon/Celeron processors which lowers the CPU temperature by skipping clocks. (You probably want to use a SpeedStep driver instead.)

To see a full list of available modules, run:

Load the appropriate module (see Kernel modules for details). Once the appropriate cpufreq driver is loaded, detailed information about the CPU(s) can be displayed by running

Setting maximum and minimum frequencies

In some cases, it may be necessary to manually set maximum and minimum frequencies.

To set the maximum clock frequency ( clock_freq is a clock frequency with units: GHz, MHz):

To set the minimum clock frequency:

To set the CPU to run at a specified frequency:

  • To adjust for only a single CPU core, append -c core_number .
  • The governor, maximum and minimum frequencies can be set in /etc/default/cpupower .

Alternatively, you can set the frequency manually:

The available values can be found in /sys/devices/system/cpu/cpu*/cpufreq/scaling_available_frequencies or similar. [1]

The thermald daemon prevents machines from overheating and was introduced in the 14.04 Ubuntu Trusty LTS release. It monitors thermal sensors and will modify cooling controls to keep the hardware cool. Thermald uses the available CPU temperature sensors and will keep the CPU from overheating. If hardware supplies a skin temperature sensor then by default thermald will endeavour to keep the skin temperature under 45 degrees C.

Thermald can control cooling via:

* active or passive cooling devices as presented in sysfs

Thermald works in two modes:

Zero configuration mode

By default, thermald runs in zero configuration mode. This is is normally sufficient for most systems. Thermald will attempt to use the CPU Digital Thermal Sensor (DTS) to sense the temperature and use the P-state driver, Running Average Power Limit (RAPL), PowerClamp and cpufreq to control cooling.

XML configuration mode

One can fine tune, optimise and workaround buggy ACPI configurations with a user defined XML configuration file.

Installation

To install thermald on Ubuntu Trusty, use:

Thermald will install and start running automatically in the default zero configuration mode.

Modifying the default configuration

The thermald configuration file /etc/thermald/thermal-conf.xml can be modified to optimize thermald for your specific hardware. The configuration is based around the ACPI thermal model, where platform regions are divided into thermal zones and these contain physical devices, cooling controls and thermal sensors. A thermal zone may contain one or more thermal sensors. Cooling controls modify the behavior of cooling devices, such as fan or a driver interface that can throttle back a device too cool it down, such as a CPU. Cooling can be active such as a fan (which can create noise and consume more power but will not reduce system performance) or passive (such as CPU performance throttling).

Cooling devices can be activated when a trip point temperature threshold has been reached. Thermal zones may have one or more trip points.

In theory the ACPI thermal governor should be able to uses the ACPI thermal zone information to keep the machine' temperature under control. The reality is that the machine's ACPI configuration may be buggy or not correctly tuned. The thermald configuration can be used to correct or optimise the system's thermal behaviour.

Some cooling devices may not have a thermal sysfs interface, so the thermald configuration allows one to connect a cooling zone to a cooling device. Sometimes a platform has thermal zones but no associated actions for cooling, in which case the thermald configuration can be used to marry up cooling devices with thermal zones.

For more configuration information, consult the thermal-conf.xml man page.

Below is a very simple configuration that kicks in various passive cooling devices of the CPU package reaches 80 degrees C. Each cooling device is given a different influence value to allow thermald to select each device in the specified rank (highest to lowest influence ranking).

Once one has modified the configuration file, stop thermald and restart it:

If the configuration is incorrect or one wants to observe thermald running, one can use:

..and one can halt this with Control-C. When the configuration looks correct, restart thermald using:

ядро: CPU2: температура пакета выше порогового значения, тактовая частота процессора снижена (общее количество событий = 13430).

У меня есть 4 процессора, и все они имеют одинаковую проблему. Информация об оборудовании моего ноутбука:

Информация о процессоре:

Название модели: Intel(R) Core(TM) i7-3537U CPU @ 2,00 ГГц

Я искал журнал и обнаружил аппаратные ошибки этого процессора в Ubuntu 17.04 и остановил перегрев процессора, проверил свои пакеты и установил Thermald и Intel- Microcode.

Я слышу, как работает вентилятор моего ноутбука, но иногда он сильно нагревается, и я чувствую это через корпус.

В Windows-10, хотя загрузка ЦП становится высокой, температура обычно нормальная.

Есть идеи, что могло пойти не так? и что я могу сделать для дальнейшего изучения этой проблемы?

Обновить

Я проверил состояние thermald.service и нашел следующую строку:

thermald [879]: сбой чтения sysfs /sys/class/thermal/ охлаждение_устройства0/cur_state

3 ответа

В моем случае это происходит так редко и без побочных эффектов, я решил игнорировать ошибки.

И чтобы вы знали, что это не просто Ubuntu из Redhat:

Это звучит как твой /etc/thermald/thermal-conf.xml файл должен быть настроен для вашего оборудования.

sudo apt-get update

sudo apt-get установить thermald

Thermald поставляется с файлом конфигурации по умолчанию в /etc/thermald/thermal-conf.xml это будет контролировать большинство компьютеров, но, возможно, потребуется настроить их для некоторых компьютеров. Видеть man thermal-conf.xml для некоторых деталей и примеров. Как только кто-то изменил файл конфигурации, остановите thermald и перезапустите его:

После установки Thermald я бы остановил thermald обработать, и запустить его вручную как sudo thermald --no-daemon наблюдать за его действиями в реальном времени. Эту информацию в реальном времени можно использовать для создания собственного настраиваемого файла thermal-conf.xml. Видеть man thermald для дополнительной информации.

Вы можете искать thermald здесь на Спросите Ubuntu, чтобы увидеть, какие предыдущие ответы есть. Многие ответы приходят от меня.

Поблемель есть там. Во-первых, у вас высокая загрузка процессора. Во-вторых, охлаждения процессора недостаточно, и в-третьих, он не работает правильно.

Более высокая загрузка ЦП может быть связана с тем, что единица не правильно использует ваше аппаратное ускорение геодека. И единство довольно интенсивно. Вы можете изменить его или даже переключиться на другой менеджер рабочего стола, le cinnamon, Kubuntu, lubuntu или Linux mint.

Охлаждение процессора на ноутбуках, как известно, плохо. Может помочь очистка вентилятора вашей компании и установка ноутбука на плоскую поверхность вместо ткани / подушки.

Что касается троттлинга, вы можете установить максимальную частоту процессора на более низкое значение или переключиться в режим энергосбережения.

В данном HOWTO мы рассмотрим как правильно установить и настроить thermald в Fedora.

Введение

После установки он будет автоматически регулировать работу системы охлаждения на основе показаний термальных датчиков устройства.

Официально поддерживаются процессоры Intel, на AMD следует использовать с особой осторожностью.

Внимание! Некорректные настройки могут повредить устройство, поэтому данное руководство следует использовать исключительно на свой страх и риск. Никто не несёт никакой ответственности за возможные последствия.

Установка thermald

Установим данный пакет в Fedora:

Активируем его для автоматического запуска при загрузке системы:

Конфигурация thermald

Файлы конфигурации можно получить следующими способами:

  1. составить самостоятельно на базе готовых примеров;
  2. найти уже созданные другими участниками сообщества для конкретной модели устройства;
  3. использовать специальную утилиту для извлечения параметров из ACPI-таблиц.

Мы применим третий способ, как самый простой и наиболее безопасный.

Извлечение параметров из ACPI

Для извлечения воспользуемся специальной утилитой dptfxtract, предоставляемой компанией Intel.

К сожалению, это проприетарный продукт, который поставляется без исходных кодов и в то же время для работы требует права суперпользователя, что, на наш взгляд, очень небезопасно, поэтому запускать его мы будем на чистом LiveUSB с размонтированными разделами основной системы.

Скачаем самый свежий ISO-образ Fedora LiveUSB, запишем его на USB-флеш накопитель, затем загрузимся с него строго в UEFI-режиме.

Скачаем утилиту и выполним её с правами суперпользователя (при загрузке с Live):

Если устройство поддерживается и DPTF-таблицы существуют, то результат в виде одного или нескольких файлов thermal-conf.xml появятся как в текущем рабочем каталоге, так и в виртуальном /etc/thermald Live-версии.

Сохраним эти файлы в архив и перенесём его в основную систему любым способом:

Настройка thermald

В основной системе распакуем созданный ранее в Live архив thermald.tar.xz в каталог /etc/thermald и установим корректные права владельца, а также chmod для данных файлов:

Если всё сделано верно, сервис начнёт работу в штатном режиме. Более полную информацию о работе можно найти в журналах работы:

Читайте также: