k10temp or how to get the temperature from your amd phenom processor
2
Feb/0930
Feb/0930
Step for step (I’m not sure if this the newest k10temp version!):
$ wget http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20080718/d51be536/attachment.bin
$ mkdir k10temp && mv attachment.bin k10temp/k10temp.c
Now create the Makefile with following lines:
obj-m := k10temp.o
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
default:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
$ make -C /lib/modules/$(uname -r)/build M=$(pwd) modules
$ cp k10temp.ko /lib/modules/$(uname -r)/kernel/drivers/hwmon
$ depmod && modprobe k10temp
Enjoy it!
8:41 pm on February 13th, 2009
Hi, I’m trying to compile the k10temp module but I have never done anything like this before (I have compiled a regular kernel). Could anyone please help me with this?
I have downloaded attachment.bin and renamed it to k10temp.c though I don’t know if it matters where the k10temp folder is placed? When I run “make -C /lib/modules/$(uname -r)/build M=$(pwd) modules” I get:
make: Entering directory `/usr/src/linux-2.6.28-gentoo-r1′
scripts/Makefile.build:41: /usr/src/k10temp/Makefile: No such file or directory
make[1]: *** No rule to make target `/usr/src/k10temp/Makefile’. Stop.
make: *** [_module_/usr/src/k10temp] Error 2
make: Leaving directory `/usr/src/linux-2.6.28-gentoo-r1′
What am I missing? Obviously a Makefile, but what do I do about it?
8:52 pm on February 13th, 2009
Create the makefile with this content:
obj-m := k10temp.o
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
default:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
Now it should work. I added it to the post.
5:44 pm on April 18th, 2009
I have done this and added k10temp to my /etc/conf.d/lm_sensors and the module shows up in lsmod and no problems in dmesg but when I run sensors I only get:
[code]
lm99-i2c-3-4c
Adapter: NVIDIA i2c adapter
G/C Temp: +30 C (low = +0 C, high = +100 C)
GPU Temp: +54.1 C (low = +21.0 C, high = +102.0 C)
G/C Crit: +127 C (hyst = +117 C)
GPU Crit: +159 C (hyst = +149 C)
k10temp-pci-00c3
Adapter: PCI adapter
[/code]
uname -a
[code]Linux localhost 2.6.29-gentoo #10 SMP Fri Apr 17 18:32:47 EDT 2009 i686 AMD Phenom(tm) 9850 Quad-Core Processor AuthenticAMD GNU/Linux
[/code]
any ideas would be greatly appreciated. Thanks!
-Bob
11:59 am on April 20th, 2009
That is a good question, it’s a problem with gentoo.
I tried for a while to fix it, but I never found the cause of the problem.
The gentoo kernel is not the problem, it must be something with the lm_sensors package.
Maybe you can check the package version of lm_sensors and have a look which version debian is using.
Another solution can be to check the use flags, maybe there is something missing.
Cause of to much problems with gentoo and fglrx (Hell, I hate this fucking catalyst driver!) my gentoo system got a total crash after the 999999 crash of the kernel. So at the moment I can not have a look at it.
12:57 am on April 23rd, 2009
Gwydion,
Thanks for your reply. I figured it out by updating the lm_sensors package to the newest version available. Gentoo has 2.10.7 marked as the most recent stable version which apparently doesn’t work with this driver. Thanks for your help.
9:07 pm on May 14th, 2009
Thank you, very easy to follow and worked flawlessly on Ubuntu 9.04.
5:08 pm on May 16th, 2009
I get to the last step and it makes an error
~/k10temp$ depmod && modprobe k10temp
FATAL: Could not open /lib/modules/2.6.28-11-generic/modules.dep.temp for writing: Permission denied
Permission denied – so I tried with sudo
~/k10temp$ sudo depmod && modprobe k10temp
FATAL: Error inserting k10temp (/lib/modules/2.6.28-11-generic/kernel/drivers/hwmon/k10temp.ko): Operation not permitted
10:05 am on May 18th, 2009
2 Will
~/work/k10temp$ sudo depmod && sudo modprobe k10temp
6:16 am on June 26th, 2009
Excellent. Worked on Jaunty 2.6.28-13-generic #44-Ubuntu SMP Tue Jun 2 07:55:09 UTC 2009 x86_64 GNU/Linux
9:34 pm on July 16th, 2009
Does not work with gentoo-sources-2.6.29-gentoo-r5:
$ sudo sensors
k10temp-pci-00c3
Adapter: PCI adapter
3:28 pm on July 25th, 2009
See Robert Spencers Post. You need to install a newer version of the lm_sensors package.
11:10 pm on August 2nd, 2009
In Ubuntu works great! But I’ve got a problem in Kubuntu 9.04
make: se ingresa al directorio `/usr/src/linux-headers-2.6.28-14-generic’
make[1]: *** No hay ninguna regla para construir el objetivo `/home/armisael/k10temp.c’, necesario para `/home/armisael/k10temp.o’. Alto.
make: *** [_module_/home/armisael] Error 2
make: se sale del directorio `/usr/src/linux-headers-2.6.28-14-generic’
Any ideas?
5:04 pm on August 3rd, 2009
Well, I have resolt the problem moving the Makefile to k10temp directory.
Thanks
7:35 am on August 7th, 2009
why hasn’t this been submitted to kernel??
8:00 am on August 7th, 2009
The last information I found some time ago was that the k8-module will be updated to support the k10-cpus.
Dont’t know if this in 30 or 31. Maybe when I find time, I will have a look at it.
–> http://lists.lm-sensors.org/pipermail/lm-sensors/2008-October/024308.html
7:27 pm on October 5th, 2009
There would be no kernel support in future for the sensors cause of “Embedded sensors are known to be unreliable, and won’t be supported ever.”.
7:57 pm on December 2nd, 2009
$ wget http://lists.lm-sensors.org/pipermai…attachment.bin
$ mkdir k10temp && mv attachment.bin k10temp/k10temp.c
Made a Makefile with following lines:
obj-m := k10temp.o
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
default:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
$ sudo make -C /lib/modules/$(uname -r)/build M=$(pwd) modules
$ sudo cp k10temp.ko /lib/modules/$(uname -r)/kernel/drivers/hwmon
$ sudo depmod && sudo modprobe k10temp
All this worked out:
$ sudo sensors-detect
Still outputs:
#—-cut here—-
# Chip drivers
# no driver for AMD K10 thermal sensors yet
#—-cut here—-
$ sudo sensors
k10temp-pci-00c3
Adapter: PCI adapter
temp1: +27.6°C <– 27.6 degrees my ass
Can anyone tell me whats wrong ?
Asus M4A78T-E + AMD Athlon 2 X4 620
10:35 pm on December 8th, 2009
It seems no more k10temp is needed.
I’ve installed the new 2.6.32 kernel and sensors gave this output:
Vcore Voltage: +1.34 V (min = +0.85 V, max = +1.60 V)
+12V Voltage: +11.97 V (min = +10.20 V, max = +13.80 V)
+5V Voltage: +5.00 V (min = +4.50 V, max = +5.50 V)
+3.3V Voltage: +3.26 V (min = +2.97 V, max = +3.63 V)
CPU FAN Speed: 16071 RPM (min = 800 RPM)
Chassis FAN Speed: 0 RPM (min = 800 RPM)
Power Fan Speed: 0 RPM (min = 800 RPM)
CPU Temperature: +53.0°C (high = +65.0°C, crit = +95.0°C)
MB Temperature: +55.0°C (high = +45.0°C, crit = +95.0°C)
11:19 pm on December 8th, 2009
Is it possible that your lm-sensors package is very old?
I had such a problem and it was fixed while updating the lm-sensors package.
Second thing:
Does dmesg says something about the k10temp?
3:35 am on January 31st, 2010
Works with CentOS 5.4 (32 bits) after updating lm_sensors to lm_sensors.i386 0:2.10.8-2.el5.elrepo from http://elrepo.org/
2.6.18-164.11.1.el5.centos.plusPAE #1 SMP Wed Jan 20 19:33:21 EST 2010 i686 athlon i386 GNU/Linux
12:15 am on February 28th, 2010
mark@Lexington:~/k10temp$ make -C /lib/modules/2.6.31-19-generic/build M=$(pwd) modules
make: Entering directory `/usr/src/linux-headers-2.6.31-19-generic’
scripts/Makefile.build:44: /home/mark/k10temp/Makefile: No such file or directory
make[1]: *** No rule to make target `/home/mark/k10temp/Makefile’. Stop.
make: *** [_module_/home/mark/k10temp] Error 2
make: Leaving directory `/usr/src/linux-headers-2.6.31-19-generic
What did I do wrong?
8:40 pm on March 3rd, 2010
You need to create the Makefile.
Then it will work.
5:56 am on May 17th, 2010
worked great on Ubuntu 9.1 amd athlon2 x4 630; gigabyte ma785gm
@hnnashikama: what were you expecting? even with my stock with no work being performed that would be about right. With the Zalman I just installed I get 23.5C. This correlates with what speedfan was giving me in Windows 7. Well, about 2 C less actually. I haven’t tested it under load with handbrake yet.
3:19 am on August 19th, 2010
Thanks for this, I made i work (somehow) at last with my AMD phenom II X4 965. Though I only get 1 temp reading.
“sensors” give:
k10temp-pci-00c3
Adapter: PCI adapter
temp1: +37.5°C
But, the posted Makefile missed on slash at the last sentence which had me going for quite some time (Im not used to compiling stuff).
This worked:
obj-m := k10temp.o
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
default:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD)/modules
Note the last “/modules”, not ” modules”.
3:20 am on August 19th, 2010
Oh, and I’m using Ubuntu 9.10 32-bit atm.
7:38 am on August 21st, 2010
Any Idea?
Thanks!
Sebastian
root@aramis-laptop:~/tmp# insmod -f /lib/modules/2.6.32.15+drm33.5/kernel/drivers/hwmon/k10temp.ko
insmod: error inserting ‘/lib/modules/2.6.32.15+drm33.5/kernel/drivers/hwmon/k10temp.ko’: -1 Invalid module format
root@aramis-laptop:~/tmp# file /lib/modules/2.6.32.15+drm33.5/kernel/drivers/hwmon/k10temp.ko
/lib/modules/2.6.32.15+drm33.5/kernel/drivers/hwmon/k10temp.ko: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
root@aramis-laptop:~/tmp# uname -m
x86_64
11:37 pm on August 25th, 2010
You build it for the right kernel? Looks like it was build for an other version of the linux kernel.