ACPI Temperature zones, batteries

Daniel Bonniot Daniel.Bonniot at inria.fr
Fri May 27 01:19:46 PDT 2005


 >>I agree that's the best. However, as far as I know there is no automatic way
 >>to associate an ACPI thermal zone name to a concrete device (like CPU,
 >>motherboard, ...). This is claimed here, for instance:
 >>http://lists.debian.org/debian-laptop/2003/08/msg00040.html
 >>I would loved to be proved wrong. Also, maybe there is a "common practice"
 >>common enough to be taken as a default. On my system, THRC is the CPU (C), and
 >>there is also THRM is probably the motherboard (M).
 >
 >
 > How does the ACPI code in the kernel generate the names? Does it know
 > for sure?

This is just a wild guess, but I suspect the names are received through the 
ACPI protocol, same as the temperature data. That is, they would be somewhere 
in the hardware or in the bios.


 >>2) Some CPUs can be controled to change frequency and voltage (CPUfreq). I
 >>wrote a patch to the userspace tool cpudyn that controls this feature. My
 >>patch needs to know the temperature to decide which frequency to chose.
 >
 >
 > Cool - as long as you are not saying "when cpu temp > 100*c then
 > shutdown" :-)

No, I agree this is a different job altogether.

~ cat /proc/acpi/thermal_zone/THRC/trip_points            [10:11 27/05/05]
critical (S5):           101 C
passive:                 92 C: tc1=2 tc2=5 tsp=300 devices=0xdfb47fe0

I read this as saying that the system should move to state S5 (shutdown?) if 
the CPU goes to 101 C. Not sure who is responsible for this, and if this is 
working atm on linux, luckilly I never got there.

It would also be interesting to know what the passive line does. Any hint?

 >>BTW, I would also be interested in battery information. In that case it should
 >>be easier to attach the info to a concrete device ;-)
 >
 >
 > If I understand your question, then yes, Already there - try running
 > hal-0.52. See these screenshots for more information:
 > http://gnome-power.sourceforge.net/hal.php#screenshots

Cool thanks. I see I had a quite outdated version of HAL.

 >>In both cases, do you know if it's possible to be notified of changes instead
 >>of polling? Or would HAL do the polling, and notify all interested clients?
 >
 >
 > Yes, this is what HAL 0.52 does, it listens on the /proc/acpi/event file
 > (it can work with or without acpid present) and then an event is
 > triggered for each change.

At least on my system, I think there are events for battery insertion and 
moving in and out of AC, but not for each change in the battery level.

Daniel

_______________________________________________
hal mailing list
hal at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/hal



More information about the Hal mailing list