Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I use thermald to stay below n degrees? #42

Closed
fhaust opened this issue Dec 11, 2014 · 6 comments
Closed

Can I use thermald to stay below n degrees? #42

fhaust opened this issue Dec 11, 2014 · 6 comments

Comments

@fhaust
Copy link

fhaust commented Dec 11, 2014

I just noticed that I had thermald installed and running on my arch linux running Dell XPS notebook for quite a while.

The CPU temperature is constantly around 58°C when idle, still the fan is running constantly. I believe the trigger temperature for the fan is about 50°C. Sadly the i8k module doesn't work for this model (can force it but freezes the system every 3 seconds).

So: can I setup thermald to keep the temperature below 50°C in normal conditions?

@spandruvada
Copy link
Contributor

On Thu, 2014-12-11 at 01:49 -0800, fhaust wrote:

I just noticed that I had thermald installed and running on my arch
linux running Dell XPS notebook for quite a while.

The CPU temperature is constantly around 58°C when idle, still the fan
is running constantly. I believe the trigger temperature for the fan
is about 50°C. Sadly the i8k module doesn't work for this model (can
force it but freezes the system every 3 seconds).

So: can I setup thermald to keep the temperature below 50°C in normal
conditions?
Sure. You can change the maximum temp. But it will hurt performance.

Thanks,
Srinivas


Reply to this email directly or view it on GitHub.

@fhaust
Copy link
Author

fhaust commented Dec 11, 2014

Could I configure it so that all soft cooling devices (rapl, powerclamp,
etc) are used only up to say 55°C? At this point the bios has surely
activated the fan and any soft measures are probably in vain.

If so could you give some guidance on how to configure thermald to do this?
To be honest from looking at the conf file and the sparse available
documentation I have no clue on how to configure it at all.

Kind regards,
Florian

2014-12-11 16:56 GMT+01:00 Srinivas Pandruvada notifications@github.com:

On Thu, 2014-12-11 at 01:49 -0800, fhaust wrote:

I just noticed that I had thermald installed and running on my arch
linux running Dell XPS notebook for quite a while.

The CPU temperature is constantly around 58°C when idle, still the fan
is running constantly. I believe the trigger temperature for the fan
is about 50°C. Sadly the i8k module doesn't work for this model (can
force it but freezes the system every 3 seconds).

So: can I setup thermald to keep the temperature below 50°C in normal
conditions?
Sure. You can change the maximum temp. But it will hurt performance.

Thanks,
Srinivas


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub
https://github.com/01org/thermal_daemon/issues/42#issuecomment-66639607.

@spandruvada
Copy link
Contributor

On Thu, 2014-12-11 at 08:11 -0800, fhaust wrote:

Could I configure it so that all soft cooling devices (rapl,
powerclamp,
etc) are used only up to say 55°C? At this point the bios has surely
activated the fan and any soft measures are probably in vain.

If so could you give some guidance on how to configure thermald to do
this?
To be honest from looking at the conf file and the sparse available
documentation I have no clue on how to configure it at all.

I will try to look for:

  1. see if you have acpi fan available
    cd /sys/class/thermal
    and look for entry cooling_deviceX where type == Fan
    If you have then you can turn off the fan by writing 0 to curr_state

This will be a best option for you if you have this support.

  1. You can send dbus message to set temperature. I don't know whether
    your distros is executing thermald with --dbus-enable option or not. You
    should see in the syslog the action.

If you have version 1.3. you can check by "thermald --version" command

sudo dbus-send --system
--dest=org.freedesktop.thermald /org/freedesktop/thermald
org.freedesktop.thermald.SetUserPassiveTemperature string:cpu
string:55000

For earliar versions
dbus-send --system
--dest=org.freedesktop.thermald /org/freedesktop/thermald
org.freedesktop.thermald.SetUserMaxTemperature string:cpu string:55000

You only need to do one time. This stores this setting for subsequent
runs.

  1. If you don't have dbus enabled then you can configure xml to set.
    Your thermal-conf.xml, it will be in /usr/local/etc/thermald
    or /usr/etc/thermald/ or /etc/thermald based on your build parameters.

You can replace contents with:

Generic X86 Laptop Device * QUIET cpu 55000 max

Thanks,
Srinivas

Kind regards,
Florian

2014-12-11 16:56 GMT+01:00 Srinivas Pandruvada
notifications@github.com:

On Thu, 2014-12-11 at 01:49 -0800, fhaust wrote:

I just noticed that I had thermald installed and running on my
arch
linux running Dell XPS notebook for quite a while.

The CPU temperature is constantly around 58°C when idle, still the
fan
is running constantly. I believe the trigger temperature for the
fan
is about 50°C. Sadly the i8k module doesn't work for this model
(can
force it but freezes the system every 3 seconds).

So: can I setup thermald to keep the temperature below 50°C in
normal
conditions?
Sure. You can change the maximum temp. But it will hurt
performance.

Thanks,
Srinivas


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub

https://github.com/01org/thermal_daemon/issues/42#issuecomment-66639607.


Reply to this email directly or view it on GitHub.

@fhaust
Copy link
Author

fhaust commented Dec 13, 2014

2014-12-12 19:18 GMT+01:00 Srinivas Pandruvada notifications@github.com:

On Thu, 2014-12-11 at 08:11 -0800, fhaust wrote:

Could I configure it so that all soft cooling devices (rapl,
powerclamp,
etc) are used only up to say 55°C? At this point the bios has surely
activated the fan and any soft measures are probably in vain.

If so could you give some guidance on how to configure thermald to do
this?
To be honest from looking at the conf file and the sparse available
documentation I have no clue on how to configure it at all.

I will try to look for:

  1. see if you have acpi fan available
    cd /sys/class/thermal
    and look for entry cooling_deviceX where type == Fan
    If you have then you can turn off the fan by writing 0 to curr_state

This will be a best option for you if you have this support.

Sadly there is no (stable) way to control the fan on this system. There
still is a bug in the i8k module required to control it (
https://bugs.launchpad.net/i8kutils/+bug/1179282).

  1. You can send dbus message to set temperature. I don't know whether
    your distros is executing thermald with --dbus-enable option or not. You
    should see in the syslog the action.

If you have version 1.3. you can check by "thermald --version" command

sudo dbus-send --system
--dest=org.freedesktop.thermald /org/freedesktop/thermald
org.freedesktop.thermald.SetUserPassiveTemperature string:cpu
string:55000

For earliar versions
dbus-send --system
--dest=org.freedesktop.thermald /org/freedesktop/thermald
org.freedesktop.thermald.SetUserMaxTemperature string:cpu string:55000

You only need to do one time. This stores this setting for subsequent
runs.

​Thanks, I'll try that and see if this helps.​ On ArchLinux thermald is
definitly called with --dbus-enabled.

  1. If you don't have dbus enabled then you can configure xml to set.
    Your thermal-conf.xml, it will be in /usr/local/etc/thermald
    or /usr/etc/thermald/ or /etc/thermald based on your build parameters.

You can replace contents with:

Generic X86 Laptop Device * QUIET cpu 55000 max

​This ​looks to me as if there is almost no configuration necessary to set
the temperature. Does thermald query all available devices and if it does
how does it build a "battleplan" on how to use all available devices?

Thanks,
Srinivas

Kind regards,
Florian

2014-12-11 16:56 GMT+01:00 Srinivas Pandruvada
notifications@github.com:

On Thu, 2014-12-11 at 01:49 -0800, fhaust wrote:

I just noticed that I had thermald installed and running on my
arch
linux running Dell XPS notebook for quite a while.

The CPU temperature is constantly around 58°C when idle, still the
fan
is running constantly. I believe the trigger temperature for the
fan
is about 50°C. Sadly the i8k module doesn't work for this model
(can
force it but freezes the system every 3 seconds).

So: can I setup thermald to keep the temperature below 50°C in
normal
conditions?
Sure. You can change the maximum temp. But it will hurt
performance.

Thanks,
Srinivas


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub

https://github.com/01org/thermal_daemon/issues/42#issuecomment-66639607.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub
https://github.com/01org/thermal_daemon/issues/42#issuecomment-66811915.

@davepuchyr
Copy link

davepuchyr commented Apr 17, 2017

Just to give a bump to this old thread that, seems to me, is a very relevant use case for thermald, I achieved the goal with these config files and root crontab entry:

thermal-conf.xml

<?xml version="1.0"?>
<!-- https://wiki.gentoo.org/wiki/Toshiba_Radius_12 -->
<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>77000</Temperature>
                  <type>passive</type>
                  <ControlType>SEQUENTIAL</ControlType>
                  <CoolingDevice>
                     <index>1</index>
                     <type>intel_pstate</type>
                     <influence>100</influence>
                     <SamplingPeriod>10</SamplingPeriod>
                  </CoolingDevice>
               </TripPoint>
            </TripPoints>
         </ThermalZone>
      </ThermalZones>
   </Platform>
</ThermalConfiguration>

thermal-cpu-cdev-order.xml

<CoolingDeviceOrder>
	<CoolingDevice>intel_pstate</CoolingDevice>
	<CoolingDevice>rapl_controller</CoolingDevice>
	<CoolingDevice>intel_powerclamp</CoolingDevice>
	<CoolingDevice>cpufreq</CoolingDevice>
	<CoolingDevice>Processor</CoolingDevice>
</CoolingDeviceOrder>

crontab

# temperature is in m°C
@reboot /usr/bin/dbus-send --system --dest=org.freedesktop.thermald /org/freedesktop/thermald org.freedesktop.thermald.SetUserMaxTemperature string:cpu uint32:80000
@reboot /usr/bin/dbus-send --system --dest=org.freedesktop.thermald /org/freedesktop/thermald org.freedesktop.thermald.SetCurrentPreference string:"ENERGY_CONSERVE"

I must say that the results of the software are great - a (good) laptop of mine that kept overheating is now perfectly functional - but the entirely esoteric nature of the config files is a problem; hence the need for the crontab.

Anyway, I tested the above config by transcoding an hevc(x265)/aac video into h264/mp3 and got 95+% cpu usage and all sensor temperatures stayed below 80°C after an initial peak above 80°C. Without thermald my laptop would have abruptly powered-off very quickly.

@spandruvada
Copy link
Contributor

Closing older issues, reopen if you need to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants