# Asus E35M1-I temperature monitoring?



## tingo (Nov 5, 2011)

Does anyone know how to get temperature monitoring data from the AMD E-350 / Hudson M1 platform in FreeBSD?
I have a Asus E35M1-I motherboard, and the "monitor" screen in the bios shows cpu temperature.
Installed FreeBSD 8.2-release / amd 64 on it, but nothing here:

```
root@kg-f3# uname -a
FreeBSD kg-f3.kg4.no 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Thu Feb 17 02:41:51 UTC 2011
     root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
root@kg-f3# sysctl -a | grep temp
net.inet6.ip6.use_tempaddr: 0
net.inet6.ip6.temppltime: 86400
net.inet6.ip6.tempvltime: 604800
net.inet6.ip6.prefer_tempaddr: 0
hw.usb.template: 0
```
tried with the amdtemp(4) module:

```
# kldload amdtemp
# sysctl dev.amdtemp
sysctl: unknown oid 'dev.amdtemp'
# sysctl dev.cpu.0.temperature
sysctl: unknown oid 'dev.cpu.0.temperature'
# sysctl dev.cpu.1.temperature
sysctl: unknown oid 'dev.cpu.1.temperature'
```
and even the acpi_aiboost(4) module (Asus specific):

```
# kldload acpi_aiboost
# sysctl dev.acpi_aiboost.0
sysctl: unknown oid 'dev.acpi_aiboost.0'
```
Nothing at all.


----------



## francis (Nov 12, 2011)

Hi *tingo*! It seems that, there is several possibilities to check out/monitoring temperature. First off let's look for some applications available in FreeBSD Ports Collection and sysutils category (more here; ports/sysutils):

 sysutils/lmmon display various information included motherboard temperature;
 sysutils/mbmon motherboard monitor; interesting sentence _"If you have a problem on ASUS Pentium4 motherboard, look into this..."_ The problem of ASUS Pentium 4 motherboards. Despite that it refers to different model in case of any problems maybe You will find helpful information?;
 sysutils/healthd it is capable of monitoring up to 3 tempuratures, 3 fan speeds and 7 voltages by using the ASUS 99127 hardware monitor chips;
 sysutils/ipmitool in short _"IPMI is an open standard for monitoring ... and control of hardware that is implemented independent of the main CPU, BIOS, and OS."_ ipmitool(1) manpage; To use this, You need an interface/support to an IPMI controller in Your motherboard (called a _Baseboard Management Controller_, or BMC).
Note that the mbmon has no maintainer. I believe, that there is many another, interesting applications for this type of tasks. Your post shows that You've tried some  sysctl options. You could try something like this and of course many others sysctl's options;

`# kldload coretemp  [color="PaleTurquoise"]..[/color][i][color="DimGray"]# It is a driver for Intel Core and newer CPUs, right? However, You can try.[/color][/i]`
`# sysctl -a |grep temperature[color="PaleTurquoise"]..[/color][i][color="DimGray"]# Use with `coretemp` module? It's only guessing![b][1][/b][/color][/i]
# sysctl hw.acpi.thermal.tz0.temperature [color="PaleTurquoise"]..[/color][i][color="DimGray"]# Refer to `acpi_thermal` driver. [b][2][/b][/color][/i]`

According to using the ipmitool utility You can try this command;

`#  ipmitool sensor |egrep "[0-9]++ Temp" [color="PaleTurquoise"]..[/color][i][color="DimGray"]  # Found on the FreeBSD forums ... and so on.[/color][/i]`

*[2]* acpi_thermal(4) (apparently some systems are able to report temperature with this driver) with many _hw.acpi.thermal_ values. One more thing; I found a very interesting conversation about CPU temp, see here; lists.freebsd-amd64 - fan speed/CPU temp.

__________________
*[1]* *Example* - Lenovo Thinkpad with FreeBSD 7.2. In this example, I want to show opportunities to check the temperature.

