root/lm-sensors/trunk/doc/FAQ @ 588

Revision 588, 24.0 KB (checked in by frodo, 15 years ago)

Slight expansion of one of the FAQ answers (about patching)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1Sensors FAQ for lm_sensors version 2
2------------------------------------
3
4[Internal comments/questions/uncertainties are in square brackets.]
5
6Note: some questions were specific for version 1. These are put together
7under chapter 6: version 1 questions.
8
91 What sensors are available on my PC?
101.1 What can a sensor chip like the "LM78" do?
111.2 Where do I find out more about any of these LMxx chips?
12
132 How are these sensors read?
142.1 What is the SMBus? And the I2C bus?
152.2 What sensors does the Pentium 2 (and P6) have?
162.3 How often are the sensor values updated?
172.4 How are alarms triggered?
18
193 Installation and management
203.1 Why so many modules, and how do I cope with them?
213.2 How do I know which chips I own?
223.3 Which modules should I insert?
233.4 Do I need the configuration file?
243.5 What about the 'No such file or directory' warnings when I compile it?
253.6 I get all kind of weird compilation errors?
263.7 It still does not compile or patch
27
284 Problems
294.1 Why do my fans report exactly half/double their values by your code
30compared to the BIOS?
314.2 Why do my two LM75's report "-48 degrees"?
324.3 Why do I have two Vcore readings, I have only one processor!
334.4 How do those ALARMS work? The current value is within range but there
34is still an ALARM warning!
354.5 My voltage readings seem to drift a bit. Is something wrong with my power
36supply?
374.6 Some measurements are way out of range. What happened?
384.7 What are VID lines?
394.8 I try to read sensor values several times a second, but it seems to be
40updated only each second or so. Why?
414.9 It sometimes seems to take a fraction of a seconds before I see the
42sensor reading results. Why?
434.10 Can I be alerted when an ALARM occurs?
444.11 SMBus transactions on my PIIX4 simply don't work (timeouts happen).  Why?
454.12 My BIOS reports a much higher CPU temperature than your modules!
464.13 I try to read the raw /proc files, but the values are strange?!?
474.14 How do I set new limits?
484.15 Some sensors are doubly detected?
494.16 I ran sensors-detect, but now I get very strange readings?!?
50
515 How to ask for help:
525.1 What to do if it won't insert?
535.2 What to do if it inserts, but nothing happens?
545.3 What to do if I read only bogus information?
555.4 What to do if you have other problems?
565.5 What if it just works like a charm?
57
586 Version 1 specific questions
596.1 My manufacturer swears that my mainboard has an SMBus, but your code
60reports that it can't find it.  What's wrong?
616.2 The modules won't load, saying 'SMBus not detected'.
626.3 I try to read /proc/sensors, and I get a "No sensor data yet (try again in
63a few moments)" message. Why?
64
65-------------------------------------------------------------
66
671 What sensors are available on my PC?
68
69        Most medium/high-end computers since late 1997 now come with a LM78- or
70LM79-like hardware health monitoring chip and an SMBus.
71       
72       
731.1 What can a sensor chip like the "LM78" do?
74
75        The LM78 is a chip made by National Semiconductor which can monitor 7
76voltages (5 positive, 2 negative) from 0 to 4.08V.  The inputs are usually in
77series with voltage dividers which lower the 12+/-V and 5+/-V supplies to
78measurable range.  Therefore, the readings for such inputs need to be
79re-scaled appropriately by software.
80        The LM78 also has 3 fan speed monitoring inputs, an internal
81temperature sensor, a chassis intrusion sensor, and a couple maskable interrupt
82inputs.  The LM78 can also relay the processor's (P6 or Pent II) VID lines
83which are hardwired and used to indicate to the power regulator (usually on
84the mainboard close to the processor socket/slot) what voltage to supply to
85the processor.
86        The LM78 can be interfaced to a system via the ISA bus and/or the
87SMBus.
88        Most other sensor chips have comparable functionality. Each supported
89chip should be documented somewhere in the doc/chips directory.
90
91       
921.2 Where do I find out more about any of these LMxx chips?
93
94        National Semiconductor has an excellent documentation resource on their
95web-site.  Complete specs on the LMxx chips talked about in this FAQ can be
96downloaded at:
97        http://www.national.com
98The Winbond documentation for Wxxxxxxx chips can be found at:
99        http://www.winbond.com.tw/produ/perso7.htm
100The Genesys Logic documentation for GLxxxxx chips is regrettably not freely
101downloadable.
102        Please see the file doc/useful_addresses.html for hyperlinks to
103the available documentation.
104
105
1062 How are these sensors read?
107
108        The LM78 and most other chips sensors are usually read through
109the ISA bus.  Our code looks for the presence of the chips on the ISA bus
110and attempts to read the sensors from it by reading their different internal
111registers.
112        Many chips have also, or even exclusively, an SMBus interface,
113explained more in detail below.
114       
115
1162.1 What is the SMBus? And the I2C bus?
117
118        The SMBus is the "System Management Bus".  More specifically, it is a
1192-wire, low-speed serial communication bus used for basic health monitoring
120and hardware management. It is a specific implementation of the more
121general I2C (pronunciation: I-squared-C) bus. In fact, both I2C devices
122and SMBus devices may be connected to the same (I2C) bus.
123        The SMBus (or I2C bus) starts at the host controller, used for
124starting transactions on the SMBus.  From the host interface, the
125devices communicated with are the 'slave' devices.  Each slave device has a
126unique 7-bit address in which the host must refer to it with.
127        For each supported SMBus host, there is a separate kernel module
128which implements the communication protocol with the host. Some SMBus hosts
129really operate on the SMBus level; these hosts can not cope with pure I2C
130devices. Other hosts are in fact I2C hosts: in this case, we implement
131the SMBus protocol in terms of I2C operations. But these hosts can also
132talk to pure I2C devices.
133       
134
1352.2 What sensors does the Pentium 2 (and P6) have?
136
137        The Pentium 2 'boxed' processor usually has an LM75 very close to the
138base of the box. It can be read through the SMBus to report the approximate
139temperature of the processor.  The processor also contains an internal
140temperature sensor (of low accuracy) used as a fail-safe to disable the
141processor in case it gets much too hot (usually around 130 degrees C).  And,
142the Pentium 2 also has a hard-wired signal (VID lines) on it's SEC (single
143edge connector) which indicates what power supply is required to operate the
144processor.
145        Apparently, the SEC connector has connectivity to the thermal sensor
146for devices like the Analog Devices ADM1021 which has circuitry for
147converting the sense information into temperature degrees.  The Winbond
148chip's external temperature lines may be compatible with the P2 temperature
149lines as well.
150        The P6 (Pentium-Pro) may have an LM75 in or just under the socket. 
151P6's also have VID lines.
152        Pentiums and Pentium w/ MMX do not have VID lines, and sometimes have
153LM75's under the sockets (depends on the mainboard, and how 'modern' the
154mainboard is).
155        The P2 Xeon will be the first Intel processor to include the SMBus
156interface on the P2 Xeon SEC.
157       
158
1592.3 How often are the sensor values updated?
160
161        The LM78, and most other sensor chips like it, reads its sensors one
162by one. A complete scanning sweep will take about 1.5 seconds. The LM78 stops
163readings sensors if you try to access it, so if you access it very often
164(by reading sensor values; writing new limits is safe) it will not find the
165time to update its sensor values at all! Fortunately, the kernel module takes
166care not to do this, and only reads new values each 1.5 seconds. If you
167read the values again, you will get the 'old' values again.
168
169
1702.4 How are alarms triggered?
171
172        It is possible to monitor each sensor and let an alarm go off if
173it crosses some pre-determined limits.  There are two sorts of interrupts
174which can be generated by sensor chips if this happens (it depends a bit on
175the actual chip if both are supported; the LM80, for example, has only
176IRQ interrupts): IRQ interrupts and SMI interrupts.  IRQ stands for
177Interrupt Request and are the interrupt lines you can find in /proc/interrupts.
178SMI stands for System Management Interrupt, and is a special interrupt which
179puts the processor in a secure environment independent of any other things
180running.  SMI is currently not supported by the Linux kernel.  IRQs are
181supported, of course.
182        Even if no interrupt is generated, some bits in a status register
183will be set until the register is read the next time. If the alarm condition
184persists after that, the bits will be set on the next scanning sweep, etc.
185        At this moment, interrupts are not supported.
186
187
1883 Installation and management
189
1903.1 Why so many modules, and how do I cope with them?
191
192        We tried to make this package as modular as possible. This makes it
193easy to add new drivers, and unused drivers will take no precious kernel
194space. On the other hand, it can be a bit confusing at first.
195        It is strongly suggested you read doc/modules, and follow the
196installation described there. It will allow you to use simple modprobe
197commands to load the modules, instead of the more low-level insmod calls.
198This file also describes how you can load the modules automatically at
199boot-time.
200
201
2023.2 How do I know which chips I own?
203
204        By now, chip detection is fairly good. That means that it is
205relatively harmless to insert more chip drivers than you need. This approach
206can still lead to problems, though.
207        In the past, you had to muddle your way through and just tried
208several drivers. But starting with 2.3.0, we have an excellent program
209that scans all your hardware. It is called 'sensors-detect' and is
210installed when you call 'make install'. Just execute this script, and
211it will tell you exactly what you want to know.
212
213
2143.3 Which modules should I insert?
215
216        You need one module for each adapter you own; if there are
217chips on the ISA bus, this includes i2c-isa.o. Also, you need one module
218for each type of chip you own. That's all. On my computer, I could use the
219following line:
220    modprobe i2c-isa && modprobe i2c-piix4 && \
221                        modprobe lm78 && modprobe lm75 && modprobe i2c-dev
222
223
2243.4 Do I need the configuration file?
225
226        Usually, you do. It tells how to translate the values the chip
227measures to real-world values. This is especially important for voltage
228inputs. The default configuration file should usually do the trick.
229It is automatically installed as /etc/sensors.conf, but it will not
230overwrite any existing file with that name.
231
232
2333.5 What about the 'No such file or directory' warnings when I compile it?
234
235        Don't worry about them. The dependency files (which tell which
236files should be recompiled when certain files change) are created
237dynamically. They are not distributed with the package. The `make' program
238notices they are not there, and warns about that - and the first thing
239it will do is generate them. So all is well.
240
2413.6 I get all kinds of weird compilation errors?
242
243        Check that the correct i2c header files are used. Depending on
244how you installed, they should be under either /usr/local/include or
245/usr/src/linux*/include. Try to edit the Makefile for the other setting.
246
247
2483.7 It still does not compile or patch!
249        Have you installed a recent version of the i2c package? Remember,
250compilation is not enough, you also need to install it for the header
251files to be found!
252        If you want to patch the kernel, you will have to apply the i2c
253patches first!
254
255
2564 Problems
257
2584.1 Why do my fans report exactly half/double their values by your code
259compared to the BIOS?
260
261        The problem with much of the sensor data is that it is impossible to
262properly interpret some of the readings without knowing what the hardware
263configuration is.  Some fans report one 'tick' each rotation, some report
264two 'ticks' each rotation. It is easy to resolve this through the
265configuration file:
266    chip lm78-*               # Or whatever chip this relates to
267    compute fan1 2*@,@/2      # Copy for each fan present
268
269
2704.2 Why do my two LM75's report "-48 degrees"?
271
272        For starters, those aren't LM75's.  Your mainboard actually has the
273Winbond W83781D which emulates two LM75's, but many systems which use the
274Winbond chip (such as the Asus P2B) don't have the thermo-resisters connected
275to the chip resulting in these strange -48 degree readings.
276        If you have an Asus P2B and want more information on adding thermal
277sensing capability, check out:
278http://ultimatepc.fsn.net/techinfo/p2bthermistor/p2bthermistor.htm
279        In upcoming versions, you will be able to disable non-interesting
280readings.
281
282
2834.3 Why do I have two Vcore readings, I have only one processor!
284
285        The LM78 family has seven voltage sensors. The default way of
286connecting them is used in the configuration file. This includes a VCore2,
287even if you do not have one. You can easily edit the configuration file
288to give it another name, or (in upcoming versions) to make this reading
289disappear.
290        Note that Vcore2 is usually the same as Vcore on motherboards which
291only support one processor. It is possible, though, that is monitors something
292else, so you should not be too surprised if the values are completely
293different.
294
295
2964.4 How do those ALARMS work? The current value is within range but there
297is still an ALARM warning!
298
299        An ALARM will go off when a minimum or maximum limit is crossed. It
300will stay there until the next internal update - which will be the next time
301you read these values, but not within (usually) 1.5 seconds since the last
302update. After that, it will only stay if the current value is out of range,
303though this too depends a bit on the kind of chip. See the specific chip
304documentation in doc/chips for more information.
305
306
3074.5 My voltage readings seem to drift a bit. Is something wrong with my power
308supply?
309
310        No, probably not. If your motherboard heats up a bit, the sensed
311voltages will drift a bit. If your power supply is loaded (because a disk
312gets going, for example), the voltages may get a bit lower. As long as they
313stay within a sensible range (say 10% of the expected value), there is no
314reason to worry.
315
316
3174.6 Some measurements are way out of range. What happened?
318
319        Each module tries to set limits to sensible values on initialization,
320but a module does not know how a chip is actually connected. This is
321described in the configuration file, which is not read by kernel modules.
322So limits can be strange, if the chip is connected in a non-standard way.
323        Readings can also be strange; there are several reasons for this.
324Temperature sensors, for example, can simply not be present, even though
325the chip supports them. Also, it can be that the input is used in a
326non-standard way. You can use the configuration file to describe how this
327measurement should be interpreted; see the comments the example file for
328more information.
329
330
3314.7 What are VID lines?
332
333        These describe the voltage your processors use. This is only supported
334for Pentium 2 and newer processors, and even then they are not always
335correctly connected to the sensor chip, so the readings may be out of
336range. A value of +3.5 V is especially suspect.
337
338
3394.8 I try to read sensor values several times a second, but it seems to be
340updated only each second or so. Why?
341
342        If we would read the registers more often, it would not find the
343time to update them. So we only update our readings once each 1.5 seconds
344(the actual delay is chip-specific; for some chips, it may not be needed
345at all).
346
347
3484.9 It sometimes seems to take a fraction of a seconds before I see the
349sensor reading results. Why?
350
351        ISA bus access is fast, but SMBus access is really slow. If you have
352a lot of sensors, it just takes a lot of time to access them. Fortunately,
353this has almost no impact on the system as a whole, as another job can run
354while we are waiting for the transaction to finish.
355
356
3574.10 Can I be alerted when an ALARM occurs?
358
359        No, you can't; and it may well be never supported.
360        Almost no mainboard we have encountered have actually connected the
361IRQ-out pin of sensor chips. That means that we could enable IRQ reporting, but
362nothing would happen. Also, even if a motherboard has it connected, it is
363unclear what interrupt number would be triggered. And IRQ lines are a scarce
364facility, which means that almost nobody would be able to use it anyway.
365        The SMI interrupt is only available on a few types of chips. It is
366really a very obscure way to handle interrupts, and supporting it under Linux
367might be quite hard to do.
368        Your best bet would be to poll the alarm file with a user-land daemon
369which alerts you if an alarm is raised. I am not aware of any program which
370does the job, though you might want to examine one of the graphical monitor
371programs under X, see doc/useful_addresses.html for addresses.
372
373
3744.11 SMBus transactions on my PIIX4 simply don't work (timeouts happen).  Why?
375
376        Some chips which mainboard makers connect to the SMBus are not SMBus
377devices.  An example is the 91xx clock generator chips.  When read, these
378devices can lock up the SMBus until the next hard reboot.  This is because
379they have a similar serial interface (like the I2C), but don't conform to
380Intel's SMBus standard.
381        Why did they connect these devices to the SMBus if they aren't
382compatible?  Good question! :')  Actually, these devices may support being
383written to, but lock things up when they are read.
384
385
3864.12 My BIOS reports a much higher CPU temperature than your modules!
387
388        We display the actual temperature of the sensor. This may not be the
389temperature you are interested in, though.  If a sensor should measure
390the CPU temperature, it must be in thermal contact with it.  In practice,
391it is just somewhere near it. Your BIOS may correct for this (by adding,
392for example, thirty degrees to the measured temperature).  The correction
393factor is regrettably different for each mainboard, so we can not do this
394in the module itself. You can do it through the configuration file, though:
395 
396    chip lm75-*-49                     # Or whatever chip this relates to
397    label temp "Processor"
398    compute temp @*1.2+13,(@-13)/1.2   # Or whatever formula
399
400
4014.13 I try to read the raw /proc files, but the values are strange?!?
402
403        Remember, these values do not take the configuration file
404'compute' lines in account. This is especially obvious for voltage readings
405(usually called in? or vin?). Use a program linked to libsensors (like
406the provided 'sensors' program) instead.
407
408
4094.14 How do I set new limits?
410
411        This is a bit intricate right now. In the near future, this can be
412done through the 'sensors' program, which will take account of the
413computations specified in the configuration file. At this moment, you must
414also put the 'set' commands into the configuration file. This will get
415easier in newer versions.
416
417
4184.15 Some sensors are doubly detected?
419
420        Yes, this is still a problem. It will partially solved in the future,
421but it is really tough. Double detections can be caused by two things:
422sensors can be detected to both the ISA and the SMBus (and if you have
423loaded the approprate adapter drivers, it will be detected on both), and
424some chips simulate other chips (the Winbond W83781D simulates LM75 chips
425on the SMBus, for example). Remove the offending adapter or chip driver, or
426run sensors-detect and add the insmod parameters it suggests.
427
428
4294.16 I ran sensors-detect, but now I get very strange readings?!?
430
431        Your SMBus (PIIX4?) is probably crashed. There are some mainboards
432which connect a clock chip to the SMBus. Unfortunately, this clock chip
433hangs the PIIX4 if it is read (it is an I2C device, but not SMBus compatible).
434We have found no way of solving this, except for rebooting your computer.
435Next time when you run sensors-detect, you may want to exclude addresses
4360x69 and/or 0x6a, by entering 's' when you are asked whether you want to
437scan the PIIX4.
438
4395 How to ask for help:
440
441        We are always willing to answer questions if things don't work out.
442Please mail lm78@stimpy.netroedge.com, and not the individual authors,
443unless you have something private to say. Especially, do not mail
444Alexander Larsson, as he has left the development team. You can be assured
445that any mail sent to lm78@stimpy.netroedge.com will arrive at anyone
446who answered your email, so please do not CC: him again.
447        Instead of using email, you can also use the web-based support
448area, at http://www.netroedge.com/~lm78/support.html. You will be helped
449just as fast, and others may profit from the answer too. You will be
450noticed automatically when your question has been answered.
451
452
4535.1 What to do if it won't insert?
454
455        Always inspect the output of 'dmesg' and send it to us. Check
456/proc/pci for your SMBus adapter, and send the output too. Check whether
457you actually have a sensor chip - sometimes, it is only an upgrade option.
458If your mainboard manual happens to mention the chip type, send it too.
459Tell us what mainboard you own.
460
461
4625.2 What to do if it inserts, but nothing happens?
463
464        Check /proc/pci to see whether you have a supported adapter. If it
465is not there, we do not support it. Future version may do it. If you want,
466you can send us an email telling you have a such-and-so mainboard, together
467with the PCI output - that way, we can see what SMBus hosts are used most.
468
469
4705.3 What to do if I read only bogus information?
471
472        It may be that this was a mis-detection: the chip may not be
473present. If you are convinced there is something wrong, please send us
474the usual information (see 5.1).
475
476
4775.4 What to do if you have other problems?
478
479        Again, send the output of 'dmesg', /proc/sensors and /proc/pci.
480
481
4825.5 What if it just works like a charm?
483
484        Drop us a mail if you feel like it, mentioning the mainboard and
485detected chip type. That way, we have some positive feedback, too!
486
487
4886 Version 1 specific questions
489
4906.1 My manufacturer swears that my mainboard has an SMBus, but your code
491reports that it can't find it.  What's wrong?
492
493        Currently, our code only assumes that an SMBus exists if it originates
494from the Intel PIIX4 (82371AB).  If your computer doesn't have one, or if your
495SMBus originates from a different SMBus 'host', then you are out of luck. :'(
496Our experience is, though, that most machines have a PIIX4, and that it is
497where the SMBus is hosted.
498
499Regarding the VIA chip set(s):
500        Right now, the SMBus code depends on the Intel PIIX4 chip to handle
501SMBus transactions.  The VIA chip set is NOT supported at this time because
502it forces much of the SMBus protocol to be implemented by software.
503        To implement the SMBus correctly with the VIA chip, it needs to be
504written at a low level to be quick.  A more attractive alternative is to
505use the Bios SMBus interface (not always available nor standard).
506
507        Version 2 supports the VIA chipset, and will support other chipsets.
508Version 1 never will.
509
510
5116.2 The modules won't load, saying 'SMBus not detected'.
512
513        This should no longer be an issue in 1.4.10 and later; it will
514continue loading, but it won't support SMBus-connected devices, of course.
515
516
5176.3 I try to read /proc/sensors, and I get a "No sensor data yet (try again in
518a few moments)" message. Why?
519
520        It takes about 1.5 seconds for the LM78 to update all its sensor
521values.  If we would try to read it before it finished that, you would get
522old garbage instead. So you have to wait 1.5 seconds after the module is
523inserted before you can access /proc/sensors.
524        Module versions 1.3.7 and later let the process sleep if it tries
525to access sensor data right after insertion time, and do not display this
526message anymore.
527
528
5296.4 On my Dell, a LM80 is detected, but all readings are 0!
530
531        This is a bug we have only observed on Dell computers. There is
532probably a problem with the way the SMBus is accessed; but it is not yet
533clear whether the problem is in our code or with the Dells.
534        There are very probably no sensor chips at all on your computer;
535but until somebody contacts Dell about this and tells us the results, we
536can not be sure.
537
538
539-----------
540Rev 2.2 (Frodo) Corrections for lm_sensors 2.4, 19990920
541Rev 2.1 (Frodo) Corrections for lm_sensors 2.2, 19990112
542Rev 2.0 (Frodo) Major revision for lm_sensors 2.1, 19981229
543Rev 1.10 (Frodo) Modified 3.8, updated some other things, 19980924
544Rev 1.9 (Frodo) Added 3.15, 19980906
545Rev 1.8 (Frodo) Added 3.14, 19980905
546Rev 1.7 (Phil) Added 3.13 and some other minor changes, 19980901
547Rev 1.6 (Frodo) Added 4, 4.1, 4.2, 4.3, 4.4, 4.5, 19980901
548Rev 1.5 (Frodo) Added 2.3, 2.4, 3.9, 3.10, 3.11, 19980826
549Rev 1.4 (Frodo) Added some more Winbond information, and 3.5-3.8, 19980817
550Rev 1.3 Added info on the Winbond chip, 19980816
551Rev 1.2 Adapation by Frodo Looijaard, 19980810
552Rev 1.1 Modifications by Philip Edelbrock, 19980809
553Rev 1.0 Written by Philip Edelbrock, 19980803
Note: See TracBrowser for help on using the browser.