Haiku (and R5) know how hot (or not) my system is.

The acpi_thermal driver is not close to done, but it’s got minimal functionality for reading temperatures of thermal devices.

$ cat /dev/power/thermal/0
ACPI Thermal Device 0
Critical Temperature: 352.2 K
Current Temperature: 303.2 K

I checked the driver that does this into Haiku’s subversion repo last night.
The driver supports reading status with human-readable output via the standard stream read() function, as well as specialized ioctl()s.

5 Responses to “Haiku (and R5) know how hot (or not) my system is.”

  1. mikesum32 Says:

    If you call Kelvin human-readable output.

    “You’ brilliant Kelvin !”

  2. nemo3383 Says:

    mikesum32 it is readable.

    Actually, I think both Celsius and Kelvin make more sense than Fahrenheit.

    Celsius = Kelvin - 273.15
    Fahrenheit =( Kelvin - 273.15 /(5/9)) + 32

  3. mikesum32 Says:

    Slightly more sense.

  4. Bryan Says:

    Temperatures reported (and used) by ACPI are all in tenths of degrees kelvin.

    Clearly, good end-user tools would convert to the preferred scale. That’s obvious.

    So why kelvin?

    Simple. No negative numbers. Kelvin is an absolute-zero based temerature scale. Writing andything with ACPI means you don’t have to deal with signed primitives. Integer as defined in ACPI means a uint32.

    nemo3383, I hope you had to look those conversions up…. :-) (I did last night)

  5. axeld Says:

    Nice to see you working on this!
    The thermal driver is working on my IBM ThinkPad T40 as well, btw.

Leave a Reply

You must be logged in to post a comment.