Skip to contentSkip to conversation

adt7463 on asus w1n laptop

DISCUSSION christophe 4 participants 31 messages May 19, 2005

lore
Share & tools
lore

christophe

author
#0 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I already tried to file this report on the
http://www2.lm-sensors.nu/~lm78/support.html
page but for some unknown reasons it doesn't seem to register my ticket. Here is the ticket i wanted to submit to the database :

I have googled a lot and searched the database and FAQ(section 5.3) but i found no answer to my problem. The adt7463 on my asus w1n laptop / mandrake 10.1 Official Edition is not detected in spite of all my efforts.

I found nothing consistent in the logs.

Interesting part of sensors-detect :
- ----------------------------
...
We can start with probing for (PCI) I2C or SMBus adapters.
You do not need any special privileges for this. Do you want to probe now? (YES/no): YES
Probing for PCI bus adapters...
Sorry, no PCI bus adapters found.

We will now try to load each adapter module in turn.
If you have undetectable or unsupported adapters, you can have them scanned by manually loading the modules before running this script.

To continue, we need module `i2c-dev' to be loaded.
If it is built-in into your kernel, you can safely skip this. i2c-dev is not loaded. Do you want to load it now? (YES/no): YES Module loaded succesfully.

We are now going to do the adapter probings. Some adapters may hang halfway through; we can't really help that. Also, some chips will be double detected; we choose the one with the highest confidence value in that case. If you found that the adapter hung after probing a certain address, you can specify that address to remain unprobed. That often
includes address 0x69 (clock chip).

Some chips are also accessible through the ISA bus. ISA probes are typically a bit more dangerous, as we have to write to I/O ports to do this. This is usually safe though.

Do you want to scan the ISA bus? (YES/no): YES Probing for `National Semiconductor LM78'
Trying address 0x0290... Failed!
Probing for `National Semiconductor LM78-J'
Trying address 0x0290... Failed!
Probing for `National Semiconductor LM79'
Trying address 0x0290... Failed!
Probing for `Winbond W83781D'
Trying address 0x0290... Failed!
Probing for `Winbond W83782D'
Trying address 0x0290... Failed!
Probing for `Winbond W83627HF'
Trying address 0x0290... Failed!
Probing for `Winbond W83697HF'
Trying address 0x0290... Failed!
Probing for `Silicon Integrated Systems SIS5595'
Trying general detect... Failed!
Probing for `VIA Technologies VT82C686 Integrated Sensors'
Trying general detect... Failed!
Probing for `VIA Technologies VT8231 Integrated Sensors'
Trying general detect... Failed!
Probing for `ITE IT8705F / IT8712F / SiS 950'
Trying address 0x0290... Failed!
Probing for `IPMI BMC KCS'
Trying address 0x0ca0... Failed!
Probing for `IPMI BMC SMIC'
Trying address 0x0ca8... Failed!

Some Super I/O chips may also contain sensors. Super I/O probes are typically a bit more dangerous, as we have to write to I/O ports to do this. This is usually safe though.

Do you want to scan for Super I/O sensors? (YES/no): YES Probing for `ITE 8702F Super IO Sensors'
Failed! (0x8705)
Probing for `ITE 8705F Super IO Sensors'
Success... but not activated
Probing for `ITE 8712F Super IO Sensors'
Failed! (0x8705)
Probing for `Nat. Semi. PC87351 Super IO Fan Sensors'
Failed! (skipping family)
Probing for `SMSC 47B27x Super IO Fan Sensors'
Failed! (skipping family)
Probing for `VT1211 Super IO Sensors'
Failed! (skipping family)

Do you want to scan for secondary Super I/O sensors? (YES/no): YES Probing for `ITE 8702F Super IO Sensors'
Failed! (skipping family)
Probing for `Nat. Semi. PC87351 Super IO Fan Sensors'
Failed! (skipping family)
Probing for `SMSC 47B27x Super IO Fan Sensors'
Failed! (skipping family)
Probing for `VT1211 Super IO Sensors'
Failed! (skipping family)

Sorry, no chips were detected.
Either your sensors are not supported, or they are connected to an I2C bus adapter that we do not support. See doc/FAQ, doc/lm_sensors-FAQ.html, or
http://www2.lm-sensors.nu/~lm78/cvs/lm_sensors2/doc/lm_sensors-FAQ.html
(FAQ #4.24.3) for further information.
If you find out what chips are on your board, see
http://secure.netroedge.com/~lm78/newdrivers.html for driver status.
...
- ----------------------------

Actually i ran speedfan on windows XP and it finds a ADT7463 (it says ID $27) on an smbus ($2E address). It also says ISA bus at $0290 and SMBUS at$0540 (intel 82801DB).

lsmod gives :
- ----------------------------

i2c-dev                 7808  0
i2c-i801                7184  0
i2c-core               18836  2 i2c-dev,i2c-i801
usbmouse                4480  0
tsdev                   6080  0
joydev                  8128  0
usbhid                 40448  0
fglrx                 234816  7
md5                     3840  1
ipv6                  224132  12
snd-seq-oss            30848  0
snd-seq-midi-event      6272  1 snd-seq-oss
snd-seq                50576  4 snd-seq-oss,snd-seq-midi-event
snd-pcm-oss            54568  0
snd-mixer-oss          18432  1 snd-pcm-oss
snd-intel8x0           29900  1
snd-ac97-codec         68304  1 snd-intel8x0
snd-pcm                87304  2 snd-pcm-oss,snd-intel8x0
snd-timer              21252  2 snd-seq,snd-pcm
snd-page-alloc          7944  2 snd-intel8x0,snd-pcm
gameport                3584  1 snd-intel8x0
snd-mpu401-uart         6144  1 snd-intel8x0
snd-rawmidi            20004  1 snd-mpu401-uart
snd-seq-device          6536  3 snd-seq-oss,snd-seq,snd-rawmidi
snd                    51844  14
snd-seq-oss,snd-seq-midi-event,snd-seq,snd-pcm-oss,snd-mixer-oss,snd-intel8x0,snd-ac97-codec,snd-pcm,snd-timer,snd-mpu401-uart,snd-rawmidi,snd-seq-device
soundcore               7136  1 snd
ipt_TOS                 2176  12
ipt_REJECT              5888  4
ipt_pkttype             1536  4
ipt_LOG                 5760  8
ipt_state               1664  17
ipt_multiport           1920  0
ipt_conntrack           2304  0
iptable_mangle          2304  1
ip_nat_irc              3696  0
ip_nat_tftp             3184  0
ip_nat_ftp              4336  0
iptable_nat            20780  3 ip_nat_irc,ip_nat_tftp,ip_nat_ftp
ip_conntrack_irc       70576  1 ip_nat_irc
ip_conntrack_tftp       3248  0
ip_conntrack_ftp       71344  1 ip_nat_ftp
ip_conntrack           27944  9

ipt_state,ipt_conntrack,ip_nat_irc,ip_nat_tftp,ip_nat_ftp,iptable_nat,ip_conntrack_irc,ip_conntrack_tftp,ip_conntrack_ftp
iptable_filter 2304 1
ip_tables 14592 10
ipt_TOS,ipt_REJECT,ipt_pkttype,ipt_LOG,ipt_state,ipt_multiport,ipt_conntrack,iptable_mangle,iptable_nat,iptable_filter

af_packet              15880  6
ds                     17412  4
yenta_socket           18432  0
pcmcia_core            58564  2 ds,yenta_socket
eth1394                16904  0
sk98lin               159912  1
ide-cd                 36512  0
cdrom                  36764  1 ide-cd
ohci1394               30340  0
ieee1394              289464  2 eth1394,ohci1394
loop                   12424  0
ntfs                  145820  2
nls_utf8                1792  3
nls_cp437               5632  1
vfat                   11136  1
fat                    39360  1 vfat
intel-agp              19360  1
agpgart                27176  2 intel-agp
nvram                   6920  0
evdev                   7808  1
pcspkr                  3304  0
ehci-hcd               25604  0
uhci-hcd               27792  0
usbcore               100580  6 usbmouse,usbhid,ehci-hcd,uhci-hcd
thermal                15240  0
tc1100-wmi              6916  0
processor              21160  1 thermal
fan                     4100  0
button                  6416  0
battery                 9732  0
asus_acpi               9360  0
ac                      4740  0
ext3                  117352  1
jbd                    47512  1 ext3

- ----------------------------

lspci gives :
- ----------------------------
00:00.0 Host bridge: Intel Corp. 82855PM Processor to I/O Controller (rev 21) 00:01.0 PCI bridge: Intel Corp. 82855PM Processor to AGP Controller (rev 21) 00:1d.0 USB Controller: Intel Corp. 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 (rev 03)
00:1d.1 USB Controller: Intel Corp. 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 (rev 03)
00:1d.2 USB Controller: Intel Corp. 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3 (rev 03)
00:1d.7 USB Controller: Intel Corp. 82801DB/DBM (ICH4/ICH4-M) USB 2.0 EHCI Controller (rev 03)
00:1e.0 PCI bridge: Intel Corp. 82801 PCI Bridge (rev 83)
00:1f.0 ISA bridge: Intel Corp. 82801DBM LPC Interface Controller (rev 03) 00:1f.1 IDE interface: Intel Corp. 82801DBM (ICH4) Ultra ATA Storage Controller (rev 03)
00:1f.5 Multimedia audio controller: Intel Corp. 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 03)
00:1f.6 Modem: Intel Corp. 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Modem Controller (rev 03)
01:00.0 VGA compatible controller: ATI Technologies Inc RV350 [Mobility Radeon 9600 M10]
02:00.0 Ethernet controller: Marvell Technology Group Ltd. Yukon Gigabit Ethernet 10/100/1000Base-T Adapter (rev 13)
02:01.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev ac)
02:01.1 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev ac)
02:01.2 FireWire (IEEE 1394): Ricoh Co Ltd R5C552 IEEE 1394 Controller (rev
04)
02:02.0 Multimedia controller: Philips Semiconductors SAA7133 Audio+video broadcast decoder (rev f0)
02:03.0 Network controller: Intel Corp. PRO/Wireless 2200BG (rev 05)
- ----------------------------

