Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Setup lm_sensors works - but I don't know why
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
midnite
Apprentice
Apprentice


Joined: 09 Apr 2006
Posts: 256
Location: Hong Kong

PostPosted: Tue Jan 05, 2016 6:29 am    Post subject: Setup lm_sensors works - but I don't know why Reply with quote

Background: I have installed Gentoo, 99% following the official handbook. I have also installed KDE following the Gentoo KDE wiki.

When I add the Hardware Temperate widget to the desktop, it shows a blank square - nothing. Then I emerge lm_sensors. After emerge, the follow message is shown:

Code:
 * Messages for package sys-apps/lm_sensors-3.3.5:

 * Please run `/usr/sbin/sensors-detect' in order to setup
 * /etc/conf.d/lm_sensors.
 * /etc/conf.d/lm_sensors is vital to the init-script.
 * Please make sure you also add lm_sensors to the desired
 * runlevel. Otherwise your I2C modules won't get loaded
 * on the next startup.
 * You will also need to run the above command if you're upgrading from
 * <=lm_sensors-2, as the needed entries in /etc/conf.d/lm_sensors has
 * changed.
 * Be warned, the probing of hardware in your system performed by
 * sensors-detect could freeze your system. Also make sure you read
 * the documentation before running lm_sensors on IBM ThinkPads.
 * Also make sure you have read:
 * http://www.lm-sensors.org/wiki/FAQ/Chapter3#Mysensorshavestoppedworkinginkernel2.6.31
 * Please refer to the lm_sensors documentation for more information.
 * (http://www.lm-sensors.org/wiki/Documentation)


I run /usr/sbin/sensors-detect, answer all with YES. I added a few drivers in the kernel, re-compile it. And ran sensors-detect again maybe.

I tried sl33k ~ # sensors and it shows my CPU temperatures already. I checked ls /etc/conf.d/lm* but there is still no configuration file. I checked rc-update show and there is no lm_sensors nor sensors nor sensord nor *sensor* things there. Okay, I try not to add it for now. Then I go for a reboot.

After reboot, the magic happens. The Hardware Temperate widget is showing my CPU temperatures.

My questions are:

1. Why lm_sensors is working even I have no /etc/conf.d/lm_sensors configuration file? I know I have run sensors-detect. I guess it would generate /etc/conf.d/lm_sensors, but it did not. So, I guess what sensors-detect actually generates is /etc/init.d/lm_sensors (I do have this file there). And /etc/conf.d/lm_sensors is just some parameters helping sensors-detect to generates the /etc/init.d/lm_sensors. Is it the case?

2. Why the temperature widget is working even I did not add lm_sensors to rc-update? I guess the widget continuously issue the command sensors every 2 seconds, so it gets the information to display. But according to the message from the emerge (above), lm_sensors must be added to a run-level or it will not start. Why it works??

Please show me what is going on. Thank you!
_________________
i love meaningful forums. thats why i am here =]


Last edited by midnite on Tue Jan 05, 2016 11:28 am; edited 1 time in total
Back to top
View user's profile Send private message
Syl20
Guru
Guru


Joined: 04 Aug 2005
Posts: 550
Location: France

PostPosted: Tue Jan 05, 2016 10:44 am    Post subject: Re: Setup lm=sensors works - but I don't know why Reply with quote

midnite wrote:
1. Why lm_sensors is working even I have no /etc/conf.d/lm_sensors configuration file? I know I have run sensors-detect. I guess it would generate /etc/conf.d/lm_sensors, but it did not. So, I guess what sensors-detect actually generates is /etc/init.d/lm_sensors (I do have this file there). And /etc/conf.d/lm_sensors is just some parameters helping sensors-detect to generates the /etc/init.d/lm_sensors. Is it the case?

2. Why the temperature widget is working even I did not add lm_sensors to rc-update? I guess the widget continuously issue the command sensors every 2 seconds, so it gets the information to display. But according to the message from the emerge (above), lm_sensors must be added to a run-level or it will not start. Why it works??

The lonely task the lm_sensors service is doing is loading the appropriate kernel modules to manage your hardware sensors. Did you compile the related drivers as modules, or in-kernel ?
Back to top
View user's profile Send private message
midnite
Apprentice
Apprentice


Joined: 09 Apr 2006
Posts: 256
Location: Hong Kong

PostPosted: Tue Jan 05, 2016 11:25 am    Post subject: Re: Setup lm=sensors works - but I don't know why Reply with quote

CneGroumF wrote:
midnite wrote:
1. Why lm_sensors is working even I have no /etc/conf.d/lm_sensors configuration file? I know I have run sensors-detect. I guess it would generate /etc/conf.d/lm_sensors, but it did not. So, I guess what sensors-detect actually generates is /etc/init.d/lm_sensors (I do have this file there). And /etc/conf.d/lm_sensors is just some parameters helping sensors-detect to generates the /etc/init.d/lm_sensors. Is it the case?

2. Why the temperature widget is working even I did not add lm_sensors to rc-update? I guess the widget continuously issue the command sensors every 2 seconds, so it gets the information to display. But according to the message from the emerge (above), lm_sensors must be added to a run-level or it will not start. Why it works??

The lonely task the lm_sensors service is doing is loading the appropriate kernel modules to manage your hardware sensors. Did you compile the related drivers as modules, or in-kernel ?


Everything in-kernel :lol:
_________________
i love meaningful forums. thats why i am here =]
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 6962

PostPosted: Tue Jan 05, 2016 1:44 pm    Post subject: Reply with quote

sensors is providing a human interface to read value, but you have many way your applet can just get the values itself thru /sys/bus/acpi/drivers/thermal or /sys/devices/virtual/thermal or i2c or coretemp without the need to run sensors at all.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum