You are not logged in.

#1 2013-07-05 22:00:50

cris9288
Member
Registered: 2013-01-07
Posts: 348

configuring thermald

has anyone actually figured out how to configure thermald in thermald-conf.xml? Normally I don't have problems with configuration files, but i'm really lost with this one. The man page doesn't really help either.


Here's my thermald-conf.xml. They only thing i've done is to lower the Trip Point values to try and trigger my fans, but nothing seems to happen. Maybe I just don't understand what thermald is supposed to actually do. I would greatly appreciate any advice or help.

<?xml version="1.0"?><!DOCTYPE ThermalConfiguration [
<!ELEMENT uuid (#PCDATA)>
<!ELEMENT Preference (#PCDATA)>
<!ELEMENT Name (#PCDATA)>
<!ELEMENT Sensor_path (#PCDATA)>
<!ELEMENT Temperature (#PCDATA)>
<!ELEMENT type (#PCDATA)>
<!ELEMENT TripPoint (Temperature,CoolingDevice,type)>
<!ELEMENT TripPoints (TripPoint)+>
<!ELEMENT Kp (#PCDATA)>
<!ELEMENT Ki (#PCDATA)>
<!ELEMENT Kd (#PCDATA)>
<!ELEMENT PidControl (Kp,Ki,Kd)>
<!ELEMENT ThermalZone (Name,Sensor_path,TripPoints)>
<!ELEMENT ThermalZones (ThermalZone)+>
<!ELEMENT Index (#PCDATA)>
<!ELEMENT Type (#PCDATA)>
<!ELEMENT Path (#PCDATA)>
<!ELEMENT MinState (#PCDATA)>
<!ELEMENT MaxState (#PCDATA)>
<!ELEMENT IncDecStep (#PCDATA)>
<!ELEMENT AutoOffMode (#PCDATA)>
<!ELEMENT CoolingDevice (#PCDATA|Index|Type|Path|MinState|MaxState)*>
<!ELEMENT CoolingDevices (CoolingDevice)+>
<!ELEMENT Platform (Name,uuid,Preference,ThermalZones,CoolingDevices)>
<!ELEMENT ThermalConfiguration (Platform)+>
]>

<!-- 	EXAMPLE CONF FILE
 	Motivation: How can it help
Configuration in this file is useful for the following cases:
1. If there is no thermal sysfs data but has some some sensors
and cooling devices.
2. Buggy ACPI provided data: For example has 0's in trip points
or invalid trip points
3. Non ACPI detectable sensor and cooling devices, so thermal zone
information
4. Specify ACPI passive cooling clock throttling constants

Caveats:
Using DMI UUID to identify a platform. What else can we use?
WILL BE ENHANCING TILL SOME TIME! SO DTD IS NOT FINAL.
-->

<!--
Example below specifies
- One platform thermal configuration data
- Three temperature zones
	Two temerature zones
	One virtual temperature zone
- 4 cooling devices
	Two active cooling FAN type devices
	one passive cooling using ACPI formula
	one passive cooling with PID controller
-->

<!-- BEGIN -->

<!-- Thermal configuration -->
<ThermalConfiguration>
<Platform>
<Name>Intel IvyBridge UltraBook SDV</Name>
<uuid>dummy-C4850803-A624-C485-0803-A624C4850803</uuid>
<Preference>PERFORMANCE</Preference>
<!-- Either PERFORMANCE or QUIET 
<Preference>QUIET</Preference>
-->
	<ThermalZones>
		<!-- Thermal Zone 0 -->
		<ThermalZone>
			<Name>Zone0</Name>
			<Sensor_path>/sys/class/thermal/thermal_zone0/temp</Sensor_path>
			<TripPoints>
				<TripPoint>
					<Temperature>30000</Temperature>
					<CoolingDevice>9</CoolingDevice>
					<type>active</type>
				</TripPoint>
				<TripPoint>
					<Temperature>40000</Temperature>
					<CoolingDevice>8</CoolingDevice>
					<type>active</type>
				</TripPoint>
				<TripPoint>
					<Temperature>50000</Temperature>
					<CoolingDevice>7</CoolingDevice>
					<type>active</type>
				</TripPoint>
				<TripPoint>
					<Temperature>75000</Temperature>
					<CoolingDevice>6</CoolingDevice>
					<type>active</type>
				</TripPoint>
				<TripPoint>
					<Temperature>80000</Temperature>
					<CoolingDevice>5</CoolingDevice>
					<type>active</type>
				</TripPoint>
					<TripPoint>
					<Temperature>85000</Temperature>
					<CoolingDevice>4</CoolingDevice>
					<type>active</type>
				</TripPoint>
				<TripPoint>
					<Temperature>86000</Temperature>
					<CoolingDevice>3</CoolingDevice>
					<type>active</type>
				</TripPoint>
				<TripPoint>
					<Temperature>90000</Temperature>
					<CoolingDevice>2</CoolingDevice>
					<type>active</type>
				</TripPoint>
				<TripPoint>
					<Temperature>95000</Temperature>
					<CoolingDevice>1</CoolingDevice>
					<type>active</type>
				</TripPoint>
				<TripPoint>
					<Temperature>98000</Temperature>
					<CoolingDevice>0</CoolingDevice>
					<type>active</type>
				</TripPoint>
				<TripPoint>
					<Temperature>105000</Temperature>
					<type>critical</type>
				</TripPoint>
			</TripPoints>
		</ThermalZone>
		<!-- Thermal Zone 1 -->
		<ThermalZone>
			<Name>Zone1</Name>
			<Sensor_path>/sys/class/thermal/thermal_zone1/temp</Sensor_path>
			<TripPoints>
				<TripPoint>
					<Temperature>95000</Temperature>
					<CoolingDevice>13</CoolingDevice>
					<type>passive</type>
				</TripPoint>
				<TripPoint>
					<Temperature>95000</Temperature>
					<CoolingDevice>12</CoolingDevice>
					<type>passive</type>
				</TripPoint>
				<TripPoint>
					<Temperature>95000</Temperature>
					<CoolingDevice>11</CoolingDevice>
					<type>passive</type>
				</TripPoint>
				<TripPoint>
					<Temperature>95000</Temperature>
					<CoolingDevice>10</CoolingDevice>
					<type>passive</type>
				<TripPoint>
					<Temperature>105000</Temperature>
					<type>critical</type>
				</TripPoint>
				</TripPoint>
			</TripPoints>
		</ThermalZone>
	<!-- Thermal Zones End -->
	</ThermalZones>
	<!-- Cooling Devices Begin -->
	<CoolingDevices>
		<CoolingDevice>
			<Index>0</Index>
			<Type>Fan</Type>
			<Path>/sys/class/thermal/cooling_device0/cur_state</Path>
			<MinState>0</MinState>
			<MaxState>1</MaxState>
		</CoolingDevice>
		<CoolingDevice>
			<Index>1</Index>
			<Type>Fan</Type>
			<Path>/sys/class/thermal/cooling_device1/cur_state</Path>
			<MinState>0</MinState>
			<MaxState>1</MaxState>
		</CoolingDevice>
		<CoolingDevice>
			<Index>2</Index>
			<Type>Fan</Type>
			<Path>/sys/class/thermal/cooling_device2/cur_state</Path>
			<MinState>0</MinState>
			<MaxState>1</MaxState>
		</CoolingDevice>
		<CoolingDevice>
			<Index>3</Index>
			<Type>Fan</Type>
			<Path>/sys/class/thermal/cooling_device3/cur_state</Path>
			<MinState>0</MinState>
			<MaxState>1</MaxState>
		</CoolingDevice>
		<CoolingDevice>
			<Index>4</Index>
			<Type>Fan</Type>
			<Path>/sys/class/thermal/cooling_device4/cur_state</Path>
			<MinState>0</MinState>
			<MaxState>1</MaxState>
		</CoolingDevice>
		<CoolingDevice>
			<Index>5</Index>
			<Type>Fan</Type>
			<Path>/sys/class/thermal/cooling_device5/cur_state</Path>
			<MinState>0</MinState>
			<MaxState>1</MaxState>
		</CoolingDevice>
		<CoolingDevice>
			<Index>6</Index>
			<Type>Fan</Type>
			<Path>/sys/class/thermal/cooling_device6/cur_state</Path>
			<MinState>0</MinState>
			<MaxState>1</MaxState>
		</CoolingDevice>
		<CoolingDevice>
			<Index>7</Index>
			<Type>Fan</Type>
			<Path>/sys/class/thermal/cooling_device7/cur_state</Path>
			<MinState>0</MinState>
			<MaxState>1</MaxState>
		</CoolingDevice>
		<CoolingDevice>
			<Index>8</Index>
			<Type>Fan</Type>
			<Path>/sys/class/thermal/cooling_device8/cur_state</Path>
			<MinState>0</MinState>
			<MaxState>1</MaxState>
		</CoolingDevice>
		<CoolingDevice>
			<Index>9</Index>
			<Type>Fan</Type>
			<Path>/sys/class/thermal/cooling_device9/cur_state</Path>
			<MinState>0</MinState>
			<MaxState>1</MaxState>
		</CoolingDevice>
		<CoolingDevice>
			<Index>10</Index>
			<Type>Processor</Type>
			<Path>/sys/class/thermal/cooling_device10/cur_state</Path>
			<MinState>0</MinState>
			<MaxState>17</MaxState>
		</CoolingDevice>
		<CoolingDevice>
			<Index>11</Index>
			<Type>Processor</Type>
			<Path>/sys/class/thermal/cooling_device11/cur_state</Path>
			<MinState>0</MinState>
			<MaxState>17</MaxState>
		</CoolingDevice>
		<CoolingDevice>
			<Index>12</Index>
			<Type>Processor</Type>
			<Path>/sys/class/thermal/cooling_device12/cur_state</Path>
			<MinState>0</MinState>
			<MaxState>17</MaxState>
		</CoolingDevice>
		<CoolingDevice>
			<Index>13</Index>
			<Type>Processor</Type>
			<Path>/sys/class/thermal/cooling_device13/cur_state</Path>
			<MinState>0</MinState>
			<MaxState>17</MaxState>
		</CoolingDevice>
		<CoolingDevice>
			<Index>14</Index>
			<Type>LCD</Type>
			<Path>/sys/class/thermal/cooling_device14/cur_state</Path>
			<MinState>0</MinState>
			<MaxState>16</MaxState>
		</CoolingDevice>
	<!-- Cooling Devices End -->
	</CoolingDevices>
</Platform>
<Platform>
	<Name>SandyBridge Platform</Name>
	<uuid>dummy-001320F9-BE92-0013-20F9-BE92001320F9</uuid>
	<Preference>PERFORMANCE</Preference>

	<ThermalZones>
		<ThermalZone>
			<Name>Zone0</Name>
			<Sensor_path>/sys/class/thermal/thermal_zone0/temp</Sensor_path>
			<TripPoints>
				<TripPoint>
					<Temperature> 30000 </Temperature>
					<CoolingDevice>4</CoolingDevice>
					<type>active</type>
				</TripPoint>
				<TripPoint>
					<Temperature> 40000 </Temperature>
					<CoolingDevice>3</CoolingDevice>
					<type>active</type>
				</TripPoint>
				<TripPoint>
					<Temperature> 50000 </Temperature>
					<CoolingDevice>2</CoolingDevice>
					<type>active</type>
				</TripPoint>
				<TripPoint>
					<Temperature> 55000 </Temperature>
					<CoolingDevice>1</CoolingDevice>
					<type>active</type>
				</TripPoint>
				<TripPoint>
					<Temperature> 71000 </Temperature>
					<CoolingDevice>0</CoolingDevice>
					<type>active</type>
				</TripPoint>
			</TripPoints>
		</ThermalZone>
	</ThermalZones>
	<CoolingDevices>
		<CoolingDevice>
			<Index>0</Index>
			<Type>Fan</Type>
			<Path>/sys/class/thermal/cooling_device0/cur_state</Path>
			<MinState>0</MinState>
			<MaxState>1</MaxState>
		</CoolingDevice>
		<CoolingDevice>
			<Index>1</Index>
			<Type>Fan</Type>
			<Path>/sys/class/thermal/cooling_device1/cur_state</Path>
			<MinState>0</MinState>
			<MaxState>1</MaxState>
		</CoolingDevice>
		<CoolingDevice>
			<Index>2</Index>
			<Type>Fan</Type>
			<Path>/sys/class/thermal/cooling_device2/cur_state</Path>
			<MinState>0</MinState>
			<MaxState>1</MaxState>
		</CoolingDevice>
		<CoolingDevice>
			<Index>3</Index>
			<Type>Fan</Type>
			<Path>/sys/class/thermal/cooling_device3/cur_state</Path>
			<MinState>0</MinState>
			<MaxState>1</MaxState>
		</CoolingDevice>
		<CoolingDevice>
			<Index>4</Index>
			<Type>Fan</Type>
			<Path>/sys/class/thermal/cooling_device4/cur_state</Path>
			<MinState>0</MinState>
			<MaxState>1</MaxState>
		</CoolingDevice>
	</CoolingDevices>
</Platform>

<!-- 	EXAMPLE CONF FILE
Example using a non thermal zone temperature sysfs
-->
<Platform>
	<Name>Asus Ultrabook Platform</Name>
	<uuid>dummy-0BAE5980-01A6-81E1-3575-5404A62D3DB1</uuid>
	<Preference>QUIET</Preference>
	<ThermalZones>
		<ThermalZone>
			<Name>Zone0</Name>
			<Sensor_path>/sys/devices/platform/coretemp.0/temp1_input</Sensor_path>
			<TripPoints>
				<TripPoint>
					<Temperature> 70000 </Temperature>
					<CoolingDevice>0</CoolingDevice>
					<type>passive</type>
				</TripPoint>
				<TripPoint>
					<Temperature> 70000 </Temperature>
					<CoolingDevice>1</CoolingDevice>
					<type>passive</type>
				</TripPoint>
				<TripPoint>
					<Temperature> 70000 </Temperature>
					<CoolingDevice>2</CoolingDevice>
					<type>passive</type>
				</TripPoint>
				<TripPoint>
					<Temperature> 70000 </Temperature>
					<CoolingDevice>3</CoolingDevice>
					<type>passive</type>
				</TripPoint>
			</TripPoints>
		</ThermalZone>
	</ThermalZones>
	<CoolingDevices>
		<CoolingDevice>
			<Index>0</Index>
			<Type>Processor</Type>
			<Path>/sys/class/thermal/cooling_device0/cur_state</Path>
			<MinState>0</MinState>
			<MaxState>10</MaxState>
		</CoolingDevice>
		<CoolingDevice>
			<Index>1</Index>
			<Type>Processor</Type>
			<Path>/sys/class/thermal/cooling_device1/cur_state</Path>
			<MinState>0</MinState>
			<MaxState>10</MaxState>
		</CoolingDevice>
		<CoolingDevice>
			<Index>2</Index>
			<Type>Processor</Type>
			<Path>/sys/class/thermal/cooling_device2/cur_state</Path>
			<MinState>0</MinState>
			<MaxState>10</MaxState>
		</CoolingDevice>
		<CoolingDevice>
			<Index>3</Index>
			<Type>Processor</Type>
			<Path>/sys/class/thermal/cooling_device3/cur_state</Path>
			<MinState>0</MinState>
			<MaxState>10</MaxState>
		</CoolingDevice>
		<CoolingDevice>
			<Index>4</Index>
			<Type>intel_powerclamp</Type>
			<Path>/sys/class/thermal/cooling_device4/cur_state</Path>
			<MinState>0</MinState>
			<IncDecStep>5</IncDecStep>
			<AutoOffMode>1</AutoOffMode>
			<MaxState>50</MaxState>
		</CoolingDevice>
	</CoolingDevices>
</Platform>
</ThermalConfiguration>
<!-- END -->

Offline

#2 2013-07-05 22:29:46

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: configuring thermald

Thermald tries to regulate thermal output (temp) without significantly impacting performance by using a number of Intel specific functions included in the Linux kernel.  So in theory, it is supposed to use p-states, t-states, powerclamp, etc before actually falling back to the fan.  At least this is what I gathered from reading the documentation and that discussion on Theodore T'so's G+ page.

My machine I ahve set to just use the defaults.  It runs very quietly, rarely ever spinning up the fans.  It is also able to keep the system amazingly cool.  I think it stays cooler with intel_pstate and thermald than it did with ondemand and fans.

Edit: In other words, I have never tried to edit the included config... sorry.

Last edited by WonderWoofy (2013-07-05 22:30:16)

Offline

#3 2013-07-05 23:22:11

cris9288
Member
Registered: 2013-01-07
Posts: 348

Re: configuring thermald

That's pretty much how my machine behaves - the fans don't spin up until my temp hits about 55 C. Recently though, it's been running around 10 degrees hotter. It didn't happen overnight - probably over the last few kernel updates. I installed thermald thinking it would make my fans a little more aggressive, but I guess that's not really what its supposed to do. I guess I'll just see if there's any difference with it running.

Offline

#4 2013-07-05 23:26:41

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: configuring thermald

Testing it is probably a worthwhile thing to do in any case. As I have found that even though I didn't think I needed it, it has been working quite well for me.

Can you grab an older kernel from your package cache (or the ARM) and test to see if it cools down.  It would be good to know if this is a kernel issue, or something else that is causing the problems.

Offline

#5 2013-07-05 23:44:40

cris9288
Member
Registered: 2013-01-07
Posts: 348

Re: configuring thermald

I supposed I could try that. Would downloading from here work?

https://projects.archlinux.org/svntogit … 39b6c3b6f4

I would probably need the correct headers as well right?

Last edited by cris9288 (2013-07-05 23:50:00)

Offline

#6 2013-07-05 23:57:54

donniezazen
Member
From: Salt Lake City
Registered: 2011-06-24
Posts: 671
Website

Re: configuring thermald

My understanding was that it came without any config files and you are suppose to write your own XML if you wish to modify its behavior. I do have to figure out it controls fan so that I can have one userspace utility (tlp, laptop-mode) and one kernel utility to control power management and get rid of thinkfan?

Offline

#7 2013-07-06 00:18:23

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: configuring thermald

You should look into the Arch Rollback Machine.  It is  a nice thing to know about in general.  It is covered on the wiki somehwere.  Then you can simply download the old binary packages instead of totally rebuilding.

Just remember that unlike the numerous mirrors of packages we use, the Arch Rollback Machine does not have nearly as much available bandwidth.  So don't abuse it.

Offline

#8 2013-07-06 09:54:11

mcloaked
Member
From: Yorkshire, UK
Registered: 2012-02-02
Posts: 1,240

Re: configuring thermald

I have been quietly watching posts and developments about thermald but not actually installed it on my machine (Ivybridge with no fans!) - does anyone have any test figures giving a typical core temp range over a reasonable period of use a) without thermald running, and b) with thermald running?   Although I don't have any issues with my CPU temperatures they seem to fluctuate between around 36C when nothing much is being used to around 45C to 48C when I am doing lots of stuff.

My system is a completely fanless one with the entire system inside an Akasa Euler case (35W TDP i3 Ivybridge processor) and it has been running since around March with little change in the temperatures I quoted above.  The top of the case feel quite warm to the touch and I just wondered whether running thermald would make much difference - particularly as we are just getting to the real summer temperatures in the UK this weekend!

Thanks


Mike C

Offline

#9 2013-07-06 20:53:01

cris9288
Member
Registered: 2013-01-07
Posts: 348

Re: configuring thermald

WonderWoofy wrote:

You should look into the Arch Rollback Machine.  It is  a nice thing to know about in general.  It is covered on the wiki somehwere.  Then you can simply download the old binary packages instead of totally rebuilding.

Just remember that unlike the numerous mirrors of packages we use, the Arch Rollback Machine does not have nearly as much available bandwidth.  So don't abuse it.

Cool. I checked it out. I'm gonna try and roll back to 3.9.1 after I try out thermald for a while. So far it seems to work pretty nice. My machine stays at around 30 on idle and 35-37 when I'm doing stuff (chrome + netbeans + spotify is typically the biggest load my cpu has to handle). What's weird to me is that I can't get the fans to spin even If I set the trip points pretty low in thermal-conf.xml. This makes me think that the recent drop in temp is just a placebo (ambient temp maybe? It has been kind of hot around here) rather than thermald's work.

Offline

#10 2013-07-07 10:58:25

mcloaked
Member
From: Yorkshire, UK
Registered: 2012-02-02
Posts: 1,240

Re: configuring thermald

I decided to try thermald from the aur (not the git version though) - I have the cpupower daemon running, and thermald as well - but I don't see any noticeable difference at all in the temperatures compared to before I was running thermald! Admittedly I am nowhere near the temp-high, or critical, and maybe the main effect is to control the situation better if the temperatures are getting near the critical values?

I don't know if I have thermald running correctly but I have the current arch kernel 3.9.9-1-ARCH (x86_64) and simply installed the thermald package from aur (dated July 2nd 2013) - then did systemctl start thermald - (and enabled it for future boots).  However after that interestingly I see:

$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver 
acpi-cpufreq

So there is no evidence of intel p-states!

Is this the correct way to set up thermald?


Mike C

Offline

#11 2013-07-07 14:30:07

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: configuring thermald

Mike, did you actually read the documentation that is either on the thermald site or on the git page?  It explains how and when thermald is supposed to work.  With temps <50C all the time, I am not sure what expectations you have... again, you need to read how thermald works.

Also you say you have an IvyBridge, so I am also not sure why you would expect to have intel_pstates being applied to your frequency scaling.  Unless you enabled it with your processor before building (either by using a patch or simply adding a one liner to the intel_pstate.c file) it is doing exactly as expected.

Offline

#12 2013-07-07 20:04:43

mcloaked
Member
From: Yorkshire, UK
Registered: 2012-02-02
Posts: 1,240

Re: configuring thermald

WonderWoofy wrote:

Mike, did you actually read the documentation that is either on the thermald site or on the git page?  It explains how and when thermald is supposed to work.  With temps <50C all the time, I am not sure what expectations you have... again, you need to read how thermald works.

Also you say you have an IvyBridge, so I am also not sure why you would expect to have intel_pstates being applied to your frequency scaling.  Unless you enabled it with your processor before building (either by using a patch or simply adding a one liner to the intel_pstate.c file) it is doing exactly as expected.

I did read as best I could, yes, and did think that it would not benefit me too much but I thought I would install it and see what difference it would make.  However I did see some reports indicating that temperatures were lower when running thermald even though they were not particularly high to start with.

Yes I had seen that specific parameters need setting to build the kernel for p-states to be be used - but it is not clear (to me) whether the normal kernel released for arch is now p-states enabled or not!

I'll go away and read more before trying any more on this.


Mike C

Offline

Board footer

Powered by FluxBB