lspci -n gives :
- ----------------------------
00:00.0 Class 0600: 8086:3340 (rev 21)
00:01.0 Class 0604: 8086:3341 (rev 21)
00:1d.0 Class 0c03: 8086:24c2 (rev 03)
00:1d.1 Class 0c03: 8086:24c4 (rev 03)
00:1d.2 Class 0c03: 8086:24c7 (rev 03)
00:1d.7 Class 0c03: 8086:24cd (rev 03)
00:1e.0 Class 0604: 8086:2448 (rev 83)
00:1f.0 Class 0601: 8086:24cc (rev 03)
00:1f.1 Class 0101: 8086:24ca (rev 03)
00:1f.5 Class 0401: 8086:24c5 (rev 03)
00:1f.6 Class 0703: 8086:24c6 (rev 03)
01:00.0 Class 0300: 1002:4e50
02:00.0 Class 0200: 11ab:4320 (rev 13)
02:01.0 Class 0607: 1180:0476 (rev ac)
02:01.1 Class 0607: 1180:0476 (rev ac)
02:01.2 Class 0c00: 1180:0552 (rev 04)
02:02.0 Class 0480: 1131:7133 (rev f0)
02:03.0 Class 0280: 8086:4220 (rev 05)
- ----------------------------

I tried to insert manually various modules like i2c-i801, i2c-i810, i2c-sensor, i2c-piix4, i2c-isa....
I also tried to insert the lm85 module corresponding to the adt7463 sensor chip. I tried many different parameters, but i don't know how to pass a correct parameter described as :
"List of adapter,address pairs which are unquestionably assumed to contain a `adt7463' chip"
in this document :
http://www2.lm-sensors.nu/~lm78/cvs/lm_sensors2/doc/chips/lm85

I suppose the problem is that there is no bus to reach the sensor. (SMBus ? i2c ? Isa ???). But i have no clue on how to solve this.

i2cdetect gives nothing. i2cdump gives nothing.

isadump gives only zeros.

I can't read what's on the chip because it's a laptop and i would lose warranty if i open it.

I don't know motherboard type but lspci above will tell you.

Sensor version is 2.8.7

Kernel version is 2.6.8.1

I need this lm_sensor to lower the fan speed in order to have more battery time.

Thank you
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFCELlnoBxdxgioZBIRAmdQAJwIfFHGG1YNcyIEIItbXzcKpmgNbwCgjQyp fkMzt/BRxmgeCpWphRbLTHwFua
-----END PGP SIGNATURE-----

#1 lore raw

Hi Christophe,

Quoted 4 lines
Quoted 3 lines

We'd now need the output of "lspci -s 00:00.0 -vn" to add the quirk your system needs. With that I can write a patch for you to test (if you can do that).

Quoted 8 lines

Here you are :
lspci -s 00:00.0 -vn
00:00.0 Class 0600: 8086:3340 (rev 21)

        Subsystem: 1043:184b
        Flags: bus master, fast devsel, latency 0
        Memory at e0000000 (32-bit, prefetchable) [size%6M]
        Capabilities: [e4] #09 [4104]
        Capabilities: [a0] AGP version 2.0

OK, attached is a patch for Linux 2.6.10, which should do the trick. It should apply cleanly to any 2.6.11-rc version as well. (If you need it against an older kernel, just ask.)

If you confirm that the SMBus is properly un-hidden with that patch and no trouble arise, I'll push it to the PCI folks.

Quoted 2 lines

Merci beaucoup, many thanks.
Peut-?tre parlez-vous (parles-tu) fran?ais ? Maybe you speak french ?

He oui :) Mais ce n'est pas le cas de la majorit? des lecteurs de cette liste.

Signature · 12 lines
Jean Delvare
-------------- next part --------------
--- linux-2.6.10/drivers/pci/quirks.c.orig	2004-12-24 22:33:49.000000000 +0100
+++ linux-2.6.10/drivers/pci/quirks.c	2005-02-14 20:10:24.000000000 +0100
@@ -774,6 +774,7 @@
 			}
 		if (dev->device = PCI_DEVICE_ID_INTEL_82855PM_HB)
 			switch (dev->subsystem_device) {
+			case 0x184b: /* W1N notebook */
 			case 0x186a: /* M6Ne notebook */
 				asus_hides_smbus = 1;
 			}
#2 lore raw
In reply to christophe

Hi Christophe,

Quoted 3 lines

I already tried to file this report on the
http://www2.lm-sensors.nu/~lm78/support.html
page but for some unknown reasons it doesn't seem to register my ticket.

Probably because you hit the arbitrary size limit. We are considering moving to bugzilla for this reason and several others.

Quoted 5 lines

I have googled a lot and searched the database and FAQ(section 5.3) but i found no answer to my problem. The adt7463 on my asus w1n laptop / mandrake 10.1 Official Edition is not detected in spite of all my efforts. (...)
Probing for PCI bus adapters...

Quoted 8 lines

Sorry, no PCI bus adapters found.
(...)
00:00.0 Host bridge: Intel Corp. 82855PM Processor to I/O Controller (rev 21)
(...)
00:1f.0 ISA bridge: Intel Corp. 82801DBM LPC Interface Controller (rev 03)
00:1f.1 IDE interface: Intel Corp. 82801DBM (ICH4) Ultra ATA Storage Controller (rev 03)
00:1f.5 Multimedia audio controller: Intel Corp. 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 03) 00:1f.6 Modem: Intel Corp. 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Modem Controller (rev 03)

Missing SMBus function (should be 00:1f.3). Quite typical from Asus, they tend to hide it for no reason.

You need what is called a PCI quirk to enable it again. Good news is that this is a known problem with a known solution. Bad news is that it involves a kernel recompilation, which you might not be used to.

We'd now need the output of "lspci -s 00:00.0 -vn" to add the quirk your system needs. With that I can write a patch for you to test (if you can do that).

Thanks,
--
Jean Delvare

author
#3 lore raw
In reply to christophe

Le lundi 14 F?vrier 2005 20:17, Jean Delvare a ?crit?:

Quoted 12 lines

Hi Christophe,

Quoted 11 lines
Quoted 3 lines

We'd now need the output of "lspci -s 00:00.0 -vn" to add the quirk your system needs. With that I can write a patch for you to test (if you can do that).

Here you are :
lspci -s 00:00.0 -vn
00:00.0 Class 0600: 8086:3340 (rev 21)

        Subsystem: 1043:184b
        Flags: bus master, fast devsel, latency 0
        Memory at e0000000 (32-bit, prefetchable) [size%6M]
        Capabilities: [e4] #09 [4104]
        Capabilities: [a0] AGP version 2.0
Quoted 3 lines

OK, attached is a patch for Linux 2.6.10, which should do the trick. It should apply cleanly to any 2.6.11-rc version as well. (If you need it against an older kernel, just ask.)

Ok i didn't want to change my kernel 2.6.8.1-24mdk because i made many improvements on it (regarding dothan cpu and lirc). So i applied the patch you gave me on the /drivers/pci/quirks.c file. At the same place i just added the line about the w1n laptop :

		if (dev->device = PCI_DEVICE_ID_INTEL_82855PM_HB)

switch (dev->subsystem_device) {
+ case 0x184b: /* W1N notebook */
case 0x186a: /* M6Ne notebook */
asus_hides_smbus = 1;
}
Then i recompiled. (make mrproper, make all, make modules_install install) Then... Nothing. Perhaps, there is something i forgot.
I don't understand. And i am not very good at kernel stuff. Everything about pci is activated in the kernel config. PCI access mode is set to 'any', legacy /proc/cpi interface is set, pci device name database is set, isa support is set, eisa support is set with generic pci/eisa, eisa virtual root device, eisa device name database, and natsemi SCx200 is set. Actually i think your patch is good but does not seem to be exploited since lspci -v still says that :
00:00.0 Host bridge: Intel Corp. 82855PM Processor to I/O Controller (rev 21)
Subsystem: Asustek Computer, Inc.: Unknown device 184b <---- Here
Flags: bus master, fast devsel, latency 0
Memory at e0000000 (32-bit, prefetchable) [size%6M]
Capabilities: [e4] #09 [4104]
Capabilities: [a0] AGP version 2.0
the device is unknown... I don't know how to tell the kernel to take your patch into account.

Quoted 2 lines

If you confirm that the SMBus is properly un-hidden with that patch and no trouble arise, I'll push it to the PCI folks.

i'm sorry i could not make it work.

Quoted 3 lines
Quoted 1 line

Peut-?tre parlez-vous (parles-tu) fran?ais ? Maybe you speak french ?

He oui :) Mais ce n'est pas le cas de la majorit? des lecteurs de cette liste.

Let's speak globish... ;o)

author
#4 lore raw
In reply to christophe

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I plead guilty for one confusion i did. I did use the printk stuff :

Quoted 7 lines

if (dev->device = PCI_DEVICE_ID_INTEL_82855PM_HB)

    switch (dev->subsystem_device) {
    case 0x184b: /* W1N notebook */
    case 0x186a: /* M6Ne notebook */
        asus_hides_smbus = 1;
+       printk(KERN_INFO "*** PCI QUIRK DONE!\n");
    }

And i realised that when adding the patch manually to the 2.6.8.1 kernel, although it was a patch done for kernel 2.6.10, i inserted the "case" lines for w1n in the wrong if section. I inserted it for the PCI_DEVICE_ID_INTEL_82855GM_HB when it was for PCI_DEVICE_ID_INTEL_82855PM_HB
*** ***
I made this mistake because in the quirks.c file there are only the first section for kernel 2.6.8.1
Thank you Jean Delvare for your patch.

So now the patch is correctly applied and could run sensors-detect successfully.
Actually, sensors-detect did not detect the adt7463 chip. But i added everything in the config files to insert automatically the lm85 modules, without any parameters, when the lm_sensors service is started. So now, i can reduce manually the fan speed and have a longer battery time.