To the /boot/loader.conf file was added two entries;

```
coretemp_load="YES"
acpi_ibm_load="YES"
```
 Next, using two kernel modules: coretemp and acpi_ibm (of course loaded by kldload(8) utility), we can check temp value using sysctl;

`# sysctl -a|grep tempe`

```
hw.acpi.thermal.tz0.temperature: 51.0C
hw.acpi.thermal.tz1.temperature: 53.0C
dev.cpu.0.temperature: 53
dev.cpu.1.temperature: 54
```

*NOTE:* There is a `acpi_asus` module which _provides support only for the extra ACPIcontrolled gadgets, such as hotkeys and leds_ (which follows from the description). So this module seems to not have such functionality as `acpi_ibm` module. Anyway, You can compare the functionality, capabilities etc. of these two modules - acpi_ibm(4) and acpi_asus(4).

That's all what came to my mind or I found on the web. Maybe someone else will write more usable informations? I hope so. 

Best regards!


----------



## tingo (Nov 15, 2011)

francis, thanks for your reply.

Some information: lmmon, mbmon and possibly healthd (checking, yes - the newest version is from 2006) are old, and deal mostly with monitoring circuits in separate chips. Today's machines have  monitoring circuits built into their chipset, or into the cpu chips themselves. IPMI (as you might have guessed already) requires extra circuits (BMC) which adds cost to the motherboard / machine; thus it is very unlikely that you will find ipmi on a "consumer" grade motherboard. IPMI is found mostly on server-class hardware.

As for your examples, here are some results for the amusement of everyone.

```
root@kg-f3# kldload coretemp
root@kg-f3# sysctl -a | grep tempe
```
No, nothing there.

```
root@kg-f3# kldload acpi_ibm
root@kg-f3# sysctl -a | grep tempe
```
Nothing there either.

```
root@kg-f3# kldload acpi_asus
root@kg-f3# sysctl -a | grep tempe
```
No, that didn't work out.
The machine doesn't even have a hw.acpi.thermal node in the acpi tree:

```
root@kg-f3# sysctl hw.acpi.thermal
sysctl: unknown oid 'hw.acpi.thermal'
```
Finally, all tests in this post was run under FreeBSD 9.0-RC1:

```
root@kg-f3# uname -a
FreeBSD kg-f3.kg4.no 9.0-RC1 FreeBSD 9.0-RC1 #0: Tue Oct 18 18:51:43 UTC 2011
     root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
```
Showing that this area (for this hardware) hasn't changed from 8.0.


----------



## tomics (Nov 22, 2011)

Hi. tingo.

amdtemp.ko test-patch. I'm use E350IA-E45(MSI) MotherBoard.

http://www.ons.ne.jp/~ogawa/amdtemp_fusion_test.diff.gz


```
-----
zone:[198] sysctl -a | grep temperature
dev.cpu.0.temperature: 47.1C
dev.cpu.1.temperature: 47.1C

zone:[199] sysctl -a | grep amdtemp
dev.amdtemp.0.%desc: AMD CPU On-Die Thermal Sensors
dev.amdtemp.0.%driver: amdtemp
dev.amdtemp.0.%parent: hostb4
dev.amdtemp.0.sensor0.core0: 46.8C

zone:[205] dmesg | grep CPU
CPU: AMD E-350 Processor (1600.04-MHz K8-class CPU)
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
cpu0: <ACPI CPU> on acpi0
cpu1: <ACPI CPU> on acpi0
acpi_throttle0: <ACPI CPU Throttling> on cpu0
acpi_throttle1: <ACPI CPU Throttling> on cpu1
SMP: AP CPU #1 Launched!
amdtemp0: <AMD CPU On-Die Thermal Sensors> on hostb4
```


----------



## tingo (Nov 24, 2011)

It works here too, using FreeBSD 9.0-RC1:

