echo 75000 > /sys/class/thermal/thermal_zone0/trip_point_1_temp - Permission denied!!

John Hupp ubuntu at prpcompany.com
Wed Jun 18 15:53:08 UTC 2014


Hi, Tapio.

Just yesterday I wrote up a summary of what I learned/failed to learn 
during a few weeks' dive into this.  It can be seen in the Lubuntu mail 
list archive at 
https://lists.ubuntu.com/archives/lubuntu-users/2014-June/007979.html

Scripting is my Achilles' heel (OK, just one of many), but I read 
through the script trying to get a basic idea of how it works.  I see 
that in setlevel(), it does
     echo some-fan-speed-level > 
/sys/devices/virtual/thermal/cooling_deviceN/cur_state

In your /sys/devices/virtual/thermal, what is the content of the type 
file in each of the four cooling_device folders?  Is the content "fan" 
for one of them (maybe "processor", "processor" and "LCD" for the others)?

One critical difference between your scenario and mine is that the 
Thinkpads and your HP use ACPI for fan control.  My Lenovo 3000 uses SMM 
for fan control by default (though it is an open question as to whether 
it can be forced to use ACPI).  But it does use ACPI for CPU throttling.

But despite using ACPI for CPU throttling, an interesting observation 
also is that your cur_state attributes are obviously writable, but my 
CPU trip_point_temp_N attributes are not writable.  So even though we 
share a measure of ACPI support, my ACPI cooling devices are, on the 
face of it at least, not user controllable, but yours are (at least your 
fan is -- none of the cited material has looked at what is going on with 
ACPI CPU throttling on the Thinkpads and HPs).

Thermald is an exciting new development.  But it has its limitations.  
If there is no existing ACPI fan device, it cannot create one, and 
therefore it cannot do ACPI fan control.  That is the case with my 
Lenovo.  But I think that you probably do have an ACPI fan control, and 
that thermald will work for that purpose.

--John

On 6/18/2014 2:31 AM, tapio.valli at gmail.com wrote:
> Hi John,
>
> I read your posts regarding changing the Linux kernel thermal trip points and working with ACPI. My situation is somewhat similar to yours, here are the essential facts & findings
>
> 1) My laptop is HP Probook 4510s
>
> 2) Active thermal control has worked ok on Windows, no overheating. Since I started with Linux (I've tried Debian and Ubuntu 12.04-14.04), the laptop has been running hotter and had at least two, abrupt thermal shutdowns during heavy load tasks.
>
> 3) Laptop is physically clean from dust, used compressed air. No remarkable help.
>
> 4) Read extensively on the topic. Nothing I was able to find really did *anything* to the thermal system performance. I finally ended up writing a shell script to control the fan, read about it here:
>
> http://askubuntu.com/questions/428760/fan-is-constantly-on-when-plugged-but-goes-silent-when-only-on-battery (scroll for my reply)
>
> 5)  Noticed that bash script increases the loading on the machine too much (ah, the irony) and turned it into c++ daemon. It works great, source code which should be easy to modify for other laptops on Ubuntu is available from me.
>
> 6) Learned about this
>
> https://bugzilla.kernel.org/show_bug.cgi?id=71711
>
> It seems that my case would be affected by kernel bug on 3.13 versions. I installed latest RC for development kernel, 3.15-rc8. Now the fan *is* indeed controlled but less aggressively than with my daemon. Core temps are higher and laptop is generally more silent.
>
> 7) Now, I would like to adjust the cooling policies so that the kernel would take active cooling measures (i.e. fan) on lower temps. This is basically same as the task you had.
>
> I see that there are two possibilities, either to a) re-compile ACPI (already tried, felt very cryptic) or b) use thermald
>
> The pros/cons with these seems to be
>
> a) ACPI language is difficult, specification is long. Need to use also ACPI compiler and other tools. Finally kernel has to accept my re-compiled version to replace the BIOS version on the start-up. BTW, I have already updated my BIOS in 4) above.
>
> b) This is a new method which is geared towards newer Intel CPU features. My CPU is Core Duo 2, which does not have those new tricks. There are ways to use the older system through thermald as well, but I wonder how well they'll work. Anyway, the thermald-conf is also not well documented and there are not too many examples.
>
> I'd be interested to read about your findings and ways you have identified to solve your issue. Also all recommendation between a/b and other would be highly appreciated.
>
> Thanks,
>
> Tapio Valli
> tapio.valli at gmail.com
>
>
> _____________________________________
> Sent from http://ubuntu.5.x6.nabble.com
>





More information about the kernel-team mailing list