One more question : is there a way to adjust fan speed to one of the temperature ?
Or do i have to write a little script ?
Why can't i modify the content of
the /sys/bus/i2c/devices/0-002e/fan1_pwm_enable (it contains '1') ? What is the purpose of these fan*_pwm_enable files ?

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFCFRbSoBxdxgioZBIRAj3rAJ9n0vjbWWOQ12kwbhvb1Kfv4G1jowCeLKeh vQ9jvFDE6q7XBPaydCh88Tk=kqLe
-----END PGP SIGNATURE-----

author
#5 lore raw
In reply to christophe

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 6 lines
Quoted 3 lines

So now the patch is correctly applied and could run sensors-detect successfully.
Actually, sensors-detect did not detect the adt7463 chip.

This is a problem. Can you please provide a dump of your chip (using i2cdetect to locate the correct address and i2cdump to do the actual dump)?

I don't know what parameters to pass to i2detect and i2cdump. I've tried some adresses like 002e and lots of others but i don't know which one. I'll take time to read man for i2cdetect and i2c dump. But i don't have time to do it know.

OK i realised that /sys/bus/i2c/devices/0-002e/name contains adm1027 instead of adt7463. Actually, i don't know which one is right since i can't read the name of a chip that is "jailed" in a laptop.
Do i have to load the lm85 module with special options like :
modprobe lm85 force_adt7463=xxxx
What should i put instead of this xxxx ? modinfo lm85 says "list of adapter, address pairs, what does it mean ?

Quoted 4 lines
Quoted 2 lines

So now, i can reduce manually the fan speed and have a longer battery time.

I admit I am surprised, I never thought that lowering the speed of the fan could really spare a significant amount of battery.

Well, i thought that the fastest the fan turns, the more energy is spent and the shorter the battery lasts. No ? If the fan does not spend a lot of energy, reducing fan speed has at least one advantage : less noise !

Quoted 4 lines
Quoted 2 lines

One more question : is there a way to adjust fan speed to one of the temperature ?

See this file for additional insight:
http://www2.lm-sensors.nu/~lm78/cvs/lm_sensors2/doc/chips/lm85

Should i use something like :

set pwm1_zone 123

in /etc/sensors.conf in the appropriate section (lm85 and co...), as explained at the end of your linked document ?

Any way, thanks a lot !!!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFCFhNDoBxdxgioZBIRAgEvAKCpQPJd33foFF0MusCFYhEsN3B0jwCfZVld mQW4HLMHOXvVWzoSO5+L2jE=eGxd
-----END PGP SIGNATURE-----

author
#6 lore raw
In reply to christophe

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 3 lines

"i2cdetect 0" will list the addresses on your SMBus. Then use these address as parameters to i2cdump. Most likely You need to do "i2cdump 0 0x2e".

First, these commands failed because there were no /dev/i2c* files. I solved this by inserting the i2c-dev module (also in /etc/sysconfig/lm_sensors). And here is the result :

#i2cdetect 0
WARNING! This program can confuse your I2C bus, cause data loss and worse! I will probe file /dev/i2c-0.
I will probe address range 0x03-0x77.
You have five seconds to reconsider and press CTRL-C!

0 1 2 3 4 5 6 7 8 9 a b c d e f
00: XX XX XX XX XX XX XX XX XX XX XX XX XX
10: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX 20: XX XX XX XX XX XX XX XX XX XX XX XX XX XX UU XX 30: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX 40: XX XX XX XX XX XX XX XX XX 49 XX XX XX XX XX XX 50: UU UU XX XX XX XX XX XX XX XX XX XX XX XX XX XX 60: XX XX XX XX XX XX XX XX XX 69 XX XX XX XX XX XX 70: XX XX XX XX XX XX XX XX

#i2cdump 0 0x2e
No size specified (using byte-data access)
WARNING! This program can confuse your I2C bus, cause data loss and worse! I will probe file /dev/i2c-0, address 0x2e, mode byte
You have five seconds to reconsider and press CTRL-C!

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
20: 00 54 c4 7e 00 30 30 2f 14 0b ff ff ff ff ff ff    .T?~.00/??......
30: 4d ff ff 64 64 64 00 00 00 00 00 00 00 27 41 6a    M..ddd.......'Aj
40: 05 8a 01 00 6d 79 96 a6 b6 ca b6 ca b6 ca 1e 3c    ???.my?????????<
50: 14 32 14 32 30 2a ff ff ff ff ff ff e2 e2 e2 a4    ?2?20*......????
60: c4 c4 00 00 40 40 40 32 5a 5a 64 64 64 44 40 00    ??..@@@2ZZdddD@.
70: 00 00 00 10 ef df b4 68 80 00 40 55 00 01 00 00    ...????h?.@U.?..
80: 00 00 00 00 00 00 00 00 00 00 00 30 00 00 00 00    ...........0....
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
b0: 00 00 00 00 30 00 00 00 00 00 00 00 00 00 00 00    ....0...........
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................

#i2cdump 0 0x49
No size specified (using byte-data access)
WARNING! This program can confuse your I2C bus, cause data loss and worse! I will probe file /dev/i2c-0, address 0x49, mode byte
You have five seconds to reconsider and press CTRL-C!

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
10: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
20: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
30: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
40: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
50: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
60: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
70: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
80: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
90: XX XX 34 XX XX XX XX XX XX XX XX XX XX XX XX XX    XX4XXXXXXXXXXXXX
a0: XX XX XX XX XX XX XX XX XX XX XX 34 XX XX XX XX    XXXXXXXXXXX4XXXX
b0: XX XX XX XX XX XX XX XX XX XX 35 XX XX XX XX XX    XXXXXXXXXX5XXXXX
c0: XX XX XX XX XX XX XX XX XX XX XX XX 34 XX XX XX    XXXXXXXXXXXX4XXX
d0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX 35    XXXXXXXXXXXXXXX5
e0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
f0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX

#i2cdump 0 0x69
No size specified (using byte-data access)
WARNING! This program can confuse your I2C bus, cause data loss and worse! I will probe file /dev/i2c-0, address 0x69, mode byte
You have five seconds to reconsider and press CTRL-C!

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07    ????????????????
10: 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07    ????????????????
20: 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07    ????????????????
30: 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07    ????????????????
40: 07 07 07 35 07 07 07 07 07 07 07 07 07 07 07 07    ???5????????????
50: 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07    ????????????????
60: 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07    ????????????????
70: 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07    ????????????????
80: 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07    ????????????????
90: 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07    ????????????????
a0: 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07    ????????????????
b0: 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07    ????????????????
c0: 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07    ????????????????
d0: 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07    ????????????????
e0: 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07    ????????????????
f0: 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07 07    ????????????????

I think the adresses 0x50 and 0x51 are for eeprom.

Quoted 6 lines
Quoted 3 lines

OK i realised that /sys/bus/i2c/devices/0-002e/name contains adm1027 instead of adt7463. Actually, i don't know which one is right since i can't read the name of a chip that is "jailed" in a laptop.

Both chips are mostly compatible. Do you have any reason to believe that you really have either one? Sometimes manufacturers just put what they have available at any given moment, thanks to that compatibility.

Well speedfan on win$ XP says it's an adt7463. And i can't read anything in i2cdump consistent.

Quoted 6 lines

That makes sense, but I'd guess the fan only uses 0.5W of power or so. If you set the PWM to a 50% duty cycle you'll save 0.25W. Out of the 25W your laptop must be consumming, it's not much, only 1%. Still I agree that whatever you can save, should be. But actually I think it's more interesting for the noise reduction than for the power consumption reduction.

True, noise reduction is an interesting issue.

Quoted 10 lines
Quoted 4 lines

Should i use something like :
set pwm1_zone 123
in /etc/sensors.conf in the appropriate section (lm85 and co...), as explained at the end of your linked document ?

You may need to. Zones define which temperature sensors determine the speed of a given fan. I'd hope that your BIOS already configured the zones properly, but maybe not. At any rate, be very careful when chaning this. If you configure the zones improperly, the fans may stop speeding up properly on temperature increase (obviously), possibly causing permanent damage to your hardware!

Ok i've put these lines in /etc/sensors.conf in the lm85 and co section :

set pwm1_zone 123
set pwm1_min_ctl 0
set pwm1_min 0

set temp1_min 20
set temp1_max 60 # dothan's max temp is actually around 100?C
set temp2_min 10
set temp2_max 45
set temp3_min 10
set temp3_max 45

It doesn't seem to set fan speed at a low rpm (not less than 3000 rpm, that's too fast) as i expected, but it might be due to my inappropriate settings... Actuall i read this document :
http://www2.lm-sensors.nu/~lm78/cvs/lm_sensors2/doc/chips/lm85
but did not understand a lot of it...
In spite of my settings the fan1_pwm is always at a minimum of 127, which means a little more than 3000 rpm. Quite noisy and "energy-consuming". I can only set fan to a lower velocity with this command :
echo 77 > fan1_pwm (for example)
Actually when cpu is very busy, cpu temperature increases and fan speed also. When cpu is less busy, cpu temperature decreases and fan speed also, but never below 3000 rpm which corresponds to fan1_pwm7. Never less than 127, except if i set it by myself.
In spite of my "set pwm1_zone 123" setting, fan speed does not increase when zone 3 has an increase in temperature :zone 3 seems to be the gpu, because it gets very hot when i use opengl with a game or a screensaver.

Another problem :
The "sensors" command gives all the informations needed about temperatures, fan speed and so on. Running the script "sh /etc/init.d/lm_sensors start" shows no errors. No errors too if i run "sensord -i 1m -l 30m". After that, what is weird is that i get no line about sensord in a "top" and no line about sensord when i run "ps -waux | grep sensord".
This is something i can't explain. It seems that sensord cannot be launched...

Thanks again.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFCF3DvoBxdxgioZBIRAseSAKDXbZKiy0pdZBEv5fAROJSBTGF3xgCgi6fF syE4DbgdWSEpUYI6Ut1yP0U=L5Be
-----END PGP SIGNATURE-----

#7 lore raw
In reply to christophe

Hi Christophe,

Quoted 1 line

30: 4d ff ff 64 64 64 00 00 00 00 00 00 00 27 41 6a

Device revision 0x6A. ADM1027 is documented as 0x60+, ADT7463 is documented as 0x62+, so I would indeed agree that it must be an ADT7463. Our driver needs to be updated.

In the meantime you can use force_adt7463.

Quoted 1 line

I think the adresses 0x50 and 0x51 are for eeprom.

You're correct.

Signature · 1 line
Jean Delvare
author
#8 lore raw
In reply to christophe

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Le samedi 19 F?vrier 2005 19:38, Jean Delvare a ?crit?:

Quoted 9 lines

Hi Christophe,

Quoted 1 line

30: 4d ff ff 64 64 64 00 00 00 00 00 00 00 27 41 6a

Device revision 0x6A. ADM1027 is documented as 0x60+, ADT7463 is documented as 0x62+, so I would indeed agree that it must be an ADT7463. Our driver needs to be updated.

In the meantime you can use force_adt7463.

OK so i need to put something like :

options lm85 force_adt7463=xxx

in the /etc/modprobe.conf... But what is the xxx i need to put ? "modinfo lm85" says i has to be "List of adapter,address pairs". I can't guess what it means... Should i put 0x2e or 060+ or anything else ??? What is this list of adapters ? I have read the lm_sensors faq but did not find anything about it... Perhaps i missed the right paragraph...

Quoted 3 lines
Quoted 1 line

I think the adresses 0x50 and 0x51 are for eeprom.

You're correct.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFCF5MJoBxdxgioZBIRAmBxAKDF/l+A/ic+rkvId81Xr4jFIdQJqwCdGcyL cxj2Bw4lyxH7ig8mHrlIO9E=ixHR
-----END PGP SIGNATURE-----

#9 lore raw
In reply to christophe
Quoted 10 lines

OK so i need to put something like :

options lm85 force_adt7463=xxx

in the /etc/modprobe.conf... But what is the xxx i need to put ? "modinfo lm85" says i has to be "List of adapter,address pairs". I can't guess what it means... Should i put 0x2e or 060+ or anything else ??? What is this list of adapters ? I have read the lm_sensors faq but did not find anything about it... Perhaps i missed the right paragraph...

Adapter is 0, address is 0x2e.

modprobe lm85 force_adt7463=0,0x2e

In other words it's exactly the same parameters you used for i2cdump. Easy :)

Signature · 1 line
Jean Delvare
author
#10 lore raw
In reply to christophe

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Le samedi 19 F?vrier 2005 16:32, vous avez ?crit?:

Quoted 8 lines
Quoted 6 lines · Jean Delvare

That makes sense, but I'd guess the fan only uses 0.5W of power or so. If you set the PWM to a 50% duty cycle you'll save 0.25W. Out of the 25W your laptop must be consumming, it's not much, only 1%. Still I agree that whatever you can save, should be. But actually I think it's more interesting for the noise reduction than for the power consumption reduction.

Quoted 7 lines

Don't know how big the fan is, a 40mm fan is typically rated at 1.2-1.4W. This is significant and I suspect a lot more than 2% of a laptop's power when it is not doing anything. Fan control is an important part of any laptop's power management.

Also, fan power is not proportional to PWM percentage or RPM; a fan running at half speed could use 1/4 or less of its full-speed power.

Understood, you gave me a good advice.

Quoted 15 lines
Quoted 8 lines
Quoted 7 lines

Should i use something like :

set pwm1_zone 123

in /etc/sensors.conf in the appropriate section (lm85 and co...), as explained at the end of your linked document ?

Quoted 6 lines

You may need to. Zones define which temperature sensors determine the speed of a given fan. I'd hope that your BIOS already configured the zones properly, but maybe not. At any rate, be very careful when chaning this. If you configure the zones improperly, the fans may stop speeding up properly on temperature increase (obviously), possibly causing permanent damage to your hardware!

Quoted 3 lines

agreed, if you break the feedback loop with the wrong correlations bad things could happen. Ideally you should figure out what the BIOS or windows does and make sure to set it up the same way under linux. Be very careful.

Thanks for warning me.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFCF6wPoBxdxgioZBIRAskyAJ9yzZB7T5yHFLmSsb2BgVCgtErtrQCgpdWB kbXDe+cfLHYI1QtpNzz6eYY=wU4I
-----END PGP SIGNATURE-----

author
#11 lore raw
In reply to christophe

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 4 lines

Adapter is 0, address is 0x2e.
modprobe lm85 force_adt7463=0,0x2e
In other words it's exactly the same parameters you used for i2cdump. Easy :)

Great ! That works !

Now i have another question : i've put these lines in /etc/sensors.conf in the lm85 and co section :

set pwm1_zone 123
set pwm1_min_ctl 0
set pwm1_min 0

set temp1_min 20
set temp1_max 60 # dothan's max temp is actually around 100?C
set temp2_min 10
set temp2_max 45
set temp3_min 10
set temp3_max 45

It doesn't seem to set fan speed at a low rpm (not less than 3000 rpm, that's too fast) as i expected, but it might be due to my inappropriate settings... Actuall i read this document :
http://www2.lm-sensors.nu/~lm78/cvs/lm_sensors2/doc/chips/lm85
but did not understand a lot of it...
In spite of my settings the fan1_pwm is always at a minimum of 127, which means a little more than 3000 rpm. Quite noisy and "energy-consuming". I can only set fan to a lower velocity (around 1800 rpm) with this command :
echo 77 > fan1_pwm (for example)
Actually when cpu is very busy, cpu temperature increases and fan speed also. When cpu is less busy, cpu temperature decreases and fan speed also, but never below 3000 rpm which corresponds to fan1_pwm7. Never less than 127, except if i set it by myself.
In spite of my "set pwm1_zone 123" setting, fan speed does not increase when zone 3 has an increase in temperature : zone 3 seems to be the gpu, because it gets very hot when i use opengl with a game or a screensaver. That's a problem because if gpu temperature gets too high, that doesn't smell good.

Another problem :
The "sensors" command gives all the informations needed about temperatures, fan speed and so on. Running the script "sh /etc/init.d/lm_sensors start" shows no errors. No errors too if i run "sensord -i 1m -l 30m". After that, what is weird is that i get no line about sensord in a "top" and no line about sensord when i run "ps -waux | grep sensord".
This is something i can't explain. It seems that sensord cannot be launched...

I know i ask many questions, i hope it doesn't bother you, but i hope it can improve lm_sensors if i give a feed back.
Thanks.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFCF6wwoBxdxgioZBIRAj86AKDFL0Z+55qc/5V9pvhxhqr97OnKZgCeIrQt RFdrWy5IEnitbLolS7f7vGo=cTCD
-----END PGP SIGNATURE-----

#12 lore raw
In reply to christophe

Hi Philip,

Quoted 6 lines
Quoted 3 lines

Device revision 0x6A. ADM1027 is documented as 0x60+, ADT7463 is documented as 0x62+, so I would indeed agree that it must be an ADT7463. Our driver needs to be updated.

Where do you see that in the datasheet?

Quoted 7 lines

The way I read this datasheet:

http://www.analog.com/UploadedFiles/Data_Sheets/272624927ADT7463_c.pdf

It says that the only valid values for the REVISION register are 0x62 and 0x6A. (see Table IV on page 32) It doesn't say that any value larger than 0x62 is an ADT7463.

My conclusion was based on the revision B of the datasheet (thanks for the pointer to the new one). Revision B didn't mention 0x6A as possible, only 0x62.

It is very common that datasheets will document the lowest possible revision/stepping for a chip, leaving it up to us to decide which range we want to accept. This is what I proposed (and committed), based on both the ADM1027 (rev.A) and the ADT7463 (rev.B) datasheets.

Quoted 1 line

I think it might be safer to just add 0x6A as a valid ADT7463 chip.

How exactly is it safer? I obviously don't know the LM85 and compatibles family as good as you do, but I don't see what risk we have here. The worst that could happen would be that we think the chip has feature it doesn't actually have, right? These features will just not work, and users will report about it.

And even that is unlikely, IMHO. I think I understand that the ADT7463 has more features than the ADM1027 had, and higher stepping numbers. A newer chip in that family would certainly follow the same rules: higher stepping number, additional features. My code admittedly assumes that.

The problem with your method is that it requires a change to the driver with every new chip revision. With mine we only have to change the code if the new chip revision has new features. In the meantime the driver will provide as many features as possible, while with your approach it will feature the minimal subset.

As a matter of fact, with my code, Christophe's chip would have been properly detected. With yours it required a driver update.

So unless there is a real risk I am missing, I do believe that the change I made is an improvement.

Thanks,

Signature · 1 line
Jean Delvare
#13 lore raw
In reply to christophe
Quoted 8 lines · Jean Delvare

That makes sense, but I'd guess the fan only uses 0.5W of power or so. If you set the PWM to a 50% duty cycle you'll save 0.25W. Out of the 25W your laptop must be consumming, it's not much, only 1%. Still I agree that whatever you can save, should be. But actually I think it's more interesting for the noise reduction than for the power consumption reduction.

Don't know how big the fan is, a 40mm fan is typically rated at 1.2-1.4W. This is significant and I suspect a lot more than 2% of a laptop's power when it is not doing anything. Fan control is an important part of any laptop's power management.

Also, fan power is not proportional to PWM percentage or RPM; a fan running at half speed could use 1/4 or less of its full-speed power.

Quoted 9 lines
Quoted 7 lines

Should i use something like :

set pwm1_zone 123

in /etc/sensors.conf in the appropriate section (lm85 and co...), as explained at the end of your linked document ?

Quoted 6 lines

You may need to. Zones define which temperature sensors determine the speed of a given fan. I'd hope that your BIOS already configured the zones properly, but maybe not. At any rate, be very careful when chaning this. If you configure the zones improperly, the fans may stop speeding up properly on temperature increase (obviously), possibly causing permanent damage to your hardware!

agreed, if you break the feedback loop with the wrong correlations bad things could happen. Ideally you should figure out what the BIOS or windows does and make sure to set it up the same way under linux. Be very careful.