```
root@kg-f3# uname -a
FreeBSD kg-f3.kg4.no 9.0-RC1 FreeBSD 9.0-RC1 #0: Tue Oct 18 18:51:43 UTC 2011
     root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
root@kg-f3# sysctl -a | grep amdtemp
dev.amdtemp.0.%desc: AMD CPU On-Die Thermal Sensors
dev.amdtemp.0.%driver: amdtemp
dev.amdtemp.0.%parent: hostb4
dev.amdtemp.0.sensor0.core0: 51.1C
root@kg-f3# sysctl -a | grep temper
dev.cpu.0.temperature: 51.0C
dev.cpu.1.temperature: 51.0C
```
Thanks!
The patch didn't work on FreeBSD 8.2-stable.


----------



## tingo (Nov 25, 2011)

It does look like the temperature reported in the bios and via amdtemp differ a bit.
BIOS: +33 degrees C, via amdtemp:

```
root@kg-f3# temp
dev.cpu.0.temperature: 39.8C
dev.cpu.1.temperature: 39.8C
```
I don't know why.
*Update*: After a while, the temperature reported by amdtemp stabilzes:

```
root@kg-f3# temp
dev.cpu.0.temperature: 51.3C
dev.cpu.1.temperature: 51.3C
```
But still the bios reports a different temperature: +46 degrees C


----------



## koci (Dec 5, 2011)

tingo said:
			
		

> It works here too, using FreeBSD 9.0-RC1:
> 
> ```
> root@kg-f3# uname -a
> ...


Hi,
I'm a freeBSD FreeBSD noob, using 8.2 stable, but I'd like to try the patch anyway, could someone tell me how to apply it?
Thanks


----------



## r00t (Dec 15, 2011)

Same problem here. Running 8.2 stable and need to know the temperature. If it doesn't work on 8.2 is there another solution?

I think to apply the patch you have to use the 'patch' command. The problem is that I can't find the original amdtemp.c file to be patched. Any news on this?


----------



## koci (Dec 16, 2011)

I found it at /usr/src/sys/dev/amdtemp/amdtemp.c. The patch fails at the first hunk. It would be easy enough to edit the file manually and rebuild the kernel, but I haven't tried it yet.


----------



## tingo (Aug 5, 2012)

*For FreeBSD 8.2*



			
				r00t said:
			
		

> Same problem here. Running 8.2 stable and need to know the temperature. If it doesn't work on 8.2 is there another solution?



It seems like PR kern/156358 is for FreeBSD 8.2-stable, but I haven't tested it.


----------



## tingo (Aug 5, 2012)

*patch still needed for FreeBSD 9.1-beta1*

I installed FreeBSD 9.1-beta1 on a ASRock E350M1 machine, and found out that the amdtemp.ko module didn't work out of the box.
So I get the latest sources, rebuilt everything, and built a new kernel with the patch from post 4. Yes, the patch is still needed, because now it works:

```
tingo@kg-f4$ uname -a
FreeBSD kg-f4.kg4.no 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #1: Sun Aug  5 18:43:08 CEST 2012     root@kg-f4.kg4.no:/usr/obj/usr/src/sys/GENERIC  amd64
tingo@kg-f4$ kldstat 
Id Refs Address            Size     Name
 1    3 0xffffffff80200000 1320ec0  kernel
 2    1 0xffffffff81521000 3048     amdtemp.ko
tingo@kg-f4$ dmesg | grep amdtemp
amdtemp0: <AMD CPU On-Die Thermal Sensors> on hostb4
tingo@kg-f4$ sysctl dev.amdtemp
dev.amdtemp.0.%desc: AMD CPU On-Die Thermal Sensors
dev.amdtemp.0.%driver: amdtemp
dev.amdtemp.0.%parent: hostb4
dev.amdtemp.0.sensor0.core0: 54.0C
```
HTH


----------



## Paul-LKW (Sep 7, 2013)

I just tried the patch and it seems the patch does still not work with the AMD 990FXA chipset.


----------

