Automatically detecting temperature sensors on startup (Ubuntu 10.10)

1

I am very close to achieving my goal of setting up a CPU temperature graph that is displayed in the top panel of my desktop. I have the applet and have gotten it to graph temperatures, which appear to be being sensed correctly. However, my machine doesn't find its temperature sensors by default; I have to run

sudo modprobe coretemp

for the sensors command to work, then log off and back in before the graph applet starts displaying my temperatures. I am wondering if I can somehow tell the kernel to load the coretemp module on startup so I don't have to keep doing these extra steps. I have tried putting this command in my startup applications, but I think its need for root permission is keeping this from working. Is there a way to set up startup applications with root permission, or some other way to ensure that this module is loaded at startup?

If anyone is curious, I'm running 64-bit Ubuntu 10.10 on a Lenovo G770 laptop with a Core i5 processor and the 2.6.35 kernel.

dpitch40

Posted 2012-03-29T22:25:31.863

Reputation: 169

Answers

4

You can add your desired modules to /etc/modules like so:

echo coretemp >> /etc/modules

and have the specified module loaded at system startup.

CodeGnome

Posted 2012-03-29T22:25:31.863

Reputation: 1 841

This is exactly what I needed. Thanks for the quick response. – dpitch40 – 2012-03-29T23:23:02.227

2

For kernels that don't autoload modules or if you want to be sure that a certain module gets loaded you can add the name of the module to /etc/modules (the filename is different on some distros)

See here for a more detailed explanation.

Baarn

Posted 2012-03-29T22:25:31.863

Reputation: 6 096