#14 lore raw
In reply to christophe
Quoted 28 lines · christophe

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 6 lines

Adapter is 0, address is 0x2e.
modprobe lm85 force_adt7463=0,0x2e
In other words it's exactly the same parameters you used for i2cdump. Easy :)

Great ! That works !

Now i have another question : i've put these lines in /etc/sensors.conf in the lm85 and co section :

set pwm1_zone 123
set pwm1_min_ctl 0
set pwm1_min 0

set temp1_min 20
set temp1_max 60 # dothan's max temp is actually around 100?C
set temp2_min 10
set temp2_max 45
set temp3_min 10
set temp3_max 45

Quoted 7 lines

It doesn't seem to set fan speed at a low rpm (not less than 3000 rpm, that's too fast) as i expected, but it might be due to my inappropriate settings... Actuall i read this document :
http://www2.lm-sensors.nu/~lm78/cvs/lm_sensors2/doc/chips/lm85
but did not understand a lot of it...

I'm sorry. Is there any particular section that was confusing? What could I explain better?

Quoted 5 lines

In spite of my settings the fan1_pwm is always at a minimum of 127, which means a little more than 3000 rpm. Quite noisy and "energy-consuming". I can only set fan to a lower velocity (around 1800 rpm) with this command :
echo 77 > fan1_pwm (for example)
Actually when cpu is very busy, cpu temperature increases and fan speed also.

Quoted 10 lines

When cpu is less busy, cpu temperature decreases and fan speed also, but never below 3000 rpm which corresponds to fan1_pwm7. Never less than 127, except if i set it by myself.
In spite of my "set pwm1_zone 123" setting, fan speed does not increase when zone 3 has an increase in temperature : zone 3 seems to be the gpu, because it gets very hot when i use opengl with a game or a screensaver. That's a problem because if gpu temperature gets too high, that doesn't smell good.

Is this a 2.4 or a 2.6 kernel?

Can you send the current values of all your current settings by running something like:

head /proc/sys/dev/sensors/adt7463*/*

which will work on 2.4. If you're using 2.6, you'll need to do something similar in /sys

Thanks,
:v)

#15 lore raw
In reply to christophe
Quoted 4 lines · Jean Delvare

Hi Christophe,

Quoted 9 lines
Quoted 3 lines

30: 4d ff ff 64 64 64 00 00 00 00 00 00 00 27 41 6a

Device revision 0x6A. ADM1027 is documented as 0x60+, ADT7463 is documented as 0x62+, so I would indeed agree that it must be an ADT7463. Our driver needs to be updated.

Where do you see that in the datasheet?

The way I read this datasheet:

http://www.analog.com/UploadedFiles/Data_Sheets/272624927ADT7463_c.pdf

It says that the only valid values for the REVISION register are 0x62 and 0x6A. (see Table IV on page 32) It doesn't say that any value larger than 0x62 is an ADT7463.

I think it might be safer to just add 0x6A as a valid ADT7463 chip. See the attached patch against CVS.

Quoted 3 lines

In the meantime you can use force_adt7463.

-------------- next part --------------
Index: lm_sensors2/kernel/chips/lm85.c =================================RCS file: /home/cvs/lm_sensors2/kernel/chips/lm85.c,v retrieving revision 1.16

kernel/chips/lm85.c +12 -4
diff -u -r1.16 lm85.c
@@ -114,6 +114,7 @@
 #define LM85_VERSTEP_LM85B 0x62
 #define LM85_VERSTEP_ADM1027 0x60
 #define LM85_VERSTEP_ADT7463 0x62
+#define LM85_VERSTEP_ADT7463C 0x6A
 #define LM85_VERSTEP_EMC6D100_A0 0x60
 #define LM85_VERSTEP_EMC6D100_A1 0x61
 
@@ -781,11 +782,18 @@
 			    " Defaulting to Generic LM85.\n", verstep );
 			kind = any_chip ;
 		} else if( company = LM85_COMPANY_ANALOG_DEV
+		    && verstep = LM85_VERSTEP_ADM1027 ) {
+			kind = adm1027 ;
+		} else if( company = LM85_COMPANY_ANALOG_DEV
+		    && (verstep = LM85_VERSTEP_ADT7463
+			 || verstep = LM85_VERSTEP_ADT7463C) ) {
+			kind = adt7463 ;
+		} else if( company = LM85_COMPANY_ANALOG_DEV
 		    && (verstep & LM85_VERSTEP_VMASK) = LM85_VERSTEP_GENERIC) {
-			if (verstep >= LM85_VERSTEP_ADT7463)
-				kind = adt7463;
-			else
-				kind = adm1027;
+			printk("lm85: Detected Analog Devices chip\n");
+			printk("lm85: Unrecgonized version/stepping 0x%02x"
+			    " Defaulting to Generic LM85.\n", verstep );
+			kind = any_chip ;
 		} else if( company = LM85_COMPANY_SMSC
 		    && (verstep = LM85_VERSTEP_EMC6D100_A0
 			 || verstep = LM85_VERSTEP_EMC6D100_A1) ) {
#16 lore raw
In reply to christophe
Quoted 21 lines · Jean Delvare

Hi Philip,

Quoted 7 lines
Quoted 5 lines

Device revision 0x6A. ADM1027 is documented as 0x60+, ADT7463 is documented as 0x62+, so I would indeed agree that it must be an ADT7463. Our driver needs to be updated.

Where do you see that in the datasheet?

Quoted 9 lines

The way I read this datasheet:

http://www.analog.com/UploadedFiles/Data_Sheets/272624927ADT7463_c.pdf

It says that the only valid values for the REVISION register are 0x62 and 0x6A. (see Table IV on page 32) It doesn't say that any value larger than 0x62 is an ADT7463.

Quoted 10 lines

My conclusion was based on the revision B of the datasheet (thanks for the pointer to the new one). Revision B didn't mention 0x6A as possible, only 0x62.

It is very common that datasheets will document the lowest possible revision/stepping for a chip, leaving it up to us to decide which range we want to accept. This is what I proposed (and committed), based on both the ADM1027 (rev.A) and the ADT7463 (rev.B) datasheets.

OK. I haven't seen a range of revisions documented in a datasheet, but I believe that you've read more datasheets than I have.

Quoted 11 lines
Quoted 3 lines

I think it might be safer to just add 0x6A as a valid ADT7463 chip.

How exactly is it safer? I obviously don't know the LM85 and compatibles family as good as you do, but I don't see what risk we have here. The worst that could happen would be that we think the chip has feature it doesn't actually have, right? These features will just not work, and users will report about it.

Or the register bits could have changed in a non-backward compatible way. We could end up disabling something or turning something off that causes the system to overheat when we attempt to program the ADT7463 specific functions.

Witness the recent changes to the config bits on the LM75 driver. The operation of the interrupt output function.

Quoted 6 lines

And even that is unlikely, IMHO. I think I understand that the ADT7463 has more features than the ADM1027 had, and higher stepping numbers. A newer chip in that family would certainly follow the same rules: higher stepping number, additional features. My code admittedly assumes that.

Each member of the lm85 family has it's additional features implemented differently. Registers above 0x70 are generally completely manufacturer specific. (Register 0x74 and 0x75 are completely different between the LM85 and the ADM1027/ADT7463)

And between the ADM1027 and the ADT7463, there is the _THERM_Enable bit in Configuration Register 3. This bit is not defined on the ADM1027 but is on the ADT7463. This bit controls the Interrupt or "overheat/shutdown" function of the chip and system. Not something we want to program incorrectly.

Lastly, the ADT7463 datasheet says "DO NOT WRITE TO THESE REGISTERS" in the description of registers 0x7e and 0x7f. These registers are named "Test Register 1" and 2. What other "test registers" might exist in future or compatible chips that shouldn't be written to? What if they happen to be at the same address as one of the config registers currently implemented in the ADT7463 driver?

Quoted 7 lines

The problem with your method is that it requires a change to the driver with every new chip revision. With mine we only have to change the code if the new chip revision has new features. In the meantime the driver will provide as many features as possible, while with your approach it will feature the minimal subset.

Shouldn't we investigate each revision of the chip to determine if there are new features that should be enabled or bits that have changed rather than just blindly assuming the manufacturer made a backward compatible upgrade?

I would suggest that the "minimal subset" would be a much better default than the "maximum functionality" that your patch produces.

Quoted 4 lines

As a matter of fact, with my code, Christophe's chip would have been properly detected. With yours it required a driver update.

The driver should have already detected his chip correctly. There is an else/if clause that matches for the Analog Devices manufacturer ID and a generic '0x6?' revision ID. In that case, it should detect the chip and provide the basic functionality along with a message to advise them to look into the driver for better support.

                } else if( company = LM85_COMPANY_ANALOG_DEV
                    && (verstep & LM85_VERSTEP_VMASK) = 
LM85_VERSTEP_GENERIC) {
                        printk("lm85: Detected Analog Devices chip\n");
                        printk("lm85: Unrecgonized version/stepping 0x%02x"
                            " Defaulting to Generic LM85.\n", verstep );
                        kind = any_chip ;

Did this code not work in this case?

Quoted 4 lines

So unless there is a real risk I am missing, I do believe that the change I made is an improvement.

And we disagree. But that is the nature of the open source development process.

:v)

#17 lore raw
In reply to christophe
Quoted 2 lines
Quoted 2 lines

Well there must be something wrong, because no 00:0f.3 device.

I made a typo in the first place. The device we are trying to unhide is actually 00:1f.3.

--
Jean Delvare

#18 lore raw
In reply to christophe

Hi Philip,

Quoted 7 lines
Quoted 4 lines

It is very common that datasheets will document the lowest possible revision/stepping for a chip, leaving it up to us to decide which range we want to accept. This is what I proposed (and committed), based on both the ADM1027 (rev.A) and the ADT7463 (rev.B) datasheets.

OK. I haven't seen a range of revisions documented in a datasheet, but I believe that you've read more datasheets than I have.

An example of this can be read in the LM90 datasheet:

"2.13 DIE REVISION CODE REGISTER

(Read Address FFh) Default value 21h. This register will increment by 1 every time there is a revision to the die by National Semiconductor."

I think I remember reading the same on the LM86, LM89 and LM99 datasheets.

On other datasheets, no revision is mentioned at all, so we have little choice but to rely on chip dumps or ask the manufacturer directly for hints (the LM83 and ADM1032 fall into that category). On yet other datasheets, one part (typically the high nibble) of the revision is given and the rest isn't (the ADM1025 falls into that category).

So there are obviously different cases, which must be dealt with appropriately.

Quoted 10 lines
Quoted 5 lines

How exactly is it safer? I obviously don't know the LM85 and compatibles family as good as you do, but I don't see what risk we have here. The worst that could happen would be that we think the chip has feature it doesn't actually have, right? These features will just not work, and users will report about it.

Or the register bits could have changed in a non-backward compatible way. We could end up disabling something or turning something off that causes the system to overheat when we attempt to program the ADT7463 specific functions.

Right. I assumed wisdom from Analog Devices in the improvements they could do to the chip. I wouldn't have from all companies, but even then my assumption might be too high and unsafe, as you underlined.

Quoted 2 lines

Witness the recent changes to the config bits on the LM75 driver. The operation of the interrupt output function.

The recent LM75 case is different, I think. The code was not correct in the first place, even for a real, fully documented LM75.

Also not that I have always been advocating minimum initialization steps, which are a requirement for the kind of forward compatibility I was suggesting here. When the initialization in a given driver does more than it should (e.g. chip reset or arbitrary reconfiguration of particular features), then my point is void, agreed.

Quoted 4 lines

Each member of the lm85 family has it's additional features implemented differently. Registers above 0x70 are generally completely manufacturer specific. (Register 0x74 and 0x75 are completely different between the LM85 and the ADM1027/ADT7463)

Well, as long as it is manufacturer-specific and not model-specific, my approach seems to be still valid.

Quoted 6 lines

And between the ADM1027 and the ADT7463, there is the _THERM_Enable bit in Configuration Register 3. This bit is not defined on the ADM1027 but is on the ADT7463. This bit controls the Interrupt or "overheat/shutdown" function of the chip and system. Not something we want to program incorrectly.

Quoted 6 lines

Lastly, the ADT7463 datasheet says "DO NOT WRITE TO THESE REGISTERS" in the description of registers 0x7e and 0x7f. These registers are named "Test Register 1" and 2. What other "test registers" might exist in future or compatible chips that shouldn't be written to? What if they happen to be at the same address as one of the config registers currently implemented in the ADT7463 driver?

The cases you describe here are not a problem as long as Analog Devices take care of backward and forward compatibility among a family of their chips. I'd expect it, but of course we can't be sure.

Quoted 7 lines

Shouldn't we investigate each revision of the chip to determine if there are new features that should be enabled or bits that have changed rather than just blindly assuming the manufacturer made a backward compatible upgrade?

I would suggest that the "minimal subset" would be a much better default than the "maximum functionality" that your patch produces.

Makes sense. I might be assuming too much.

Quoted 8 lines
Quoted 2 lines

As a matter of fact, with my code, Christophe's chip would have been properly detected. With yours it required a driver update.

The driver should have already detected his chip correctly. There is an else/if clause that matches for the Analog Devices manufacturer ID and a generic '0x6?' revision ID. In that case, it should detect the chip and provide the basic functionality along with a message to advise them to look into the driver for better support.

In Linux 2.6.8.1 the code happens to be slightly different, unknown revision IDs of Analog Devices chips do default to ADM1027 and not the minimum LM85 subset. This has been fixed since (by Rafael Espindola, [1]) to do what you describe (similar in that respect to the Linux 2.4 driver).

Also, when defaulting to the generic case, the message doesn't really invite the user to report. If you want him/her to, I'd suggest you be more explicit about it.

Quoted 5 lines
Quoted 2 lines

So unless there is a real risk I am missing, I do believe that the change I made is an improvement.

And we disagree. But that is the nature of the open source development process.

"(...) the fundamental strength of open source is exactly the fact that people don't have to agree about everything." -- Linus Torvalds, 2005-01-13 [2]

You made your point clear and I come to somewhat agree with you. Different family of chips require different care. You know that particular family better than I do, and it's not exactly a simple one. You also know the driver better that I do - you wrote it after all, and it differs from the other ones in several respects.

Please provide a patch for the Linux 2.6 lm85 driver adding support for the 0x6a revision of the ADT7463 the way you like it.

I'll apply your patch to CVS this evening. BTW, don't you happen to have CVS write access? If you do, you can commit the changes yourself (and if you don't, please consider asking for one.)

Thanks a lot for looking into this, this is much appreciated.

[1]
http://linux.bkbits.net:8080/linux-2.5/diffs/drivers/i2c/chips/[email protected]
[2] http://lkml.org/lkml/2005/1/12/388

--
Jean Delvare

#19 lore raw
In reply to christophe

Hi Christophe,

Quoted 10 lines

Ok i didn't want to change my kernel 2.6.8.1-24mdk because i made many improvements on it (regarding dothan cpu and lirc). So i applied the patch you gave me on the /drivers/pci/quirks.c file. At the same place i just added the line about the w1n laptop :

		if (dev->device = PCI_DEVICE_ID_INTEL_82855PM_HB)
			switch (dev->subsystem_device) {
(quoted diff) +1 -0
+			case 0x184b: /* W1N notebook */
			case 0x186a: /* M6Ne notebook */
				asus_hides_smbus = 1;
			}
Quoted 2 lines

Then i recompiled. (make mrproper, make all, make modules_install install) Then... Nothing. Perhaps, there is something i forgot.

The expected effect was that lspci should now list a 00:0f.3 device. If it doesn't, then the quirk failed, right.

Quoted 5 lines

I don't understand. And i am not very good at kernel stuff. Everything about pci is activated in the kernel config. PCI access mode is set to 'any', legacy /proc/cpi interface is set, pci device name database is set, isa support is set, eisa support is set with generic pci/eisa, eisa virtual root device, eisa device name database, and natsemi SCx200 is set.

Have you enabled hotplug support (and possibly explicitely PCI hotplug support)? These was needed for the 2.4 quirks, so I'd expect it to be required in 2.6 too.

Quoted 10 lines

Actually i think your patch is good but does not seem to be exploited since lspci -v still says that :
00:00.0 Host bridge: Intel Corp. 82855PM Processor to I/O Controller (rev 21)
Subsystem: Asustek Computer, Inc.: Unknown device 184b <---- Here
Flags: bus master, fast devsel, latency 0
Memory at e0000000 (32-bit, prefetchable) [size%6M]
Capabilities: [e4] #09 [4104]
Capabilities: [a0] AGP version 2.0
the device is unknown... I don't know how to tell the kernel to take your patch into account.

The patch is not supposed to make the device appear as non-unknown. Devices are unknown when they are not listed in /usr/share/pci.ids (and/or the in-kernel equivalent). It just means we have no string that names the device. The device is still active.

The 00:00.0 PCI device is just used as an identification mean. Don't expect any change on it with the patch.

Are you sure you added the code chunk in the Asus part of the function, and not in the HP part?

You might also try with a 2.6.10 kernel and my original patch, even if it is only temporary. If that works then at least we'll know that the quirk is correct and 2.6.8.1 simply lacks something (supposedly).

--
Jean Delvare

#20 lore raw
In reply to christophe

Hi Christophe,

Quoted 7 lines

I plead guilty for one confusion i did. I did use the printk stuff :
(...)
And i realised that when adding the patch manually to the 2.6.8.1 kernel, although it was a patch done for kernel 2.6.10, i inserted the "case" lines for w1n in the wrong if section. I inserted it for the PCI_DEVICE_ID_INTEL_82855GM_HB when it was for PCI_DEVICE_ID_INTEL_82855PM_HB

Ok, at least that explains it all. I'll push the patch upwards.

Quoted 3 lines

So now the patch is correctly applied and could run sensors-detect successfully.
Actually, sensors-detect did not detect the adt7463 chip.

This is a problem. Can you please provide a dump of your chip (using i2cdetect to locate the correct address and i2cdump to do the actual dump)?

Quoted 5 lines

But i added
everything in the config files to insert automatically the lm85 modules, without any parameters, when the lm_sensors service is started. So now, i can reduce manually the fan speed and have a longer battery time.

I admit I am surprised, I never thought that lowering the speed of the fan could really spare a significant amount of battery.

Quoted 3 lines

One more question : is there a way to adjust fan speed to one of the temperature ?
Or do i have to write a little script ?

The LM85 and friend chips supposedly have hardware temperature-driven fan control.

Quoted 3 lines

Why can't i modify the content of
the /sys/bus/i2c/devices/0-002e/fan1_pwm_enable (it contains '1') ? What is the purpose of these fan*_pwm_enable files ?

This means that fan control is enabled for this fan output (which may or may not be physically wired to an actual fan on your system).

See this file for additional insight:
http://www2.lm-sensors.nu/~lm78/cvs/lm_sensors2/doc/chips/lm85

Not everything might exactly apply to the 2.6 kernel version of the driver but that will still give you a good idea of the chip capabilities and how it can be configured.

--
Jean Delvare

#21 lore raw
In reply to christophe

Hi Christophe,

Quoted 6 lines

Well there must be something wrong, because no 00:0f.3 device. Is there a way to check if this quirk has been "tried" by the kernel ? Any log to check ?
I tried "tail -2000 /var/log/syslog | grep -i quirk" : no output. I tried "tail -2000 /var/log/syslog | grep -i pci" : long output that i don't know how to decypher, but nothing about a 00:0f.3 device...

No, quirks don't leave any trace in the logs.

However, you could easily add some printk at the location you added code to yesterday. Something like that:

if (dev->device = PCI_DEVICE_ID_INTEL_82855PM_HB)

    switch (dev->subsystem_device) {
    case 0x184b: /* W1N notebook */
    case 0x186a: /* M6Ne notebook */
        asus_hides_smbus = 1;
+       printk(KERN_INFO "*** PCI QUIRK DONE!\n");
    }

Feel free to also add a printk in the asus_hides_smbus_lpc function (which is the second part of the trick). Unless the two printk messages show in your logs, the quirk has not triggered as expected.

Quoted 3 lines

Yes i enabled the hotplug support but as a module and i am quite confused about it, because i don't know which module i am supposed to load and with which parameters.

I am surprised. Hotplug is a configuration flag, it cannot be made a module as far as I know. What I am talking about is named exactly "Support for hot-pluggable devices" and is found in "General setup". If you have this enabled I think it's all you need.

Quoted 2 lines

OK, so right now the goal is to find a way to make the kernel discover a device on the pci bus. Am i right ?

Exactly. Once the new device is found, you should be able to load i2c-i801, which is your SMBus controller driver.

Quoted 3 lines

I hope that kernel 2.6.8.1 can do that. It seems to be just a matter of finding a device on the pci bus. There must be a way to do it with 2.6.8.1. You suggest pci hotplug. Is it a hotplugable device that we need to find ?

The device isn't (it is already on your motherboard) but the fact that the BIOS disabled it and we re-enable it afterwards may make the kernel see it as if it were hotplugged. But I am not sure either.

Quoted 1 line

Are we looking for a smbus controller ?

Yes we are.

Quoted 1 line

Sorry about my newbie questions, but i like to learn.

No problem :)

--
Jean Delvare

#22 lore raw
In reply to christophe

Hi Christophe,

Quoted 3 lines

OK, so which module in
the /lib/modules/<kernelversion>/kernel/drivers/pci/hotplug/ directory are we supposed to load and with which parameters ?

I don't think you are supposed to load these. The main flag should be sufficient.

--
Jean Delvare

#23 lore raw
In reply to christophe

Hi Christophe,

Quoted 4 lines

I don't know what parameters to pass to i2detect and i2cdump. I've tried some adresses like 002e and lots of others but i don't know which one. I'll take time to read man for i2cdetect and i2c dump. But i don't have time to do it know.

"i2cdetect 0" will list the addresses on your SMBus. Then use these address as parameters to i2cdump. Most likely You need to do "i2cdump 0 0x2e".

Quoted 3 lines

OK i realised that /sys/bus/i2c/devices/0-002e/name contains adm1027 instead of adt7463. Actually, i don't know which one is right since i can't read the name of a chip that is "jailed" in a laptop.

Both chips are mostly compatible. Do you have any reason to believe that you really have either one? Sometimes manufacturers just put what they have available at any given moment, thanks to that compatibility.

Quoted 2 lines

Do i have to load the lm85 module with special options like :
modprobe lm85 force_adt7463=xxxx

Should not be needed. The dump will tell. Either you really have an ADM1027, or the detction is broken and we'll fix it.

Quoted 6 lines
Quoted 2 lines

I admit I am surprised, I never thought that lowering the speed of the fan could really spare a significant amount of battery.

Well, i thought that the fastest the fan turns, the more energy is spent and the shorter the battery lasts. No ? If the fan does not spend a lot of energy, reducing fan speed has at least one advantage : less noise !

That makes sense, but I'd guess the fan only uses 0.5W of power or so. If you set the PWM to a 50% duty cycle you'll save 0.25W. Out of the 25W your laptop must be consumming, it's not much, only 1%. Still I agree that whatever you can save, should be. But actually I think it's more interesting for the noise reduction than for the power consumption reduction.

Quoted 6 lines

Should i use something like :

set pwm1_zone 123

in /etc/sensors.conf in the appropriate section (lm85 and co...), as explained at the end of your linked document ?

You may need to. Zones define which temperature sensors determine the speed of a given fan. I'd hope that your BIOS already configured the zones properly, but maybe not. At any rate, be very careful when chaning this. If you configure the zones improperly, the fans may stop speeding up properly on temperature increase (obviously), possibly causing permanent damage to your hardware!

--
Jean Delvare

author
#24 lore raw
In reply to christophe

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 7 lines
Quoted 5 lines

It doesn't seem to set fan speed at a low rpm (not less than 3000 rpm, that's too fast) as i expected, but it might be due to my inappropriate settings... Actuall i read this document :
http://www2.lm-sensors.nu/~lm78/cvs/lm_sensors2/doc/chips/lm85
but did not understand a lot of it...

I'm sorry. Is there any particular section that was confusing? What could I explain better?

Well, "i" am sorry, i read the document about lm85 chip and i may not have enough technical knowledges to understand how to give the right parameters in /etc/sensors.conf
This is the intersting part of this file (in the lm85 and co section) :

set pwm1_zone 123
set pwm1_min_ctl 0
set pwm1_min 0

set temp1_min 20
set temp1_max 60 # dothan's max temp is actually around 100?C
set temp2_min 10
set temp2_max 45
set temp3_min 10
set temp3_max 45

If i run "sensord -i 1m -l 30m", i read this in /var/log/syslog :
Error getting sensor data: adt7463/fan1_tach_mode: Can't access procfs/sysfs file

I get the same message in /var/log/syslog if put this line in /etc/sensors.conf:

set fan1_tach_mode 0

I can't understand that... Actually this may be the reason why the fan doesn't seem to follow the policy i give him in /etc/sensors.conf, as i told before.

Quoted 13 lines
Quoted 5 lines

In spite of my settings the fan1_pwm is always at a minimum of 127, which means a little more than 3000 rpm. Quite noisy and "energy-consuming". I can only set fan to a lower velocity (around 1800 rpm) with this command : echo 77 > fan1_pwm (for example)
Actually when cpu is very busy, cpu temperature increases and fan speed

Quoted 8 lines

also. When cpu is less busy, cpu temperature decreases and fan speed also, but never below 3000 rpm which corresponds to fan1_pwm7. Never less than 127, except if i set it by myself.
In spite of my "set pwm1_zone 123" setting, fan speed does not increase when zone 3 has an increase in temperature : zone 3 seems to be the gpu, because it gets very hot when i use opengl with a game or a screensaver. That's a problem because if gpu temperature gets too high, that doesn't smell good.

Quoted 1 line

Is this a 2.4 or a 2.6 kernel?

The kernel is 2.6.8.1 with a patch for quirks.c to detect the adt7463 chip on my asus w1n laptop.

Quoted 3 lines

Can you send the current values of all your current settings by running something like:

   head /proc/sys/dev/sensors/adt7463*/*

No sensors directory in /proc/sys/dev/ ! Shall i recompile again with some other options ?

Quoted 2 lines

which will work on 2.4. If you're using 2.6, you'll need to do something similar in /sys

Ah ! OK so here is what i get if i run "head /sys/bus/i2c/devices/0-002e" :

=> alarms <=
394

=> detach_state <=
0

=> fan1_input <=
0

=> fan1_min <=
500

=> fan1_pwm <=
0

=> fan1_pwm_enable <=
1

=> fan2_input <=
0

=> fan2_min <=
0

=> fan2_pwm <=
255

=> fan2_pwm_enable <=
1

=> fan3_input <=
0

=> fan3_min <=
0

=> fan3_pwm <=
255

=> fan3_pwm_enable <=
1

=> fan4_input <=
0

=> fan4_min <=
0

=> in0_input <=
0

=> in0_max <=
1576

=> in0_min <=
1419

=> in0_ref <=
1850

=> in1_input <=
1207

=> in1_max <=
1945

=> in1_min <=
1758

=> in2_input <=
3369

=> in2_max <=
3472

=> in2_min <=
3128

=> in3_input <=
3281

=> in3_max <=
5260

=> in3_min <=
4740

=> in4_input <=
0

=> in4_max <=
12625

=> in4_min <=
11375

=> name <=
adt7463

=> power <=
head: Erreur lors de la lecture `power': Is a directory

=> temp1_input <=
54000

=> temp1_max <=
60000

=> temp1_min <=
30000

=> temp2_input <=
48000

=> temp2_max <=
50000

=> temp2_min <=
20000

=> temp3_input <=
48000

=> temp3_max <=
50000

=> temp3_min <=
20000

=> vrm <=
91

I thought that the the chip itself could handle fan speed according to temperatures. Shall i use fancontrol instead ?

Thank you.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFCGft9oBxdxgioZBIRAgbGAJ9xOH8pb727lRi/6tvyfrVpMrXgsQCePhmi 4nWN8ZGuQ1gYGAX84QhCqnA=DyR6
-----END PGP SIGNATURE-----

author
#25 lore raw
In reply to christophe

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Le lundi 21 F?vrier 2005 16:32, Jean Delvare a ?crit?:

Quoted 9 lines

Hi Christophe,

Quoted 3 lines

If i run "sensord -i 1m -l 30m", i read this in /var/log/syslog :
Error getting sensor data: adt7463/fan1_tach_mode: Can't access procfs/sysfs file

I would suggest that you do NOT run sensord. Most people don't need it and since it is not being actively maintained, using it is usually asking for more trouble than is worth.

Thanks for your very kind advice !

Quoted 9 lines

sensord is a deamon which will poll the sensors repeatedly, and log problems when they occur. While this is fine for servers, it is usually easier for regular users on desktop/laptop systems to just run "sensors" from times to times, or use graphical frontends (xsensors, gkrellm, ksensors...).

At any rate, sensord is *not* required for fan control operations (neither automatic nor manual). It is, in fact, totally unrelated (sensord is about monitoring/reporting, not control).

So how can i suggect this fan to adapt its temperature to the 3 monitored temperatures ?
I have added in /etc/sensors.conf :

set pwm1_zone 123
set pwm1_min_ctl 0
set pwm1_min 0

set temp1_min 20
set temp1_max 60 # dothan's max temp is actually around 100?C
set temp2_min 10
set temp2_max 45
set temp3_min 10
set temp3_max 45

It appears that when the fan reaches 3000rpm it never spins down below that speed whatever the temp#_min and temp#_max are.

I ran pwmconfig and fancontrol but fancontrol adjusts fan speed only to one temperature, and moreover, it says that access to fan1_pwm_enable is denied.

Actually i can't find an easy way to adapt the fan speed (fan1) according the 3 temperatures, so that fan speed is as low as possible.

Thank you.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFCGgSAoBxdxgioZBIRAkPZAJ9vmk0U7gsWWuh26UPHlQ6VD2UBlgCfW959 Aa6lNVPvx1cITevx7KjbsMU=eHFw
-----END PGP SIGNATURE-----

author
#26 lore raw
In reply to christophe

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Le lundi 21 F?vrier 2005 20:22, vous avez ?crit?:

Quoted 17 lines

The lm85 driver is the correct driver for the ADT7463. The problem you have is that you're using a version of lm85 that does not include the fan speed control functionality.

The initial port of the lm85 driver to the 2.6 kernel did *not* include the fan speed control features. They were added later (a couple of months ago.) with a patch.

Unfortunately, I don't have the patch handy. It was submitted to Greg KH for inclusion in his trees and from there should have made it's way into the Torvalds tree.

If you search the lm_sensors archives, you should find the patch. Alternatively, you might be able to get it from a GregKH kernel on kernel.org. Lastly, you might need a 2.6.10 or later kernel to get the additional functionality.

Quoted 4 lines

Then the pwm1_zone settings in sensors.conf will work. Until you upgrade the driver, they won't.

:v)

OK !!!
Thanks a lot for your help.
As i'd like to stay on kernel 2.6.8.1 for a few months more (too much work done on it), i decided to solve the problem by myself. I wrote a small programm in c to compute a value between 0 and 255 according to the temperature of cpu, gpu and motherboard. With a 4 lines shell script it can set fan speed (fan1_pwm) at a regular pace. And that worls great. Each time, a sensors gets a lot of celsius, the fan gets a lot of rpms....

Thanks to Jean, Mark and Philip
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFCG6zsoBxdxgioZBIRAnJCAJ97wL6HZYA/sOtkdyKb0jVr5H6g6QCgim3/ 7uX4E5AcgCcki6yBLkMt9nY=h05n
-----END PGP SIGNATURE-----

#27 lore raw
In reply to christophe

Hi Christophe,

Quoted 3 lines

If i run "sensord -i 1m -l 30m", i read this in /var/log/syslog :
Error getting sensor data: adt7463/fan1_tach_mode: Can't access procfs/sysfs file

I would suggest that you do NOT run sensord. Most people don't need it and since it is not being actively maintained, using it is usually asking for more trouble than is worth.

sensord is a deamon which will poll the sensors repeatedly, and log problems when they occur. While this is fine for servers, it is usually easier for regular users on desktop/laptop systems to just run "sensors" from times to times, or use graphical frontends (xsensors, gkrellm, ksensors...).

At any rate, sensord is *not* required for fan control operations (neither automatic nor manual). It is, in fact, totally unrelated (sensord is about monitoring/reporting, not control).

--
Jean Delvare

#28 lore raw
In reply to christophe

The lm85 driver is the correct driver for the ADT7463. The problem you have is that you're using a version of lm85 that does not include the fan speed control functionality.

The initial port of the lm85 driver to the 2.6 kernel did *not* include the fan speed control features. They were added later (a couple of months ago.) with a patch.

Unfortunately, I don't have the patch handy. It was submitted to Greg KH for inclusion in his trees and from there should have made it's way into the Torvalds tree.

If you search the lm_sensors archives, you should find the patch. Alternatively, you might be able to get it from a GregKH kernel on kernel.org. Lastly, you might need a 2.6.10 or later kernel to get the additional functionality.

Then the pwm1_zone settings in sensors.conf will work. Until you upgrade the driver, they won't.

:v)

Quoted 236 lines · christophe

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 11 lines
Quoted 7 lines

It doesn't seem to set fan speed at a low rpm (not less than 3000 rpm, that's too fast) as i expected, but it might be due to my inappropriate settings... Actuall i read this document :
http://www2.lm-sensors.nu/~lm78/cvs/lm_sensors2/doc/chips/lm85
but did not understand a lot of it...

I'm sorry. Is there any particular section that was confusing? What could I explain better?

Well, "i" am sorry, i read the document about lm85 chip and i may not have enough technical knowledges to understand how to give the right parameters in /etc/sensors.conf
This is the intersting part of this file (in the lm85 and co section) :

set pwm1_zone 123
set pwm1_min_ctl 0
set pwm1_min 0

set temp1_min 20
set temp1_max 60 # dothan's max temp is actually around 100?C
set temp2_min 10
set temp2_max 45
set temp3_min 10
set temp3_max 45

If i run "sensord -i 1m -l 30m", i read this in /var/log/syslog :
Error getting sensor data: adt7463/fan1_tach_mode: Can't access procfs/sysfs file

I get the same message in /var/log/syslog if put this line in /etc/sensors.conf:

set fan1_tach_mode 0

I can't understand that... Actually this may be the reason why the fan doesn't seem to follow the policy i give him in /etc/sensors.conf, as i told before.

Quoted 15 lines
Quoted 5 lines

In spite of my settings the fan1_pwm is always at a minimum of 127, which means a little more than 3000 rpm. Quite noisy and "energy-consuming". I can only set fan to a lower velocity (around 1800 rpm) with this command : echo 77 > fan1_pwm (for example)
Actually when cpu is very busy, cpu temperature increases and fan speed

Quoted 10 lines

also. When cpu is less busy, cpu temperature decreases and fan speed also, but never below 3000 rpm which corresponds to fan1_pwm7. Never less than 127, except if i set it by myself.
In spite of my "set pwm1_zone 123" setting, fan speed does not increase when zone 3 has an increase in temperature : zone 3 seems to be the gpu, because it gets very hot when i use opengl with a game or a screensaver. That's a problem because if gpu temperature gets too high, that doesn't smell good.

Quoted 3 lines

Is this a 2.4 or a 2.6 kernel?

The kernel is 2.6.8.1 with a patch for quirks.c to detect the adt7463 chip on my asus w1n laptop.

Quoted 5 lines

Can you send the current values of all your current settings by running something like:
head /proc/sys/dev/sensors/adt7463*/*

No sensors directory in /proc/sys/dev/ ! Shall i recompile again with some other options ?

Quoted 4 lines

which will work on 2.4. If you're using 2.6, you'll need to do something similar in /sys

Ah ! OK so here is what i get if i run "head /sys/bus/i2c/devices/0-002e" :

=> alarms <=
394

=> detach_state <=
0

=> fan1_input <=
0

=> fan1_min <=
500

=> fan1_pwm <=
0

=> fan1_pwm_enable <=
1

=> fan2_input <=
0

=> fan2_min <=
0

=> fan2_pwm <=
255

=> fan2_pwm_enable <=
1

=> fan3_input <=
0

=> fan3_min <=
0

=> fan3_pwm <=
255

=> fan3_pwm_enable <=
1

=> fan4_input <=
0

=> fan4_min <=
0

=> in0_input <=
0

=> in0_max <=
1576

=> in0_min <=
1419

=> in0_ref <=
1850

=> in1_input <=
1207

=> in1_max <=
1945

=> in1_min <=
1758

=> in2_input <=
3369

=> in2_max <=
3472

=> in2_min <=
3128

=> in3_input <=
3281

=> in3_max <=
5260

=> in3_min <=
4740

=> in4_input <=
0

=> in4_max <=
12625

=> in4_min <=
11375

=> name <=
adt7463

=> power <=
head: Erreur lors de la lecture `power': Is a directory

=> temp1_input <=
54000

=> temp1_max <=
60000

=> temp1_min <=
30000

=> temp2_input <=
48000

=> temp2_max <=
50000

=> temp2_min <=
20000

=> temp3_input <=
48000

=> temp3_max <=
50000

=> temp3_min <=
20000

=> vrm <=
91

I thought that the the chip itself could handle fan speed according to temperatures. Shall i use fancontrol instead ?

Thank you.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFCGft9oBxdxgioZBIRAgbGAJ9xOH8pb727lRi/6tvyfrVpMrXgsQCePhmi 4nWN8ZGuQ1gYGAX84QhCqnA>=DyR6
-----END PGP SIGNATURE-----

#29 lore raw
In reply to christophe

Did you know you can do integer math with BASH using:

% echo $(( 35 * 9 / 5 + 32 ))
95

Of course you've already written your simple C program, but this way it's all in one place.

:v)

Quoted 48 lines · christophe

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Le lundi 21 F?vrier 2005 20:22, vous avez ?crit :

Quoted 17 lines

The lm85 driver is the correct driver for the ADT7463. The problem you have is that you're using a version of lm85 that does not include the fan speed control functionality.

The initial port of the lm85 driver to the 2.6 kernel did *not* include the fan speed control features. They were added later (a couple of months ago.) with a patch.

Unfortunately, I don't have the patch handy. It was submitted to Greg KH for inclusion in his trees and from there should have made it's way into the Torvalds tree.

If you search the lm_sensors archives, you should find the patch. Alternatively, you might be able to get it from a GregKH kernel on kernel.org. Lastly, you might need a 2.6.10 or later kernel to get the additional functionality.

Quoted 6 lines

Then the pwm1_zone settings in sensors.conf will work. Until you upgrade the driver, they won't.

:v)

OK !!!
Thanks a lot for your help.
As i'd like to stay on kernel 2.6.8.1 for a few months more (too much work done on it), i decided to solve the problem by myself. I wrote a small programm in c to compute a value between 0 and 255 according to the temperature of cpu, gpu and motherboard. With a 4 lines shell script it can set fan speed (fan1_pwm) at a regular pace. And that worls great. Each time, a sensors gets a lot of celsius, the fan gets a lot of rpms....

Thanks to Jean, Mark and Philip
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFCG6zsoBxdxgioZBIRAnJCAJ97wL6HZYA/sOtkdyKb0jVr5H6g6QCgim3/ 7uX4E5AcgCcki6yBLkMt9nY>=h05n
-----END PGP SIGNATURE-----

#30 lore raw
In reply to christophe

Hi Philip,

Quoting myself:

Quoted 1 line

I'll apply your patch to CVS this evening.

I just did, sorry for the delay. I'll prepare a similar patch for Linux 2.6 now.

Signature · 1 line
Jean Delvare